1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-24 16:55:36 +03:00

Add vtxtable powerlabel to the OSD element (#8665)

Add vtxtable powerlabel to the OSD element
This commit is contained in:
Michael Keller 2019-08-06 23:52:40 +12:00 committed by GitHub
commit 95e9445a59
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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