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

Merge pull request #2782 from martinbudden/bf_osd_debug

Added debug fields to OSD
This commit is contained in:
Martin Budden 2017-04-12 17:18:18 +01:00 committed by GitHub
commit 996e8b31d9
4 changed files with 14 additions and 3 deletions

View file

@ -460,7 +460,7 @@ static void osdDrawSingleElement(uint8_t item)
break;
}
case OSD_AVG_CELL_VOLTAGE:
case OSD_AVG_CELL_VOLTAGE:
{
uint16_t cellV = getBatteryVoltage() * 10 / getBatteryCellCount();
buff[0] = SYM_BATT_5;
@ -468,8 +468,14 @@ static void osdDrawSingleElement(uint8_t item)
break;
}
default:
return;
case OSD_DEBUG:
{
sprintf(buff, "DBG %5d %5d %5d %5d", debug[0], debug[1], debug[2], debug[3]);
break;
}
default:
return;
}
displayWrite(osdDisplayPort, elemPosX + elemOffsetX, elemPosY, buff);
@ -518,6 +524,7 @@ void osdDrawElements(void)
osdDrawSingleElement(OSD_PIDRATE_PROFILE);
osdDrawSingleElement(OSD_MAIN_BATT_WARNING);
osdDrawSingleElement(OSD_AVG_CELL_VOLTAGE);
osdDrawSingleElement(OSD_DEBUG);
#ifdef GPS
#ifdef CMS
@ -559,6 +566,7 @@ void pgResetFn_osdConfig(osdConfig_t *osdProfile)
osdProfile->item_pos[OSD_PIDRATE_PROFILE] = OSD_POS(25, 10) | VISIBLE_FLAG;
osdProfile->item_pos[OSD_MAIN_BATT_WARNING] = OSD_POS(9, 10) | VISIBLE_FLAG;
osdProfile->item_pos[OSD_AVG_CELL_VOLTAGE] = OSD_POS(12, 2) | VISIBLE_FLAG;
osdProfile->item_pos[OSD_DEBUG] = OSD_POS(7, 12) | VISIBLE_FLAG;
osdProfile->item_pos[OSD_GPS_LAT] = OSD_POS(18, 14) | VISIBLE_FLAG;
osdProfile->item_pos[OSD_GPS_LON] = OSD_POS(18, 15) | VISIBLE_FLAG;