1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-24 16:55:36 +03:00

Add OSD_STATE_GROUP_ELEMENTS state to osdUpdate() and optimise DMA vs polled MAX7456 SPI access

This commit is contained in:
Steve Evans 2022-01-26 20:24:12 +00:00
parent 28e596a500
commit 2e8d026b4e
5 changed files with 68 additions and 45 deletions

View file

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