1
0
Fork 0
mirror of https://github.com/iNavFlight/inav.git synced 2025-07-14 03:49:58 +03:00

Merge pull request #7355 from MrD-RC/add-icon-for-VTx-power

Add icon to VTx power OSD element
This commit is contained in:
Paweł Spychalski 2021-09-14 14:49:39 +02:00 committed by GitHub
commit e5f8fc30ad
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View file

@ -56,6 +56,7 @@
#define SYM_AH_MI 0x24 // 036 Ah/mi
// 0x25 // 037 ASCII %
// 0x26 // 038 ASCII &
#define SYM_VTX_POWER 0x27 // 039 VTx Power
// 0x28 // 040 to 062 ASCII
#define SYM_AH_NM 0x3F // 063 Ah/NM
// 0x40 // 064 to 095 ASCII

View file

@ -1985,9 +1985,12 @@ static bool osdDrawSingleElement(uint8_t item)
vtxDeviceOsdInfo_t osdInfo;
vtxCommonGetOsdInfo(vtxCommonDevice(), &osdInfo);
tfp_sprintf(buff, "%c", SYM_VTX_POWER);
displayWrite(osdDisplayPort, elemPosX, elemPosY, buff);
tfp_sprintf(buff, "%c", osdInfo.powerIndexLetter);
if (isAdjustmentFunctionSelected(ADJUSTMENT_VTX_POWER_LEVEL)) TEXT_ATTRIBUTES_ADD_BLINK(elemAttr);
displayWriteWithAttr(osdDisplayPort, elemPosX, elemPosY, buff, elemAttr);
displayWriteWithAttr(osdDisplayPort, elemPosX+1, elemPosY, buff, elemAttr);
return true;
}