1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-15 20:35:33 +03:00

Add vtxtable powerlabel to the OSD element

This commit is contained in:
Miguel Angel Mulero Martinez 2019-08-05 13:50:22 +02:00
parent 64c85730a8
commit 458d97caad

View file

@ -1117,6 +1117,7 @@ static void osdElementVtxChannel(osdElementParms_t *element)
vtxCommonGetPowerIndex(vtxDevice, &vtxPower);
}
}
const char *vtxPowerLabel = vtxCommonLookupPowerName(vtxDevice, vtxPower);
char vtxStatusIndicator = '\0';
if (IS_RC_MODE_ACTIVE(BOXVTXCONTROLDISABLE)) {
@ -1128,9 +1129,9 @@ static void osdElementVtxChannel(osdElementParms_t *element)
if (vtxStatus & VTX_STATUS_LOCKED) {
tfp_sprintf(element->buff, "-:-:-:L");
} else if (vtxStatusIndicator) {
tfp_sprintf(element->buff, "%c:%s:%1d:%c", vtxBandLetter, vtxChannelName, vtxPower, vtxStatusIndicator);
tfp_sprintf(element->buff, "%c:%s:%s:%c", vtxBandLetter, vtxChannelName, vtxPowerLabel, vtxStatusIndicator);
} else {
tfp_sprintf(element->buff, "%c:%s:%1d", vtxBandLetter, vtxChannelName, vtxPower);
tfp_sprintf(element->buff, "%c:%s:%s", vtxBandLetter, vtxChannelName, vtxPowerLabel);
}
}
#endif // USE_VTX_COMMON