mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-26 09:45:37 +03:00
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
1 changed files with 4 additions and 2 deletions
|
@ -270,8 +270,10 @@ static uint8_t decodeEscFrame(void)
|
||||||
|
|
||||||
frameStatus = ESC_SENSOR_FRAME_COMPLETE;
|
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_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);
|
DEBUG_SET(DEBUG_ESC_SENSOR_TMP, escSensorMotor, escSensorData[escSensorMotor].temperature);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
frameStatus = ESC_SENSOR_FRAME_FAILED;
|
frameStatus = ESC_SENSOR_FRAME_FAILED;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue