nrf-rs / microbit

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

Fix blocking::Display::set_refresh_rate() #128

Closed mattheww closed 9 months ago

mattheww commented 9 months ago

The calculation in display::blocking::Display::set_refresh_rate was wrong for the micro:bit v2.

For example, set_refresh_rate(60) gave a refresh rate of 36Hz rather than 60Hz.

To see the difference, add

  display.set_refresh_rate(60);

to examples/display-blocking/src/main.rs