Skip to content

Commit

Permalink
Add vtxtable powerlabel to the OSD element
Browse files Browse the repository at this point in the history
  • Loading branch information
McGiverGim committed Aug 5, 2019
1 parent 64c8573 commit 458d97c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/main/osd/osd_elements.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand All @@ -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
Expand Down

0 comments on commit 458d97c

Please sign in to comment.