From 79684bdd0a1401642e0d7a2484e2758b2d15e470 Mon Sep 17 00:00:00 2001 From: fly Date: Tue, 3 Dec 2024 13:32:14 +0100 Subject: [PATCH] Fix issues with MCDU Signed-off-by: fly --- Pedestal/MCDU/firmware/src/main.rs | 7 ++----- Pedestal/flightgear/HID/FLC-Meow-Capt-MCDU.xml | 2 +- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/Pedestal/MCDU/firmware/src/main.rs b/Pedestal/MCDU/firmware/src/main.rs index 28a5adc..9347ebe 100644 --- a/Pedestal/MCDU/firmware/src/main.rs +++ b/Pedestal/MCDU/firmware/src/main.rs @@ -30,7 +30,7 @@ use crate::device::{CustomConfig, CustomInputReport}; macro_rules! define_output_states { ($bit:literal, $pin:ident, $output:ident, $io_pins:ident) => { - if $output.leds >= $bit { + if $output.leds & $bit == $bit { $io_pins.$pin.set_high(); } else { @@ -324,10 +324,7 @@ fn main() -> ! { if usb_dev.poll(&mut [&mut consumer]) { match consumer.device().read_report() { - Err(UsbHidError::WouldBlock) => { -// TODO somehow always gets stuck here -io_pins.pa10.set_high(); - } + Err(UsbHidError::WouldBlock) => { } Ok(output) => { // LED outputs define_output_states!(0x1, pa9, output, io_pins); // FM diff --git a/Pedestal/flightgear/HID/FLC-Meow-Capt-MCDU.xml b/Pedestal/flightgear/HID/FLC-Meow-Capt-MCDU.xml index 5ae18c8..a64d977 100644 --- a/Pedestal/flightgear/HID/FLC-Meow-Capt-MCDU.xml +++ b/Pedestal/flightgear/HID/FLC-Meow-Capt-MCDU.xml @@ -14,7 +14,7 @@ - unknown-0 + unknown /FLC/MCDU/Capt/leds