Out of bounds protection for telemetryItems[] array access and some code refactoring for telemetry value precision

This commit is contained in:
Damjan Adamic
2015-10-18 12:06:25 +02:00
parent 4ef9913f76
commit 082ba0893d
8 changed files with 49 additions and 28 deletions
+1
View File
@@ -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) {