Fix issues with MCDU
Signed-off-by: fly <merspieler@alwaysdata.net>
This commit is contained in:
parent
08127eb7b0
commit
79684bdd0a
2 changed files with 3 additions and 6 deletions
|
@ -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
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
</nasal>
|
||||
<!-- Outputs -->
|
||||
<event>
|
||||
<name>unknown-0</name>
|
||||
<name>unknown</name>
|
||||
<setting>
|
||||
<property>/FLC/MCDU/Capt/leds</property>
|
||||
</setting>
|
||||
|
|
Loading…
Reference in a new issue