Go to the documentation of this file. 65 #define MSP_PROTOCOL_VERSION 0 67 #define API_VERSION_MAJOR 1 // increment when major changes are made 68 #define API_VERSION_MINOR 37 // increment after a release, to set the version for all changes to go into the following release (if no changes to MSP are made between the releases, this can be reverted before the release) 70 #define API_VERSION_LENGTH 2 72 #define MULTIWII_IDENTIFIER "MWII"; 73 #define BASEFLIGHT_IDENTIFIER "BAFL"; 74 #define BETAFLIGHT_IDENTIFIER "BTFL" 75 #define CLEANFLIGHT_IDENTIFIER "CLFL" 76 #define INAV_IDENTIFIER "INAV" 77 #define RACEFLIGHT_IDENTIFIER "RCFL" 78 #define ARDUPILOT_IDENTIFIER "ARDU" 80 #define FLIGHT_CONTROLLER_IDENTIFIER_LENGTH 4 81 #define FLIGHT_CONTROLLER_VERSION_LENGTH 3 82 #define FLIGHT_CONTROLLER_VERSION_MASK 0xFFF 84 #define BOARD_IDENTIFIER_LENGTH 4 // 4 UPPER CASE alpha numeric characters that identify the board being used. 85 #define BOARD_HARDWARE_REVISION_LENGTH 2 88 #define CAP_PLATFORM_32BIT ((uint32_t)1 << 31) 89 #define CAP_BASEFLIGHT_CONFIG ((uint32_t)1 << 30) 92 #define CAP_NAVI_VERSION_BIT_4_MSB ((uint32_t)1 << 31) 93 #define CAP_NAVI_VERSION_BIT_3 ((uint32_t)1 << 30) 94 #define CAP_NAVI_VERSION_BIT_2 ((uint32_t)1 << 29) 95 #define CAP_NAVI_VERSION_BIT_1_LSB ((uint32_t)1 << 28) 97 #define CAP_DYNBALANCE ((uint32_t)1 << 2) 98 #define CAP_FLAPS ((uint32_t)1 << 3) 99 #define CAP_NAVCAP ((uint32_t)1 << 4) 100 #define CAP_EXTAUX ((uint32_t)1 << 5) 102 #define MSP_API_VERSION 1 //out message 103 #define MSP_FC_VARIANT 2 //out message 104 #define MSP_FC_VERSION 3 //out message 105 #define MSP_BOARD_INFO 4 //out message 106 #define MSP_BUILD_INFO 5 //out message 108 #define MSP_NAME 10 //out message Returns user set board name - betaflight 109 #define MSP_SET_NAME 11 //in message Sets board name - betaflight 114 #define MSP_BATTERY_CONFIG 32 115 #define MSP_SET_BATTERY_CONFIG 33 117 #define MSP_MODE_RANGES 34 //out message Returns all mode ranges 118 #define MSP_SET_MODE_RANGE 35 //in message Sets a single mode range 120 #define MSP_FEATURE_CONFIG 36 121 #define MSP_SET_FEATURE_CONFIG 37 123 #define MSP_BOARD_ALIGNMENT_CONFIG 38 124 #define MSP_SET_BOARD_ALIGNMENT_CONFIG 39 126 #define MSP_CURRENT_METER_CONFIG 40 127 #define MSP_SET_CURRENT_METER_CONFIG 41 129 #define MSP_MIXER_CONFIG 42 130 #define MSP_SET_MIXER_CONFIG 43 132 #define MSP_RX_CONFIG 44 133 #define MSP_SET_RX_CONFIG 45 135 #define MSP_LED_COLORS 46 136 #define MSP_SET_LED_COLORS 47 138 #define MSP_LED_STRIP_CONFIG 48 139 #define MSP_SET_LED_STRIP_CONFIG 49 141 #define MSP_RSSI_CONFIG 50 142 #define MSP_SET_RSSI_CONFIG 51 144 #define MSP_ADJUSTMENT_RANGES 52 145 #define MSP_SET_ADJUSTMENT_RANGE 53 148 #define MSP_CF_SERIAL_CONFIG 54 149 #define MSP_SET_CF_SERIAL_CONFIG 55 151 #define MSP_VOLTAGE_METER_CONFIG 56 152 #define MSP_SET_VOLTAGE_METER_CONFIG 57 154 #define MSP_SONAR_ALTITUDE 58 //out message get sonar altitude [cm] 156 #define MSP_PID_CONTROLLER 59 157 #define MSP_SET_PID_CONTROLLER 60 159 #define MSP_ARMING_CONFIG 61 160 #define MSP_SET_ARMING_CONFIG 62 165 #define MSP_RX_MAP 64 //out message get channel map (also returns number of channels total) 166 #define MSP_SET_RX_MAP 65 //in message set rx map, numchannels to set comes from MSP_RX_MAP 170 #define MSP_BF_CONFIG 66 //out message baseflight-specific settings that aren't covered elsewhere 171 #define MSP_SET_BF_CONFIG 67 //in message baseflight-specific settings save 173 #define MSP_REBOOT 68 //in message reboot settings 178 #define MSP_DATAFLASH_SUMMARY 70 //out message - get description of dataflash chip 179 #define MSP_DATAFLASH_READ 71 //out message - get content of dataflash chip 180 #define MSP_DATAFLASH_ERASE 72 //in message - erase dataflash chip 186 #define MSP_FAILSAFE_CONFIG 75 //out message Returns FC Fail-Safe settings 187 #define MSP_SET_FAILSAFE_CONFIG 76 //in message Sets FC Fail-Safe settings 189 #define MSP_RXFAIL_CONFIG 77 //out message Returns RXFAIL settings 190 #define MSP_SET_RXFAIL_CONFIG 78 //in message Sets RXFAIL settings 192 #define MSP_SDCARD_SUMMARY 79 //out message Get the state of the SD card 194 #define MSP_BLACKBOX_CONFIG 80 //out message Get blackbox settings 195 #define MSP_SET_BLACKBOX_CONFIG 81 //in message Set blackbox settings 197 #define MSP_TRANSPONDER_CONFIG 82 //out message Get transponder settings 198 #define MSP_SET_TRANSPONDER_CONFIG 83 //in message Set transponder settings 200 #define MSP_OSD_CONFIG 84 //out message Get osd settings - betaflight 201 #define MSP_SET_OSD_CONFIG 85 //in message Set osd settings - betaflight 203 #define MSP_OSD_CHAR_READ 86 //out message Get osd settings - betaflight 204 #define MSP_OSD_CHAR_WRITE 87 //in message Set osd settings - betaflight 206 #define MSP_VTX_CONFIG 88 //out message Get vtx settings - betaflight 207 #define MSP_SET_VTX_CONFIG 89 //in message Set vtx settings - betaflight 210 #define MSP_ADVANCED_CONFIG 90 211 #define MSP_SET_ADVANCED_CONFIG 91 213 #define MSP_FILTER_CONFIG 92 214 #define MSP_SET_FILTER_CONFIG 93 216 #define MSP_PID_ADVANCED 94 217 #define MSP_SET_PID_ADVANCED 95 219 #define MSP_SENSOR_CONFIG 96 220 #define MSP_SET_SENSOR_CONFIG 97 222 #define MSP_CAMERA_CONTROL 98 224 #define MSP_SET_ARMING_DISABLED 99 229 #define MSP_OSD_VIDEO_CONFIG 180 230 #define MSP_SET_OSD_VIDEO_CONFIG 181 233 #define MSP_DISPLAYPORT 182 235 #define MSP_COPY_PROFILE 183 237 #define MSP_BEEPER_CONFIG 184 238 #define MSP_SET_BEEPER_CONFIG 185 240 #define MSP_SET_TX_INFO 186 // in message Used to send runtime information from TX lua scripts to the firmware 241 #define MSP_TX_INFO 187 // out message Used by TX lua scripts to read information from the firmware 251 #define MSP_STATUS 101 //out message cycletime & errors_count & sensor present & box activation & current setting number 252 #define MSP_RAW_IMU 102 //out message 9 DOF 253 #define MSP_SERVO 103 //out message servos 254 #define MSP_MOTOR 104 //out message motors 255 #define MSP_RC 105 //out message rc channels and more 256 #define MSP_RAW_GPS 106 //out message fix, numsat, lat, lon, alt, speed, ground course 257 #define MSP_COMP_GPS 107 //out message distance home, direction home 258 #define MSP_ATTITUDE 108 //out message 2 angles 1 heading 259 #define MSP_ALTITUDE 109 //out message altitude, variometer 260 #define MSP_ANALOG 110 //out message vbat, powermetersum, rssi if available on RX 261 #define MSP_RC_TUNING 111 //out message rc rate, rc expo, rollpitch rate, yaw rate, dyn throttle PID 262 #define MSP_PID 112 //out message P I D coeff (9 are used currently) 269 #define MSP_BOXNAMES 116 //out message the aux switch names 270 #define MSP_PIDNAMES 117 //out message the PID names 271 #define MSP_WP 118 //out message get a WP, WP# is in the payload, returns (WP#, lat, lon, alt, flags) WP#0-home, WP#16-poshold 272 #define MSP_BOXIDS 119 //out message get the permanent IDs associated to BOXes 273 #define MSP_SERVO_CONFIGURATIONS 120 //out message All servo configurations. 274 #define MSP_NAV_STATUS 121 //out message Returns navigation status 275 #define MSP_NAV_CONFIG 122 //out message Returns navigation parameters 276 #define MSP_MOTOR_3D_CONFIG 124 //out message Settings needed for reversible ESCs 277 #define MSP_RC_DEADBAND 125 //out message deadbands for yaw alt pitch roll 278 #define MSP_SENSOR_ALIGNMENT 126 //out message orientation of acc,gyro,mag 279 #define MSP_LED_STRIP_MODECOLOR 127 //out message Get LED strip mode_color settings 280 #define MSP_VOLTAGE_METERS 128 //out message Voltage (per meter) 281 #define MSP_CURRENT_METERS 129 //out message Amperage (per meter) 282 #define MSP_BATTERY_STATE 130 //out message Connected/Disconnected, Voltage, Current Used 283 #define MSP_MOTOR_CONFIG 131 //out message Motor configuration (min/max throttle, etc) 284 #define MSP_GPS_CONFIG 132 //out message GPS configuration 285 #define MSP_COMPASS_CONFIG 133 //out message Compass configuration 286 #define MSP_ESC_SENSOR_DATA 134 //out message Extra ESC data from 32-Bit ESCs (Temperature, RPM) 288 #define MSP_SET_RAW_RC 200 //in message 8 rc chan 289 #define MSP_SET_RAW_GPS 201 //in message fix, numsat, lat, lon, alt, speed 290 #define MSP_SET_PID 202 //in message P I D coeff (9 are used currently) 293 #define MSP_SET_RC_TUNING 204 //in message rc rate, rc expo, rollpitch rate, yaw rate, dyn throttle PID, yaw expo 294 #define MSP_ACC_CALIBRATION 205 //in message no param 295 #define MSP_MAG_CALIBRATION 206 //in message no param 298 #define MSP_RESET_CONF 208 //in message no param 299 #define MSP_SET_WP 209 //in message sets a given WP (WP#,lat, lon, alt, flags) 300 #define MSP_SELECT_SETTING 210 //in message Select Setting Number (0-2) 301 #define MSP_SET_HEADING 211 //in message define a new heading hold direction 302 #define MSP_SET_SERVO_CONFIGURATION 212 //in message Servo settings 303 #define MSP_SET_MOTOR 214 //in message PropBalance function 304 #define MSP_SET_NAV_CONFIG 215 //in message Sets nav config parameters - write to the eeprom 305 #define MSP_SET_MOTOR_3D_CONFIG 217 //in message Settings needed for reversible ESCs 306 #define MSP_SET_RC_DEADBAND 218 //in message deadbands for yaw alt pitch roll 307 #define MSP_SET_RESET_CURR_PID 219 //in message resetting the current pid profile to defaults 308 #define MSP_SET_SENSOR_ALIGNMENT 220 //in message set the orientation of the acc,gyro,mag 309 #define MSP_SET_LED_STRIP_MODECOLOR 221 //in message Set LED strip mode_color settings 310 #define MSP_SET_MOTOR_CONFIG 222 //out message Motor configuration (min/max throttle, etc) 311 #define MSP_SET_GPS_CONFIG 223 //out message GPS configuration 312 #define MSP_SET_COMPASS_CONFIG 224 //out message Compass configuration 317 #define MSP_EEPROM_WRITE 250 //in message no param 318 #define MSP_RESERVE_1 251 //reserved for system usage 319 #define MSP_RESERVE_2 252 //reserved for system usage 320 #define MSP_DEBUGMSG 253 //out message debug string buffer 321 #define MSP_DEBUG 254 //out message debug1,debug2,debug3,debug4 322 #define MSP_RESERVE_3 255 //reserved for system usage 325 #define MSP_STATUS_EX 150 //out message cycletime, errors_count, CPU load, sensor present etc 326 #define MSP_UID 160 //out message Unique device ID 327 #define MSP_GPSSVINFO 164 //out message get Signal Strength (only U-Blox) 328 #define MSP_GPSSTATISTICS 166 //out message get GPS debugging data 329 #define MSP_ACC_TRIM 240 //out message get acc angle trim values 330 #define MSP_SET_ACC_TRIM 239 //in message set acc angle trim values 331 #define MSP_SERVO_MIX_RULES 241 //out message Returns servo mixer configuration 332 #define MSP_SET_SERVO_MIX_RULE 242 //in message Sets servo mixer configuration 333 #define MSP_SET_4WAY_IF 245 //in message Sets 4way interface 334 #define MSP_SET_RTC 246 //in message Sets the RTC clock 335 #define MSP_RTC 247 //out message Gets the RTC clock