From 076d853529471d2109fd3ff76abee3dbc41c9588 Mon Sep 17 00:00:00 2001 From: Anna Wiggins Date: Thu, 18 Nov 2021 19:07:47 +0000 Subject: [PATCH] Rename panel to be more generic. --- {sc-panel => flight-panel-2021-11}/Makefile | 0 flight-panel-2021-11/flight-panel.ino | 57 +++++++++++++++++++++ sc-panel/sc-panel.ino | 44 ---------------- 3 files changed, 57 insertions(+), 44 deletions(-) rename {sc-panel => flight-panel-2021-11}/Makefile (100%) create mode 100644 flight-panel-2021-11/flight-panel.ino delete mode 100644 sc-panel/sc-panel.ino diff --git a/sc-panel/Makefile b/flight-panel-2021-11/Makefile similarity index 100% rename from sc-panel/Makefile rename to flight-panel-2021-11/Makefile diff --git a/flight-panel-2021-11/flight-panel.ino b/flight-panel-2021-11/flight-panel.ino new file mode 100644 index 0000000..e83e959 --- /dev/null +++ b/flight-panel-2021-11/flight-panel.ino @@ -0,0 +1,57 @@ +#include + +Joystick joystick(false); + +void setup() { + // for (uint8_t i = 0; i < 14; i++) { + // joystick.AddButton(i, BUTTON_PASSTHRU); + // } + // joystick.AddButton(A0, BUTTON_PASSTHRU); + // joystick.AddButton(A1, BUTTON_PASSTHRU); + // joystick.AddButton(A2, BUTTON_PASSTHRU); + // joystick.AddButton(A3, BUTTON_PASSTHRU); + // joystick.AddButton(A4, BUTTON_PASSTHRU); + // joystick.AddButton(A5, BUTTON_PASSTHRU); + + // // 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(8, BUTTON_PASSTHRU); + joystick.AddButton(7, BUTTON_PASSTHRU); + joystick.AddButton(6, 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(10, BUTTON_PASSTHRU); + joystick.AddButton(11, BUTTON_PASSTHRU); + + // // Flight Modes + joystick.AddButton(A1, BUTTON_PASSTHRU); + joystick.AddButton(A2, BUTTON_PASSTHRU); + joystick.AddButton(A3, BUTTON_PASSTHRU); + joystick.AddButton(A4, BUTTON_PASSTHRU); + + // // Doors & Lights + // // TODO: Need multiplexer setup + joystick.AddButton(12, BUTTON_PULSED_DOUBLE_ACTION); + joystick.AddButton(A0, BUTTON_PULSED_DOUBLE_ACTION); + + // // Emergency Panel + // // TODO: Need multiplexer setup + joystick.AddButton(A5, BUTTON_PASSTHRU); + + joystick.Init(); +} + +void loop() { + joystick.Update(); +} diff --git a/sc-panel/sc-panel.ino b/sc-panel/sc-panel.ino deleted file mode 100644 index 3c5e229..0000000 --- a/sc-panel/sc-panel.ino +++ /dev/null @@ -1,44 +0,0 @@ -#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(); -}