mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-24 00:35:39 +03:00
add crsf rf_mode parameter to osd display
make osdRFmode = 0 default changes as requested fixed formatting and unittests remove 3.41 scaling on crsf LQ and simply osd drawing function Update rx.c changed loop to only go to 99 instead of 300
This commit is contained in:
parent
46b7a8586b
commit
925101cdb2
5 changed files with 34 additions and 20 deletions
|
@ -89,7 +89,6 @@ extern "C" {
|
|||
|
||||
void osdRefresh(timeUs_t currentTimeUs);
|
||||
uint16_t updateLinkQualitySamples(uint16_t value);
|
||||
uint16_t scaleCrsfLq(uint16_t lqvalue);
|
||||
#define LINK_QUALITY_SAMPLE_COUNT 16
|
||||
}
|
||||
|
||||
|
@ -311,16 +310,19 @@ TEST(LQTest, TestElementLQ_PROTOCOL_CRSF_VALUES)
|
|||
|
||||
// crsf setLinkQualityDirect 0-300;
|
||||
|
||||
for (uint16_t x = 0; x <= 300; x++) {
|
||||
// when x scaled
|
||||
setLinkQualityDirect(scaleCrsfLq(x));
|
||||
// then rxGetLinkQuality Osd should be x
|
||||
displayClearScreen(&testDisplayPort);
|
||||
osdRefresh(simulationTime);
|
||||
displayPortTestBufferSubstring(8, 1,"%c%3d", SYM_LINK_QUALITY, x);
|
||||
|
||||
for (uint8_t x = 0; x <= 99; x++) {
|
||||
for (uint8_t m = 0; m <= 4; m++) {
|
||||
// when x scaled
|
||||
setLinkQualityDirect(x);
|
||||
rxSetRfMode(m);
|
||||
// then rxGetLinkQuality Osd should be x
|
||||
// and RfMode should be m
|
||||
displayClearScreen(&testDisplayPort);
|
||||
osdRefresh(simulationTime);
|
||||
displayPortTestBufferSubstring(8, 1, "%c%1d:%2d", SYM_LINK_QUALITY, m, x);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
/*
|
||||
* Tests the LQ Alarms
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue