Class PowerMate
In: /home/oliver/dev/powermate/PowerMate.rb
Parent: Linux::Input
Interface to the Griffin PowerMate, a stainless steel dial like the volume regulator on a stereo
brightness    brightness=    button_pressed?    each_event    new    on_button_press    on_button_release    on_led_change    on_rotate    pulse_asleep=    pulse_asleep?    pulse_awake=    pulse_awake?    pulse_mode    pulse_mode=    pulse_speed    pulse_speed=   
Public Class methods
find and open the first PowerMate in the system, tries /dev/input/event0*, raises RuntimeError if no readable PowerMate is found (check those permissions, if it doesn't work!)
Public Instance methods
Button status
on_button_press( &block )
register button-press event-handler
on_button_release( &block )
register button-released event-handler
on_rotate( &block )
register dial event-handler
on_led_change( &block )
register LED status-change event-handler block gets a LedStatus Struct as argument
each_event( &block )
iterator over all events, dispatches to event specific hanlders before handling &block
last known LED brightness
brightness=( value )
set LED brightness
last known pulse speed
pulse_speed=( value )
set pulse speed 0-510, only values close to 255 make much sense
pulse_mode=( value )
set pulse mode (0,1 or 2)
last known pulse mode
pulse_awake=( value )
set pulse status when the host is running
pulse when host is running? (last known status)
pulse_asleep=( value )
set pulse status when the host is not running
pulse when host is not runnging? (last knwon status)