Rename panel to be more generic.

This commit is contained in:
Anna Rose 2021-11-18 19:07:47 +00:00
parent 21375fbbcd
commit 076d853529
3 changed files with 57 additions and 44 deletions

View File

@ -0,0 +1,57 @@
#include <Joystick.h>
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();
}

View File

@ -1,44 +0,0 @@
#include <Joystick.h>
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();
}