Rename panel to be more generic.
This commit is contained in:
parent
21375fbbcd
commit
076d853529
57
flight-panel-2021-11/flight-panel.ino
Normal file
57
flight-panel-2021-11/flight-panel.ino
Normal 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();
|
||||
}
|
|
@ -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();
|
||||
}
|
Loading…
Reference in New Issue
Block a user