added m0 stats to dfu screen

This commit is contained in:
Bernd Herzog 2023-04-23 19:52:38 +02:00
parent 812f0f8211
commit 850a79c9bb
3 changed files with 71 additions and 23 deletions

View file

@ -761,7 +761,13 @@ void SystemView::toggle_overlay() {
}
void SystemView::paint_overlay() {
static bool last_paint_state = false;
if (overlay_active){
// paint background only every other second
if ((((chTimeNow()>>10) & 0x01) == 0x01) == last_paint_state)
return;
last_paint_state = !last_paint_state;
this->overlay.set_dirty();
}
}