Out of bounds protection for telemetryItems[] array access and some code refactoring for telemetry value precision
This commit is contained in:
@@ -881,6 +881,7 @@ void displayGpsCoords(coord_t x, coord_t y, TelemetryItem & telemetryItem, LcdFl
|
||||
|
||||
void putsTelemetryChannelValue(coord_t x, coord_t y, uint8_t channel, lcdint_t value, LcdFlags att)
|
||||
{
|
||||
if (channel >= MAX_SENSORS) return;
|
||||
TelemetryItem & telemetryItem = telemetryItems[channel];
|
||||
TelemetrySensor & telemetrySensor = g_model.telemetrySensors[channel];
|
||||
if (telemetrySensor.unit == UNIT_DATETIME) {
|
||||
|
||||
Reference in New Issue
Block a user