#include Joystick joystick(false); void setup() { // Power switches joystick.AddButton(2, BUTTON_PULSED_DOUBLE_ACTION_SPLIT); joystick.AddButton(3, BUTTON_PULSED_DOUBLE_ACTION_SPLIT); joystick.AddButton(4, BUTTON_PULSED_DOUBLE_ACTION_SPLIT); joystick.AddButton(5, BUTTON_PULSED_DOUBLE_ACTION_SPLIT); // HUD modes joystick.AddButton(6, BUTTON_PASSTHRU); joystick.AddButton(7, BUTTON_PASSTHRU); joystick.AddButton(8, BUTTON_PASSTHRU); // Encoders // FIXME: these seem to be wired wrong. // joystick.AddEncoder(10, 11, ENCODER_PULSED_SPLIT); // joystick.AddEncoder(12, 13, ENCODER_PULSED_SPLIT); // Mining Modules joystick.AddButton(9, BUTTON_PASSTHRU); joystick.AddButton(A0, BUTTON_PASSTHRU); joystick.AddButton(A1, BUTTON_PASSTHRU); // Flight Modes joystick.AddButton(A2, BUTTON_PASSTHRU); joystick.AddButton(A3, BUTTON_PASSTHRU); joystick.AddButton(A4, BUTTON_PASSTHRU); joystick.AddButton(A5, BUTTON_PASSTHRU); // Doors & Lights // TODO: Need multiplexer setup // Emergency Panel // TODO: Need multiplexer setup joystick.Init(); } void loop() { joystick.Update(); }