mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-19 14:25:20 +03:00
Added KISS ESC sensor information for rpm and temperature to debug fields
This commit is contained in:
parent
c39ab90bc6
commit
8dbb156ea0
3 changed files with 10 additions and 3 deletions
|
@ -62,5 +62,7 @@ typedef enum {
|
||||||
DEBUG_ESC_SENSOR,
|
DEBUG_ESC_SENSOR,
|
||||||
DEBUG_SCHEDULER,
|
DEBUG_SCHEDULER,
|
||||||
DEBUG_STACK,
|
DEBUG_STACK,
|
||||||
|
DEBUG_ESC_SENSOR_RPM,
|
||||||
|
DEBUG_ESC_SENSOR_TMP,
|
||||||
DEBUG_COUNT
|
DEBUG_COUNT
|
||||||
} debugType_e;
|
} debugType_e;
|
||||||
|
|
|
@ -323,7 +323,9 @@ static const char * const lookupTableDebug[DEBUG_COUNT] = {
|
||||||
"ANGLERATE",
|
"ANGLERATE",
|
||||||
"ESC_SENSOR",
|
"ESC_SENSOR",
|
||||||
"SCHEDULER",
|
"SCHEDULER",
|
||||||
"STACK"
|
"STACK",
|
||||||
|
"ESC_SENSOR_RPM",
|
||||||
|
"ESC_SENSOR_TMP"
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef OSD
|
#ifdef OSD
|
||||||
|
@ -4041,7 +4043,7 @@ static void cliResource(char *cmdline)
|
||||||
cliPrintf("%c%02d: %s ", IO_GPIOPortIdx(ioRecs + i) + 'A', IO_GPIOPinIdx(ioRecs + i), owner);
|
cliPrintf("%c%02d: %s ", IO_GPIOPortIdx(ioRecs + i) + 'A', IO_GPIOPinIdx(ioRecs + i), owner);
|
||||||
if (ioRecs[i].index > 0) {
|
if (ioRecs[i].index > 0) {
|
||||||
cliPrintf("%d", ioRecs[i].index);
|
cliPrintf("%d", ioRecs[i].index);
|
||||||
}
|
}
|
||||||
cliPrintf("\r\n");
|
cliPrintf("\r\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -68,7 +68,7 @@ Byte 9: 8-bit CRC
|
||||||
DEBUG INFORMATION
|
DEBUG INFORMATION
|
||||||
-----------------
|
-----------------
|
||||||
|
|
||||||
set debug_mode = DEBUG_ESC_TELEMETRY in cli
|
set debug_mode = DEBUG_ESC_SENSOR in cli
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -235,6 +235,9 @@ static uint8_t decodeEscFrame(void)
|
||||||
combinedDataNeedsUpdate = true;
|
combinedDataNeedsUpdate = true;
|
||||||
|
|
||||||
frameStatus = ESC_SENSOR_FRAME_COMPLETE;
|
frameStatus = ESC_SENSOR_FRAME_COMPLETE;
|
||||||
|
|
||||||
|
DEBUG_SET(DEBUG_ESC_SENSOR_RPM, escSensorMotor, escSensorData[escSensorMotor].rpm);
|
||||||
|
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