mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-24 00:35:39 +03:00
added vtx osd channel variant element
This commit is contained in:
parent
18ee33e7a8
commit
5cf79f0b2b
1 changed files with 18 additions and 6 deletions
|
@ -96,6 +96,10 @@
|
||||||
type 2: Graphical bar showing battery used (grows as used)
|
type 2: Graphical bar showing battery used (grows as used)
|
||||||
type 3: Numeric % of remaining battery
|
type 3: Numeric % of remaining battery
|
||||||
type 4: Numeric % or used battery
|
type 4: Numeric % or used battery
|
||||||
|
|
||||||
|
VTX_CHANNEL
|
||||||
|
type 1: Contains Band:Channel:Power:Pit
|
||||||
|
type 2: Contains only Power
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
|
@ -1454,12 +1458,20 @@ static void osdElementVtxChannel(osdElementParms_t *element)
|
||||||
vtxStatusIndicator = 'P';
|
vtxStatusIndicator = 'P';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (vtxStatus & VTX_STATUS_LOCKED) {
|
switch (element->type) {
|
||||||
tfp_sprintf(element->buff, "-:-:-:L");
|
case OSD_ELEMENT_TYPE_2:
|
||||||
} else if (vtxStatusIndicator) {
|
tfp_sprintf(element->buff, "%s", vtxPowerLabel);
|
||||||
tfp_sprintf(element->buff, "%c:%s:%s:%c", vtxBandLetter, vtxChannelName, vtxPowerLabel, vtxStatusIndicator);
|
break;
|
||||||
} else {
|
|
||||||
tfp_sprintf(element->buff, "%c:%s:%s", vtxBandLetter, vtxChannelName, vtxPowerLabel);
|
default:
|
||||||
|
if (vtxStatus & VTX_STATUS_LOCKED) {
|
||||||
|
tfp_sprintf(element->buff, "-:-:-:L");
|
||||||
|
} else if (vtxStatusIndicator) {
|
||||||
|
tfp_sprintf(element->buff, "%c:%s:%s:%c", vtxBandLetter, vtxChannelName, vtxPowerLabel, vtxStatusIndicator);
|
||||||
|
} else {
|
||||||
|
tfp_sprintf(element->buff, "%c:%s:%s", vtxBandLetter, vtxChannelName, vtxPowerLabel);
|
||||||
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif // USE_VTX_COMMON
|
#endif // USE_VTX_COMMON
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue