Fix ESC_SENSOR blackbox debug array overflow for more than 4 mo… (#9087)
Fix ESC_SENSOR blackbox debug array overflow for more than 4 motors
This commit is contained in:
commit
e7d08cc8a1
|
@ -270,8 +270,10 @@ static uint8_t decodeEscFrame(void)
|
|||
|
||||
frameStatus = ESC_SENSOR_FRAME_COMPLETE;
|
||||
|
||||
if (escSensorMotor < 4) {
|
||||
DEBUG_SET(DEBUG_ESC_SENSOR_RPM, escSensorMotor, calcEscRpm(escSensorData[escSensorMotor].rpm) / 10); // output actual rpm/10 to fit in 16bit signed.
|
||||
DEBUG_SET(DEBUG_ESC_SENSOR_TMP, escSensorMotor, escSensorData[escSensorMotor].temperature);
|
||||
}
|
||||
} else {
|
||||
frameStatus = ESC_SENSOR_FRAME_FAILED;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue