mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-19 06:15:16 +03:00
Prepare OSD for iterative updating
This commit is contained in:
parent
ec4ad45528
commit
e6f5926131
4 changed files with 145 additions and 125 deletions
|
@ -139,10 +139,10 @@ void doTestArm(bool testEmpty = true)
|
|||
*/
|
||||
bool isSomeStatEnabled(void) {
|
||||
for (int i = 0; i < OSD_STAT_COUNT; i++) {
|
||||
if (osdConfigMutable()->enabled_stats[i]) {
|
||||
return true;
|
||||
}
|
||||
if (osdConfigMutable()->enabled_stats[i]) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -544,7 +544,7 @@ TEST(OsdTest, TestElementRssi)
|
|||
osdRefresh(simulationTime);
|
||||
|
||||
// then
|
||||
displayPortTestBufferSubstring(8, 1, "%c0", SYM_RSSI);
|
||||
displayPortTestBufferSubstring(8, 1, "%c 0", SYM_RSSI);
|
||||
|
||||
// when
|
||||
rssi = 512;
|
||||
|
|
|
@ -143,6 +143,12 @@ void displayPortTestBufferIsEmpty()
|
|||
{
|
||||
for (size_t i = 0; i < UNITTEST_DISPLAYPORT_BUFFER_LEN; i++) {
|
||||
EXPECT_EQ(' ', testDisplayPortBuffer[i]);
|
||||
if (testDisplayPortBuffer[i] != ' ') {
|
||||
testDisplayPortBuffer[UNITTEST_DISPLAYPORT_BUFFER_LEN - 1] = '\0';
|
||||
printf("FIRST ERROR AT:%d\r\n", (int)i);
|
||||
printf("DISPLAY:%s\r\n", testDisplayPortBuffer);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue