nrf-rs / microbit

A Rust crate for BBC micro:bit development
BSD Zero Clause License
276 stars 61 forks source link

Fix timer for LED-display (GreyscaleImage with a empty Row did not work) #77

Closed cathiele closed 3 years ago

cathiele commented 3 years ago

The fn disable_secondary(&mut self) function for the display timer did not work. This caused a crash when a GrayScaleImage had a row with just 0-Values.

robyoung commented 3 years ago

Do you have an example program that causes the crash? I can't seem to make it crash here.

cathiele commented 3 years ago

https://github.com/cathiele/microbit/blob/led-timer-crash-demo/examples/display-nonblocking/src/main.rs

there i changed the pattern of the heart to make it crash. when i use this version with a v2 board a whole row lights up and the controller hangs.

bors[bot] commented 3 years ago

Build succeeded: