diff --git a/code/Project_Mouse.rs b/code/Project_Mouse.rs index 8571abc5b0cc4fca6222931e47c4c2fbd0ab652f..5526bb76a2d632324314e3e45ba7643d18dfb6c4 100644 --- a/code/Project_Mouse.rs +++ b/code/Project_Mouse.rs @@ -290,8 +290,8 @@ const APP: () = { //LEDs let mut state: i8 = 0; - if Led_Counter == 10{ - Led_Counter = 0; + if *Led_Counter == 10{ + *Led_Counter = 0 as u8; if l_click.is_high().unwrap(){ if led_r.is_high().unwrap(){ state = 1; @@ -319,7 +319,7 @@ const APP: () = { toggle_led(state, led_r, led_g, led_b); } else{ - Led_Counter = Led_Counter + 1; + *Led_Counter = *Led_Counter + 1 as u8; } let (x, y) = cx.resources.pmw3389.read_status().unwrap();