diff --git a/Pedestal/PedestalConnectBox/README.md b/Pedestal/PedestalConnectBox/README.md
index 8602760..8928653 100644
--- a/Pedestal/PedestalConnectBox/README.md
+++ b/Pedestal/PedestalConnectBox/README.md
@@ -13,27 +13,28 @@ Inputs report usually via USB HID so you only have to map them.
* 1 Byte for the reportId (always value 1)
* 2 Bytes for the brightness of the integrated lighting (range 0-48000)
* 2 Bytes for the brightness of the rudder trim display (range 0-48000)
+* 2 Bytes for indicator LEDs, each bit controls one item:
+ * 0x0001: DOOR OPEN
+ * 0x0002: DOOR FAULT
+ * 0x0004: ENG 1 FAULT
+ * 0x0008: ENG 1 FIRE
+ * 0x0010: ENG 2 FAULT
+ * 0x0020: ENG 2 FIRE
+* 2 Bytes for ECAM page LEDs
+ * 0x0001: ECAM CLR
+ * 0x0002: ECAM APU
+ * 0x0004: ECAM ENG
+ * 0x0008: ECAM COND
+ * 0x0010: ECAM BLEED
+ * 0x0020: ECAM STS
+ * 0x0040: ECAM DOOR
+ * 0x0080: ECAM PRESS
+ * 0x0100: ECAM WHEEL
+ * 0x0200: ECAM ELEC
+ * 0x0400: ECAM F/CTL
+ * 0x0800: ECAM HYD
+ * 0x1000: ECAM FUEL
* 2 Bytes for generic controls (such as calibration)
-* 4 Bytes for indicator LEDs, each bit controls one item:
- * 0x00000001: ECAM CLR
- * 0x00000002: ECAM APU
- * 0x00000004: ECAM ENG
- * 0x00000008: ECAM COND
- * 0x00000010: ECAM BLEED
- * 0x00000020: ECAM STS
- * 0x00000040: ECAM DOOR
- * 0x00000080: ECAM PRESS
- * 0x00000100: ECAM WHEEL
- * 0x00000200: ECAM ELEC
- * 0x00000400: ECAM F/CTL
- * 0x00000800: ECAM HYD
- * 0x00001000: ECAM FUEL
- * 0x00002000: DOOR OPEN
- * 0x00004000: DOOR FAULT
- * 0x00008000: ENG 1 FAULT
- * 0x00010000: ENG 1 FIRE
- * 0x00020000: ENG 2 FAULT
- * 0x00040000: ENG 2 FIRE
## Pinout
### General pins
PA15|Backlight PWM
diff --git a/Pedestal/PedestalConnectBox/firmware/descriptor.wara b/Pedestal/PedestalConnectBox/firmware/descriptor.wara
index cbbbbe7..4e93229 100644
--- a/Pedestal/PedestalConnectBox/firmware/descriptor.wara
+++ b/Pedestal/PedestalConnectBox/firmware/descriptor.wara
@@ -51,11 +51,7 @@ usage = ['Generic Desktop', 'Z']
logicalValueRange = [0, 65535]
[[applicationCollection.inputReport.variableItem]]
-usageRange = ['Button', 'Button 1', 'Button 32']
-logicalValueRange = [0, 1]
-
-[[applicationCollection.inputReport.variableItem]]
-usageRange = ['Button', 'Button 1', 'Button 32']
+usageRange = ['Button', 'Button 1', 'Button 64']
logicalValueRange = [0, 1]
[[applicationCollection.outputReport]]
diff --git a/Pedestal/PedestalConnectBox/firmware/src/device.rs b/Pedestal/PedestalConnectBox/firmware/src/device.rs
index aa6a30c..41e4c99 100644
--- a/Pedestal/PedestalConnectBox/firmware/src/device.rs
+++ b/Pedestal/PedestalConnectBox/firmware/src/device.rs
@@ -34,21 +34,18 @@ pub const CUSTOM_DESCRIPTOR: &[u8] = &[
0x09, 0x32, // UsageId(Z[0x0032])
0x09, 0x32, // UsageId(Z[0x0032])
0x15, 0x00, // LogicalMinimum(0)
- 0x27, 0xFF, 0xFF, 0x00, 0x00, // LogicalMaximum(65,535)
+ 0x26, 0xFF, 0x0F, // LogicalMaximum(4,095)
0x95, 0x0B, // ReportCount(11)
0x75, 0x10, // ReportSize(16)
0x81, 0x02, // Input(Data, Variable, Absolute, NoWrap, Linear, PreferredState, NoNullPosition, BitField)
0xC0, // EndCollection()
0x05, 0x09, // UsagePage(Button[0x0009])
0x19, 0x01, // UsageIdMin(Button 1[0x0001])
- 0x29, 0x20, // UsageIdMax(Button 32[0x0020])
+ 0x29, 0x40, // UsageIdMax(Button 64[0x0040])
0x25, 0x01, // LogicalMaximum(1)
- 0x95, 0x20, // ReportCount(32)
+ 0x95, 0x40, // ReportCount(64)
0x75, 0x01, // ReportSize(1)
0x81, 0x02, // Input(Data, Variable, Absolute, NoWrap, Linear, PreferredState, NoNullPosition, BitField)
- 0x19, 0x01, // UsageIdMin(Button 1[0x0001])
- 0x29, 0x20, // UsageIdMax(Button 32[0x0020])
- 0x81, 0x02, // Input(Data, Variable, Absolute, NoWrap, Linear, PreferredState, NoNullPosition, BitField)
0x05, 0x0E, // UsagePage(Haptics[0x000E])
0x09, 0x21, // UsageId(Manual Trigger[0x0021])
0x09, 0x21, // UsageId(Manual Trigger[0x0021])
@@ -87,7 +84,8 @@ pub struct CustomOutputReport {
pub integ_lt: u16,
pub rudder_trim_brightness: u16,
pub generic: u16,
- pub leds: u32,
+ pub leds_ecam: u16,
+ pub leds: u16,
}
pub struct CustomDevice<'a, B: UsbBus> {
diff --git a/Pedestal/PedestalConnectBox/firmware/src/main.rs b/Pedestal/PedestalConnectBox/firmware/src/main.rs
index 0e2c28d..a12a24d 100644
--- a/Pedestal/PedestalConnectBox/firmware/src/main.rs
+++ b/Pedestal/PedestalConnectBox/firmware/src/main.rs
@@ -382,35 +382,35 @@ fn main() -> ! {
// Buttons
let mut buttons: u32 = 0;
- if io_pins.pa0.is_high() { buttons += 0x1; }
- if io_pins.pa1.is_high() { buttons += 0x2; }
- if io_pins.pa4.is_high() { buttons += 0x4; }
- if io_pins.pa8.is_high() { buttons += 0x8; }
- if io_pins.pa9.is_high() { buttons += 0x10; }
- if io_pins.pa10.is_high() { buttons += 0x20; }
- if io_pins.pb4.is_high() { buttons += 0x40; }
- if io_pins.pb5.is_high() { buttons += 0x80; }
- if io_pins.pb8.is_high() { buttons += 0x100; }
- if io_pins.pb9.is_high() { buttons += 0x200; }
- if io_pins.pc4.is_high() { buttons += 0x400; }
- if io_pins.pc5.is_high() { buttons += 0x800; }
- if io_pins.pc6.is_high() { buttons += 0x1000; }
- if io_pins.pc9.is_high() { buttons += 0x0200; }
- if io_pins.pc13.is_high() { buttons += 0x4000; }
- if io_pins.pc14.is_high() { buttons += 0x8000; }
- if io_pins.pc15.is_high() { buttons += 0x10000; }
- if io_pins.pd1.is_high() { buttons += 0x20000; }
- if io_pins.pd3.is_high() { buttons += 0x40000; }
- if io_pins.pd4.is_high() { buttons += 0x80000; }
- if io_pins.pd5.is_high() { buttons += 0x100000; }
- if io_pins.pd6.is_high() { buttons += 0x200000; }
- if io_pins.pd7.is_high() { buttons += 0x400000; }
- if io_pins.pd13.is_high() { buttons += 0x800000; }
- if io_pins.pd14.is_high() { buttons += 0x1000000; }
- if io_pins.pd15.is_high() { buttons += 0x2000000; }
- if io_pins.pe0.is_high() { buttons += 0x4000000; }
- if io_pins.pe5.is_high() { buttons += 0x8000000; }
- if io_pins.pe6.is_high() { buttons += 0x10000000; }
+ if io_pins.pa0.is_low() { buttons += 0x1; }
+ if io_pins.pa1.is_low() { buttons += 0x2; }
+ if io_pins.pa4.is_low() { buttons += 0x4; }
+ if io_pins.pa8.is_low() { buttons += 0x8; }
+ if io_pins.pa9.is_low() { buttons += 0x10; }
+ if io_pins.pa10.is_low() { buttons += 0x20; }
+ if io_pins.pb4.is_low() { buttons += 0x40; }
+ if io_pins.pb5.is_low() { buttons += 0x80; }
+ if io_pins.pb8.is_low() { buttons += 0x100; }
+ if io_pins.pb9.is_low() { buttons += 0x200; }
+ if io_pins.pc4.is_low() { buttons += 0x400; }
+ if io_pins.pc5.is_low() { buttons += 0x800; }
+ if io_pins.pc6.is_low() { buttons += 0x1000; }
+ if io_pins.pc9.is_low() { buttons += 0x2000; }
+ if io_pins.pc13.is_low() { buttons += 0x4000; }
+ if io_pins.pc14.is_low() { buttons += 0x8000; }
+ if io_pins.pc15.is_low() { buttons += 0x10000; }
+ if io_pins.pd1.is_low() { buttons += 0x20000; }
+ if io_pins.pd3.is_low() { buttons += 0x40000; }
+ if io_pins.pd4.is_low() { buttons += 0x80000; }
+ if io_pins.pd5.is_low() { buttons += 0x100000; }
+ if io_pins.pd6.is_low() { buttons += 0x200000; }
+ if io_pins.pd7.is_low() { buttons += 0x400000; }
+ if io_pins.pd13.is_low() { buttons += 0x800000; }
+ if io_pins.pd14.is_low() { buttons += 0x1000000; }
+ if io_pins.pd15.is_low() { buttons += 0x2000000; }
+ if io_pins.pe0.is_low() { buttons += 0x4000000; }
+ if io_pins.pe5.is_low() { buttons += 0x8000000; }
+ if io_pins.pe6.is_low() { buttons += 0x10000000; }
// ECAM Keyboard matrix
let mut ecam_buttons_read: u32 = 0;
@@ -494,15 +494,15 @@ fn main() -> ! {
let mut ecam_row = [0; 3];
let mut ecam_col = [0; 6];
// Match row and col
- if output.leds & 0x54A != 0 { ecam_row[0] = 1; }
- if output.leds & 0x1A94 != 0 { ecam_row[1] = 1; }
- if output.leds & 0x21 != 0 { ecam_row[2] = 1; }
- if output.leds & 0x6 != 0 { ecam_col[0] = 1; }
- if output.leds & 0x18 != 0 { ecam_col[1] = 1; }
- if output.leds & 0xE0 != 0 { ecam_col[2] = 1; }
- if output.leds & 0x300 != 0 { ecam_col[3] = 1; }
- if output.leds & 0xC00 != 0 { ecam_col[4] = 1; }
- if output.leds & 0x1001 != 0 { ecam_col[5] = 1; }
+ if output.leds_ecam & 0x54A != 0 { ecam_row[0] = 1; }
+ if output.leds_ecam & 0x1A94 != 0 { ecam_row[1] = 1; }
+ if output.leds_ecam & 0x21 != 0 { ecam_row[2] = 1; }
+ if output.leds_ecam & 0x6 != 0 { ecam_col[0] = 1; }
+ if output.leds_ecam & 0x18 != 0 { ecam_col[1] = 1; }
+ if output.leds_ecam & 0xE0 != 0 { ecam_col[2] = 1; }
+ if output.leds_ecam & 0x300 != 0 { ecam_col[3] = 1; }
+ if output.leds_ecam & 0xC00 != 0 { ecam_col[4] = 1; }
+ if output.leds_ecam & 0x1001 != 0 { ecam_col[5] = 1; }
// Set ECAM Out
define_ecam_output_states_row!(0, pb12, ecam_row, io_pins); // Row 1
define_ecam_output_states_row!(1, pe13, ecam_row, io_pins); // Row 2
@@ -514,12 +514,12 @@ fn main() -> ! {
define_ecam_output_states_col!(4, pd8, ecam_col, io_pins); // Col 5
define_ecam_output_states_col!(5, pb11, ecam_col, io_pins); // Col 6
// Other Indicators
- define_output_states!(0x2000, pb7, output, io_pins); // DOOR OPEN
- define_output_states!(0x4000, pb6, output, io_pins); // DOOR FAULT
- define_output_states!(0x8000, pe2, output, io_pins); // ENG 1 FAULT
- define_output_states!(0x10000, pe1, output, io_pins); // ENG 1 FIRE
- define_output_states!(0x20000, pe3, output, io_pins); // ENG 2 FAULT
- define_output_states!(0x40000, pe4, output, io_pins); // ENG 2 FIRE
+ define_output_states!(0x1, pb7, output, io_pins); // DOOR OPEN
+ define_output_states!(0x2, pb6, output, io_pins); // DOOR FAULT
+ define_output_states!(0x4, pe2, output, io_pins); // ENG 1 FAULT
+ define_output_states!(0x8, pe1, output, io_pins); // ENG 1 FIRE
+ define_output_states!(0x10, pe3, output, io_pins); // ENG 2 FAULT
+ define_output_states!(0x20, pe4, output, io_pins); // ENG 2 FIRE
// Check generic input field
// Calibration bit
diff --git a/Pedestal/flightgear/HID/FLC-Meow-Pedestal-box.xml b/Pedestal/flightgear/HID/FLC-Meow-Pedestal-box.xml
index 5bc8caf..e427a08 100644
--- a/Pedestal/flightgear/HID/FLC-Meow-Pedestal-box.xml
+++ b/Pedestal/flightgear/HID/FLC-Meow-Pedestal-box.xml
@@ -7,32 +7,274 @@
+
- vendor-0
+ unknown-0
/FLC/Pedestal/backlight
- vendor-1
+ unknown-1
+
+ /FLC/Pedestal/rudder-trim-display-brightness
+
+
+
+ unknown-2
/FLC/Pedestal/generic
- vendor-2
+ unknown-3
+
+ /FLC/Pedestal/leds-ecam
+
+
+
+ unknown-4
/FLC/Pedestal/leds
+
+
+ abs-z-translate-4
+ FloodTL Pedestal
+
+ property-scale
+ /controls/lighting/ped-flood-knb
+ 0.000244140625
+ 0
+ 1
+
+
+
+ abs-z-translate-7
+ FloodTL Main Panel
+
+ property-scale
+ /controls/lighting/main-flood-knb
+ 0.000244140625
+ 0
+ 1
+
+
+
+ abs-z-translate-8
+ IntegLT
+
+ property-scale
+ /controls/lighting/main-panel-knb
+ 0.000244140625
+ 0
+ 1
+
+
+
+
+ button-4
+ Switching ATT Capt
+ false
+
+ property-assign
+ /controls/navigation/switching/att-hdg
+ -1
+
+
+
+ property-assign
+ /controls/navigation/switching/att-hdg
+ 0
+
+
+
+
+ button-5
+ Switching AIR Capt
+ false
+
+ property-assign
+ /controls/navigation/switching/air-data
+ -1
+
+
+
+ property-assign
+ /controls/navigation/switching/air-data
+ 0
+
+
+
+
+ button-6
+ Switching ATT FO
+ false
+
+ property-assign
+ /controls/navigation/switching/att-hdg
+ 1
+
+
+
+ property-assign
+ /controls/navigation/switching/att-hdg
+ 0
+
+
+
+
+ button-9
+ Door Unlock
+ false
+
+ property-assign
+ /controls/doors/doorc-switch
+ -1
+
+
+
+ property-assign
+ /controls/doors/doorc-switch
+ 0
+
+
+
+
+ button-10
+ Door Lock
+ false
+
+ property-assign
+ /controls/doors/doorc-switch
+ 1
+
+
+
+ property-assign
+ /controls/doors/doorc-switch
+ 0
+
+
+
+
+ button-13
+ Switching AIR FO
+ false
+
+ property-assign
+ /controls/navigation/switching/air-data
+ -1
+
+
+
+ property-assign
+ /controls/navigation/switching/air-data
+ 0
+
+
+
+
+ button-14
+ Switching AIR FO
+ false
+
+ property-assign
+ /controls/navigation/switching/air-data
+ 1
+
+
+
+ property-assign
+ /controls/navigation/switching/air-data
+ 0
+
+
+
+
+ button-15
+ ENG Mode Crank
+ false
+
+ property-assign
+ /controls/ignition/start-sw
+ 0
+
+
+
+ property-assign
+ /controls/ignition/start-sw
+ 1
+
+
+
+
+ button-16
+ ENG Mode Start
+ false
+
+ property-assign
+ /controls/ignition/start-sw
+ 2
+
+
+
+ property-assign
+ /controls/ignition/start-sw
+ 1
+
+
+
+
+ button-28
+ ENG Master 1
+ false
+
+ property-assign
+ /controls/engines/engine[0]/cutoff-switch
+ 0
+
+
+
+ property-assign
+ /controls/engines/engine[0]/cutoff-switch
+ 1
+
+
+
+
+ button-29
+ ENG Master 2
+ false
+
+ property-assign
+ /controls/engines/engine[1]/cutoff-switch
+ 0
+
+
+
+ property-assign
+ /controls/engines/engine[1]/cutoff-switch
+ 1
+
+
+
diff --git a/Pedestal/flightgear/Joysticks/FLC-Meow-Pedestal-box.xml b/Pedestal/flightgear/Joysticks/FLC-Meow-Pedestal-box.xml
deleted file mode 100644
index 802005b..0000000
--- a/Pedestal/flightgear/Joysticks/FLC-Meow-Pedestal-box.xml
+++ /dev/null
@@ -1,65 +0,0 @@
-
-
-
- FLC Meow Pedestal box
-
- IntegLT
-
- property-scale
- /controls/lighting/main-panel-knb
- 0.5
- 1
- 1
-
-
-
- FloodTL
-
- property-scale
- /controls/lighting/main-flood-knb
- 0.5
- 1
- 1
-
-
-
-
-
-