mirror of
https://github.com/iNavFlight/inav.git
synced 2025-07-16 12:55:16 +03:00
[Revert PR] Add esc temperatur on CLI status
This commit is contained in:
parent
ce41344c8f
commit
c2448ef9e2
1 changed files with 15 additions and 0 deletions
|
@ -119,6 +119,9 @@ uint8_t cliMode = 0;
|
|||
#include "sensors/opflow.h"
|
||||
#include "sensors/sensors.h"
|
||||
#include "sensors/temperature.h"
|
||||
#ifdef USE_ESC_SENSOR
|
||||
#include "sensors/esc_sensor.h"
|
||||
#endif
|
||||
|
||||
#include "telemetry/frsky_d.h"
|
||||
#include "telemetry/telemetry.h"
|
||||
|
@ -3193,6 +3196,18 @@ static void cliStatus(char *cmdline)
|
|||
hardwareSensorStatusNames[getHwGPSStatus()]
|
||||
);
|
||||
|
||||
#ifdef USE_ESC_SENSOR
|
||||
uint8_t motorCount = getMotorCount();
|
||||
if (STATE(ESC_SENSOR_ENABLED) && motorCount > 0) {
|
||||
cliPrintLinef("ESC Temperature(s): Motor Count = %d", motorCount);
|
||||
for (uint8_t i = 0; i < motorCount; i++) {
|
||||
const escSensorData_t *escState = getEscTelemetry(i); //Get ESC telemetry
|
||||
cliPrintf("ESC %d: %d\260C, ", i, escState->temperature);
|
||||
}
|
||||
cliPrintLinefeed();
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef USE_SDCARD
|
||||
cliSdInfo(NULL);
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue