Wiican

Simple wiimote usage assistant and mapping manager

Skip to: Content | Sidebar | Footer

Wiican 0.3.0 released!

29 August, 2010 (23:14) | devpost | By: Felix

First of 0.3.x Wiican series released!

This release it’s focused on making easy for users to build and share mappings across network and provide developers a way to explore and manage the wiimote connection status through a d-bus interface.

Download Wiican 0.3.0

The d-bus api isn’t documented yet but i think it’s easy enough to understand. Next steps will include to fully document it and write some specs about how to evolve it in something really useful for developers so maybe some of them will include wiimote support by default in their apps, by using wiican d-bus api.

Wiican mapping packages files are in the same situation. Althought the wiican mapping editor dialog provides a great way to develop mappings, with on-the-fly syntax error highlightning and mapping validator at runtime, there is a great feature you need to set by hand in the info.desktop file: the translations. A spec about info.desktop file and how to evolve it (i.e. lp:) will make easier for mapping workers to create and share new mappings.

I hope you enjoy Wiican 0.3.0. Please submit any bugs or feature requests at Launchpad wiican bugs site!

Changelog:

DBus API

  • Wiican DBus service with an API to explore and manage wiimote connection status
  • Rebuilded the wminput launching library with GObject

Mapping manager

  • New mapping info file definition based on xdg DesktopFiles (translations supported)
  • Mappings could be imported and exported as Wiican Mapping Package (.wii files)
  • Mimetype for .wii wiican mapping package files: cute icon and mapping editor dialog launched if a package is opened
  • Smart mapping editor dialog: syntax validation and on-the-fly mapping launching

General:

  • Preferences stored in gconf
  • A set of wii device/status icons provided for the gtk icon theme sets
    • A set of mappings provided for:
    • Using nunchuk as mouse
    • Wiimote + nunchuk as gamepad
    • Classic controller as gamepad
    • Frets of Fire with wii guitar
VN:F [1.8.1_1037]
Rating: 0.0/10 (0 votes cast)

Wiican mimetype and syntax validator

16 August, 2010 (10:52) | devpost | By: Felix

Mapping editor dialog

Mapping editor dialog

Two enhancements has been almost finished for Wiican 0.3: a mimetype for wiican mapping packages and a syntax validator.

With the goal of making easier to edit and share mappings Wiican will provide a mimetype that allows to edit and execute a mapping from the mapping package directly. As you can see, in the new mapping editor dialog, there’s a toggle button to execute/stop the current mapping.

Mapping package mimetype

Mapping package mimetype

Wiican mapping packages owns their own mimetype icon. The default behaviour opening mapping packages it’s to display the mapping editor dialog where you can modify, execute and even save changes.

The other mayor changes its the syntax validator. Recently i contacted with L. Donnie Smith, the cwiid guy, asking for a wminput syntax validator. L. Donnie tolds me to build it from the wminput lexer/parser (coded in lex – yacc). After some tests i decided to code it in pure python using python-ply, the lex/yacc a python implementation, using wminput grammar. I think the original wminput grammar wasn’t coded thinking in on-the-fly validation, and some errors are not recognized so well. It’s functional now but it needs to be evolved.

I dedicate this post to L. Donnie for his help that made the validator possible.

VN:F [1.8.1_1037]
Rating: 9.3/10 (3 votes cast)

Guadalinex v7 includes Wiican 0.2.1

12 July, 2010 (21:16) | devpost | By: Felix

Guadalinex v7 Cover

Guadalinex v7 Cover

I’m very happy to announce the first time Wiican has been included in a distro: Guadalinex v7. Guadalinex it’s a Ubuntu based distro developed in Andalousia by the regional government with citizens as target users.

The version choosed: Wiican 0.2.1. I know Guadalinex team has strong criteria for selecting apps to be included by default, so this is another clue for taking wiican 0.2.x series as mature. I discovered it by a branch in Launchpad for specific guadalinex packaging, and then i could see those packages in Guadalinex v7 repository. The even apps selection in Guadalinex v7 wiki mention wiican.

I hope to release wiican 0.3 soon. My goal it’s to provide users an easy way to share their own mappings and, perhaps, a community of mappers will appear. I’ll talk with my friends at Guadalinex team: i think this feature will be interesting for them.

From this humble devlog i want to thanks the Guadalinex people for getting wiican to be used by their big amount of users.

VN:F [1.8.1_1037]
Rating: 9.5/10 (2 votes cast)

The new mapping manager: social WiiCan it’s near!

2 July, 2010 (00:08) | devpost | By: admin

It was hard, but the new mapping manager it’s fully funcional now!

Wiican Mapping Manager

As you can see, a new Import/Export buttons had been added. It means you could now share your mappings with your friends. Just export!: a tarball will be created containing the mapping info, the icon and the wminput mapping code itself.

That supposes a great change from wiican 0.2 series, where a mapping consist in one text file with wminput code and comments for info. Now a standard xdg DesktopEntry file saves the mapping info, so several languages could apply, and theme icons for mappings, and so on! Here an example file:

[Desktop Entry]
Name=Mouse
Name[es]=Ratón
Comment=Control mouse events with accelerometer and A+B buttons
Comment[es]=Controla eventos de ratón con acelerómetro y los botones A+B
Icon=gnome-mouse
X-Version=1.0
X-Authors=J. Félix Ontañón
Type=Wiican Mapping
Encoding=UTF-8

This is the mapping info file definition a mouse mapping. Translations for name and comment could be provided and the icon could take an absolute path, or even theme icon! This is how it looks in the new Mapping Editor dialog (Gnome human-interface-guide compliant):

WiiCan Mapping Editor Dialog

Every field could be edited from the dialog.

I feel this mapping edition, creation and export/import facilities could make a community of wiican-mappers. In next versions i’ll try to provide a mapping repository, with links from WiiCan, so mappers could share and vote their mappings in a centralized site and new users will discover mappings for their apps.

Let’s take WiiCan to the web-social sphere!

VN:F [1.8.1_1037]
Rating: 10.0/10 (2 votes cast)

Example clients for wiican-service

8 June, 2010 (22:48) | devpost | By: Felix

By wiican revision 77 we have now a dbus session service that can run on demand when a client requires it. This still being a dbus api draft for wiican but fully functional as i’ve showed in yesterday post.

A full example as been commited, but let me expose some minor examples.

Behold! the most simple client example:

import dbus
 
if __name__ == '__main__':
    bus = dbus.SessionBus()
 
    wiican_iface = dbus.Interface(bus.get_object ('org.gnome.Wiican',
        '/org/gnome/Wiican'), 'org.gnome.Wiican')
 
    wiican_iface.ConnectWiimote('', False)
    print 'Press 1+2 to connect wiimote'

In wiican_iface we got the Wiican dbus service interface proxy so the ConnectWiimote method could be called. Behind, a wminput will be launched in a thread, in this case, the two args means no config_file (so default mapping will be loaded) and daemon-mode off.

# The status codes
from wiican.service import WC_BLUEZ_PRESENT, WC_UINPUT_PRESENT,
    WC_WIIMOTE_DISCOVERING
 
# Check the current wiimote connection status before trying to connect
cur_status = wiican_iface.GetStatus()
 
if not cur_status && WC_UINPUT_PRESENT:
    print 'Not uinput module present'
elif not cur_status & WC_BLUEZ_PRESENT:
    print 'Not bluetooth adapter present'
elif cur_status & WC_WIIMOTE_DISCOVERING:
    print 'Wiimote still in use!'

Here is a way to know the wiimote status on-demand. The status property contains a bitwise xor operation of the WC_* constants.

import gobject
from dbus.mainloop.glib import DBusGMainLoop
 
# A callback to receive wiimote connection status changes
def status_cb(new_status):
    # Only check if wiimote it's disconnected
    if not new_status & WC_WIIMOTE_DISCOVERING:
        print 'Wiimote its disconnected'
 
DBusGMainLoop(set_as_default=True)
 
wiican_iface.connect_to_signal('StatusChanged', status_cb,
    dbus_interface='org.gnome.Wiican')
 
gobject.MainLoop().run()

And finally you could be noticed of events about wiimote connection status by binding a callback function to the StatusChanged signal.

The dbus api still in hard development, so this examples can not be taked as final but a proof of concept. Maybe i’ll fill a blueprint describing it in Wiican Launchpad site.

VN:F [1.8.1_1037]
Rating: 10.0/10 (2 votes cast)

Wiican riding dbus: first steps

7 June, 2010 (23:35) | devpost | By: Felix

Wiican dbus interface

Wiican dbus interface

I’ve started the programming of wiican running as dbus session service, and that’s the first snapshot (only for geeks, i’m afraid).

The goal is to give third apps the chance to configure and use wiimote for their own purposes. In recent dbus versions the dbus daemon could launch the wiican session service by demand, so there will be no need to run wiican before the apps could perform the wiimote association routine.

Under the Connect() method a wminput instance it’s raised, the third app can connect to StatusChanged() signal so it can track the wiimote association routine steps. The status it’s a combination of wiican status codes:

WC_DISABLED = 0
WC_BLUEZ_PRESENT = 1
WC_UINPUT_PRESENT = 2
WC_WIIMOTE_DISCOVERING = 4

So WC_BLUEZ_PRESENT | WC_UINPUT_PRESENT means that the system it’s able to run wminput, and WC_BLUEZ_PRESENT | WC_UINPUT_PRESENT | WC_WIIMOTE_DISCOVERING means that the wiimote it’s in use.

This interface it’s only a proof of concept but fully functional. If you want to test it, download the wiican_dbus.py and wminput.py files and remember to install wminput and manually load uinput module with 0666 perms.

VN:F [1.8.1_1037]
Rating: 10.0/10 (1 vote cast)

Wiican resumed

6 June, 2010 (21:47) | devpost | By: admin

Hi everyone!

Was a long time since Wiican 0.2.1, other projects as CommieCC, Wiimidi and, recently Pluglib, catch my time. Now i’m watching to Wiican 0.3 hoping to take it to the new desktop standards:

  • Get wiican riding the dbus
  • Provide a way to launch wiican as service with no gui
  • Integrate uinput module loading in new udev
  • Support for several wiimotes at same time

Some people ask me for some features in launchpad, i think that the new approx will make it real. In next posts i’ll advance some development details.

Cheers!

    VN:F [1.8.1_1037]
    Rating: 10.0/10 (1 vote cast)

    Frets on Fire

    6 January, 2010 (12:13) | Uncategorized | By: admin

    Frets on Fire mapping for Wiican

    gh

    VN:F [1.8.1_1037]
    Rating: 6.0/10 (1 vote cast)