1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-20 06:45:16 +03:00

Display stats on disarm

This commit is contained in:
Steve Evans 2021-12-26 18:08:50 +00:00
parent 20e41b5f66
commit b29ee58e0a
2 changed files with 4 additions and 6 deletions

View file

@ -1151,7 +1151,7 @@ void osdUpdate(timeUs_t currentTimeUs)
osdUpdateAlarms(); osdUpdateAlarms();
if (resumeRefreshAt) { if (resumeRefreshAt) {
osdState = OSD_STATE_IDLE; osdState = OSD_STATE_TRANSFER;
} else { } else {
osdState = OSD_STATE_UPDATE_CANVAS; osdState = OSD_STATE_UPDATE_CANVAS;
} }

View file

@ -709,7 +709,7 @@ TEST_F(OsdTest, TestAlarms)
// elements showing values in alarm range should flash // elements showing values in alarm range should flash
simulationTime += 1000000; simulationTime += 1000000;
simulationTime -= simulationTime % 1000000; simulationTime -= simulationTime % 1000000;
timeUs_t startTime = simulationTime; timeUs_t startTime = simulationTime + 0.25e6;
for (int i = 0; i < 15; i++) { for (int i = 0; i < 15; i++) {
// Blinking should happen at 2Hz // Blinking should happen at 2Hz
simulationTime = startTime + i*0.25e6; simulationTime = startTime + i*0.25e6;
@ -1083,7 +1083,6 @@ TEST_F(OsdTest, TestElementWarningsBattery)
// Delay as the warnings are flashing // Delay as the warnings are flashing
simulationTime += 1000000; simulationTime += 1000000;
simulationTime -= simulationTime % 1000000; simulationTime -= simulationTime % 1000000;
simulationTime += 0.25e6;
osdRefresh(); osdRefresh();
// then // then
@ -1099,7 +1098,6 @@ TEST_F(OsdTest, TestElementWarningsBattery)
// Delay as the warnings are flashing // Delay as the warnings are flashing
simulationTime += 1000000; simulationTime += 1000000;
simulationTime -= simulationTime % 1000000; simulationTime -= simulationTime % 1000000;
simulationTime += 0.25e6;
osdRefresh(); osdRefresh();
// then // then
@ -1206,7 +1204,7 @@ TEST_F(OsdTest, TestGpsElements)
// Sat indicator should blink and show "NC" // Sat indicator should blink and show "NC"
simulationTime += 1000000; simulationTime += 1000000;
simulationTime -= simulationTime % 1000000; simulationTime -= simulationTime % 1000000;
timeUs_t startTime = simulationTime; timeUs_t startTime = simulationTime + 0.25e6;
for (int i = 0; i < 15; i++) { for (int i = 0; i < 15; i++) {
// Blinking should happen at 2Hz // Blinking should happen at 2Hz
simulationTime = startTime + i*0.25e6; simulationTime = startTime + i*0.25e6;
@ -1230,7 +1228,7 @@ TEST_F(OsdTest, TestGpsElements)
// Sat indicator should blink and show "0" // Sat indicator should blink and show "0"
simulationTime += 1000000; simulationTime += 1000000;
simulationTime -= simulationTime % 1000000; simulationTime -= simulationTime % 1000000;
startTime = simulationTime; startTime = simulationTime + 0.25e6;
for (int i = 0; i < 15; i++) { for (int i = 0; i < 15; i++) {
// Blinking should happen at 2Hz // Blinking should happen at 2Hz
simulationTime = startTime + i*0.25e6; simulationTime = startTime + i*0.25e6;