1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-25 01:05:27 +03:00

Merge pull request #10789 from alexeystn/osd_aux_channel

Add AUX channel value to OSD (e.g. for Pilot's Heart Rate)
This commit is contained in:
haslinghuis 2022-10-13 21:07:40 +02:00 committed by GitHub
commit ec32baa955
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 33 additions and 2 deletions

View file

@ -1478,6 +1478,11 @@ switch (element->type) {
}
#endif // USE_VTX_COMMON
static void osdElementAuxValue(osdElementParms_t *element)
{
tfp_sprintf(element->buff, "%c%d", osdConfig()->aux_symbol, osdAuxValue);
}
static void osdElementWarnings(osdElementParms_t *element)
{
bool elementBlinking = false;
@ -1601,6 +1606,7 @@ static const uint8_t osdElementDisplayOrder[] = {
#ifdef USE_PERSISTENT_STATS
OSD_TOTAL_FLIGHTS,
#endif
OSD_AUX_VALUE,
};
// Define the mapping between the OSD element id and the function to draw it
@ -1717,6 +1723,7 @@ const osdElementDrawFn osdElementDrawFunction[OSD_ITEM_COUNT] = {
#ifdef USE_PERSISTENT_STATS
[OSD_TOTAL_FLIGHTS] = osdElementTotalFlights,
#endif
[OSD_AUX_VALUE] = osdElementAuxValue,
};
// Define the mapping between the OSD element id and the function to draw its background (static part)