mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-24 16:55:36 +03:00
Merge pull request #11169 from SteveCEvans/f411_osd
Reduce number of OSD bytes transferred in polled mode
This commit is contained in:
commit
3d9b7cf490
3 changed files with 5 additions and 7 deletions
|
@ -205,7 +205,7 @@ static uint8_t shadowBuffer[VIDEO_BUFFER_CHARS_PAL];
|
|||
//Max bytes to update in one call to max7456DrawScreen()
|
||||
|
||||
#define MAX_BYTES2SEND 250
|
||||
#define MAX_BYTES2SEND_POLLED 25
|
||||
#define MAX_BYTES2SEND_POLLED 20
|
||||
|
||||
static DMA_DATA uint8_t spiBuf[MAX_BYTES2SEND];
|
||||
|
||||
|
|
|
@ -1151,7 +1151,7 @@ void osdUpdate(timeUs_t currentTimeUs)
|
|||
osdUpdateAlarms();
|
||||
|
||||
if (resumeRefreshAt) {
|
||||
osdState = OSD_STATE_IDLE;
|
||||
osdState = OSD_STATE_TRANSFER;
|
||||
} else {
|
||||
osdState = OSD_STATE_UPDATE_CANVAS;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
timeUs_t startTime = simulationTime + 0.25e6;
|
||||
for (int i = 0; i < 15; i++) {
|
||||
// Blinking should happen at 2Hz
|
||||
simulationTime = startTime + i*0.25e6;
|
||||
|
@ -1083,7 +1083,6 @@ TEST_F(OsdTest, TestElementWarningsBattery)
|
|||
// Delay as the warnings are flashing
|
||||
simulationTime += 1000000;
|
||||
simulationTime -= simulationTime % 1000000;
|
||||
simulationTime += 0.25e6;
|
||||
osdRefresh();
|
||||
|
||||
// then
|
||||
|
@ -1099,7 +1098,6 @@ TEST_F(OsdTest, TestElementWarningsBattery)
|
|||
// Delay as the warnings are flashing
|
||||
simulationTime += 1000000;
|
||||
simulationTime -= simulationTime % 1000000;
|
||||
simulationTime += 0.25e6;
|
||||
osdRefresh();
|
||||
|
||||
// then
|
||||
|
@ -1206,7 +1204,7 @@ TEST_F(OsdTest, TestGpsElements)
|
|||
// Sat indicator should blink and show "NC"
|
||||
simulationTime += 1000000;
|
||||
simulationTime -= simulationTime % 1000000;
|
||||
timeUs_t startTime = simulationTime;
|
||||
timeUs_t startTime = simulationTime + 0.25e6;
|
||||
for (int i = 0; i < 15; i++) {
|
||||
// Blinking should happen at 2Hz
|
||||
simulationTime = startTime + i*0.25e6;
|
||||
|
@ -1230,7 +1228,7 @@ TEST_F(OsdTest, TestGpsElements)
|
|||
// Sat indicator should blink and show "0"
|
||||
simulationTime += 1000000;
|
||||
simulationTime -= simulationTime % 1000000;
|
||||
startTime = simulationTime;
|
||||
startTime = simulationTime + 0.25e6;
|
||||
for (int i = 0; i < 15; i++) {
|
||||
// Blinking should happen at 2Hz
|
||||
simulationTime = startTime + i*0.25e6;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue