class Artoo::Drivers::Ps3
The Ps3
controller driver behaviors
Public Instance Methods
axis_map()
click to toggle source
# File lib/artoo/drivers/ps3.rb, line 39 def axis_map BINDING_MAP[:ps3][:axis_map] end
currently_pressed?(b)
click to toggle source
Calls superclass method
Artoo::Drivers::Joystick#currently_pressed?
# File lib/artoo/drivers/ps3.rb, line 8 def currently_pressed?(b) if button_map.has_value?(b) button_values[button_map.key(b)] else super b end end
handle_joystick()
click to toggle source
# File lib/artoo/drivers/ps3.rb, line 16 def handle_joystick x0 = connection.axis(axis_map[:j0_x]) y0 = connection.axis(axis_map[:j0_y]) publish_joystick(0, x0, y0) x1 = connection.axis(axis_map[:j1_x]) y1 = connection.axis(axis_map[:j1_y]) publish_joystick(1, x1, y1) end