mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-25 17:25:20 +03:00
Added MSP_EXTRA_ESC_DATA MSP (#4140)
This commit is contained in:
parent
2b10a7ff01
commit
f4af2da6e8
2 changed files with 12 additions and 0 deletions
|
@ -108,6 +108,7 @@
|
|||
#include "sensors/gyro.h"
|
||||
#include "sensors/sensors.h"
|
||||
#include "sensors/sonar.h"
|
||||
#include "sensors/esc_sensor.h"
|
||||
|
||||
#include "telemetry/telemetry.h"
|
||||
|
||||
|
@ -930,6 +931,16 @@ static bool mspFcProcessOutCommand(uint8_t cmdMSP, sbuf_t *dst)
|
|||
break;
|
||||
#endif
|
||||
|
||||
#ifdef USE_DSHOT
|
||||
case MSP_ESC_SENSOR_DATA:
|
||||
sbufWriteU8(dst, getMotorCount());
|
||||
for (int i = 0; i < getMotorCount(); i++) {
|
||||
sbufWriteU8(dst, getEscSensorData(i)->temperature);
|
||||
sbufWriteU16(dst, getEscSensorData(i)->rpm);
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
|
||||
#ifdef GPS
|
||||
case MSP_GPS_CONFIG:
|
||||
sbufWriteU8(dst, gpsConfig()->provider);
|
||||
|
|
|
@ -271,6 +271,7 @@
|
|||
#define MSP_MOTOR_CONFIG 131 //out message Motor configuration (min/max throttle, etc)
|
||||
#define MSP_GPS_CONFIG 132 //out message GPS configuration
|
||||
#define MSP_COMPASS_CONFIG 133 //out message Compass configuration
|
||||
#define MSP_ESC_SENSOR_DATA 134 //out message Extra ESC data from 32-Bit ESCs (Temperature, RPM)
|
||||
|
||||
#define MSP_SET_RAW_RC 200 //in message 8 rc chan
|
||||
#define MSP_SET_RAW_GPS 201 //in message fix, numsat, lat, lon, alt, speed
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue