mirror of
https://github.com/iNavFlight/inav.git
synced 2025-07-25 17:25:18 +03:00
Debug motor eRPM
This commit is contained in:
parent
1ceb0970f7
commit
85da1894d6
3 changed files with 7 additions and 1 deletions
|
@ -74,5 +74,6 @@ typedef enum {
|
||||||
DEBUG_FFT,
|
DEBUG_FFT,
|
||||||
DEBUG_FFT_TIME,
|
DEBUG_FFT_TIME,
|
||||||
DEBUG_FFT_FREQ,
|
DEBUG_FFT_FREQ,
|
||||||
|
DEBUG_ERPM,
|
||||||
DEBUG_COUNT
|
DEBUG_COUNT
|
||||||
} debugType_e;
|
} debugType_e;
|
||||||
|
|
|
@ -81,7 +81,7 @@ tables:
|
||||||
values: ["NONE", "GYRO", "NOTCH", "NAV_LANDING", "FW_ALTITUDE", "AGL", "FLOW_RAW",
|
values: ["NONE", "GYRO", "NOTCH", "NAV_LANDING", "FW_ALTITUDE", "AGL", "FLOW_RAW",
|
||||||
"FLOW", "SBUS", "FPORT", "ALWAYS", "STAGE2", "SAG_COMP_VOLTAGE",
|
"FLOW", "SBUS", "FPORT", "ALWAYS", "STAGE2", "SAG_COMP_VOLTAGE",
|
||||||
"VIBE", "CRUISE", "REM_FLIGHT_TIME", "SMARTAUDIO", "ACC", "GENERIC", "ITERM_RELAX",
|
"VIBE", "CRUISE", "REM_FLIGHT_TIME", "SMARTAUDIO", "ACC", "GENERIC", "ITERM_RELAX",
|
||||||
"D_BOOST", "ANTIGRAVITY", "FFT", "FFT_TIME", "FFT_FREQ"]
|
"D_BOOST", "ANTIGRAVITY", "FFT", "FFT_TIME", "FFT_FREQ", "ERPM"]
|
||||||
- name: async_mode
|
- name: async_mode
|
||||||
values: ["NONE", "GYRO", "ALL"]
|
values: ["NONE", "GYRO", "ALL"]
|
||||||
- name: aux_operator
|
- name: aux_operator
|
||||||
|
|
|
@ -112,6 +112,11 @@ static bool escSensorDecodeFrame(void)
|
||||||
escSensorData[escSensorMotor].current = ((uint16_t)telemetryBuffer[3]) << 8 | telemetryBuffer[4];
|
escSensorData[escSensorMotor].current = ((uint16_t)telemetryBuffer[3]) << 8 | telemetryBuffer[4];
|
||||||
escSensorData[escSensorMotor].erpm = ((uint16_t)telemetryBuffer[7]) << 8 | telemetryBuffer[8];
|
escSensorData[escSensorMotor].erpm = ((uint16_t)telemetryBuffer[7]) << 8 | telemetryBuffer[8];
|
||||||
escSensorDataNeedsUpdate = true;
|
escSensorDataNeedsUpdate = true;
|
||||||
|
|
||||||
|
if (escSensorMotor < 4) {
|
||||||
|
DEBUG_SET(DEBUG_ERPM, escSensorMotor, escSensorData[escSensorMotor].erpm);
|
||||||
|
}
|
||||||
|
|
||||||
return ESC_SENSOR_FRAME_COMPLETE;
|
return ESC_SENSOR_FRAME_COMPLETE;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue