mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-13 19:40:31 +03:00
Revive MSP message for mag declination (#13232)
Add MSP message for mag declination
This commit is contained in:
parent
15246eebab
commit
58933f9972
2 changed files with 15 additions and 2 deletions
|
@ -1457,6 +1457,11 @@ case MSP_NAME:
|
|||
#endif
|
||||
break;
|
||||
|
||||
#ifdef USE_MAG
|
||||
case MSP_COMPASS_CONFIG:
|
||||
sbufWriteU16(dst, imuConfig()->mag_declination);
|
||||
break;
|
||||
#endif
|
||||
// Deprecated in favor of MSP_MOTOR_TELEMETY as of API version 1.42
|
||||
// Used by DJI FPV
|
||||
case MSP_ESC_SENSOR_DATA:
|
||||
|
@ -2842,7 +2847,15 @@ static mspResult_e mspProcessInCommand(mspDescriptor_t srcDesc, int16_t cmdMSP,
|
|||
gpsConfigMutable()->gps_ublox_use_galileo = sbufReadU8(src);
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
|
||||
#ifdef USE_MAG
|
||||
case MSP_SET_COMPASS_CONFIG:
|
||||
imuConfigMutable()->mag_declination = sbufReadU16(src);
|
||||
break;
|
||||
#endif
|
||||
|
||||
#ifdef USE_GPS
|
||||
#ifdef USE_GPS_RESCUE
|
||||
case MSP_SET_GPS_RESCUE:
|
||||
gpsRescueConfigMutable()->maxRescueAngle = sbufReadU16(src);
|
||||
|
|
|
@ -280,7 +280,7 @@
|
|||
#define MSP_BATTERY_STATE 130 //out message Connected/Disconnected, Voltage, Current Used
|
||||
#define MSP_MOTOR_CONFIG 131 //out message Motor configuration (min/max throttle, etc)
|
||||
#define MSP_GPS_CONFIG 132 //out message GPS configuration
|
||||
//DEPRECATED - #define MSP_COMPASS_CONFIG 133 //out message Compass 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_GPS_RESCUE 135 //out message GPS Rescue angle, returnAltitude, descentDistance, groundSpeed, sanityChecks and minSats
|
||||
#define MSP_GPS_RESCUE_PIDS 136 //out message GPS Rescue throttleP and velocity PIDS + yaw P
|
||||
|
@ -319,7 +319,7 @@
|
|||
#define MSP_SET_LED_STRIP_MODECOLOR 221 //in message Set LED strip mode_color settings
|
||||
#define MSP_SET_MOTOR_CONFIG 222 //out message Motor configuration (min/max throttle, etc)
|
||||
#define MSP_SET_GPS_CONFIG 223 //out message GPS configuration
|
||||
//DEPRECATED - #define MSP_SET_COMPASS_CONFIG 224 //out message Compass configuration
|
||||
#define MSP_SET_COMPASS_CONFIG 224 //out message Compass configuration
|
||||
#define MSP_SET_GPS_RESCUE 225 //in message GPS Rescue angle, returnAltitude, descentDistance, groundSpeed and sanityChecks
|
||||
#define MSP_SET_GPS_RESCUE_PIDS 226 //in message GPS Rescue throttleP and velocity PIDS + yaw P
|
||||
#define MSP_SET_VTXTABLE_BAND 227 //in message set vtxTable band/channel data (one band at a time)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue