diff --git a/src/parser.c b/src/parser.c index 0986a74..e8cb129 100644 --- a/src/parser.c +++ b/src/parser.c @@ -190,7 +190,6 @@ static void identifyMainFields(flightLog_t *log, flightLogFrameDef_t *frameDef) if (startsWith(fieldName, "motor[")) { int motorIndex = atoi(fieldName + strlen("motor[")); - if (motorIndex >= 0 && motorIndex < FLIGHT_LOG_MAX_MOTORS) { log->mainFieldIndexes.motor[motorIndex] = fieldIndex; } @@ -231,9 +230,10 @@ static void identifyMainFields(flightLog_t *log, flightLogFrameDef_t *frameDef) log->mainFieldIndexes.accSmooth[axisIndex] = fieldIndex; } else if (startsWith(fieldName, "servo[")) { - int servoIndex = atoi(fieldName + strlen("servo[")); - - log->mainFieldIndexes.servo[servoIndex] = fieldIndex; + int servoIndex = atoi(fieldName + strlen("servo[")); + if (servoIndex >= 0 && servoIndex < FLIGHT_LOG_MAX_SERVOS) { + log->mainFieldIndexes.servo[servoIndex] = fieldIndex; + } } else if (strcmp(fieldName, "vbatLatest") == 0) { log->mainFieldIndexes.vbatLatest = fieldIndex; } else if (strcmp(fieldName, "vbat") == 0) { diff --git a/src/parser.h b/src/parser.h index d29726d..f082038 100644 --- a/src/parser.h +++ b/src/parser.h @@ -16,8 +16,8 @@ #define FLIGHT_LOG_FIELD_INDEX_ITERATION 0 #define FLIGHT_LOG_FIELD_INDEX_TIME 1 -#define FLIGHT_LOG_MAX_MOTORS 8 -#define FLIGHT_LOG_MAX_SERVOS 18 +#define FLIGHT_LOG_MAX_MOTORS 16 +#define FLIGHT_LOG_MAX_SERVOS 32 typedef enum FirmwareType { FIRMWARE_TYPE_UNKNOWN = 0, diff --git a/src/version.h b/src/version.h index af74044..ae6fe18 100644 --- a/src/version.h +++ b/src/version.h @@ -1,4 +1,4 @@ -#define BBLTOOLS_VERSION 7.99.0 +#define BBLTOOLS_VERSION 7.99.1 #ifdef BLACKBOX_VERSION #undef BBLTOOLS_VERSION