-
Notifications
You must be signed in to change notification settings - Fork 1.9k
MSP Messages reference
Warning: Work in progress
Generated with Gemini 2.5 Pro Preview O3-25 on source code files
Verification needed, exercise caution until completely verified for accuracy and cleared
Refer to source for absolute certainty
For details on the structure of MSP, see The wiki page
Basic Concepts:
-
MSP Versions:
- MSPv1: The original protocol. Uses command IDs from 0 to 254.
-
MSPv2: An extended version. Uses command IDs from 0x1000 onwards. Can be encapsulated within an MSPv1 frame (
MSP_V2_FRAMEID 255) or used natively.
-
Direction:
- Out: Message sent from the Flight Controller (FC) to the Ground Control Station (GCS), OSD, or other peripheral. Usually a request for data or status.
- In: Message sent from the GCS/OSD to the FC. Usually a command to set a parameter, perform an action, or provide data to the FC.
- In/Out: Can function in both directions, often used for getting/setting related data where the request might specify a subset (e.g., get specific waypoint, get specific setting info).
- Payload: The data carried by the message, following the command ID. The structure (order, type, size of fields) is critical.
-
Data Types: Common C data types are used (
uint8_t,int16_t,uint32_t,float, etc.). Pay close attention to signed vs. unsigned types and sizes. -
Packing: Data fields are packed sequentially in the order listed.
__attribute__((packed))is often used in struct definitions to prevent compiler padding.
- Direction: Out
- Description: Provides the MSP protocol version and the INAV API version.
-
Payload:
Field C Type Size (Bytes) Description mspProtocolVersionuint8_t1 MSP Protocol version ( MSP_PROTOCOL_VERSION, typically 0).apiVersionMajoruint8_t1 INAV API Major version ( API_VERSION_MAJOR).apiVersionMinoruint8_t1 INAV API Minor version ( API_VERSION_MINOR). - Notes: Used by configurators to check compatibility.
- Direction: Out
- Description: Identifies the flight controller firmware variant (e.g., INAV, Betaflight).
-
Payload:
Field C Type Size (Bytes) Description fcVariantIdentifierchar[4]4 4-character identifier string (e.g., "INAV"). Defined by flightControllerIdentifier. -
Notes: See
FLIGHT_CONTROLLER_IDENTIFIER_LENGTH.
- Direction: Out
- Description: Provides the specific version number of the flight controller firmware.
-
Payload:
Field C Type Size (Bytes) Description fcVersionMajoruint8_t1 Firmware Major version ( FC_VERSION_MAJOR).fcVersionMinoruint8_t1 Firmware Minor version ( FC_VERSION_MINOR).fcVersionPatchuint8_t1 Firmware Patch level ( FC_VERSION_PATCH_LEVEL).
- Direction: Out
- Description: Provides information about the specific hardware board and its capabilities.
-
Payload:
Field C Type Size (Bytes) Description boardIdentifierchar[4]4 4-character UPPER CASE board identifier ( TARGET_BOARD_IDENTIFIER).hardwareRevisionuint16_t2 Hardware revision number. 0 if not detected ( USE_HARDWARE_REVISION_DETECTION).osdSupportuint8_t1 OSD chip type: 0=None, 2=Onboard ( USE_OSD). INAV does not support slave OSD (1).commCapabilitiesuint8_t1 Communication capabilities bitmask: Bit 0=VCP support ( USE_VCP), Bit 1=SoftSerial support (USE_SOFTSERIAL1/2).targetNameLengthuint8_t1 Length of the target name string that follows. targetNamechar[]Variable Target name string (e.g., "MATEKF405"). Length given by previous field. -
Notes:
BOARD_IDENTIFIER_LENGTHis 4.
- Direction: Out
- Description: Provides build date, time, and Git revision of the firmware.
-
Payload:
Field C Type Size (Bytes) Description buildDatechar[11]11 Build date string (e.g., "Dec 31 2023"). BUILD_DATE_LENGTH.buildTimechar[8]8 Build time string (e.g., "23:59:59"). BUILD_TIME_LENGTH.gitRevisionchar[7]7 Short Git revision string. GIT_SHORT_REVISION_LENGTH.
- Direction: Out
- Description: Retrieves legacy INAV-specific PID controller related settings. Many fields are now obsolete or placeholders.
-
Payload:
Field C Type Size (Bytes) Units Description legacyAsyncProcessinguint8_t1 - Legacy, unused. Always 0. legacyAsyncValue1uint16_t2 - Legacy, unused. Always 0. legacyAsyncValue2uint16_t2 - Legacy, unused. Always 0. headingHoldRateLimituint8_t1 deg/s Max rate for heading hold P term ( pidProfile()->heading_hold_rate_limit).headingHoldLpfFrequint8_t1 Hz Fixed LPF frequency for heading hold error ( HEADING_HOLD_ERROR_LPF_FREQ).legacyYawJumpLimituint16_t2 - Legacy, unused. Always 0. legacyGyroLpfuint8_t1 Enum Fixed value GYRO_LPF_256HZ.accLpfHzuint8_t1 Hz Accelerometer LPF frequency ( accelerometerConfig()->acc_lpf_hz).reserved1uint8_t1 - Reserved. Always 0. reserved2uint8_t1 - Reserved. Always 0. reserved3uint8_t1 - Reserved. Always 0. reserved4uint8_t1 - Reserved. Always 0. -
Notes: Superseded by
MSP2_PIDfor core PIDs and other specific messages for filter settings.
- Direction: In
- Description: Sets legacy INAV-specific PID controller related settings.
-
Payload: (Matches
MSP_INAV_PIDstructure)Field C Type Size (Bytes) Units Description legacyAsyncProcessinguint8_t1 - Legacy, ignored. legacyAsyncValue1uint16_t2 - Legacy, ignored. legacyAsyncValue2uint16_t2 - Legacy, ignored. headingHoldRateLimituint8_t1 deg/s Sets pidProfileMutable()->heading_hold_rate_limit.headingHoldLpfFrequint8_t1 Hz Ignored (fixed value HEADING_HOLD_ERROR_LPF_FREQused).legacyYawJumpLimituint16_t2 - Legacy, ignored. legacyGyroLpfuint8_t1 Enum Ignored (was gyro LPF). accLpfHzuint8_t1 Hz Sets accelerometerConfigMutable()->acc_lpf_hz.reserved1uint8_t1 - Ignored. reserved2uint8_t1 - Ignored. reserved3uint8_t1 - Ignored. reserved4uint8_t1 - Ignored. - Notes: Expects 15 bytes.
- Direction: Out
- Description: Returns the user-defined craft name.
-
Payload:
Field C Type Size (Bytes) Description craftNamechar[]Variable The craft name string ( systemConfig()->craftName). Null termination is not explicitly sent, the length is determined by the payload size.
- Direction: In
- Description: Sets the user-defined craft name.
-
Payload:
Field C Type Size (Bytes) Description craftNamechar[]1 to MAX_NAME_LENGTHThe new craft name string. Automatically null-terminated by the FC. -
Notes: Maximum length is
MAX_NAME_LENGTH.
- Direction: Out
- Description: Retrieves navigation position hold and general manual/auto flight parameters. Some parameters depend on the platform type (Multirotor vs Fixed Wing).
-
Payload:
Field C Type Size (Bytes) Units Description userControlModeuint8_t1 Enum Navigation user control mode ( navConfig()->general.flags.user_control_mode).maxAutoSpeeduint16_t2 cm/s Max speed in autonomous modes ( navConfig()->general.max_auto_speed).maxAutoClimbRateuint16_t2 cm/s Max climb rate in autonomous modes (uses fw.max_auto_climb_rateormc.max_auto_climb_ratebased on platform).maxManualSpeeduint16_t2 cm/s Max speed in manual modes with GPS aiding ( navConfig()->general.max_manual_speed).maxManualClimbRateuint16_t2 cm/s Max climb rate in manual modes with GPS aiding (uses fw.max_manual_climb_rateormc.max_manual_climb_rate).mcMaxBankAngleuint8_t1 degrees Max bank angle for multirotor position hold ( navConfig()->mc.max_bank_angle).mcAltHoldThrottleTypeuint8_t1 Enum Altitude Hold throttle control type ( navConfig()->mc.althold_throttle_type).mcHoverThrottleuint16_t2 PWM Multirotor hover throttle ( currentBatteryProfile->nav.mc.hover_throttle).
- Direction: In
- Description: Sets navigation position hold and general manual/auto flight parameters.
-
Payload: (Matches
MSP_NAV_POSHOLDstructure)Field C Type Size (Bytes) Units Description userControlModeuint8_t1 Enum Sets navConfigMutable()->general.flags.user_control_mode.maxAutoSpeeduint16_t2 cm/s Sets navConfigMutable()->general.max_auto_speed.maxAutoClimbRateuint16_t2 cm/s Sets fw.max_auto_climb_rateormc.max_auto_climb_ratebased on current platform type.maxManualSpeeduint16_t2 cm/s Sets navConfigMutable()->general.max_manual_speed.maxManualClimbRateuint16_t2 cm/s Sets fw.max_manual_climb_rateormc.max_manual_climb_rate.mcMaxBankAngleuint8_t1 degrees Sets navConfigMutable()->mc.max_bank_angle.mcAltHoldThrottleTypeuint8_t1 Enum Sets navConfigMutable()->mc.althold_throttle_type.mcHoverThrottleuint16_t2 PWM Sets currentBatteryProfileMutable->nav.mc.hover_throttle. - Notes: Expects 13 bytes.
- Direction: Out
- Description: Retrieves sensor calibration data (Accelerometer zero/gain, Magnetometer zero/gain, Optical Flow scale).
-
Payload:
Field C Type Size (Bytes) Units Description accCalibAxisFlagsuint8_t1 Bitmask Flags indicating which axes of the accelerometer have been calibrated ( accGetCalibrationAxisFlags()).accZeroXuint16_t2 Raw ADC Accelerometer zero offset for X-axis ( accelerometerConfig()->accZero.raw[X]).accZeroYuint16_t2 Raw ADC Accelerometer zero offset for Y-axis ( accelerometerConfig()->accZero.raw[Y]).accZeroZuint16_t2 Raw ADC Accelerometer zero offset for Z-axis ( accelerometerConfig()->accZero.raw[Z]).accGainXuint16_t2 Raw ADC Accelerometer gain/scale for X-axis ( accelerometerConfig()->accGain.raw[X]).accGainYuint16_t2 Raw ADC Accelerometer gain/scale for Y-axis ( accelerometerConfig()->accGain.raw[Y]).accGainZuint16_t2 Raw ADC Accelerometer gain/scale for Z-axis ( accelerometerConfig()->accGain.raw[Z]).magZeroXuint16_t2 Raw ADC Magnetometer zero offset for X-axis ( compassConfig()->magZero.raw[X]). 0 ifUSE_MAGdisabled.magZeroYuint16_t2 Raw ADC Magnetometer zero offset for Y-axis ( compassConfig()->magZero.raw[Y]). 0 ifUSE_MAGdisabled.magZeroZuint16_t2 Raw ADC Magnetometer zero offset for Z-axis ( compassConfig()->magZero.raw[Z]). 0 ifUSE_MAGdisabled.opflowScaleuint16_t2 Scale * 256 Optical flow scale factor ( opticalFlowConfig()->opflow_scale * 256). 0 ifUSE_OPFLOWdisabled.magGainXuint16_t2 Raw ADC Magnetometer gain/scale for X-axis ( compassConfig()->magGain[X]). 0 ifUSE_MAGdisabled.magGainYuint16_t2 Raw ADC Magnetometer gain/scale for Y-axis ( compassConfig()->magGain[Y]). 0 ifUSE_MAGdisabled.magGainZuint16_t2 Raw ADC Magnetometer gain/scale for Z-axis ( compassConfig()->magGain[Z]). 0 ifUSE_MAGdisabled. - Notes: Total size 27 bytes. Fields related to optional sensors are zero if the sensor is not used.
- Direction: In
- Description: Sets sensor calibration data.
-
Payload: (Matches
MSP_CALIBRATION_DATAstructure, excludingaccCalibAxisFlags)Field C Type Size (Bytes) Units Description accZeroXuint16_t2 Raw ADC Sets accelerometerConfigMutable()->accZero.raw[X].accZeroYuint16_t2 Raw ADC Sets accelerometerConfigMutable()->accZero.raw[Y].accZeroZuint16_t2 Raw ADC Sets accelerometerConfigMutable()->accZero.raw[Z].accGainXuint16_t2 Raw ADC Sets accelerometerConfigMutable()->accGain.raw[X].accGainYuint16_t2 Raw ADC Sets accelerometerConfigMutable()->accGain.raw[Y].accGainZuint16_t2 Raw ADC Sets accelerometerConfigMutable()->accGain.raw[Z].magZeroXuint16_t2 Raw ADC Sets compassConfigMutable()->magZero.raw[X](ifUSE_MAG).magZeroYuint16_t2 Raw ADC Sets compassConfigMutable()->magZero.raw[Y](ifUSE_MAG).magZeroZuint16_t2 Raw ADC Sets compassConfigMutable()->magZero.raw[Z](ifUSE_MAG).opflowScaleuint16_t2 Scale * 256 Sets opticalFlowConfigMutable()->opflow_scale = value / 256.0f(ifUSE_OPFLOW).magGainXuint16_t2 Raw ADC Sets compassConfigMutable()->magGain[X](ifUSE_MAG).magGainYuint16_t2 Raw ADC Sets compassConfigMutable()->magGain[Y](ifUSE_MAG).magGainZuint16_t2 Raw ADC Sets compassConfigMutable()->magGain[Z](ifUSE_MAG). -
Notes: Expects 26 bytes. Ignores values for sensors not enabled by
USE_*defines.
- Direction: Out
- Description: Retrieves parameters related to the INAV position estimation fusion weights and GPS minimum satellite count.
-
Payload:
Field C Type Size (Bytes) Units Description weightZBaroPuint16_t2 Weight * 100 Barometer Z position fusion weight ( positionEstimationConfig()->w_z_baro_p * 100).weightZGPSPuint16_t2 Weight * 100 GPS Z position fusion weight ( positionEstimationConfig()->w_z_gps_p * 100).weightZGPSVuint16_t2 Weight * 100 GPS Z velocity fusion weight ( positionEstimationConfig()->w_z_gps_v * 100).weightXYGPSPuint16_t2 Weight * 100 GPS XY position fusion weight ( positionEstimationConfig()->w_xy_gps_p * 100).weightXYGPSVuint16_t2 Weight * 100 GPS XY velocity fusion weight ( positionEstimationConfig()->w_xy_gps_v * 100).minSatsuint8_t1 Count Minimum satellites required for GPS use ( gpsConfigMutable()->gpsMinSats).useGPSVelNEDuint8_t1 Boolean Legacy flag, always 1 (GPS velocity is always used if available).
- Direction: In
- Description: Sets parameters related to the INAV position estimation fusion weights and GPS minimum satellite count.
-
Payload: (Matches
MSP_POSITION_ESTIMATION_CONFIGstructure)Field C Type Size (Bytes) Units Description weightZBaroPuint16_t2 Weight * 100 Sets positionEstimationConfigMutable()->w_z_baro_p = value / 100.0f(constrained 0.0-10.0).weightZGPSPuint16_t2 Weight * 100 Sets positionEstimationConfigMutable()->w_z_gps_p = value / 100.0f(constrained 0.0-10.0).weightZGPSVuint16_t2 Weight * 100 Sets positionEstimationConfigMutable()->w_z_gps_v = value / 100.0f(constrained 0.0-10.0).weightXYGPSPuint16_t2 Weight * 100 Sets positionEstimationConfigMutable()->w_xy_gps_p = value / 100.0f(constrained 0.0-10.0).weightXYGPSVuint16_t2 Weight * 100 Sets positionEstimationConfigMutable()->w_xy_gps_v = value / 100.0f(constrained 0.0-10.0).minSatsuint8_t1 Count Sets gpsConfigMutable()->gpsMinSats(constrained 5-10).useGPSVelNEDuint8_t1 Boolean Legacy flag, ignored. - Notes: Expects 12 bytes.
- Direction: In
- Description: Commands the FC to load the waypoint mission stored in non-volatile memory (e.g., EEPROM or FlashFS) into the active mission buffer.
-
Payload:
Field C Type Size (Bytes) Description missionIDuint8_t1 Reserved for future use, currently ignored. -
Notes: Only functional if
NAV_NON_VOLATILE_WAYPOINT_STORAGEis defined. Requires 1 byte payload. Returns error if loading fails.
- Direction: In
- Description: Commands the FC to save the currently active waypoint mission from RAM to non-volatile memory (e.g., EEPROM or FlashFS).
-
Payload:
Field C Type Size (Bytes) Description missionIDuint8_t1 Reserved for future use, currently ignored. -
Notes: Only functional if
NAV_NON_VOLATILE_WAYPOINT_STORAGEis defined. Requires 1 byte payload. Returns error if saving fails.
- Direction: Out
- Description: Retrieves information about the waypoint mission capabilities and the status of the currently loaded mission.
-
Payload:
Field C Type Size (Bytes) Description wpCapabilitiesuint8_t1 Reserved for future waypoint capabilities flags. Currently always 0. maxWaypointsuint8_t1 Maximum number of waypoints supported ( NAV_MAX_WAYPOINTS).missionValiduint8_t1 Boolean flag indicating if the current mission in RAM is valid ( isWaypointListValid()).waypointCountuint8_t1 Number of waypoints currently defined in the mission ( getWaypointCount()).
- Direction: Out
- Description: Retrieves configuration parameters related to Return-to-Home (RTH) and automatic landing behaviors.
-
Payload:
Field C Type Size (Bytes) Units Description minRthDistanceuint16_t2 meters Minimum distance from home required for RTH to engage ( navConfig()->general.min_rth_distance).rthClimbFirstuint8_t1 Boolean Flag: Climb to RTH altitude before returning ( navConfig()->general.flags.rth_climb_first).rthClimbIgnoreEmerguint8_t1 Boolean Flag: Climb even in emergency RTH ( navConfig()->general.flags.rth_climb_ignore_emerg).rthTailFirstuint8_t1 Boolean Flag: Multirotor returns tail-first ( navConfig()->general.flags.rth_tail_first).rthAllowLandinguint8_t1 Boolean Flag: Allow automatic landing after RTH ( navConfig()->general.flags.rth_allow_landing).rthAltControlModeuint8_t1 Enum RTH altitude control mode ( navConfig()->general.flags.rth_alt_control_mode).rthAbortThresholduint16_t2 cm/s Stick input threshold to abort RTH ( navConfig()->general.rth_abort_threshold).rthAltitudeuint16_t2 meters Target RTH altitude ( navConfig()->general.rth_altitude).landMinAltVspduint16_t2 cm/s Landing vertical speed at minimum slowdown altitude ( navConfig()->general.land_minalt_vspd).landMaxAltVspduint16_t2 cm/s Landing vertical speed at maximum slowdown altitude ( navConfig()->general.land_maxalt_vspd).landSlowdownMinAltuint16_t2 meters Altitude below which landMinAltVspdapplies (navConfig()->general.land_slowdown_minalt).landSlowdownMaxAltuint16_t2 meters Altitude above which landMaxAltVspdapplies (navConfig()->general.land_slowdown_maxalt).emergDescentRateuint16_t2 cm/s Vertical speed during emergency landing descent ( navConfig()->general.emerg_descent_rate).
- Direction: In
- Description: Sets configuration parameters related to Return-to-Home (RTH) and automatic landing behaviors.
-
Payload: (Matches
MSP_RTH_AND_LAND_CONFIGstructure)Field C Type Size (Bytes) Units Description minRthDistanceuint16_t2 meters Sets navConfigMutable()->general.min_rth_distance.rthClimbFirstuint8_t1 Boolean Sets navConfigMutable()->general.flags.rth_climb_first.rthClimbIgnoreEmerguint8_t1 Boolean Sets navConfigMutable()->general.flags.rth_climb_ignore_emerg.rthTailFirstuint8_t1 Boolean Sets navConfigMutable()->general.flags.rth_tail_first.rthAllowLandinguint8_t1 Boolean Sets navConfigMutable()->general.flags.rth_allow_landing.rthAltControlModeuint8_t1 Enum Sets navConfigMutable()->general.flags.rth_alt_control_mode.rthAbortThresholduint16_t2 cm/s Sets navConfigMutable()->general.rth_abort_threshold.rthAltitudeuint16_t2 meters Sets navConfigMutable()->general.rth_altitude.landMinAltVspduint16_t2 cm/s Sets navConfigMutable()->general.land_minalt_vspd.landMaxAltVspduint16_t2 cm/s Sets navConfigMutable()->general.land_maxalt_vspd.landSlowdownMinAltuint16_t2 meters Sets navConfigMutable()->general.land_slowdown_minalt.landSlowdownMaxAltuint16_t2 meters Sets navConfigMutable()->general.land_slowdown_maxalt.emergDescentRateuint16_t2 cm/s Sets navConfigMutable()->general.emerg_descent_rate. - Notes: Expects 21 bytes.
- Direction: Out
- Description: Retrieves configuration parameters specific to Fixed Wing navigation.
-
Payload:
Field C Type Size (Bytes) Units Description cruiseThrottleuint16_t2 PWM Cruise throttle level ( currentBatteryProfile->nav.fw.cruise_throttle).minThrottleuint16_t2 PWM Minimum throttle during autonomous flight ( currentBatteryProfile->nav.fw.min_throttle).maxThrottleuint16_t2 PWM Maximum throttle during autonomous flight ( currentBatteryProfile->nav.fw.max_throttle).maxBankAngleuint8_t1 degrees Maximum bank angle allowed ( navConfig()->fw.max_bank_angle).maxClimbAngleuint8_t1 degrees Maximum pitch angle during climb ( navConfig()->fw.max_climb_angle).maxDiveAngleuint8_t1 degrees Maximum negative pitch angle during descent ( navConfig()->fw.max_dive_angle).pitchToThrottleuint8_t1 Ratio (%) Pitch-to-throttle feed-forward ratio ( currentBatteryProfile->nav.fw.pitch_to_throttle).loiterRadiusuint16_t2 meters Default loiter radius ( navConfig()->fw.loiter_radius).
- Direction: In
- Description: Sets configuration parameters specific to Fixed Wing navigation.
-
Payload: (Matches
MSP_FW_CONFIGstructure)Field C Type Size (Bytes) Units Description cruiseThrottleuint16_t2 PWM Sets currentBatteryProfileMutable->nav.fw.cruise_throttle.minThrottleuint16_t2 PWM Sets currentBatteryProfileMutable->nav.fw.min_throttle.maxThrottleuint16_t2 PWM Sets currentBatteryProfileMutable->nav.fw.max_throttle.maxBankAngleuint8_t1 degrees Sets navConfigMutable()->fw.max_bank_angle.maxClimbAngleuint8_t1 degrees Sets navConfigMutable()->fw.max_climb_angle.maxDiveAngleuint8_t1 degrees Sets navConfigMutable()->fw.max_dive_angle.pitchToThrottleuint8_t1 Ratio (%) Sets currentBatteryProfileMutable->nav.fw.pitch_to_throttle.loiterRadiusuint16_t2 meters Sets navConfigMutable()->fw.loiter_radius. - Notes: Expects 12 bytes.
These commands were often introduced by Cleanflight or Betaflight and adopted/adapted by INAV.
- Direction: Out
- Description: Returns all defined mode activation ranges (aux channel assignments for flight modes).
-
Payload: Repeated
MAX_MODE_ACTIVATION_CONDITION_COUNTtimes:Field C Type Size (Bytes) Units Description modePermanentIduint8_t1 ID Permanent ID of the flight mode (maps to boxIdviafindBoxByActiveBoxId). 0 if entry unused.auxChannelIndexuint8_t1 Index 0-based index of the AUX channel used for activation. rangeStartStepuint8_t1 0-20 Start step (corresponding to channel value range 900-2100 in steps of 50/25, depends on steps calculation). rangeEndStepuint8_t1 0-20 End step for the activation range. - Notes: The number of steps and mapping to PWM values depends on internal range calculations.
- Direction: In
- Description: Sets a single mode activation range by its index.
-
Payload:
Field C Type Size (Bytes) Units Description rangeIndexuint8_t1 Index Index of the mode range to set (0 to MAX_MODE_ACTIVATION_CONDITION_COUNT - 1).modePermanentIduint8_t1 ID Permanent ID of the flight mode to assign. auxChannelIndexuint8_t1 Index 0-based index of the AUX channel. rangeStartStepuint8_t1 0-20 Start step for activation. rangeEndStepuint8_t1 0-20 End step for activation. -
Notes: Expects 5 bytes. Updates the mode configuration and recalculates used mode flags. Returns error if
rangeIndexormodePermanentIdis invalid.
- Direction: Out
- Description: Returns a bitmask of enabled features.
-
Payload:
Field C Type Size (Bytes) Description featureMaskuint32_t4 Bitmask of active features (see featureMask()). -
Notes: Feature bits are defined in
feature.h.
- Direction: In
- Description: Sets the enabled features using a bitmask. Clears all previous features first.
-
Payload:
Field C Type Size (Bytes) Description featureMaskuint32_t4 Bitmask of features to enable. - Notes: Expects 4 bytes. Updates feature configuration and related settings (e.g., RSSI source).
- Direction: Out
- Description: Returns the sensor board alignment angles relative to the craft frame.
-
Payload:
Field C Type Size (Bytes) Units Description rollAlignuint16_t2 deci-degrees Board alignment roll angle ( boardAlignment()->rollDeciDegrees).pitchAlignuint16_t2 deci-degrees Board alignment pitch angle ( boardAlignment()->pitchDeciDegrees).yawAlignuint16_t2 deci-degrees Board alignment yaw angle ( boardAlignment()->yawDeciDegrees).
- Direction: In
- Description: Sets the sensor board alignment angles.
-
Payload: (Matches
MSP_BOARD_ALIGNMENTstructure)Field C Type Size (Bytes) Units Description rollAlignuint16_t2 deci-degrees Sets boardAlignmentMutable()->rollDeciDegrees.pitchAlignuint16_t2 deci-degrees Sets boardAlignmentMutable()->pitchDeciDegrees.yawAlignuint16_t2 deci-degrees Sets boardAlignmentMutable()->yawDeciDegrees. - Notes: Expects 6 bytes.
- Direction: Out
- Description: Retrieves the configuration for the current sensor.
-
Payload:
Field C Type Size (Bytes) Units Description scaleuint16_t2 mV/10A or similar Current sensor scale factor ( batteryMetersConfig()->current.scale). Units depend on sensor type.offsetuint16_t2 mV Current sensor offset ( batteryMetersConfig()->current.offset).typeuint8_t1 Enum Type of current sensor hardware ( batteryMetersConfig()->current.type).capacityuint16_t2 mAh (legacy) Battery capacity (constrained 0-65535) ( currentBatteryProfile->capacity.value). Note: This is legacy, useMSP2_INAV_BATTERY_CONFIGfor full 32-bit capacity.
- Direction: In
- Description: Sets the configuration for the current sensor.
-
Payload: (Matches
MSP_CURRENT_METER_CONFIGstructure)Field C Type Size (Bytes) Units Description scaleuint16_t2 mV/10A or similar Sets batteryMetersConfigMutable()->current.scale.offsetuint16_t2 mV Sets batteryMetersConfigMutable()->current.offset.typeuint8_t1 Enum Sets batteryMetersConfigMutable()->current.type.capacityuint16_t2 mAh (legacy) Sets currentBatteryProfileMutable->capacity.value(truncated to 16 bits). - Notes: Expects 7 bytes.
- Direction: Out
- Description: Retrieves the mixer type (Legacy, INAV always returns QuadX).
-
Payload:
Field C Type Size (Bytes) Description mixerModeuint8_t1 Always 3 (QuadX) in INAV for compatibility. -
Notes: This command is largely obsolete. Mixer configuration is handled differently in INAV (presets, custom mixes). See
MSP2_INAV_MIXER.
- Direction: In
- Description: Sets the mixer type (Legacy, ignored by INAV).
-
Payload:
Field C Type Size (Bytes) Description mixerModeuint8_t1 Mixer mode to set (ignored by INAV). -
Notes: Expects 1 byte. Calls
mixerUpdateStateFlags()for potential side effects related to presets.
- Direction: Out
- Description: Retrieves receiver configuration settings. Some fields are Betaflight compatibility placeholders.
-
Payload:
Field C Type Size (Bytes) Units Description serialRxProvideruint8_t1 Enum Serial RX provider type ( rxConfig()->serialrx_provider).maxCheckuint16_t2 PWM Upper channel value threshold for stick commands ( rxConfig()->maxcheck).midRcuint16_t2 PWM Center channel value ( PWM_RANGE_MIDDLE, typically 1500).minCheckuint16_t2 PWM Lower channel value threshold for stick commands ( rxConfig()->mincheck).spektrumSatBinduint8_t1 Count/Flag Spektrum bind pulses ( rxConfig()->spektrum_sat_bind). 0 ifUSE_SPEKTRUM_BINDdisabled.rxMinUsecuint16_t2 µs Minimum expected pulse width ( rxConfig()->rx_min_usec).rxMaxUsecuint16_t2 µs Maximum expected pulse width ( rxConfig()->rx_max_usec).bfCompatRcInterpolationuint8_t1 - BF compatibility. Always 0. bfCompatRcInterpolationIntuint8_t1 - BF compatibility. Always 0. bfCompatAirModeThresholduint16_t2 - BF compatibility. Always 0. reserved1uint8_t1 - Reserved/Padding. Always 0. reserved2uint32_t4 - Reserved/Padding. Always 0. reserved3uint8_t1 - Reserved/Padding. Always 0. bfCompatFpvCamAngleuint8_t1 - BF compatibility. Always 0. receiverTypeuint8_t1 Enum Receiver type (Parallel PWM, PPM, Serial) ( rxConfig()->receiverType).
- Direction: In
- Description: Sets receiver configuration settings.
-
Payload: (Matches
MSP_RX_CONFIGstructure)Field C Type Size (Bytes) Units Description serialRxProvideruint8_t1 Enum Sets rxConfigMutable()->serialrx_provider.maxCheckuint16_t2 PWM Sets rxConfigMutable()->maxcheck.midRcuint16_t2 PWM Ignored ( PWM_RANGE_MIDDLEis used).minCheckuint16_t2 PWM Sets rxConfigMutable()->mincheck.spektrumSatBinduint8_t1 Count/Flag Sets rxConfigMutable()->spektrum_sat_bind(ifUSE_SPEKTRUM_BIND).rxMinUsecuint16_t2 µs Sets rxConfigMutable()->rx_min_usec.rxMaxUsecuint16_t2 µs Sets rxConfigMutable()->rx_max_usec.bfCompatRcInterpolationuint8_t1 - Ignored. bfCompatRcInterpolationIntuint8_t1 - Ignored. bfCompatAirModeThresholduint16_t2 - Ignored. reserved1uint8_t1 - Ignored. reserved2uint32_t4 - Ignored. reserved3uint8_t1 - Ignored. bfCompatFpvCamAngleuint8_t1 - Ignored. receiverTypeuint8_t1 Enum Sets rxConfigMutable()->receiverType. - Notes: Expects 24 bytes.
- Direction: Out
- Description: Retrieves the HSV color definitions for configurable LED colors.
-
Payload: Repeated
LED_CONFIGURABLE_COLOR_COUNTtimes:Field C Type Size (Bytes) Description hueuint16_t2 Hue value (0-359). saturationuint8_t1 Saturation value (0-255). valueuint8_t1 Value/Brightness (0-255). -
Notes: Only available if
USE_LED_STRIPis defined.
- Direction: In
- Description: Sets the HSV color definitions for configurable LED colors.
-
Payload: Repeated
LED_CONFIGURABLE_COLOR_COUNTtimes:Field C Type Size (Bytes) Description hueuint16_t2 Hue value (0-359). saturationuint8_t1 Saturation value (0-255). valueuint8_t1 Value/Brightness (0-255). -
Notes: Only available if
USE_LED_STRIPis defined. ExpectsLED_CONFIGURABLE_COLOR_COUNT * 4bytes.
- Direction: Out
- Description: Retrieves the configuration for each LED on the strip (legacy packed format).
-
Payload: Repeated
LED_MAX_STRIP_LENGTHtimes:Field C Type Size (Bytes) Description legacyLedConfiguint32_t4 Packed LED configuration (position, function, overlay, color, direction, params). See C code for bit packing details. -
Notes: Only available if
USE_LED_STRIPis defined. Superseded byMSP2_INAV_LED_STRIP_CONFIG_EXwhich uses a clearer struct.
- Direction: In
- Description: Sets the configuration for a single LED on the strip using the legacy packed format.
-
Payload:
Field C Type Size (Bytes) Description ledIndexuint8_t1 Index of the LED to configure (0 to LED_MAX_STRIP_LENGTH - 1).legacyLedConfiguint32_t4 Packed LED configuration to set. -
Notes: Only available if
USE_LED_STRIPis defined. Expects 5 bytes. CallsreevaluateLedConfig(). Superseded byMSP2_INAV_SET_LED_STRIP_CONFIG_EX.
- Direction: Out
- Description: Retrieves the channel used for analog RSSI input.
-
Payload:
Field C Type Size (Bytes) Description rssiChanneluint8_t1 AUX channel index (1-based) used for RSSI, or 0 if disabled ( rxConfig()->rssi_channel).
- Direction: In
- Description: Sets the channel used for analog RSSI input.
-
Payload:
Field C Type Size (Bytes) Description rssiChanneluint8_t1 AUX channel index (1-based) to use for RSSI, or 0 to disable. -
Notes: Expects 1 byte. Input value is constrained 0 to
MAX_SUPPORTED_RC_CHANNEL_COUNT. Updates the effective RSSI source.
- Direction: Out
- Description: Returns all defined RC adjustment ranges (tuning via aux channels).
-
Payload: Repeated
MAX_ADJUSTMENT_RANGE_COUNTtimes:Field C Type Size (Bytes) Description adjustmentIndexuint8_t1 Index of the adjustment slot (0 to MAX_SIMULTANEOUS_ADJUSTMENT_COUNT - 1).auxChannelIndexuint8_t1 0-based index of the AUX channel controlling the adjustment value. rangeStartStepuint8_t1 Start step (0-20) of the control channel range. rangeEndStepuint8_t1 End step (0-20) of the control channel range. adjustmentFunctionuint8_t1 Function/parameter being adjusted (e.g., PID gain, rate). See rcAdjustments.henum.auxSwitchChannelIndexuint8_t1 0-based index of the AUX channel acting as an enable switch (or 0 if always enabled). -
Notes: See
adjustmentRange_t.
- Direction: In
- Description: Sets a single RC adjustment range configuration by its index.
-
Payload:
Field C Type Size (Bytes) Description rangeIndexuint8_t1 Index of the adjustment range to set (0 to MAX_ADJUSTMENT_RANGE_COUNT - 1).adjustmentIndexuint8_t1 Adjustment slot index (0 to MAX_SIMULTANEOUS_ADJUSTMENT_COUNT - 1).auxChannelIndexuint8_t1 0-based index of the control AUX channel. rangeStartStepuint8_t1 Start step (0-20). rangeEndStepuint8_t1 End step (0-20). adjustmentFunctionuint8_t1 Function/parameter being adjusted. auxSwitchChannelIndexuint8_t1 0-based index of the enable switch AUX channel (or 0). -
Notes: Expects 7 bytes. Returns error if
rangeIndexoradjustmentIndexis invalid.
- Direction: Out
- Description: Deprecated command to get serial port configuration.
-
Notes: Not implemented in INAV
fc_msp.c. UseMSP2_COMMON_SERIAL_CONFIG.
- Direction: In
- Description: Deprecated command to set serial port configuration.
-
Notes: Not implemented in INAV
fc_msp.c. UseMSP2_COMMON_SET_SERIAL_CONFIG.
- Direction: Out
- Description: Retrieves legacy voltage meter configuration (scaled values).
-
Payload:
Field C Type Size (Bytes) Units Description vbatScaleuint8_t1 Scale / 10 Voltage sensor scale factor / 10 ( batteryMetersConfig()->voltage.scale / 10). 0 ifUSE_ADCdisabled.vbatMinCelluint8_t1 0.1V Minimum cell voltage / 10 ( currentBatteryProfile->voltage.cellMin / 10). 0 ifUSE_ADCdisabled.vbatMaxCelluint8_t1 0.1V Maximum cell voltage / 10 ( currentBatteryProfile->voltage.cellMax / 10). 0 ifUSE_ADCdisabled.vbatWarningCelluint8_t1 0.1V Warning cell voltage / 10 ( currentBatteryProfile->voltage.cellWarning / 10). 0 ifUSE_ADCdisabled. -
Notes: Superseded by
MSP2_INAV_BATTERY_CONFIG.
- Direction: In
- Description: Sets legacy voltage meter configuration (scaled values).
-
Payload: (Matches
MSP_VOLTAGE_METER_CONFIGstructure)Field C Type Size (Bytes) Units Description vbatScaleuint8_t1 Scale / 10 Sets batteryMetersConfigMutable()->voltage.scale = value * 10(ifUSE_ADC).vbatMinCelluint8_t1 0.1V Sets currentBatteryProfileMutable->voltage.cellMin = value * 10(ifUSE_ADC).vbatMaxCelluint8_t1 0.1V Sets currentBatteryProfileMutable->voltage.cellMax = value * 10(ifUSE_ADC).vbatWarningCelluint8_t1 0.1V Sets currentBatteryProfileMutable->voltage.cellWarning = value * 10(ifUSE_ADC). -
Notes: Expects 4 bytes. Superseded by
MSP2_INAV_SET_BATTERY_CONFIG.
- Direction: Out
- Description: Retrieves the altitude measured by the primary rangefinder (sonar or lidar).
-
Payload:
Field C Type Size (Bytes) Units Description rangefinderAltitudeuint32_t4 cm Latest altitude reading from the rangefinder ( rangefinderGetLatestAltitude()). 0 ifUSE_RANGEFINDERdisabled or no reading.
These commands originated in Baseflight or were added later in similar ranges.
- Direction: Out
- Description: Retrieves the RC channel mapping array (AETR, etc.).
-
Payload:
Field C Type Size (Bytes) Description rcMapuint8_t[MAX_MAPPABLE_RX_INPUTS]MAX_MAPPABLE_RX_INPUTSArray defining the mapping from input channel index to logical function (Roll, Pitch, Yaw, Throttle, Aux1...). -
Notes:
MAX_MAPPABLE_RX_INPUTSis typically 8 or more.
- Direction: In
- Description: Sets the RC channel mapping array.
-
Payload:
Field C Type Size (Bytes) Description rcMapuint8_t[MAX_MAPPABLE_RX_INPUTS]MAX_MAPPABLE_RX_INPUTSArray defining the new channel mapping. -
Notes: Expects
MAX_MAPPABLE_RX_INPUTSbytes.
- Direction: Out (but triggers an action)
- Description: Commands the flight controller to reboot.
- Payload: None
-
Notes: The FC sends an ACK before rebooting. The
mspPostProcessFnis set tomspRebootFnto perform the reboot after the reply is sent. Will fail if the craft is armed.
- Direction: Out
- Description: Retrieves summary information about the onboard dataflash chip (if present and used for Blackbox via FlashFS).
-
Payload:
Field C Type Size (Bytes) Description flashReadyuint8_t1 Boolean: 1 if flash chip is ready, 0 otherwise. ( flashIsReady()). 0 ifUSE_FLASHFSdisabled.sectorCountuint32_t4 Total number of sectors on the flash chip ( geometry->sectors). 0 ifUSE_FLASHFSdisabled.totalSizeuint32_t4 Total size of the flash chip in bytes ( geometry->totalSize). 0 ifUSE_FLASHFSdisabled.usedSizeuint32_t4 Currently used size in bytes (FlashFS offset) ( flashfsGetOffset()). 0 ifUSE_FLASHFSdisabled. -
Notes: Requires
USE_FLASHFS.
- Direction: In/Out
- Description: Reads a block of data from the onboard dataflash (FlashFS).
-
Request Payload:
Field C Type Size (Bytes) Description addressuint32_t4 Starting address to read from within the FlashFS volume. sizeuint16_t2 (Optional) Number of bytes to read. Defaults to 128 if not provided. -
Reply Payload:
Field C Type Size (Bytes) Description addressuint32_t4 The starting address from which data was actually read. datauint8_t[]Variable The data read from flash. Length is MIN(requested size, remaining buffer space, remaining flashfs data). -
Notes: Requires
USE_FLASHFS. Read length may be truncated by buffer size or end of flashfs volume.
- Direction: In
- Description: Erases the entire onboard dataflash chip (FlashFS volume).
- Payload: None
-
Notes: Requires
USE_FLASHFS. This is a potentially long operation. Use with caution.
- Direction: Out
- Description: Retrieves the configured loop time (PID loop frequency denominator).
-
Payload:
Field C Type Size (Bytes) Units Description looptimeuint16_t2 µs Configured loop time ( gyroConfig()->looptime). -
Notes: This is the configured target loop time, not necessarily the actual measured cycle time (see
MSP_STATUS).
- Direction: In
- Description: Sets the configured loop time.
-
Payload:
Field C Type Size (Bytes) Units Description looptimeuint16_t2 µs New loop time to set ( gyroConfigMutable()->looptime). - Notes: Expects 2 bytes.
- Direction: Out
- Description: Retrieves the failsafe configuration settings.
-
Payload:
Field C Type Size (Bytes) Units Description failsafeDelayuint8_t1 0.1s Delay before failsafe stage 1 activates ( failsafeConfig()->failsafe_delay).failsafeOffDelayuint8_t1 0.1s Delay after signal recovery before returning control ( failsafeConfig()->failsafe_off_delay).failsafeThrottleuint16_t2 PWM Throttle level during failsafe stage 2 ( currentBatteryProfile->failsafe_throttle).legacyKillSwitchuint8_t1 - Legacy flag, always 0. failsafeThrottleLowDelayuint16_t2 ms Delay for throttle-based failsafe detection ( failsafeConfig()->failsafe_throttle_low_delay).failsafeProcedureuint8_t1 Enum Failsafe procedure (Drop, RTH, Land, etc.) ( failsafeConfig()->failsafe_procedure).failsafeRecoveryDelayuint8_t1 0.1s Delay after RTH finishes before attempting recovery ( failsafeConfig()->failsafe_recovery_delay).failsafeFWRollAngleuint16_t2 deci-degrees Fixed wing failsafe roll angle ( failsafeConfig()->failsafe_fw_roll_angle).failsafeFWPitchAngleuint16_t2 deci-degrees Fixed wing failsafe pitch angle ( failsafeConfig()->failsafe_fw_pitch_angle).failsafeFWYawRateuint16_t2 deg/s Fixed wing failsafe yaw rate ( failsafeConfig()->failsafe_fw_yaw_rate).failsafeStickThresholduint16_t2 PWM units Stick movement threshold to exit failsafe ( failsafeConfig()->failsafe_stick_motion_threshold).failsafeMinDistanceuint16_t2 meters Minimum distance from home for RTH failsafe ( failsafeConfig()->failsafe_min_distance).failsafeMinDistanceProcuint8_t1 Enum Failsafe procedure if below min distance ( failsafeConfig()->failsafe_min_distance_procedure).
- Direction: In
- Description: Sets the failsafe configuration settings.
-
Payload: (Matches
MSP_FAILSAFE_CONFIGstructure)Field C Type Size (Bytes) Units Description failsafeDelayuint8_t1 0.1s Sets failsafeConfigMutable()->failsafe_delay.failsafeOffDelayuint8_t1 0.1s Sets failsafeConfigMutable()->failsafe_off_delay.failsafeThrottleuint16_t2 PWM Sets currentBatteryProfileMutable->failsafe_throttle.legacyKillSwitchuint8_t1 - Ignored. failsafeThrottleLowDelayuint16_t2 ms Sets failsafeConfigMutable()->failsafe_throttle_low_delay.failsafeProcedureuint8_t1 Enum Sets failsafeConfigMutable()->failsafe_procedure.failsafeRecoveryDelayuint8_t1 0.1s Sets failsafeConfigMutable()->failsafe_recovery_delay.failsafeFWRollAngleuint16_t2 deci-degrees Sets failsafeConfigMutable()->failsafe_fw_roll_angle(casted toint16_t).failsafeFWPitchAngleuint16_t2 deci-degrees Sets failsafeConfigMutable()->failsafe_fw_pitch_angle(casted toint16_t).failsafeFWYawRateuint16_t2 deg/s Sets failsafeConfigMutable()->failsafe_fw_yaw_rate(casted toint16_t).failsafeStickThresholduint16_t2 PWM units Sets failsafeConfigMutable()->failsafe_stick_motion_threshold.failsafeMinDistanceuint16_t2 meters Sets failsafeConfigMutable()->failsafe_min_distance.failsafeMinDistanceProcuint8_t1 Enum Sets failsafeConfigMutable()->failsafe_min_distance_procedure. - Notes: Expects 20 bytes.
- Direction: Out
- Description: Retrieves summary information about the SD card status and filesystem.
-
Payload:
Field C Type Size (Bytes) Description sdCardSupporteduint8_t1 Bitmask: Bit 0 = 1 if SD card support compiled in ( USE_SDCARD).sdCardStateuint8_t1 Enum ( mspSDCardState_e): Current state (Not Present, Fatal, Card Init, FS Init, Ready). 0 ifUSE_SDCARDdisabled.fsErroruint8_t1 Last filesystem error code ( afatfs_getLastError()). 0 ifUSE_SDCARDdisabled.freeSpaceKBuint32_t4 Free space in KiB ( afatfs_getContiguousFreeSpace() / 1024). 0 ifUSE_SDCARDdisabled.totalSpaceKBuint32_t4 Total space in KiB ( sdcard_getMetadata()->numBlocks / 2). 0 ifUSE_SDCARDdisabled. -
Notes: Requires
USE_SDCARDandUSE_ASYNCFATFS.
- Direction: Out
-
Description: Legacy command to retrieve Blackbox configuration. Superseded by
MSP2_BLACKBOX_CONFIG. -
Payload:
Field C Type Size (Bytes) Description blackboxDeviceuint8_t1 Always 0 (API no longer supported). blackboxRateNumuint8_t1 Always 0. blackboxRateDenomuint8_t1 Always 0. blackboxPDenomuint8_t1 Always 0. -
Notes: Returns fixed zero values. Use
MSP2_BLACKBOX_CONFIG.
- Direction: In
-
Description: Legacy command to set Blackbox configuration. Superseded by
MSP2_SET_BLACKBOX_CONFIG. - Payload: (Ignored)
-
Notes: Not implemented in
fc_msp.c. UseMSP2_SET_BLACKBOX_CONFIG.
- Direction: Out
- Description: Get VTX Transponder settings (likely specific to RaceFlight/Betaflight, not standard INAV VTX).
-
Notes: Not implemented in INAV
fc_msp.c.
- Direction: In
- Description: Set VTX Transponder settings.
-
Notes: Not implemented in INAV
fc_msp.c.
- Direction: Out
- Description: Retrieves OSD configuration settings and layout for screen 0.
-
Payload:
Field C Type Size (Bytes) Units Description osdDriverTypeuint8_t1 Enum OSD_DRIVER_MAX7456ifUSE_OSD, elseOSD_DRIVER_NONE.videoSystemuint8_t1 Enum Video system (Auto/PAL/NTSC) ( osdConfig()->video_system). Sent even if OSD disabled.unitsuint8_t1 Enum Measurement units (Metric/Imperial) ( osdConfig()->units). Sent even if OSD disabled.rssiAlarmuint8_t1 % RSSI alarm threshold ( osdConfig()->rssi_alarm). Sent even if OSD disabled.capAlarmuint16_t2 mAh/mWh Capacity alarm threshold ( currentBatteryProfile->capacity.warning). Sent even if OSD disabled.timerAlarmuint16_t2 seconds Timer alarm threshold ( osdConfig()->time_alarm). Sent even if OSD disabled.altAlarmuint16_t2 meters Altitude alarm threshold ( osdConfig()->alt_alarm). Sent even if OSD disabled.distAlarmuint16_t2 meters Distance alarm threshold ( osdConfig()->dist_alarm). Sent even if OSD disabled.negAltAlarmuint16_t2 meters Negative altitude alarm threshold ( osdConfig()->neg_alt_alarm). Sent even if OSD disabled.itemPositionsuint16_t[OSD_ITEM_COUNT]OSD_ITEM_COUNT * 2Coordinates Packed X/Y position for each OSD item on screen 0 ( osdLayoutsConfig()->item_pos[0][i]). Sent even if OSD disabled. -
Notes: Requires
USE_OSDfor meaningful data, but payload is always sent. Coordinates are packed:(Y << 8) | X. SeeMSP2_INAV_OSD_*commands for more detail and multi-layout support.
- Direction: In
- Description: Sets OSD configuration or a single item's position on screen 0.
-
Payload Format 1 (Set General Config):
Field C Type Size (Bytes) Units Description addruint8_t1 - Must be 0xFF (-1). videoSystemuint8_t1 Enum Sets osdConfigMutable()->video_system.unitsuint8_t1 Enum Sets osdConfigMutable()->units.rssiAlarmuint8_t1 % Sets osdConfigMutable()->rssi_alarm.capAlarmuint16_t2 mAh/mWh Sets currentBatteryProfileMutable->capacity.warning.timerAlarmuint16_t2 seconds Sets osdConfigMutable()->time_alarm.altAlarmuint16_t2 meters Sets osdConfigMutable()->alt_alarm.distAlarmuint16_t2 meters (Optional) Sets osdConfigMutable()->dist_alarm.negAltAlarmuint16_t2 meters (Optional) Sets osdConfigMutable()->neg_alt_alarm. -
Payload Format 2 (Set Item Position):
Field C Type Size (Bytes) Units Description itemIndexuint8_t1 Index Index of the OSD item to position (0 to OSD_ITEM_COUNT - 1).itemPositionuint16_t2 Coordinates Packed X/Y position (`(Y << 8) -
Notes: Requires
USE_OSD. Distinguishes formats based on the first byte. Format 1 requires at least 10 bytes. Format 2 requires 3 bytes. Triggers an OSD redraw. SeeMSP2_INAV_OSD_SET_*for more advanced control.
- Direction: Out
- Description: Reads character data from the OSD font memory.
-
Notes: Not implemented in INAV
fc_msp.c. Requires direct hardware access, typically done via DisplayPort.
- Direction: In
- Description: Writes character data to the OSD font memory.
-
Payload:
Field C Type Size (Bytes) Description addressuint8_toruint16_t1 or 2 Starting address in font memory. Size depends on total payload size. charDatauint8_t[]Variable Character bitmap data (54 or 64 bytes per char, depending on format). -
Notes: Requires
USE_OSD. Payload size determines address size (8/16 bit) and character data size (visible bytes only or full char with metadata). UsesdisplayWriteFontCharacter(). Requires OSD hardware (like MAX7456) to be present and functional.
- Direction: Out
- Description: Retrieves the current VTX (Video Transmitter) configuration and capabilities.
-
Payload: (Only sent if
USE_VTX_CONTROLis defined and a VTX device is configured)Field C Type Size (Bytes) Description vtxDeviceTypeuint8_t1 Enum ( VTXDEV_*): Type of VTX device detected/configured.VTXDEV_UNKNOWNif none.banduint8_t1 VTX band number (from vtxSettingsConfig).channeluint8_t1 VTX channel number (from vtxSettingsConfig).poweruint8_t1 VTX power level index (from vtxSettingsConfig).pitModeuint8_t1 Boolean: 1 if VTX is currently in pit mode, 0 otherwise. vtxReadyuint8_t1 Boolean: 1 if VTX device reported ready, 0 otherwise. lowPowerDisarmuint8_t1 Boolean: 1 if low power on disarm is enabled (from vtxSettingsConfig).vtxTableAvailableuint8_t1 Boolean: 1 if VTX tables (band/power) are available for query. bandCountuint8_t1 Number of bands supported by the VTX device. channelCountuint8_t1 Number of channels per band supported by the VTX device. powerCountuint8_t1 Number of power levels supported by the VTX device. -
Notes: BF compatibility field
frequency(uint16) is missing compared to some BF versions. UseMSP_VTXTABLE_BANDandMSP_VTXTABLE_POWERLEVELfor details.
- Direction: In
- Description: Sets the VTX configuration (band, channel, power, pit mode). Supports multiple protocol versions/extensions based on payload size.
-
Payload (Minimum):
Field C Type Size (Bytes) Description bandChannelEncodeduint16_t2 Encoded band/channel value: (band-1)*8 + (channel-1). If <=VTXCOMMON_MSP_BANDCHAN_CHKVAL. -
Payload (Extended): (Fields added sequentially based on size)
Field C Type Size (Bytes) Description poweruint8_t1 Power level index to set ( vtxSettingsConfigMutable()->power).pitModeuint8_t1 Pit mode state to set (0=off, 1=on). Directly calls vtxCommonSetPitMode.lowPowerDisarmuint8_t1 Low power on disarm setting ( vtxSettingsConfigMutable()->lowPowerDisarm).pitModeFrequint16_t2 Ignored. Betaflight extension. banduint8_t1 Explicit band number to set ( vtxSettingsConfigMutable()->band). Overrides encoded value if present.channeluint8_t1 Explicit channel number to set ( vtxSettingsConfigMutable()->channel). Overrides encoded value if present.frequencyuint16_t2 Ignored. Betaflight extension. bandCountuint8_t1 Ignored. Betaflight extension. channelCountuint8_t1 Ignored. Betaflight extension. powerCountuint8_t1 Ignored. Betaflight extension (can potentially reduce reported power count if valid). -
Notes: Requires
USE_VTX_CONTROL. Minimum size 2 bytes. Applies settings tovtxSettingsConfigand potentially directly to the device (pit mode).
- Direction: Out
- Description: Retrieves advanced hardware-related configuration (PWM protocols, rates). Some fields are BF compatibility placeholders.
-
Payload:
Field C Type Size (Bytes) Description gyroSyncDenomuint8_t1 Always 1 (BF compatibility). pidProcessDenomuint8_t1 Always 1 (BF compatibility). useUnsyncedPwmuint8_t1 Always 1 (BF compatibility, INAV uses async PWM based on protocol). motorPwmProtocoluint8_t1 Enum: Motor PWM protocol type ( motorConfig()->motorPwmProtocol).motorPwmRateuint16_t2 Hz: Motor PWM rate (if applicable) ( motorConfig()->motorPwmRate).servoPwmRateuint16_t2 Hz: Servo PWM rate ( servoConfig()->servoPwmRate).legacyGyroSyncuint8_t1 Always 0 (BF compatibility).
- Direction: In
- Description: Sets advanced hardware-related configuration (PWM protocols, rates).
-
Payload: (Matches
MSP_ADVANCED_CONFIGstructure)Field C Type Size (Bytes) Description gyroSyncDenomuint8_t1 Ignored. pidProcessDenomuint8_t1 Ignored. useUnsyncedPwmuint8_t1 Ignored. motorPwmProtocoluint8_t1 Sets motorConfigMutable()->motorPwmProtocol.motorPwmRateuint16_t2 Sets motorConfigMutable()->motorPwmRate.servoPwmRateuint16_t2 Sets servoConfigMutable()->servoPwmRate.legacyGyroSyncuint8_t1 Ignored. - Notes: Expects 9 bytes.
- Direction: Out
- Description: Retrieves filter configuration settings (Gyro, D-term, Yaw, Accel). Some fields are BF compatibility placeholders or legacy.
-
Payload:
Field C Type Size (Bytes) Units Description gyroMainLpfHzuint8_t1 Hz Gyro main low-pass filter cutoff frequency ( gyroConfig()->gyro_main_lpf_hz).dtermLpfHzuint16_t2 Hz D-term low-pass filter cutoff frequency ( pidProfile()->dterm_lpf_hz).yawLpfHzuint16_t2 Hz Yaw low-pass filter cutoff frequency ( pidProfile()->yaw_lpf_hz).legacyGyroNotchHzuint16_t2 - Always 0 (Legacy). legacyGyroNotchCutoffuint16_t2 - Always 1 (Legacy). bfCompatDtermNotchHzuint16_t2 - Always 0 (BF compatibility). bfCompatDtermNotchCutoffuint16_t2 - Always 1 (BF compatibility). bfCompatGyroNotch2Hzuint16_t2 - Always 0 (BF compatibility). bfCompatGyroNotch2Cutoffuint16_t2 - Always 1 (BF compatibility). accNotchHzuint16_t2 Hz Accelerometer notch filter center frequency ( accelerometerConfig()->acc_notch_hz).accNotchCutoffuint16_t2 Hz Accelerometer notch filter cutoff frequency ( accelerometerConfig()->acc_notch_cutoff).legacyGyroStage2LpfHzuint16_t2 - Always 0 (Legacy).
- Direction: In
- Description: Sets filter configuration settings. Handles different payload lengths for backward compatibility.
-
Payload: (Fields added sequentially based on size)
Field C Type Size (Bytes) Units Description gyroMainLpfHzuint8_t1 Hz Sets gyroConfigMutable()->gyro_main_lpf_hz. (Size >= 5)dtermLpfHzuint16_t2 Hz Sets pidProfileMutable()->dterm_lpf_hz(constrained 0-500). (Size >= 5)yawLpfHzuint16_t2 Hz Sets pidProfileMutable()->yaw_lpf_hz(constrained 0-255). (Size >= 5)legacyGyroNotchHzuint16_t2 - Ignored. (Size >= 9) legacyGyroNotchCutoffuint16_t2 - Ignored. (Size >= 9) bfCompatDtermNotchHzuint16_t2 - Ignored. (Size >= 13) bfCompatDtermNotchCutoffuint16_t2 - Ignored. (Size >= 13) bfCompatGyroNotch2Hzuint16_t2 - Ignored. (Size >= 17) bfCompatGyroNotch2Cutoffuint16_t2 - Ignored. (Size >= 17) accNotchHzuint16_t2 Hz Sets accelerometerConfigMutable()->acc_notch_hz(constrained 0-255). (Size >= 21)accNotchCutoffuint16_t2 Hz Sets accelerometerConfigMutable()->acc_notch_cutoff(constrained 1-255). (Size >= 21)legacyGyroStage2LpfHzuint16_t2 - Ignored. (Size >= 22) -
Notes: Requires specific payload sizes (5, 9, 13, 17, 21, or 22 bytes) to be accepted. Calls
pidInitFilters()if size >= 13.
- Direction: Out
- Description: Retrieves advanced PID tuning parameters. Many fields are BF compatibility placeholders.
-
Payload:
Field C Type Size (Bytes) Units Description legacyRollPitchItermIgnoreuint16_t2 - Always 0 (Legacy). legacyYawItermIgnoreuint16_t2 - Always 0 (Legacy). legacyYawPLimituint16_t2 - Always 0 (Legacy). bfCompatDeltaMethoduint8_t1 - Always 0 (BF compatibility). bfCompatVbatPidCompuint8_t1 - Always 0 (BF compatibility). bfCompatSetpointRelaxRatiouint8_t1 - Always 0 (BF compatibility). reserved1uint8_t1 - Always 0. legacyPidSumLimituint16_t2 - Always 0 (Legacy). bfCompatItermThrottleGainuint8_t1 - Always 0 (BF compatibility). accelLimitRollPitchuint16_t2 dps / 10 Axis acceleration limit for Roll/Pitch / 10 ( pidProfile()->axisAccelerationLimitRollPitch / 10).accelLimitYawuint16_t2 dps / 10 Axis acceleration limit for Yaw / 10 ( pidProfile()->axisAccelerationLimitYaw / 10). - Notes: Acceleration limits are scaled by 10 for compatibility.
- Direction: In
- Description: Sets advanced PID tuning parameters.
-
Payload: (Matches
MSP_PID_ADVANCEDstructure)Field C Type Size (Bytes) Units Description legacyRollPitchItermIgnoreuint16_t2 - Ignored. legacyYawItermIgnoreuint16_t2 - Ignored. legacyYawPLimituint16_t2 - Ignored. bfCompatDeltaMethoduint8_t1 - Ignored. bfCompatVbatPidCompuint8_t1 - Ignored. bfCompatSetpointRelaxRatiouint8_t1 - Ignored. reserved1uint8_t1 - Ignored. legacyPidSumLimituint16_t2 - Ignored. bfCompatItermThrottleGainuint8_t1 - Ignored. accelLimitRollPitchuint16_t2 dps / 10 Sets pidProfileMutable()->axisAccelerationLimitRollPitch = value * 10.accelLimitYawuint16_t2 dps / 10 Sets pidProfileMutable()->axisAccelerationLimitYaw = value * 10. - Notes: Expects 17 bytes.
- Direction: Out
- Description: Retrieves the configured hardware type for various sensors.
-
Payload:
Field C Type Size (Bytes) Description accHardwareuint8_t1 Enum ( accHardware_e): Accelerometer hardware type (accelerometerConfig()->acc_hardware).baroHardwareuint8_t1 Enum ( baroHardware_e): Barometer hardware type (barometerConfig()->baro_hardware). 0 ifUSE_BAROdisabled.magHardwareuint8_t1 Enum ( magHardware_e): Magnetometer hardware type (compassConfig()->mag_hardware). 0 ifUSE_MAGdisabled.pitotHardwareuint8_t1 Enum ( pitotHardware_e): Pitot tube hardware type (pitotmeterConfig()->pitot_hardware). 0 ifUSE_PITOTdisabled.rangefinderHardwareuint8_t1 Enum ( rangefinderHardware_e): Rangefinder hardware type (rangefinderConfig()->rangefinder_hardware). 0 ifUSE_RANGEFINDERdisabled.opflowHardwareuint8_t1 Enum ( opticalFlowHardware_e): Optical flow hardware type (opticalFlowConfig()->opflow_hardware). 0 ifUSE_OPFLOWdisabled.
- Direction: In
- Description: Sets the configured hardware type for various sensors.
-
Payload: (Matches
MSP_SENSOR_CONFIGstructure)Field C Type Size (Bytes) Description accHardwareuint8_t1 Sets accelerometerConfigMutable()->acc_hardware.baroHardwareuint8_t1 Sets barometerConfigMutable()->baro_hardware(ifUSE_BARO).magHardwareuint8_t1 Sets compassConfigMutable()->mag_hardware(ifUSE_MAG).pitotHardwareuint8_t1 Sets pitotmeterConfigMutable()->pitot_hardware(ifUSE_PITOT).rangefinderHardwareuint8_t1 Sets rangefinderConfigMutable()->rangefinder_hardware(ifUSE_RANGEFINDER).opflowHardwareuint8_t1 Sets opticalFlowConfigMutable()->opflow_hardware(ifUSE_OPFLOW). - Notes: Expects 6 bytes.
- Direction: Out
- Description: Betaflight specific, likely unused/unimplemented in INAV.
-
Notes: Not implemented in INAV
fc_msp.c.
- Direction: In
- Description: Betaflight specific, likely unused/unimplemented in INAV.
-
Notes: Not implemented in INAV
fc_msp.c.
These are commands originating from the MultiWii project.
- Direction: Out
- Description: Provides basic flight controller identity information. Not implemented in modern INAV, but used by legacy versions and MultiWii.
-
Payload:
Field C Type Size (Bytes) Units Description MultiWii version uint8_t 1 n/a Scaled version major*100+minor Mixer Mode uint8_t 1 Enumeration Mixer type MSP Version uint8_t 1 n/a Scaled version major*100+minor Platform Capability uint32_t Bitmask of MW capabilities - Notes: Obsolete. Listed for legacy compatibility only.
- Direction: Out
- Description: Provides basic flight controller status including cycle time, errors, sensor status, active modes (first 32), and the current configuration profile.
-
Payload:
Field C Type Size (Bytes) Units Description cycleTimeuint16_t2 µs Main loop cycle time ( cycleTime).i2cErrorsuint16_t2 Count Number of I2C errors encountered ( i2cGetErrorCounter()). 0 ifUSE_I2Cnot defined.sensorStatusuint16_t2 Bitmask Bitmask indicating available/active sensors ( packSensorStatus()). See notes.activeModesLowuint32_t4 Bitmask First 32 bits of the active flight modes bitmask ( packBoxModeFlags()).profileuint8_t1 Index Current configuration profile index (0-based) ( getConfigProfile()). -
Notes: Superseded by
MSP_STATUS_EXandMSP2_INAV_STATUS.sensorStatusbitmask: (Bit 0: ACC, 1: BARO, 2: MAG, 3: GPS, 4: RANGEFINDER, 5: GYRO).activeModesLowonly contains the first 32 modes; useMSP_ACTIVEBOXESfor the full set.
- Direction: Out
- Description: Provides raw sensor readings from the IMU (Accelerometer, Gyroscope, Magnetometer).
-
Payload:
Field C Type Size (Bytes) Units Description accXint16_t2 ~1/512 G Raw accelerometer X reading, scaled ( acc.accADCf[X] * 512).accYint16_t2 ~1/512 G Raw accelerometer Y reading, scaled ( acc.accADCf[Y] * 512).accZint16_t2 ~1/512 G Raw accelerometer Z reading, scaled ( acc.accADCf[Z] * 512).gyroXint16_t2 deg/s Gyroscope X-axis rate ( gyroRateDps(X)).gyroYint16_t2 deg/s Gyroscope Y-axis rate ( gyroRateDps(Y)).gyroZint16_t2 deg/s Gyroscope Z-axis rate ( gyroRateDps(Z)).magXint16_t2 Raw units Raw magnetometer X reading ( mag.magADC[X]). 0 ifUSE_MAGdisabled.magYint16_t2 Raw units Raw magnetometer Y reading ( mag.magADC[Y]). 0 ifUSE_MAGdisabled.magZint16_t2 Raw units Raw magnetometer Z reading ( mag.magADC[Z]). 0 ifUSE_MAGdisabled. - Notes: Acc scaling is approximate (512 LSB/G). Mag units depend on the sensor.
- Direction: Out
- Description: Provides the current output values for all supported servos.
-
Payload:
Field C Type Size (Bytes) Units Description servoOutputsint16_t[MAX_SUPPORTED_SERVOS]MAX_SUPPORTED_SERVOS * 2PWM Array of current servo output values (typically 1000-2000).
- Direction: Out
- Description: Provides the current output values for the first 8 motors.
-
Payload:
Field C Type Size (Bytes) Units Description motorOutputsuint16_t[8]16 PWM Array of current motor output values (typically 1000-2000). Values beyond MAX_SUPPORTED_MOTORSare 0.
- Direction: Out
- Description: Provides the current values of the received RC channels.
-
Payload:
Field C Type Size (Bytes) Units Description rcChannelsuint16_t[]rxRuntimeConfig.channelCount * 2PWM Array of current RC channel values (typically 1000-2000). Length depends on detected channels.
- Direction: Out
- Description: Provides raw GPS data (fix status, coordinates, altitude, speed, course).
-
Payload:
Field C Type Size (Bytes) Units Description fixTypeuint8_t1 Enum GPS fix type ( gpsSol.fixType).numSatuint8_t1 Count Number of satellites used in solution ( gpsSol.numSat).latitudeuint32_t4 deg * 1e7 Latitude ( gpsSol.llh.lat).longitudeuint32_t4 deg * 1e7 Longitude ( gpsSol.llh.lon).altitudeuint16_t2 meters Altitude above MSL ( gpsSol.llh.alt / 100).speeduint16_t2 cm/s Ground speed ( gpsSol.groundSpeed).groundCourseuint16_t2 deci-degrees Ground course ( gpsSol.groundCourse).hdopuint16_t2 HDOP * 100 Horizontal Dilution of Precision ( gpsSol.hdop). -
Notes: Only available if
USE_GPSis defined. Altitude is truncated to meters.
- Direction: Out
- Description: Provides computed GPS values: distance and direction to home.
-
Payload:
Field C Type Size (Bytes) Units Description distanceToHomeuint16_t2 meters Distance to the home point ( GPS_distanceToHome).directionToHomeuint16_t2 degrees Direction to the home point (0-360) ( GPS_directionToHome).gpsHeartbeatuint8_t1 Boolean Indicates if GPS data is being received ( gpsSol.flags.gpsHeartbeat). -
Notes: Only available if
USE_GPSis defined.
- Direction: Out
- Description: Provides the current attitude estimate (roll, pitch, yaw).
-
Payload:
Field C Type Size (Bytes) Units Description rollint16_t2 deci-degrees Roll angle ( attitude.values.roll).pitchint16_t2 deci-degrees Pitch angle ( attitude.values.pitch).yawint16_t2 degrees Yaw/Heading angle ( DECIDEGREES_TO_DEGREES(attitude.values.yaw)). - Notes: Yaw is converted from deci-degrees to degrees.
- Direction: Out
- Description: Provides estimated altitude, vertical speed (variometer), and raw barometric altitude.
-
Payload:
Field C Type Size (Bytes) Units Description estimatedAltitudeuint32_t4 cm Estimated altitude above home/sea level ( getEstimatedActualPosition(Z)).variometerint16_t2 cm/s Estimated vertical speed ( getEstimatedActualVelocity(Z)).baroAltitudeuint32_t4 cm Latest raw altitude from barometer ( baroGetLatestAltitude()). 0 ifUSE_BAROdisabled.
- Direction: Out
- Description: Provides analog sensor readings: battery voltage, current consumption (mAh), RSSI, and current draw (Amps).
-
Payload:
Field C Type Size (Bytes) Units Description vbatuint8_t1 0.1V Battery voltage, scaled ( getBatteryVoltage() / 10), constrained 0-255.mAhDrawnuint16_t2 mAh Consumed battery capacity ( getMAhDrawn()), constrained 0-65535.rssiuint16_t2 0-1023 or % Received Signal Strength Indicator ( getRSSI()). Units depend on source.amperageint16_t2 0.01A Current draw ( getAmperage()), constrained -32768 to 32767. -
Notes: Superseded by
MSP2_INAV_ANALOGwhich provides higher precision and more fields.
- Direction: Out
- Description: Retrieves RC tuning parameters (rates, expos, TPA) for the current control rate profile.
-
Payload:
Field C Type Size (Bytes) Description legacyRcRateuint8_t1 Always 100 (Legacy, unused). rcExpouint8_t1 Roll/Pitch RC Expo ( currentControlRateProfile->stabilized.rcExpo8).rollRateuint8_t1 Roll Rate ( currentControlRateProfile->stabilized.rates[FD_ROLL]).pitchRateuint8_t1 Pitch Rate ( currentControlRateProfile->stabilized.rates[FD_PITCH]).yawRateuint8_t1 Yaw Rate ( currentControlRateProfile->stabilized.rates[FD_YAW]).dynamicThrottlePIDuint8_t1 Dynamic Throttle PID (TPA) value ( currentControlRateProfile->throttle.dynPID).throttleMiduint8_t1 Throttle Midpoint ( currentControlRateProfile->throttle.rcMid8).throttleExpouint8_t1 Throttle Expo ( currentControlRateProfile->throttle.rcExpo8).tpaBreakpointuint16_t2 Throttle PID Attenuation (TPA) breakpoint ( currentControlRateProfile->throttle.pa_breakpoint).rcYawExpouint8_t1 Yaw RC Expo ( currentControlRateProfile->stabilized.rcYawExpo8). -
Notes: Superseded by
MSP2_INAV_RATE_PROFILEwhich includes manual rates/expos.
- Direction: Out
- Description: Provides the full bitmask of currently active flight modes (boxes).
-
Payload:
Field C Type Size (Bytes) Description activeModesboxBitmask_tsizeof(boxBitmask_t)Bitmask of all active modes ( packBoxModeFlags()). Size depends onboxBitmask_tdefinition. -
Notes: Use this instead of
MSP_STATUSorMSP_STATUS_EXif more than 32 modes are possible.
- Direction: Out
- Description: Retrieves miscellaneous configuration settings, mostly related to RC, GPS, Mag, and Battery voltage (legacy formats).
-
Payload:
Field C Type Size (Bytes) Units Description midRcuint16_t2 PWM Mid RC value ( PWM_RANGE_MIDDLE, typically 1500).legacyMinThrottleuint16_t2 - Always 0 (Legacy). maxThrottleuint16_t2 PWM Maximum throttle command ( getMaxThrottle()).minCommanduint16_t2 PWM Minimum motor command when disarmed ( motorConfig()->mincommand).failsafeThrottleuint16_t2 PWM Failsafe throttle level ( currentBatteryProfile->failsafe_throttle).gpsTypeuint8_t1 Enum GPS provider type ( gpsConfig()->provider). 0 ifUSE_GPSdisabled.legacyGpsBauduint8_t1 - Always 0 (Legacy). gpsSbasModeuint8_t1 Enum GPS SBAS mode ( gpsConfig()->sbasMode). 0 ifUSE_GPSdisabled.legacyMwCurrentOutuint8_t1 - Always 0 (Legacy). rssiChanneluint8_t1 Index RSSI channel index (1-based) ( rxConfig()->rssi_channel).reserved1uint8_t1 - Always 0. magDeclinationuint16_t2 0.1 degrees Magnetic declination / 10 ( compassConfig()->mag_declination / 10). 0 ifUSE_MAGdisabled.vbatScaleuint8_t1 Scale / 10 Voltage scale / 10 ( batteryMetersConfig()->voltage.scale / 10). 0 ifUSE_ADCdisabled.vbatMinCelluint8_t1 0.1V Min cell voltage / 10 ( currentBatteryProfile->voltage.cellMin / 10). 0 ifUSE_ADCdisabled.vbatMaxCelluint8_t1 0.1V Max cell voltage / 10 ( currentBatteryProfile->voltage.cellMax / 10). 0 ifUSE_ADCdisabled.vbatWarningCelluint8_t1 0.1V Warning cell voltage / 10 ( currentBatteryProfile->voltage.cellWarning / 10). 0 ifUSE_ADCdisabled. -
Notes: Superseded by
MSP2_INAV_MISCand other specific commands which offer better precision and more fields.
- Direction: Out
- Description: Provides a semicolon-separated string containing the names of all available flight modes (boxes).
-
Payload:
Field C Type Size (Bytes) Description boxNamesStringchar[]Variable String containing mode names separated by ';'. Null termination not guaranteed by MSP, relies on payload size. ( serializeBoxNamesReply()). -
Notes: The exact set of names depends on compiled features and configuration. Due to the size of the payload, it is recommended that
MSP_BOXIDSis used instead.
- Direction: Out
- Description: Provides a semicolon-separated string containing the names of the PID controllers.
-
Payload:
Field C Type Size (Bytes) Description pidNamesStringchar[]Variable String "ROLL;PITCH;YAW;ALT;Pos;PosR;NavR;LEVEL;MAG;VEL;". Null termination not guaranteed by MSP.
- Direction: In/Out
- Description: Get/Set a single waypoint from the mission plan.
-
Request Payload:
Field C Type Size (Bytes) Description waypointIndexuint8_t1 Index of the waypoint to retrieve (0 to NAV_MAX_WAYPOINTS - 1). -
Reply Payload:
Field C Type Size (Bytes) Units Description waypointIndexuint8_t1 Index Index of the returned waypoint. actionuint8_t1 Enum Waypoint action type ( navWaypointAction_e).latitudeuint32_t4 deg * 1e7 Latitude coordinate. longitudeuint32_t4 deg * 1e7 Longitude coordinate. altitudeuint32_t4 cm Altitude coordinate (relative to home or sea level, see flag). param1uint16_t2 Varies Parameter 1 (meaning depends on action). param2uint16_t2 Varies Parameter 2 (meaning depends on action). param3uint16_t2 Varies Parameter 3 (meaning depends on action). flaguint8_t1 Bitmask Waypoint flags ( NAV_WP_FLAG_*). -
Notes: See
navWaypoint_tandnavWaypointAction_e.
- Direction: Out
- Description: Provides a list of permanent IDs associated with the available flight modes (boxes).
-
Payload:
Field C Type Size (Bytes) Description boxIdsuint8_t[]Variable Array of permanent IDs for each configured box ( serializeBoxReply()). Length depends on number of boxes. -
Notes: Useful for mapping mode range configurations (
MSP_MODE_RANGES) back to user-understandable modes viaMSP_BOXNAMES.
- Direction: Out
- Description: Retrieves the configuration parameters for all supported servos (min, max, middle, rate). Legacy format with unused fields.
-
Payload: Repeated
MAX_SUPPORTED_SERVOStimes:Field C Type Size (Bytes) Units Description minuint16_t2 PWM Minimum servo endpoint ( servoParams(i)->min).maxuint16_t2 PWM Maximum servo endpoint ( servoParams(i)->max).middleuint16_t2 PWM Middle/Neutral servo position ( servoParams(i)->middle).rateuint8_t1 % (-100 to 100) Servo rate/scaling ( servoParams(i)->rate).reserved1uint8_t1 - Always 0. reserved2uint8_t1 - Always 0. legacyForwardChanuint8_t1 - Always 255 (Legacy). legacyReversedSourcesuint32_t4 - Always 0 (Legacy). -
Notes: Superseded by
MSP2_INAV_SERVO_CONFIGwhich has a cleaner structure.
- Direction: Out
- Description: Retrieves the current status of the navigation system.
-
Payload:
Field C Type Size (Bytes) Description navModeuint8_t1 Enum ( NAV_MODE_*): Current navigation mode (None, RTH, WP, Hold, etc.) (NAV_Status.mode).navStateuint8_t1 Enum ( NAV_STATE_*): Current navigation state (NAV_Status.state).activeWpActionuint8_t1 Enum ( navWaypointAction_e): Action of the currently executing waypoint (NAV_Status.activeWpAction).activeWpNumberuint8_t1 Index: Index of the currently executing waypoint ( NAV_Status.activeWpNumber).navErroruint8_t1 Enum ( NAV_ERROR_*): Current navigation error code (NAV_Status.error).targetHeadinguint16_t2 degrees: Target heading for heading controller ( getHeadingHoldTarget()). -
Notes: Requires
USE_GPS.
- Not implemented
- Direction: Out
- Description: Retrieves settings related to 3D/reversible motor operation.
-
Payload:
Field C Type Size (Bytes) Units Description deadbandLowuint16_t2 PWM Lower deadband limit for 3D mode ( reversibleMotorsConfig()->deadband_low).deadbandHighuint16_t2 PWM Upper deadband limit for 3D mode ( reversibleMotorsConfig()->deadband_high).neutraluint16_t2 PWM Neutral throttle point for 3D mode ( reversibleMotorsConfig()->neutral). - Notes: Requires reversible motor support.
- Direction: Out
- Description: Retrieves RC input deadband settings.
-
Payload:
Field C Type Size (Bytes) Units Description deadbanduint8_t1 PWM General RC deadband for Roll/Pitch ( rcControlsConfig()->deadband).yawDeadbanduint8_t1 PWM Specific deadband for Yaw ( rcControlsConfig()->yaw_deadband).altHoldDeadbanduint8_t1 PWM Deadband for altitude hold adjustments ( rcControlsConfig()->alt_hold_deadband).throttleDeadbanduint16_t2 PWM Deadband around throttle mid-stick ( rcControlsConfig()->mid_throttle_deadband).
- Direction: Out
- Description: Retrieves sensor alignment settings (legacy format).
-
Payload:
Field C Type Size (Bytes) Description gyroAlignuint8_t1 Always 0 (Legacy alignment enum). accAlignuint8_t1 Always 0 (Legacy alignment enum). magAlignuint8_t1 Magnetometer alignment ( compassConfig()->mag_align). 0 ifUSE_MAGdisabled.opflowAlignuint8_t1 Optical flow alignment ( opticalFlowConfig()->opflow_align). 0 ifUSE_OPFLOWdisabled. -
Notes: Board alignment is now typically handled by
MSP_BOARD_ALIGNMENT. This returns legacy enum values where applicable.
- Direction: Out
- Description: Retrieves the color index assigned to each LED mode and function/direction combination, including special colors.
-
Payload: Repeated (
LED_MODE_COUNT * LED_DIRECTION_COUNT+LED_SPECIAL_COLOR_COUNT) times:Field C Type Size (Bytes) Description modeIndexuint8_t1 Index of the LED mode ( ledModeIndex_e).LED_MODE_COUNTfor special colors.directionOrSpecialIndexuint8_t1 Index of the direction ( ledDirection_e) or special color (ledSpecialColor_e).colorIndexuint8_t1 Index of the color assigned from ledStripConfig()->colors. -
Notes: Only available if
USE_LED_STRIPis defined. Allows mapping modes/directions/specials to configured colors.
- Direction: Out
- Description: Provides battery state information, formatted primarily for DJI FPV Goggles compatibility.
-
Payload:
Field C Type Size (Bytes) Units Description cellCountuint8_t1 Count Number of battery cells ( getBatteryCellCount()).capacityuint16_t2 mAh Battery capacity ( currentBatteryProfile->capacity.value).vbatScaleduint8_t1 0.1V Battery voltage / 10 ( getBatteryVoltage() / 10).mAhDrawnuint16_t2 mAh Consumed capacity ( getMAhDrawn()).amperageint16_t2 0.01A Current draw ( getAmperage()).batteryStateuint8_t1 Enum Current battery state ( getBatteryState(), seeBATTERY_STATE_*).vbatActualuint16_t2 0.01V Actual battery voltage ( getBatteryVoltage()). -
Notes: Only available if
USE_DJI_HD_OSDorUSE_MSP_DISPLAYPORTis defined. Some values are duplicated fromMSP_ANALOG/MSP2_INAV_ANALOGbut potentially with different scaling/types.
- Direction: In/Out (?)
-
Description: Retrieves information about a specific VTX band from the VTX table. (Implementation missing in provided
fc_msp.c) - Notes: The ID is defined, but no handler exists in the provided C code. Likely intended to query band names and frequencies.
- Direction: In/Out
- Description: Retrieves information about a specific VTX power level from the VTX table.
-
Request Payload:
Field C Type Size (Bytes) Description powerLevelIndexuint8_t1 1-based index of the power level to query. -
Reply Payload:
Field C Type Size (Bytes) Description powerLevelIndexuint8_t1 1-based index of the returned power level. powerValueuint16_t2 Always 0 (Actual power value in mW is not stored/returned via MSP). labelLengthuint8_t1 Length of the power level label string that follows. labelchar[]Variable Power level label string (e.g., "25", "200"). Length given by previous field. -
Notes: Requires
USE_VTX_CONTROL. Returns error if index is out of bounds. ThepowerValuefield is unused.
These commands are sent to the FC.
- Direction: In
- Description: Provides raw RC channel data to the flight controller, typically used when the receiver is connected via MSP (e.g., MSP RX feature).
-
Payload:
Field C Type Size (Bytes) Units Description rcChannelsuint16_t[]Variable (2 * channelCount) PWM Array of RC channel values (typically 1000-2000). Number of channels determined by payload size. -
Notes: Requires
USE_RX_MSP. Maximum channelsMAX_SUPPORTED_RC_CHANNEL_COUNT. CallsrxMspFrameReceive().
- Direction: In
- Description: Provides raw GPS data to the flight controller, typically for simulation or external GPS injection.
-
Payload:
Field C Type Size (Bytes) Units Description fixTypeuint8_t1 Enum GPS fix type. numSatuint8_t1 Count Number of satellites. latitudeuint32_t4 deg * 1e7 Latitude. longitudeuint32_t4 deg * 1e7 Longitude. altitudeuint16_t2 meters Altitude (converted to cm internally). speeduint16_t2 cm/s Ground speed. groundCourseuint16_t2 ??? Ground course (units unclear from code, likely degrees or deci-degrees, ignored in current code). -
Notes: Requires
USE_GPS. Expects 14 bytes. UpdatesgpsSolstructure and callsonNewGPSData(). Note the altitude unit mismatch (meters in MSP, cm internal). Does not provide velocity components.
- Direction: In
- Description: Sets the state of flight modes (boxes). (Likely unused/obsolete in INAV).
-
Notes: Not implemented in INAV
fc_msp.c. Mode changes are typically handled via RC channels (MSP_MODE_RANGES).
- Direction: In
- Description: Sets RC tuning parameters (rates, expos, TPA) for the current control rate profile.
-
Payload: (Matches
MSP_RC_TUNINGoutgoing structure)Field C Type Size (Bytes) Description legacyRcRateuint8_t1 Ignored. rcExpouint8_t1 Sets currentControlRateProfile->stabilized.rcExpo8.rollRateuint8_t1 Sets currentControlRateProfile->stabilized.rates[FD_ROLL](constrained).pitchRateuint8_t1 Sets currentControlRateProfile->stabilized.rates[FD_PITCH](constrained).yawRateuint8_t1 Sets currentControlRateProfile->stabilized.rates[FD_YAW](constrained).dynamicThrottlePIDuint8_t1 Sets currentControlRateProfile->throttle.dynPID(constrained).throttleMiduint8_t1 Sets currentControlRateProfile->throttle.rcMid8.throttleExpouint8_t1 Sets currentControlRateProfile->throttle.rcExpo8.tpaBreakpointuint16_t2 Sets currentControlRateProfile->throttle.pa_breakpoint.rcYawExpouint8_t1 (Optional) Sets currentControlRateProfile->stabilized.rcYawExpo8. -
Notes: Expects 10 or 11 bytes. Calls
schedulePidGainsUpdate(). Superseded byMSP2_INAV_SET_RATE_PROFILE.
- Direction: In
- Description: Starts the accelerometer calibration procedure.
- Payload: None
-
Notes: Will fail if armed. Calls
accStartCalibration().
- Direction: In
- Description: Starts the magnetometer calibration procedure.
- Payload: None
-
Notes: Will fail if armed. Enables the
CALIBRATE_MAGstate flag.
- Direction: In
- Description: Sets miscellaneous configuration settings (legacy formats/scaling).
-
Payload: (Matches
MSP_MISCoutgoing structure)Field C Type Size (Bytes) Units Description midRcuint16_t2 PWM Ignored. legacyMinThrottleuint16_t2 - Ignored. legacyMaxThrottleuint16_t2 - Ignored. minCommanduint16_t2 PWM Sets motorConfigMutable()->mincommand(constrained 0-PWM_RANGE_MAX).failsafeThrottleuint16_t2 PWM Sets currentBatteryProfileMutable->failsafe_throttle(constrained PWM_RANGE_MIN/MAX).gpsTypeuint8_t1 Enum Sets gpsConfigMutable()->provider(ifUSE_GPS).legacyGpsBauduint8_t1 - Ignored. gpsSbasModeuint8_t1 Enum Sets gpsConfigMutable()->sbasMode(ifUSE_GPS).legacyMwCurrentOutuint8_t1 - Ignored. rssiChanneluint8_t1 Index Sets rxConfigMutable()->rssi_channel(constrained 0-MAX_SUPPORTED_RC_CHANNEL_COUNT). Updates source.reserved1uint8_t1 - Ignored. magDeclinationuint16_t2 0.1 degrees Sets compassConfigMutable()->mag_declination = value * 10(ifUSE_MAG).vbatScaleuint8_t1 Scale / 10 Sets batteryMetersConfigMutable()->voltage.scale = value * 10(ifUSE_ADC).vbatMinCelluint8_t1 0.1V Sets currentBatteryProfileMutable->voltage.cellMin = value * 10(ifUSE_ADC).vbatMaxCelluint8_t1 0.1V Sets currentBatteryProfileMutable->voltage.cellMax = value * 10(ifUSE_ADC).vbatWarningCelluint8_t1 0.1V Sets currentBatteryProfileMutable->voltage.cellWarning = value * 10(ifUSE_ADC). -
Notes: Expects 22 bytes. Superseded by
MSP2_INAV_SET_MISC.
- Direction: In
- Description: Resets all configuration settings to their default values and saves to EEPROM.
- Payload: None
-
Notes: Will fail if armed. Suspends RX, calls
resetEEPROM(),writeEEPROM(),readEEPROM(), resumes RX. Use with caution!
- Direction: In
- Description: Sets a single waypoint in the mission plan.
-
Payload: (Matches
MSP_WPreply structure)Field C Type Size (Bytes) Units Description waypointIndexuint8_t1 Index Index of the waypoint to set (0 to NAV_MAX_WAYPOINTS - 1).actionuint8_t1 Enum Waypoint action type. latitudeuint32_t4 deg * 1e7 Latitude coordinate. longitudeuint32_t4 deg * 1e7 Longitude coordinate. altitudeuint32_t4 cm Altitude coordinate. param1uint16_t2 Varies Parameter 1. param2uint16_t2 Varies Parameter 2. param3uint16_t2 Varies Parameter 3. flaguint8_t1 Bitmask Waypoint flags. -
Notes: Expects 21 bytes. Calls
setWaypoint(). IfUSE_FW_AUTOLANDis enabled, this also interacts with autoland approach settings based on waypoint index and flags.
- Direction: In
- Description: Selects the active configuration profile and saves it.
-
Payload:
Field C Type Size (Bytes) Description profileIndexuint8_t1 Index of the profile to activate (0-based). -
Notes: Will fail if armed. Calls
setConfigProfileAndWriteEEPROM().
- Direction: In
- Description: Sets the target heading for the heading hold controller (e.g., during MAG mode).
-
Payload:
Field C Type Size (Bytes) Units Description headinguint16_t2 degrees Target heading (0-359). -
Notes: Expects 2 bytes. Calls
updateHeadingHoldTarget().
- Direction: In
- Description: Sets the configuration for a single servo (legacy format).
-
Payload:
Field C Type Size (Bytes) Units Description servoIndexuint8_t1 Index Index of the servo to configure (0 to MAX_SUPPORTED_SERVOS - 1).minuint16_t2 PWM Minimum servo endpoint. maxuint16_t2 PWM Maximum servo endpoint. middleuint16_t2 PWM Middle/Neutral servo position. rateuint8_t1 % Servo rate/scaling. reserved1uint8_t1 - Ignored. reserved2uint8_t1 - Ignored. legacyForwardChanuint8_t1 - Ignored. legacyReversedSourcesuint32_t4 - Ignored. -
Notes: Expects 15 bytes. Returns error if index is invalid. Calls
servoComputeScalingFactors(). Superseded byMSP2_INAV_SET_SERVO_CONFIG.
- Direction: In
- Description: Sets the disarmed motor values, typically used for motor testing or propeller balancing functions in a configurator.
-
Payload:
Field C Type Size (Bytes) Units Description motorValuesuint16_t[8]16 PWM Array of motor values to set when disarmed. Only affects first MAX_SUPPORTED_MOTORS. -
Notes: Expects 16 bytes. Modifies the
motor_disarmedarray. These values are not saved persistently.
- Not implemented
- Direction: In
- Description: Sets parameters related to 3D/reversible motor operation.
-
Payload: (Matches
MSP_3Doutgoing structure)Field C Type Size (Bytes) Units Description deadbandLowuint16_t2 PWM Sets reversibleMotorsConfigMutable()->deadband_low.deadbandHighuint16_t2 PWM Sets reversibleMotorsConfigMutable()->deadband_high.neutraluint16_t2 PWM Sets reversibleMotorsConfigMutable()->neutral. - Notes: Expects 6 bytes. Requires reversible motor support.
- Direction: In
- Description: Sets RC input deadband values.
-
Payload: (Matches
MSP_RC_DEADBANDoutgoing structure)Field C Type Size (Bytes) Units Description deadbanduint8_t1 PWM Sets rcControlsConfigMutable()->deadband.yawDeadbanduint8_t1 PWM Sets rcControlsConfigMutable()->yaw_deadband.altHoldDeadbanduint8_t1 PWM Sets rcControlsConfigMutable()->alt_hold_deadband.throttleDeadbanduint16_t2 PWM Sets rcControlsConfigMutable()->mid_throttle_deadband. - Notes: Expects 5 bytes.
- Direction: In
- Description: Resets the PIDs of the current profile to their default values. Does not save.
- Payload: None
-
Notes: Calls
PG_RESET_CURRENT(pidProfile). To save, follow withMSP_EEPROM_WRITE.
- Direction: In
- Description: Sets sensor alignment (legacy format).
-
Payload: (Matches
MSP_SENSOR_ALIGNMENToutgoing structure)Field C Type Size (Bytes) Description gyroAlignuint8_t1 Ignored. accAlignuint8_t1 Ignored. magAlignuint8_t1 Sets compassConfigMutable()->mag_align(ifUSE_MAG).opflowAlignuint8_t1 Sets opticalFlowConfigMutable()->opflow_align(ifUSE_OPFLOW). -
Notes: Expects 4 bytes. Use
MSP_SET_BOARD_ALIGNMENTfor primary board orientation.
- Direction: In
- Description: Sets the color index for a specific LED mode/function combination.
-
Payload:
Field C Type Size (Bytes) Description modeIndexuint8_t1 Index of the LED mode ( ledModeIndex_eorLED_MODE_COUNTfor special).directionOrSpecialIndexuint8_t1 Index of the direction or special color. colorIndexuint8_t1 Index of the color to assign from ledStripConfig()->colors. -
Notes: Only available if
USE_LED_STRIPis defined. Expects 3 bytes. Returns error if setting fails (invalid index).
- Direction: In
- Description: Sets the accelerometer trim values (leveling calibration).
-
Notes: Not implemented in INAV
fc_msp.c. UseMSP_ACC_CALIBRATION.
- Direction: Out
- Description: Gets the accelerometer trim values.
-
Notes: Not implemented in INAV
fc_msp.c. Calibration data viaMSP_CALIBRATION_DATA.
- Direction: Out
- Description: Retrieves the custom servo mixer rules (legacy format).
-
Payload: Repeated
MAX_SERVO_RULEStimes:Field C Type Size (Bytes) Units Description targetChanneluint8_t1 Index Servo output channel index (0-based). inputSourceuint8_t1 Enum Input source for the mix (RC chan, Roll, Pitch...). See mixerSource_t.rateuint16_t2 % * 100? Mixing rate/weight. Needs scaling check. speeduint8_t1 0-100 Speed/Slew rate limit. reserved1uint8_t1 - Always 0. legacyMaxuint8_t1 - Always 100 (Legacy). legacyBoxuint8_t1 - Always 0 (Legacy). -
Notes: Superseded by
MSP2_INAV_SERVO_MIXER.
- Direction: In
- Description: Sets a single custom servo mixer rule (legacy format).
-
Payload:
Field C Type Size (Bytes) Units Description ruleIndexuint8_t1 Index Index of the rule to set (0 to MAX_SERVO_RULES - 1).targetChanneluint8_t1 Index Servo output channel index. inputSourceuint8_t1 Enum Input source for the mix. rateuint16_t2 % * 100? Mixing rate/weight. speeduint8_t1 0-100 Speed/Slew rate limit. legacyMinMaxuint16_t2 - Ignored. legacyBoxuint8_t1 - Ignored. -
Notes: Expects 9 bytes. Returns error if index invalid. Calls
loadCustomServoMixer(). Superseded byMSP2_INAV_SET_SERVO_MIXER.
- Direction: In/Out (Special: In command triggers passthrough mode, Reply confirms start)
- Description: Enables serial passthrough mode to peripherals like ESCs (BLHeli 4-way) or other serial devices.
- Request Payload (Legacy - 4way): None
-
Request Payload (Extended):
Field C Type Size (Bytes) Description passthroughModeuint8_t1 Type of passthrough ( mspPassthroughType_e: Serial ID, Serial Function, ESC 4way).passthroughArgumentuint8_t1 Argument for the mode (e.g., Serial Port Identifier, Serial Function ID). Defaults to 0 if not sent. -
Reply Payload:
Field C Type Size (Bytes) Description statusuint8_t1 1 if passthrough started successfully, 0 on error (e.g., port not found). For 4way, returns number of ESCs found. -
Notes: If successful, sets
mspPostProcessFnto the appropriate handler (mspSerialPassthroughFnoresc4wayProcess). This handler takes over the serial port after the reply is sent. RequiresUSE_SERIAL_4WAY_BLHELI_INTERFACEfor ESC passthrough.
- Direction: Out
- Description: Retrieves the current Real-Time Clock time.
-
Payload:
Field C Type Size (Bytes) Units Description secondsint32_t4 Seconds Seconds since epoch (or relative time if not set). 0 if RTC time unknown. millisuint16_t2 Milliseconds Millisecond part of the time. 0 if RTC time unknown. - Notes: Requires RTC hardware/support. Returns (0, 0) if time is not available/set.
- Direction: In
- Description: Sets the Real-Time Clock time.
-
Payload:
Field C Type Size (Bytes) Units Description secondsint32_t4 Seconds Seconds component of time to set. millisuint16_t2 Milliseconds Millisecond component of time to set. -
Notes: Requires RTC hardware/support. Expects 6 bytes. Uses
rtcSet().
- Direction: In
- Description: Saves the current configuration from RAM to non-volatile memory (EEPROM/Flash).
- Payload: None
-
Notes: Will fail if armed. Suspends RX, calls
writeEEPROM(),readEEPROM(), resumes RX.
- Direction: Out
- Description: Retrieves debug ("serial printf") messages from the firmware.
-
Payload:
Field C Type Size (Bytes) Description Message Text char[]Variable NULterminated debug message text.
- Direction: Out
-
Description: Retrieves values from the firmware's
debug[]array (legacy 16-bit version). -
Payload:
Field C Type Size (Bytes) Description debugValuesuint16_t[4]8 First 4 values from the debugarray. -
Notes: Useful for developers. See
MSP2_INAV_DEBUGfor 32-bit values.
- Direction: N/A (Indicator)
-
Description: This ID is used as a payload indicator within an MSPv1 message structure (
$M>) to signify that the following payload conforms to the MSPv2 format. It's not a command itself. - Notes: See MSPv2 documentation for the actual frame structure that follows this indicator.
- Direction: Out
-
Description: Provides extended flight controller status, including CPU load, arming flags, and calibration status, in addition to
MSP_STATUSfields. -
Payload: (Starts with
MSP_STATUSfields)Field C Type Size (Bytes) Units Description cycleTimeuint16_t2 µs Main loop cycle time. i2cErrorsuint16_t2 Count I2C errors. sensorStatusuint16_t2 Bitmask Sensor status bitmask. activeModesLowuint32_t4 Bitmask First 32 active modes. profileuint8_t1 Index Current config profile index. cpuLoaduint16_t2 % Average system load percentage ( averageSystemLoadPercent).armingFlagsuint16_t2 Bitmask Flight controller arming flags ( armingFlags). Note: Truncated to 16 bits.accCalibAxisFlagsuint8_t1 Bitmask Accelerometer calibrated axes flags ( accGetCalibrationAxisFlags()). -
Notes: Superseded by
MSP2_INAV_STATUSwhich provides the full 32-bitarmingFlagsand other enhancements.
- Direction: Out
- Description: Provides the hardware status for each individual sensor system.
-
Payload:
Field C Type Size (Bytes) Units Description overallHealthuint8_t1 Boolean 1 if all essential hardware is healthy, 0 otherwise ( isHardwareHealthy()).gyroStatusuint8_t1 Enum Gyro hardware status ( getHwGyroStatus()).accStatusuint8_t1 Enum Accelerometer hardware status ( getHwAccelerometerStatus()).magStatusuint8_t1 Enum Compass hardware status ( getHwCompassStatus()).baroStatusuint8_t1 Enum Barometer hardware status ( getHwBarometerStatus()).gpsStatusuint8_t1 Enum GPS hardware status ( getHwGPSStatus()).rangefinderStatusuint8_t1 Enum Rangefinder hardware status ( getHwRangefinderStatus()).pitotStatusuint8_t1 Enum Pitot hardware status ( getHwPitotmeterStatus()).opflowStatusuint8_t1 Enum Optical Flow hardware status ( getHwOpticalFlowStatus()). -
Notes: Status values likely correspond to
SENSOR_STATUS_*enums (e.g., OK, Unhealthy, Not Present).
- Direction: Out
- Description: Provides the unique identifier of the microcontroller.
-
Payload:
Field C Type Size (Bytes) Description uid0uint32_t4 First 32 bits of the unique ID ( U_ID_0).uid1uint32_t4 Middle 32 bits of the unique ID ( U_ID_1).uid2uint32_t4 Last 32 bits of the unique ID ( U_ID_2). - Notes: Total 12 bytes, representing a 96-bit unique ID.
- Direction: Out
- Description: Provides satellite signal strength information (legacy U-Blox compatibility stub).
-
Payload:
Field C Type Size (Bytes) Description protocolVersionuint8_t1 Always 1 (Stub version). numChannelsuint8_t1 Always 0 (Number of SV info channels reported). hdopHundredsuint8_t1 HDOP / 100 ( gpsSol.hdop / 100).hdopUnitsuint8_t1 HDOP / 100 ( gpsSol.hdop / 100). -
Notes: Requires
USE_GPS. This is just a stub in INAV and does not provide actual per-satellite signal info.hdopUnitsduplicateshdopHundreds.
- Direction: Out
- Description: Provides debugging statistics for the GPS communication link.
-
Payload:
Field C Type Size (Bytes) Units Description lastMessageDtuint16_t2 ms Time since last valid GPS message ( gpsStats.lastMessageDt).errorsuint32_t4 Count Number of GPS communication errors ( gpsStats.errors).timeoutsuint32_t4 Count Number of GPS communication timeouts ( gpsStats.timeouts).packetCountuint32_t4 Count Number of valid GPS packets received ( gpsStats.packetCount).hdopuint16_t2 HDOP * 100 Horizontal Dilution of Precision ( gpsSol.hdop).ephuint16_t2 cm Estimated Horizontal Position Accuracy ( gpsSol.eph).epvuint16_t2 cm Estimated Vertical Position Accuracy ( gpsSol.epv). -
Notes: Requires
USE_GPS.
- Direction: Out
- Description: Provides information potentially useful for transmitter LUA scripts.
-
Payload:
Field C Type Size (Bytes) Description rssiSourceuint8_t1 Enum: Source of the RSSI value ( getRSSISource()).rtcDateTimeIsSetuint8_t1 Boolean: 1 if the RTC has been set, 0 otherwise. -
Notes: See
rssiSource_e.
- Direction: In
- Description: Allows a transmitter LUA script (or similar) to send runtime information (currently only RSSI) to the firmware.
-
Payload:
Field C Type Size (Bytes) Units Description rssiuint8_t1 % RSSI value (0-100) provided by the external source. -
Notes: Calls
setRSSIFromMSP(). Expects 1 byte.
These commands are part of the MSPv2 specification and are intended for general configuration and interaction.
- Direction: Out
- Description: Gets the time zone offset configuration.
-
Payload:
Field C Type Size (Bytes) Units Description tzOffsetMinutesint16_t2 Minutes Time zone offset from UTC ( timeConfig()->tz_offset).tzAutoDstuint8_t1 Boolean Automatic daylight saving time enabled ( timeConfig()->tz_automatic_dst).
- Direction: In
- Description: Sets the time zone offset configuration.
-
Payload (Format 1 - Offset only):
Field C Type Size (Bytes) Units Description tzOffsetMinutesint16_t2 Minutes Sets timeConfigMutable()->tz_offset. -
Payload (Format 2 - Offset + DST):
Field C Type Size (Bytes) Units Description tzOffsetMinutesint16_t2 Minutes Sets timeConfigMutable()->tz_offset.tzAutoDstuint8_t1 Boolean Sets timeConfigMutable()->tz_automatic_dst. - Notes: Accepts 2 or 3 bytes.
- Direction: In/Out
- Description: Gets the value of a specific configuration setting, identified by name or index.
-
Request Payload (By Name):
Field C Type Size (Bytes) Description settingNamechar[]Variable Null-terminated string containing the setting name (e.g., "gyro_main_lpf_hz"). -
Request Payload (By Index):
Field C Type Size (Bytes) Description zeroByteuint8_t1 Must be 0. settingIndexuint16_t2 Absolute index of the setting. -
Reply Payload:
Field C Type Size (Bytes) Description settingValueuint8_t[]Variable Raw byte value of the setting. Size depends on the setting's type ( settingGetValueSize()). -
Notes: Returns error if setting not found. Use
MSP2_COMMON_SETTING_INFOto discover settings, types, and sizes.
- Direction: In
- Description: Sets the value of a specific configuration setting, identified by name or index.
-
Payload:
Field C Type Size (Bytes) Description settingIdentifierVaries Variable Setting name (null-terminated string) OR Index (0x00 followed by uint16_tindex).settingValueuint8_t[]Variable Raw byte value to set for the setting. Size must match the setting's type. -
Notes: Performs type checking and range validation (min/max). Returns error if setting not found, value size mismatch, or value out of range. Handles different data types (
uint8,int16,float,string, etc.) internally.
- Direction: Out
- Description: Retrieves the current motor mixer configuration (throttle, roll, pitch, yaw weights for each motor) for the primary and secondary mixer profiles.
-
Payload (Profile 1): Repeated
MAX_SUPPORTED_MOTORStimes:Field C Type Size (Bytes) Units Description throttleWeightuint16_t2 Scaled (0-4000) Throttle weight * 1000, offset by 2000. (Range -2.0 to +2.0 -> 0 to 4000). rollWeightuint16_t2 Scaled (0-4000) Roll weight * 1000, offset by 2000. pitchWeightuint16_t2 Scaled (0-4000) Pitch weight * 1000, offset by 2000. yawWeightuint16_t2 Scaled (0-4000) Yaw weight * 1000, offset by 2000. -
Payload (Profile 2 - Optional): Repeated
MAX_SUPPORTED_MOTORStimes (only ifMAX_MIXER_PROFILE_COUNT> 1):Field C Type Size (Bytes) Units Description throttleWeightuint16_t2 Scaled (0-4000) Profile 2 Throttle weight. rollWeightuint16_t2 Scaled (0-4000) Profile 2 Roll weight. pitchWeightuint16_t2 Scaled (0-4000) Profile 2 Pitch weight. yawWeightuint16_t2 Scaled (0-4000) Profile 2 Yaw weight. -
Notes: Scaling is
(float_weight + 2.0) * 1000.primaryMotorMixer()provides the data.
- Direction: In
- Description: Sets the motor mixer weights for a single motor in the primary mixer profile.
-
Payload:
Field C Type Size (Bytes) Units Description motorIndexuint8_t1 Index Index of the motor to configure (0 to MAX_SUPPORTED_MOTORS - 1).throttleWeightuint16_t2 Scaled (0-4000) Sets throttle weight from (value / 1000.0) - 2.0.rollWeightuint16_t2 Scaled (0-4000) Sets roll weight from (value / 1000.0) - 2.0.pitchWeightuint16_t2 Scaled (0-4000) Sets pitch weight from (value / 1000.0) - 2.0.yawWeightuint16_t2 Scaled (0-4000) Sets yaw weight from (value / 1000.0) - 2.0. -
Notes: Expects 9 bytes. Modifies
primaryMotorMixerMutable(). Returns error if index is invalid.
-
Direction: In/Out
-
Description: Gets detailed information about a specific configuration setting (name, type, range, flags, current value, etc.).
-
Request Payload: Same as
MSP2_COMMON_SETTINGrequest (name string or index). -
Reply Payload:
Field C Type Size (Bytes) Description settingNamechar[]Variable Null-terminated setting name. pgnuint16_t2 Parameter Group Number (PGN) ID. typeuint8_t1 Variable type ( VAR_UINT8,VAR_FLOAT, etc.).sectionuint8_t1 Setting section ( MASTER_VALUE,PROFILE_VALUE, etc.).modeuint8_t1 Setting mode ( MODE_NORMAL,MODE_LOOKUP, etc.).minValueint32_t4 Minimum allowed value (as signed 32-bit). maxValueuint32_t4 Maximum allowed value (as unsigned 32-bit). settingIndexuint16_t2 Absolute index of the setting. profileIndexuint8_t1 Current profile index (if applicable, else 0). profileCountuint8_t1 Total number of profiles (if applicable, else 0). lookupNameschar[]Variable (If mode == MODE_LOOKUP) Series of null-terminated strings for each possible value from min to max.settingValueuint8_t[]Variable Current raw byte value of the setting. -
Notes:
o Very useful for configurators to dynamically build interfaces. Returns error if setting not found. o This is a variable length message, depending on the
mode.
- Direction: In/Out
- Description: Gets a list of Parameter Group Numbers (PGNs) used by settings, along with the start and end setting indexes for each group. Can request info for a single PGN.
-
Request Payload (Optional):
Field C Type Size (Bytes) Description pgnuint16_t2 PGN ID to query. If omitted, returns all used PGNs. -
Reply Payload: Repeated for each PGN found:
Field C Type Size (Bytes) Description pgnuint16_t2 Parameter Group Number (PGN) ID. startIndexuint16_t2 Absolute index of the first setting in this group. endIndexuint16_t2 Absolute index of the last setting in this group. - Notes: Allows efficient fetching of related settings by group.
- Direction: Out
- Description: Retrieves the configuration for all available serial ports.
-
Payload: Repeated for each available serial port:
Field C Type Size (Bytes) Description identifieruint8_t1 Port identifier ( serialPortIdentifier_e).functionMaskuint32_t4 Bitmask of enabled functions ( FUNCTION_*).mspBaudIndexuint8_t1 Baud rate index for MSP function. gpsBaudIndexuint8_t1 Baud rate index for GPS function. telemetryBaudIndexuint8_t1 Baud rate index for Telemetry function. peripheralBaudIndexuint8_t1 Baud rate index for other peripheral functions. -
Notes: Baud rate indexes map to actual baud rates (e.g., 9600, 115200). See
baudRatesarray.
- Direction: In
- Description: Sets the configuration for one or more serial ports.
-
Payload: Repeated for each port being configured:
Field C Type Size (Bytes) Description identifieruint8_t1 Port identifier ( serialPortIdentifier_e).functionMaskuint32_t4 Bitmask of functions to enable. mspBaudIndexuint8_t1 Baud rate index for MSP. gpsBaudIndexuint8_t1 Baud rate index for GPS. telemetryBaudIndexuint8_t1 Baud rate index for Telemetry. peripheralBaudIndexuint8_t1 Baud rate index for peripherals. -
Notes: Payload size must be a multiple of the size of one port config entry (1 + 4 + 4 = 9 bytes). Returns error if identifier is invalid or size is incorrect. Baud rate indexes are constrained
BAUD_MINtoBAUD_MAX.
- Direction: In
- Description: Sets the position and status information for a "radar" Point of Interest (POI). Used for displaying other craft/objects on the OSD map.
-
Payload:
Field C Type Size (Bytes) Units Description poiIndexuint8_t1 Index Index of the POI slot (0 to RADAR_MAX_POIS - 1).stateuint8_t1 Enum Status of the POI (0=undefined, 1=armed, 2=lost). latitudeuint32_t4 deg * 1e7 Latitude of the POI. longitudeuint32_t4 deg * 1e7 Longitude of the POI. altitudeuint32_t4 cm Altitude of the POI. headinguint16_t2 degrees Heading of the POI (0-359). speeduint16_t2 cm/s Speed of the POI. linkQualityuint8_t1 0-4 Link quality indicator. -
Notes: Expects 19 bytes. Updates the
radar_poisarray.
- Direction: In
- Description: Sets radar information to display (likely internal/unused).
-
Notes: Not implemented in INAV
fc_msp.c.
- Direction: In
- Description: Provides RC link statistics (RSSI, LQ) to the FC, typically from an MSP-based RC link (like ExpressLRS). Sent periodically by the RC link.
-
Payload:
Field C Type Size (Bytes) Units Description sublinkIDuint8_t1 - Sublink identifier (usually 0). validLinkuint8_t1 Boolean Indicates if the link is currently valid (not in failsafe). rssiPercentuint8_t1 % Uplink RSSI percentage (0-100). uplinkRSSI_dBmuint8_t1 -dBm Uplink RSSI in dBm (sent as positive, e.g., 70 means -70dBm). downlinkLQuint8_t1 % Downlink Link Quality (0-100). uplinkLQuint8_t1 % Uplink Link Quality (0-100). uplinkSNRint8_t1 dB Uplink Signal-to-Noise Ratio. -
Notes: Requires
USE_RX_MSP. Expects at least 7 bytes. UpdatesrxLinkStatisticsand sets RSSI viasetRSSIFromMSP_RC()only ifsublinkIDis 0. This message expects no reply (MSP_RESULT_NO_REPLY).
- Direction: In
- Description: Provides additional RC link information (power levels, band, mode) to the FC from an MSP-based RC link. Sent less frequently than link stats.
-
Payload:
Field C Type Size (Bytes) Units Description sublinkIDuint8_t1 - Sublink identifier (usually 0). uplinkTxPoweruint16_t2 mW? Uplink transmitter power level. downlinkTxPoweruint16_t2 mW? Downlink transmitter power level. bandchar[4]4 - Operating band string (e.g., "2G4", "900"). modechar[6]6 - Operating mode/rate string (e.g., "100HZ", "F1000"). -
Notes: Requires
USE_RX_MSP. Expects at least 15 bytes. UpdatesrxLinkStatisticsonly ifsublinkIDis 0. Converts band/mode strings to uppercase. This message expects no reply (MSP_RESULT_NO_REPLY).
These commands are specific extensions added by the INAV project.
- Direction: Out
-
Description: Provides comprehensive flight controller status, extending
MSP_STATUS_EXwith full arming flags, battery profile, and mixer profile. -
Payload:
Field C Type Size (Bytes) Units Description cycleTimeuint16_t2 µs Main loop cycle time. i2cErrorsuint16_t2 Count I2C errors. sensorStatusuint16_t2 Bitmask Sensor status bitmask. cpuLoaduint16_t2 % Average system load percentage. profileAndBattProfileuint8_t1 Packed Bits 0-3: Config profile index ( getConfigProfile()), Bits 4-7: Battery profile index (getConfigBatteryProfile()).armingFlagsuint32_t4 Bitmask Full 32-bit flight controller arming flags ( armingFlags).activeModesboxBitmask_tsizeof(boxBitmask_t)Bitmask Full bitmask of active flight modes ( packBoxModeFlags()).mixerProfileuint8_t1 Index Current mixer profile index ( getConfigMixerProfile()).
- Direction: Out
- Description: Provides data from the optical flow sensor.
-
Payload:
Field C Type Size (Bytes) Units Description qualityuint8_t1 0-255 Raw quality indicator from the sensor ( opflow.rawQuality). 0 ifUSE_OPFLOWdisabled.flowRateXint16_t2 degrees/s Optical flow rate X (roll axis) ( RADIANS_TO_DEGREES(opflow.flowRate[X])). 0 ifUSE_OPFLOWdisabled.flowRateYint16_t2 degrees/s Optical flow rate Y (pitch axis) ( RADIANS_TO_DEGREES(opflow.flowRate[Y])). 0 ifUSE_OPFLOWdisabled.bodyRateXint16_t2 degrees/s Compensated body rate X (roll axis) ( RADIANS_TO_DEGREES(opflow.bodyRate[X])). 0 ifUSE_OPFLOWdisabled.bodyRateYint16_t2 degrees/s Compensated body rate Y (pitch axis) ( RADIANS_TO_DEGREES(opflow.bodyRate[Y])). 0 ifUSE_OPFLOWdisabled. -
Notes: Requires
USE_OPFLOW.
- Direction: Out
-
Description: Provides detailed analog sensor readings, superseding
MSP_ANALOGwith higher precision and additional fields. -
Payload:
Field C Type Size (Bytes) Units Description batteryFlagsuint8_t1 Bitmask Battery status flags: Bit 0=Full on plug-in, Bit 1=Use capacity threshold, Bit 2-3=Battery State enum ( getBatteryState()), Bit 4-7=Cell Count (getBatteryCellCount()).vbatuint16_t2 0.01V Battery voltage ( getBatteryVoltage()).amperageuint16_t2 0.01A Current draw ( getAmperage()).powerDrawuint32_t4 mW Power draw ( getPower()).mAhDrawnuint32_t4 mAh Consumed capacity ( getMAhDrawn()).mWhDrawnuint32_t4 mWh Consumed energy ( getMWhDrawn()).remainingCapacityuint32_t4 mAh/mWh Estimated remaining capacity ( getBatteryRemainingCapacity()).percentageRemaininguint8_t1 % Estimated remaining capacity percentage ( calculateBatteryPercentage()).rssiuint16_t2 0-1023 or % RSSI value ( getRSSI()).
- Direction: Out
-
Description: Retrieves miscellaneous configuration settings, superseding
MSP_MISCwith higher precision and capacity fields. -
Payload:
Field C Type Size (Bytes) Units Description midRcuint16_t2 PWM Mid RC value ( PWM_RANGE_MIDDLE).legacyMinThrottleuint16_t2 - Always 0 (Legacy). maxThrottleuint16_t2 PWM Maximum throttle command ( getMaxThrottle()).minCommanduint16_t2 PWM Minimum motor command ( motorConfig()->mincommand).failsafeThrottleuint16_t2 PWM Failsafe throttle level ( currentBatteryProfile->failsafe_throttle).gpsTypeuint8_t1 Enum GPS provider type ( gpsConfig()->provider). 0 ifUSE_GPSdisabled.legacyGpsBauduint8_t1 - Always 0 (Legacy). gpsSbasModeuint8_t1 Enum GPS SBAS mode ( gpsConfig()->sbasMode). 0 ifUSE_GPSdisabled.rssiChanneluint8_t1 Index RSSI channel index (1-based) ( rxConfig()->rssi_channel).magDeclinationuint16_t2 0.1 degrees Magnetic declination / 10 ( compassConfig()->mag_declination / 10). 0 ifUSE_MAGdisabled.vbatScaleuint16_t2 Scale Voltage scale ( batteryMetersConfig()->voltage.scale). 0 ifUSE_ADCdisabled.vbatSourceuint8_t1 Enum Voltage source ( batteryMetersConfig()->voltageSource). 0 ifUSE_ADCdisabled.cellCountuint8_t1 Count Configured cell count ( currentBatteryProfile->cells). 0 ifUSE_ADCdisabled.vbatCellDetectuint16_t2 0.01V Cell detection voltage ( currentBatteryProfile->voltage.cellDetect). 0 ifUSE_ADCdisabled.vbatMinCelluint16_t2 0.01V Min cell voltage ( currentBatteryProfile->voltage.cellMin). 0 ifUSE_ADCdisabled.vbatMaxCelluint16_t2 0.01V Max cell voltage ( currentBatteryProfile->voltage.cellMax). 0 ifUSE_ADCdisabled.vbatWarningCelluint16_t2 0.01V Warning cell voltage ( currentBatteryProfile->voltage.cellWarning). 0 ifUSE_ADCdisabled.capacityValueuint32_t4 mAh/mWh Battery capacity ( currentBatteryProfile->capacity.value).capacityWarninguint32_t4 mAh/mWh Capacity warning threshold ( currentBatteryProfile->capacity.warning).capacityCriticaluint32_t4 mAh/mWh Capacity critical threshold ( currentBatteryProfile->capacity.critical).capacityUnituint8_t1 Enum Capacity unit ( batteryMetersConfig()->capacity_unit).
- Direction: In
-
Description: Sets miscellaneous configuration settings, superseding
MSP_SET_MISC. -
Payload: (Matches
MSP2_INAV_MISCstructure)Field C Type Size (Bytes) Units Description midRcuint16_t2 PWM Ignored. legacyMinThrottleuint16_t2 - Ignored. legacyMaxThrottleuint16_t2 - Ignored. minCommanduint16_t2 PWM Sets motorConfigMutable()->mincommand(constrained).failsafeThrottleuint16_t2 PWM Sets currentBatteryProfileMutable->failsafe_throttle(constrained).gpsTypeuint8_t1 Enum Sets gpsConfigMutable()->provider(ifUSE_GPS).legacyGpsBauduint8_t1 - Ignored. gpsSbasModeuint8_t1 Enum Sets gpsConfigMutable()->sbasMode(ifUSE_GPS).rssiChanneluint8_t1 Index Sets rxConfigMutable()->rssi_channel(constrained). Updates source.magDeclinationuint16_t2 0.1 degrees Sets compassConfigMutable()->mag_declination = value * 10(ifUSE_MAG).vbatScaleuint16_t2 Scale Sets batteryMetersConfigMutable()->voltage.scale(ifUSE_ADC).vbatSourceuint8_t1 Enum Sets batteryMetersConfigMutable()->voltageSource(ifUSE_ADC, validated).cellCountuint8_t1 Count Sets currentBatteryProfileMutable->cells(ifUSE_ADC).vbatCellDetectuint16_t2 0.01V Sets currentBatteryProfileMutable->voltage.cellDetect(ifUSE_ADC).vbatMinCelluint16_t2 0.01V Sets currentBatteryProfileMutable->voltage.cellMin(ifUSE_ADC).vbatMaxCelluint16_t2 0.01V Sets currentBatteryProfileMutable->voltage.cellMax(ifUSE_ADC).vbatWarningCelluint16_t2 0.01V Sets currentBatteryProfileMutable->voltage.cellWarning(ifUSE_ADC).capacityValueuint32_t4 mAh/mWh Sets currentBatteryProfileMutable->capacity.value.capacityWarninguint32_t4 mAh/mWh Sets currentBatteryProfileMutable->capacity.warning.capacityCriticaluint32_t4 mAh/mWh Sets currentBatteryProfileMutable->capacity.critical.capacityUnituint8_t1 Enum Sets batteryMetersConfigMutable()->capacity_unit(validated). Updates OSD energy unit if changed. -
Notes: Expects 41 bytes. Performs validation on
vbatSourceandcapacityUnit.
- Direction: Out
- Description: Retrieves the configuration specific to the battery voltage and current sensors and capacity settings for the current battery profile.
-
Payload:
Field C Type Size (Bytes) Units Description vbatScaleuint16_t2 Scale Voltage scale ( batteryMetersConfig()->voltage.scale).vbatSourceuint8_t1 Enum Voltage source ( batteryMetersConfig()->voltageSource).cellCountuint8_t1 Count Configured cell count ( currentBatteryProfile->cells).vbatCellDetectuint16_t2 0.01V Cell detection voltage ( currentBatteryProfile->voltage.cellDetect).vbatMinCelluint16_t2 0.01V Min cell voltage ( currentBatteryProfile->voltage.cellMin).vbatMaxCelluint16_t2 0.01V Max cell voltage ( currentBatteryProfile->voltage.cellMax).vbatWarningCelluint16_t2 0.01V Warning cell voltage ( currentBatteryProfile->voltage.cellWarning).currentOffsetuint16_t2 mV Current sensor offset ( batteryMetersConfig()->current.offset).currentScaleuint16_t2 Scale Current sensor scale ( batteryMetersConfig()->current.scale).capacityValueuint32_t4 mAh/mWh Battery capacity ( currentBatteryProfile->capacity.value).capacityWarninguint32_t4 mAh/mWh Capacity warning threshold ( currentBatteryProfile->capacity.warning).capacityCriticaluint32_t4 mAh/mWh Capacity critical threshold ( currentBatteryProfile->capacity.critical).capacityUnituint8_t1 Enum Capacity unit ( batteryMetersConfig()->capacity_unit). -
Notes: Fields are 0 if
USE_ADCis not defined.
- Direction: In
- Description: Sets the battery voltage/current sensor configuration and capacity settings for the current battery profile.
-
Payload: (Matches
MSP2_INAV_BATTERY_CONFIGstructure)Field C Type Size (Bytes) Units Description vbatScaleuint16_t2 Scale Sets batteryMetersConfigMutable()->voltage.scale(ifUSE_ADC).vbatSourceuint8_t1 Enum Sets batteryMetersConfigMutable()->voltageSource(ifUSE_ADC, validated).cellCountuint8_t1 Count Sets currentBatteryProfileMutable->cells(ifUSE_ADC).vbatCellDetectuint16_t2 0.01V Sets currentBatteryProfileMutable->voltage.cellDetect(ifUSE_ADC).vbatMinCelluint16_t2 0.01V Sets currentBatteryProfileMutable->voltage.cellMin(ifUSE_ADC).vbatMaxCelluint16_t2 0.01V Sets currentBatteryProfileMutable->voltage.cellMax(ifUSE_ADC).vbatWarningCelluint16_t2 0.01V Sets currentBatteryProfileMutable->voltage.cellWarning(ifUSE_ADC).currentOffsetuint16_t2 mV Sets batteryMetersConfigMutable()->current.offset.currentScaleuint16_t2 Scale Sets batteryMetersConfigMutable()->current.scale.capacityValueuint32_t4 mAh/mWh Sets currentBatteryProfileMutable->capacity.value.capacityWarninguint32_t4 mAh/mWh Sets currentBatteryProfileMutable->capacity.warning.capacityCriticaluint32_t4 mAh/mWh Sets currentBatteryProfileMutable->capacity.critical.capacityUnituint8_t1 Enum Sets batteryMetersConfigMutable()->capacity_unit(validated). Updates OSD energy unit if changed. -
Notes: Expects 29 bytes. Performs validation on
vbatSourceandcapacityUnit.
- Direction: Out
-
Description: Retrieves the rates and expos for the current control rate profile, including both stabilized and manual flight modes. Supersedes
MSP_RC_TUNING. -
Payload:
Field C Type Size (Bytes) Description throttleMiduint8_t1 Throttle Midpoint ( currentControlRateProfile->throttle.rcMid8).throttleExpouint8_t1 Throttle Expo ( currentControlRateProfile->throttle.rcExpo8).dynamicThrottlePIDuint8_t1 TPA value ( currentControlRateProfile->throttle.dynPID).tpaBreakpointuint16_t2 TPA breakpoint ( currentControlRateProfile->throttle.pa_breakpoint).stabRcExpouint8_t1 Stabilized Roll/Pitch Expo ( currentControlRateProfile->stabilized.rcExpo8).stabRcYawExpouint8_t1 Stabilized Yaw Expo ( currentControlRateProfile->stabilized.rcYawExpo8).stabRollRateuint8_t1 Stabilized Roll Rate ( currentControlRateProfile->stabilized.rates[FD_ROLL]).stabPitchRateuint8_t1 Stabilized Pitch Rate ( currentControlRateProfile->stabilized.rates[FD_PITCH]).stabYawRateuint8_t1 Stabilized Yaw Rate ( currentControlRateProfile->stabilized.rates[FD_YAW]).manualRcExpouint8_t1 Manual Roll/Pitch Expo ( currentControlRateProfile->manual.rcExpo8).manualRcYawExpouint8_t1 Manual Yaw Expo ( currentControlRateProfile->manual.rcYawExpo8).manualRollRateuint8_t1 Manual Roll Rate ( currentControlRateProfile->manual.rates[FD_ROLL]).manualPitchRateuint8_t1 Manual Pitch Rate ( currentControlRateProfile->manual.rates[FD_PITCH]).manualYawRateuint8_t1 Manual Yaw Rate ( currentControlRateProfile->manual.rates[FD_YAW]).
- Direction: In
-
Description: Sets the rates and expos for the current control rate profile (stabilized and manual). Supersedes
MSP_SET_RC_TUNING. -
Payload: (Matches
MSP2_INAV_RATE_PROFILEstructure)Field C Type Size (Bytes) Description throttleMiduint8_t1 Sets currentControlRateProfile_p->throttle.rcMid8.throttleExpouint8_t1 Sets currentControlRateProfile_p->throttle.rcExpo8.dynamicThrottlePIDuint8_t1 Sets currentControlRateProfile_p->throttle.dynPID.tpaBreakpointuint16_t2 Sets currentControlRateProfile_p->throttle.pa_breakpoint.stabRcExpouint8_t1 Sets currentControlRateProfile_p->stabilized.rcExpo8.stabRcYawExpouint8_t1 Sets currentControlRateProfile_p->stabilized.rcYawExpo8.stabRollRateuint8_t1 Sets currentControlRateProfile_p->stabilized.rates[FD_ROLL](constrained).stabPitchRateuint8_t1 Sets currentControlRateProfile_p->stabilized.rates[FD_PITCH](constrained).stabYawRateuint8_t1 Sets currentControlRateProfile_p->stabilized.rates[FD_YAW](constrained).manualRcExpouint8_t1 Sets currentControlRateProfile_p->manual.rcExpo8.manualRcYawExpouint8_t1 Sets currentControlRateProfile_p->manual.rcYawExpo8.manualRollRateuint8_t1 Sets currentControlRateProfile_p->manual.rates[FD_ROLL](constrained).manualPitchRateuint8_t1 Sets currentControlRateProfile_p->manual.rates[FD_PITCH](constrained).manualYawRateuint8_t1 Sets currentControlRateProfile_p->manual.rates[FD_YAW](constrained). - Notes: Expects 15 bytes. Constraints applied to rates based on axis.
- Direction: Out
- Description: Retrieves the estimated or measured airspeed.
-
Payload:
Field C Type Size (Bytes) Units Description airspeeduint32_t4 cm/s Estimated/measured airspeed ( getAirspeedEstimate()). 0 ifUSE_PITOTdisabled or no valid data. -
Notes: Requires
USE_PITOTfor measured airspeed. May return GPS ground speed if pitot unavailable but GPS is present and configured.
- Direction: Out
- Description: Retrieves the output mapping configuration (identifies which timer outputs are used for Motors/Servos). Legacy version sending only 8-bit usage flags.
-
Payload: Repeated for each Motor/Servo timer:
Field C Type Size (Bytes) Description usageFlagsuint8_t1 Timer usage flags (truncated). TIM_USE_MOTORorTIM_USE_SERVO. -
Notes: Superseded by
MSP2_INAV_OUTPUT_MAPPING_EXT2. Only includes timers not used for PPM/PWM input.
- Direction: Out
- Description: Retrieves configuration parameters for the multirotor braking mode feature.
-
Payload: (Only if
USE_MR_BRAKING_MODEdefined)Field C Type Size (Bytes) Units Description brakingSpeedThresholduint16_t2 cm/s Speed above which braking engages ( navConfig()->mc.braking_speed_threshold).brakingDisengageSpeeduint16_t2 cm/s Speed below which braking disengages ( navConfig()->mc.braking_disengage_speed).brakingTimeoutuint16_t2 ms Timeout before braking force reduces ( navConfig()->mc.braking_timeout).brakingBoostFactoruint8_t1 % Boost factor applied during braking ( navConfig()->mc.braking_boost_factor).brakingBoostTimeoutuint16_t2 ms Timeout for the boost factor ( navConfig()->mc.braking_boost_timeout).brakingBoostSpeedThresholduint16_t2 cm/s Speed threshold for boost engagement ( navConfig()->mc.braking_boost_speed_threshold).brakingBoostDisengageSpeeduint16_t2 cm/s Speed threshold for boost disengagement ( navConfig()->mc.braking_boost_disengage_speed).brakingBankAngleuint8_t1 degrees Maximum bank angle allowed during braking ( navConfig()->mc.braking_bank_angle). -
Notes: Payload is empty if
USE_MR_BRAKING_MODEis not defined.
- Direction: In
- Description: Sets configuration parameters for the multirotor braking mode feature.
-
Payload: (Matches
MSP2_INAV_MC_BRAKINGstructure, requiresUSE_MR_BRAKING_MODE)Field C Type Size (Bytes) Units Description brakingSpeedThresholduint16_t2 cm/s Sets navConfigMutable()->mc.braking_speed_threshold.brakingDisengageSpeeduint16_t2 cm/s Sets navConfigMutable()->mc.braking_disengage_speed.brakingTimeoutuint16_t2 ms Sets navConfigMutable()->mc.braking_timeout.brakingBoostFactoruint8_t1 % Sets navConfigMutable()->mc.braking_boost_factor.brakingBoostTimeoutuint16_t2 ms Sets navConfigMutable()->mc.braking_boost_timeout.brakingBoostSpeedThresholduint16_t2 cm/s Sets navConfigMutable()->mc.braking_boost_speed_threshold.brakingBoostDisengageSpeeduint16_t2 cm/s Sets navConfigMutable()->mc.braking_boost_disengage_speed.brakingBankAngleuint8_t1 degrees Sets navConfigMutable()->mc.braking_bank_angle. -
Notes: Expects 14 bytes. Returns error if
USE_MR_BRAKING_MODEis not defined.
- Direction: Out
-
Description: Retrieves extended output mapping configuration (timer ID and usage flags). Obsolete, use
MSP2_INAV_OUTPUT_MAPPING_EXT2. -
Payload: Repeated for each Motor/Servo timer:
Field C Type Size (Bytes) Description timerIduint8_t1 Hardware timer identifier (e.g., TIM1,TIM2). Value depends on target.usageFlagsuint8_t1 Timer usage flags (truncated). TIM_USE_MOTORorTIM_USE_SERVO. -
Notes: Usage flags are truncated to 8 bits.
timerIdmapping is target-specific.
- Direction: In/Out
- Description: Get or list the output mode override for hardware timers (e.g., force ONESHOT, DSHOT).
- Request Payload (Get All): None
-
Request Payload (Get One):
Field C Type Size (Bytes) Description timerIndexuint8_t1 Index of the hardware timer definition (0 to HARDWARE_TIMER_DEFINITION_COUNT - 1). -
Reply Payload (List All): Repeated
HARDWARE_TIMER_DEFINITION_COUNTtimes:Field C Type Size (Bytes) Description timerIndexuint8_t1 Timer index. outputModeuint8_t1 Output mode override ( TIMER_OUTPUT_MODE_*enum). -
Reply Payload (Get One):
Field C Type Size (Bytes) Description timerIndexuint8_t1 Timer index requested. outputModeuint8_t1 Output mode override for the requested timer. -
Notes: Only available on non-SITL builds.
HARDWARE_TIMER_DEFINITION_COUNTvaries by target.
- Direction: In
- Description: Set the output mode override for a specific hardware timer.
-
Payload:
Field C Type Size (Bytes) Description timerIndexuint8_t1 Index of the hardware timer definition. outputModeuint8_t1 Output mode override ( TIMER_OUTPUT_MODE_*enum) to set. -
Notes: Only available on non-SITL builds. Expects 2 bytes. Returns error if
timerIndexis invalid.
- Direction: Out
-
Description: Retrieves the full extended output mapping configuration (timer ID, full 32-bit usage flags, and pin label). Supersedes
MSP2_INAV_OUTPUT_MAPPING_EXT. -
Payload: Repeated for each Motor/Servo timer:
Field C Type Size (Bytes) Description timerIduint8_t1 Hardware timer identifier (e.g., TIM1,TIM2). SITL uses index.usageFlagsuint32_t4 Full 32-bit timer usage flags ( TIM_USE_*).pinLabeluint8_t1 Label for special pin usage ( PIN_LABEL_*enum, e.g.,PIN_LABEL_LED). 0 (PIN_LABEL_NONE) otherwise. - Notes: Provides complete usage flags and helps identify pins repurposed for functions like LED strip.
- Direction: Out
- Description: Retrieves INAV-specific mixer configuration details.
-
Payload:
Field C Type Size (Bytes) Description motorDirectionInverteduint8_t1 Boolean: 1 if motor direction is reversed globally ( mixerConfig()->motorDirectionInverted).reserved1uint8_t1 Always 0 (Was yaw jump prevention limit). motorStopOnLowuint8_t1 Boolean: 1 if motors stop at minimum throttle ( mixerConfig()->motorstopOnLow).platformTypeuint8_t1 Enum ( platformType_e): Vehicle platform type (Multirotor, Airplane, etc.) (mixerConfig()->platformType).hasFlapsuint8_t1 Boolean: 1 if the current mixer configuration includes flaps ( mixerConfig()->hasFlaps).appliedMixerPresetuint16_t2 Enum ( mixerPreset_e): Mixer preset currently applied (mixerConfig()->appliedMixerPreset).maxMotorsuint8_t1 Constant: Maximum motors supported ( MAX_SUPPORTED_MOTORS).maxServosuint8_t1 Constant: Maximum servos supported ( MAX_SUPPORTED_SERVOS).
- Direction: In
- Description: Sets INAV-specific mixer configuration details.
-
Payload: (Matches
MSP2_INAV_MIXERstructure)Field C Type Size (Bytes) Description motorDirectionInverteduint8_t1 Sets mixerConfigMutable()->motorDirectionInverted.reserved1uint8_t1 Ignored. motorStopOnLowuint8_t1 Sets mixerConfigMutable()->motorstopOnLow.platformTypeuint8_t1 Sets mixerConfigMutable()->platformType.hasFlapsuint8_t1 Sets mixerConfigMutable()->hasFlaps.appliedMixerPresetuint16_t2 Sets mixerConfigMutable()->appliedMixerPreset.maxMotorsuint8_t1 Ignored. maxServosuint8_t1 Ignored. -
Notes: Expects 9 bytes. Calls
mixerUpdateStateFlags().
- Direction: In/Out
- Description: Gets OSD layout information (counts, positions for a specific layout, or position for a specific item).
- Request Payload (Get Counts): None
-
Request Payload (Get Layout):
Field C Type Size (Bytes) Description layoutIndexuint8_t1 Index of the OSD layout (0 to OSD_LAYOUT_COUNT - 1). -
Request Payload (Get Item):
Field C Type Size (Bytes) Description layoutIndexuint8_t1 Index of the OSD layout. itemIndexuint16_t2 Index of the OSD item ( OSD_ITEM_*enum, 0 toOSD_ITEM_COUNT - 1). -
Reply Payload (Get Counts):
Field C Type Size (Bytes) Description layoutCountuint8_t1 Number of OSD layouts ( OSD_LAYOUT_COUNT).itemCountuint8_t1 Number of OSD items per layout ( OSD_ITEM_COUNT). -
Reply Payload (Get Layout):
Field C Type Size (Bytes) Description itemPositionsuint16_t[OSD_ITEM_COUNT]OSD_ITEM_COUNT * 2Packed X/Y positions for all items in the requested layout. -
Reply Payload (Get Item):
Field C Type Size (Bytes) Description itemPositionuint16_t2 Packed X/Y position for the requested item in the requested layout. -
Notes: Requires
USE_OSD. Returns error if indexes are invalid.
- Direction: In
- Description: Sets the position of a single OSD item within a specific layout.
-
Payload:
Field C Type Size (Bytes) Units Description layoutIndexuint8_t1 Index Index of the OSD layout (0 to OSD_LAYOUT_COUNT - 1).itemIndexuint8_t1 Index Index of the OSD item ( OSD_ITEM_*enum).itemPositionuint16_t2 Coordinates Packed X/Y position (`(Y << 8) -
Notes: Requires
USE_OSD. Expects 4 bytes. Returns error if indexes are invalid. If the modified layout is not the currently active one, it temporarily overrides the active layout for 10 seconds to show the change. Otherwise, triggers a full OSD redraw.
- Direction: Out
- Description: Retrieves OSD alarm threshold settings.
-
Payload:
Field C Type Size (Bytes) Units Description rssiAlarmuint8_t1 % RSSI alarm threshold ( osdConfig()->rssi_alarm).timerAlarmuint16_t2 seconds Timer alarm threshold ( osdConfig()->time_alarm).altAlarmuint16_t2 meters Altitude alarm threshold ( osdConfig()->alt_alarm).distAlarmuint16_t2 meters Distance alarm threshold ( osdConfig()->dist_alarm).negAltAlarmuint16_t2 meters Negative altitude alarm threshold ( osdConfig()->neg_alt_alarm).gForceAlarmuint16_t2 G * 1000 G-force alarm threshold ( osdConfig()->gforce_alarm * 1000).gForceAxisMinAlarmint16_t2 G * 1000 Min G-force per-axis alarm ( osdConfig()->gforce_axis_alarm_min * 1000).gForceAxisMaxAlarmint16_t2 G * 1000 Max G-force per-axis alarm ( osdConfig()->gforce_axis_alarm_max * 1000).currentAlarmuint8_t1 0.1 A ? Current draw alarm threshold ( osdConfig()->current_alarm). Units may need verification.imuTempMinAlarmuint16_t2 degrees C Min IMU temperature alarm ( osdConfig()->imu_temp_alarm_min).imuTempMaxAlarmuint16_t2 degrees C Max IMU temperature alarm ( osdConfig()->imu_temp_alarm_max).baroTempMinAlarmuint16_t2 degrees C Min Baro temperature alarm ( osdConfig()->baro_temp_alarm_min). 0 ifUSE_BAROdisabled.baroTempMaxAlarmuint16_t2 degrees C Max Baro temperature alarm ( osdConfig()->baro_temp_alarm_max). 0 ifUSE_BAROdisabled.adsbWarnDistanceuint16_t2 meters ADSB warning distance ( osdConfig()->adsb_distance_warning). 0 ifUSE_ADSBdisabled.adsbAlertDistanceuint16_t2 meters ADSB alert distance ( osdConfig()->adsb_distance_alert). 0 ifUSE_ADSBdisabled. -
Notes: Requires
USE_OSD.
- Direction: In
- Description: Sets OSD alarm threshold settings.
-
Payload: (Matches most of
MSP2_INAV_OSD_ALARMSstructure)Field C Type Size (Bytes) Units Description rssiAlarmuint8_t1 % Sets osdConfigMutable()->rssi_alarm.timerAlarmuint16_t2 seconds Sets osdConfigMutable()->time_alarm.altAlarmuint16_t2 meters Sets osdConfigMutable()->alt_alarm.distAlarmuint16_t2 meters Sets osdConfigMutable()->dist_alarm.negAltAlarmuint16_t2 meters Sets osdConfigMutable()->neg_alt_alarm.gForceAlarmuint16_t2 G * 1000 Sets osdConfigMutable()->gforce_alarm = value / 1000.0f.gForceAxisMinAlarmint16_t2 G * 1000 Sets osdConfigMutable()->gforce_axis_alarm_min = value / 1000.0f.gForceAxisMaxAlarmint16_t2 G * 1000 Sets osdConfigMutable()->gforce_axis_alarm_max = value / 1000.0f.currentAlarmuint8_t1 0.1 A ? Sets osdConfigMutable()->current_alarm.imuTempMinAlarmuint16_t2 degrees C Sets osdConfigMutable()->imu_temp_alarm_min.imuTempMaxAlarmuint16_t2 degrees C Sets osdConfigMutable()->imu_temp_alarm_max.baroTempMinAlarmuint16_t2 degrees C Sets osdConfigMutable()->baro_temp_alarm_min(ifUSE_BARO).baroTempMaxAlarmuint16_t2 degrees C Sets osdConfigMutable()->baro_temp_alarm_max(ifUSE_BARO). -
Notes: Requires
USE_OSD. Expects 24 bytes. ADSB alarms are not settable via this message.
- Direction: Out
- Description: Retrieves OSD display preferences (video system, units, styles, etc.).
-
Payload:
Field C Type Size (Bytes) Description videoSystemuint8_t1 Enum: Video system (Auto/PAL/NTSC) ( osdConfig()->video_system).mainVoltageDecimalsuint8_t1 Count: Decimal places for main voltage display ( osdConfig()->main_voltage_decimals).ahiReverseRolluint8_t1 Boolean: Reverse roll direction on Artificial Horizon ( osdConfig()->ahi_reverse_roll).crosshairsStyleuint8_t1 Enum: Style of the center crosshairs ( osdConfig()->crosshairs_style).leftSidebarScrolluint8_t1 Boolean: Enable scrolling for left sidebar ( osdConfig()->left_sidebar_scroll).rightSidebarScrolluint8_t1 Boolean: Enable scrolling for right sidebar ( osdConfig()->right_sidebar_scroll).sidebarScrollArrowsuint8_t1 Boolean: Show arrows for scrollable sidebars ( osdConfig()->sidebar_scroll_arrows).unitsuint8_t1 Enum: Measurement units (Metric/Imperial) ( osdConfig()->units).statsEnergyUnituint8_t1 Enum: Unit for energy display in post-flight stats ( osdConfig()->stats_energy_unit). -
Notes: Requires
USE_OSD.
- Direction: In
- Description: Sets OSD display preferences.
-
Payload: (Matches
MSP2_INAV_OSD_PREFERENCESstructure)Field C Type Size (Bytes) Description videoSystemuint8_t1 Sets osdConfigMutable()->video_system.mainVoltageDecimalsuint8_t1 Sets osdConfigMutable()->main_voltage_decimals.ahiReverseRolluint8_t1 Sets osdConfigMutable()->ahi_reverse_roll.crosshairsStyleuint8_t1 Sets osdConfigMutable()->crosshairs_style.leftSidebarScrolluint8_t1 Sets osdConfigMutable()->left_sidebar_scroll.rightSidebarScrolluint8_t1 Sets osdConfigMutable()->right_sidebar_scroll.sidebarScrollArrowsuint8_t1 Sets osdConfigMutable()->sidebar_scroll_arrows.unitsuint8_t1 Sets osdConfigMutable()->units.statsEnergyUnituint8_t1 Sets osdConfigMutable()->stats_energy_unit. -
Notes: Requires
USE_OSD. Expects 9 bytes. Triggers a full OSD redraw.
- Direction: In
- Description: Selects the active battery profile and saves configuration.
-
Payload:
Field C Type Size (Bytes) Description batteryProfileIndexuint8_t1 Index of the battery profile to activate (0-based). -
Notes: Expects 1 byte. Will fail if armed. Calls
setConfigBatteryProfileAndWriteEEPROM().
- Direction: Out
-
Description: Retrieves values from the firmware's 32-bit
debug[]array. SupersedesMSP_DEBUG. -
Payload:
Field C Type Size (Bytes) Description debugValuesuint32_t[DEBUG32_VALUE_COUNT]DEBUG32_VALUE_COUNT * 4Values from the debugarray (typically 8 values). -
Notes:
DEBUG32_VALUE_COUNTis usually 8.
- Direction: Out
-
Description: Retrieves the Blackbox configuration. Supersedes
MSP_BLACKBOX_CONFIG. -
Payload:
Field C Type Size (Bytes) Description blackboxSupporteduint8_t1 Boolean: 1 if Blackbox is supported ( USE_BLACKBOX), 0 otherwise.blackboxDeviceuint8_t1 Enum ( blackboxDevice_e): Target device for logging (blackboxConfig()->device). 0 if not supported.blackboxRateNumuint16_t2 Numerator for logging rate divider ( blackboxConfig()->rate_num). 0 if not supported.blackboxRateDenomuint16_t2 Denominator for logging rate divider ( blackboxConfig()->rate_denom). 0 if not supported.blackboxIncludeFlagsuint32_t4 Bitmask: Flags for fields included/excluded from logging ( blackboxConfig()->includeFlags). -
Notes: Requires
USE_BLACKBOX.
- Direction: In
-
Description: Sets the Blackbox configuration. Supersedes
MSP_SET_BLACKBOX_CONFIG. -
Payload: (Matches
MSP2_BLACKBOX_CONFIGstructure, excludingblackboxSupported)Field C Type Size (Bytes) Description blackboxDeviceuint8_t1 Sets blackboxConfigMutable()->device.blackboxRateNumuint16_t2 Sets blackboxConfigMutable()->rate_num.blackboxRateDenomuint16_t2 Sets blackboxConfigMutable()->rate_denom.blackboxIncludeFlagsuint32_t4 Sets blackboxConfigMutable()->includeFlags. -
Notes: Requires
USE_BLACKBOX. Expects 9 bytes. Returns error if Blackbox is currently logging (!blackboxMayEditConfig()).
- Direction: Out
- Description: Retrieves the configuration for all onboard temperature sensors.
-
Payload: Repeated
MAX_TEMP_SENSORStimes:Field C Type Size (Bytes) Description typeuint8_t1 Enum ( tempSensorType_e): Type of the temperature sensor.addressuint64_t8 Sensor address/ID (e.g., for 1-Wire sensors). alarmMinuint16_t2 Min temperature alarm threshold (degrees C). alarmMaxuint16_t2 Max temperature alarm threshold (degrees C). osdSymboluint8_t1 Index: OSD symbol to use for this sensor (0 to TEMP_SENSOR_SYM_COUNT).labelchar[TEMPERATURE_LABEL_LEN]TEMPERATURE_LABEL_LENUser-defined label for the sensor. -
Notes: Requires
USE_TEMPERATURE_SENSOR.
- Direction: In
- Description: Sets the configuration for all onboard temperature sensors.
-
Payload: Repeated
MAX_TEMP_SENSORStimes (matchesMSP2_INAV_TEMP_SENSOR_CONFIGstructure):Field C Type Size (Bytes) Description typeuint8_t1 Sets sensor type. addressuint64_t8 Sets sensor address/ID. alarmMinuint16_t2 Sets min alarm threshold. alarmMaxuint16_t2 Sets max alarm threshold. osdSymboluint8_t1 Sets OSD symbol index (validated). labelchar[TEMPERATURE_LABEL_LEN]TEMPERATURE_LABEL_LENSets sensor label (converted to uppercase). -
Notes: Requires
USE_TEMPERATURE_SENSOR. ExpectsMAX_TEMP_SENSORS * sizeof(tempSensorConfig_t)bytes.
- Direction: Out
- Description: Retrieves the current readings from all configured temperature sensors.
-
Payload: Repeated
MAX_TEMP_SENSORStimes:Field C Type Size (Bytes) Units Description temperatureint16_t2 degrees C Current temperature reading. -1000 if sensor is invalid or reading failed. -
Notes: Requires
USE_TEMPERATURE_SENSOR.
- Direction: In/Out
- Description: Handles Hardware-in-the-Loop (HITL) simulation data exchange. Receives simulated sensor data and options, sends back control outputs and debug info.
-
Request Payload:
Field C Type Size (Bytes) Description simulatorVersionuint8_t1 Version of the simulator protocol ( SIMULATOR_MSP_VERSION).hitlFlagsuint8_t1 Bitmask: Options for HITL ( HITL_*flags).gpsFixTypeuint8_t1 (If HITL_HAS_NEW_GPS_DATA) Simulated GPS fix type.gpsNumSatuint8_t1 (If HITL_HAS_NEW_GPS_DATA) Simulated satellite count.gpsLatuint32_t4 (If HITL_HAS_NEW_GPS_DATA) Simulated latitude (1e7 deg).gpsLonuint32_t4 (If HITL_HAS_NEW_GPS_DATA) Simulated longitude (1e7 deg).gpsAltuint32_t4 (If HITL_HAS_NEW_GPS_DATA) Simulated altitude (cm).gpsSpeeduint16_t2 (If HITL_HAS_NEW_GPS_DATA) Simulated ground speed (cm/s).gpsCourseuint16_t2 (If HITL_HAS_NEW_GPS_DATA) Simulated ground course (deci-deg).gpsVelNint16_t2 (If HITL_HAS_NEW_GPS_DATA) Simulated North velocity (cm/s).gpsVelEint16_t2 (If HITL_HAS_NEW_GPS_DATA) Simulated East velocity (cm/s).gpsVelDint16_t2 (If HITL_HAS_NEW_GPS_DATA) Simulated Down velocity (cm/s).imuRollint16_t2 (If NOT HITL_USE_IMU) Simulated Roll (deci-deg).imuPitchint16_t2 (If NOT HITL_USE_IMU) Simulated Pitch (deci-deg).imuYawint16_t2 (If NOT HITL_USE_IMU) Simulated Yaw (deci-deg).accXint16_t2 mG (G * 1000) accYint16_t2 mG (G * 1000) accZint16_t2 mG (G * 1000) gyroXint16_t2 dps * 16 gyroYint16_t2 dps * 16 gyroZint16_t2 dps * 16 baroPressureuint32_t4 Pa magXint16_t2 Scaled magYint16_t2 Scaled magZint16_t2 Scaled vbatuint8_t1 (If HITL_EXT_BATTERY_VOLTAGE) Simulated battery voltage (0.1V units).airspeeduint16_t2 (If HITL_AIRSPEED) Simulated airspeed (cm/s).extFlagsuint8_t1 (If HITL_EXTENDED_FLAGS) Additional flags (upper 8 bits). -
Reply Payload:
Field C Type Size (Bytes) Description stabilizedRolluint16_t2 Stabilized Roll command output (-500 to 500). stabilizedPitchuint16_t2 Stabilized Pitch command output (-500 to 500). stabilizedYawuint16_t2 Stabilized Yaw command output (-500 to 500). stabilizedThrottleuint16_t2 Stabilized Throttle command output (-500 to 500 if armed, else -500). debugFlagsuint8_t1 Packed flags: Debug index (0-7), Platform type, Armed state, OSD feature status. debugValueuint32_t4 Current debug value ( debug[simulatorData.debugIndex]).attitudeRollint16_t2 Current estimated Roll (deci-deg). attitudePitchint16_t2 Current estimated Pitch (deci-deg). attitudeYawint16_t2 Current estimated Yaw (deci-deg). osdHeaderuint8_t1 OSD RLE Header (255). osdRowsuint8_t1 (If OSD supported) Number of OSD rows. osdColsuint8_t1 (If OSD supported) Number of OSD columns. osdStartYuint8_t1 (If OSD supported) Starting row for RLE data. osdStartXuint8_t1 (If OSD supported) Starting column for RLE data. osdRleDatauint8_t[]Variable (If OSD supported) Run-length encoded OSD character data. Terminated by [0, 0]. -
Notes: Requires
USE_SIMULATOR. Complex message handling state changes for enabling/disabling HITL. Sensor data is injected directly. OSD data is sent using a custom RLE scheme. SeesimulatorDatastruct and associated code for details.
- Direction: Out
-
Description: Retrieves the custom servo mixer rules, including programming framework condition IDs, for primary and secondary mixer profiles. Supersedes
MSP_SERVO_MIX_RULES. -
Payload (Profile 1): Repeated
MAX_SERVO_RULEStimes:Field C Type Size (Bytes) Description targetChanneluint8_t1 Servo output channel index (0-based). inputSourceuint8_t1 Enum: Input source ( mixerSource_t).rateuint16_t2 Mixing rate/weight. speeduint8_t1 Speed/Slew rate limit (0-100). conditionIduint8_t1 Logic Condition ID (0 to MAX_LOGIC_CONDITIONS - 1, or 255/-1 if none/disabled). -
Payload (Profile 2 - Optional): Repeated
MAX_SERVO_RULEStimes (only ifMAX_MIXER_PROFILE_COUNT> 1):Field C Type Size (Bytes) Description targetChanneluint8_t1 Profile 2 Target channel. inputSourceuint8_t1 Profile 2 Input source. rateuint16_t2 Profile 2 Rate. speeduint8_t1 Profile 2 Speed. conditionIduint8_t1 Profile 2 Logic Condition ID. -
Notes:
conditionIdrequiresUSE_PROGRAMMING_FRAMEWORK.
- Direction: In
-
Description: Sets a single custom servo mixer rule, including programming framework condition ID. Supersedes
MSP_SET_SERVO_MIX_RULE. -
Payload:
Field C Type Size (Bytes) Description ruleIndexuint8_t1 Index of the rule to set (0 to MAX_SERVO_RULES - 1).targetChanneluint8_t1 Servo output channel index. inputSourceuint8_t1 Enum: Input source ( mixerSource_t).rateuint16_t2 Mixing rate/weight. speeduint8_t1 Speed/Slew rate limit (0-100). conditionIduint8_t1 Logic Condition ID (255/-1 if none). Ignored if USE_PROGRAMMING_FRAMEWORKis disabled. -
Notes: Expects 7 bytes. Returns error if index invalid. Calls
loadCustomServoMixer().
- Direction: Out
- Description: Retrieves the configuration of all defined Logic Conditions.
-
Payload: Repeated
MAX_LOGIC_CONDITIONStimes:Field C Type Size (Bytes) Description enableduint8_t1 Boolean: 1 if the condition is enabled. activatorIduint8_t1 ID of the activator condition (if any, 255 if none). operationuint8_t1 Enum ( logicConditionOp_e): Logical operation (AND, OR, XOR, etc.).operandATypeuint8_t1 Enum ( logicOperandType_e): Type of the first operand (Flight Mode, GVAR, etc.).operandAValueuint32_t4 Value/ID of the first operand. operandBTypeuint8_t1 Enum ( logicOperandType_e): Type of the second operand.operandBValueuint32_t4 Value/ID of the second operand. flagsuint8_t1 Bitmask: Condition flags (e.g., LC_FLAG_FIRST_TIME_TRUE). -
Notes: Requires
USE_PROGRAMMING_FRAMEWORK. SeelogicCondition_tstructure.
- Direction: In
- Description: Sets the configuration for a single Logic Condition by its index.
-
Payload:
Field C Type Size (Bytes) Description conditionIndexuint8_t1 Index of the condition to set (0 to MAX_LOGIC_CONDITIONS - 1).enableduint8_t1 Boolean: 1 to enable the condition. activatorIduint8_t1 Activator condition ID. operationuint8_t1 Enum: Logical operation. operandATypeuint8_t1 Enum: Type of operand A. operandAValueuint32_t4 Value/ID of operand A. operandBTypeuint8_t1 Enum: Type of operand B. operandBValueuint32_t4 Value/ID of operand B. flagsuint8_t1 Bitmask: Condition flags. -
Notes: Requires
USE_PROGRAMMING_FRAMEWORK. Expects 15 bytes. Returns error if index is invalid.
- Not implemented
- Not implemented
- Direction: Out
- Description: Retrieves the current evaluated status (true/false or numerical value) of all logic conditions.
-
Payload:
Field C Type Size (Bytes) Description conditionValuesuint32_t[MAX_LOGIC_CONDITIONS]MAX_LOGIC_CONDITIONS * 4Array of current values for each logic condition ( logicConditionGetValue(i)). 1 for true, 0 for false, or numerical value depending on operation. -
Notes: Requires
USE_PROGRAMMING_FRAMEWORK.
- Direction: Out
- Description: Retrieves the current values of all Global Variables (GVARS).
-
Payload:
Field C Type Size (Bytes) Description gvarValuesuint32_t[MAX_GLOBAL_VARIABLES]MAX_GLOBAL_VARIABLES * 4Array of current values for each global variable ( gvGet(i)). -
Notes: Requires
USE_PROGRAMMING_FRAMEWORK.
- Direction: Out
- Description: Retrieves the configuration of all Programming PIDs.
-
Payload: Repeated
MAX_PROGRAMMING_PID_COUNTtimes:Field C Type Size (Bytes) Description enableduint8_t1 Boolean: 1 if the PID is enabled. setpointTypeuint8_t1 Enum ( logicOperandType_e): Type of the setpoint source.setpointValueuint32_t4 Value/ID of the setpoint source. measurementTypeuint8_t1 Enum ( logicOperandType_e): Type of the measurement source.measurementValueuint32_t4 Value/ID of the measurement source. gainPuint16_t2 Proportional gain. gainIuint16_t2 Integral gain. gainDuint16_t2 Derivative gain. gainFFuint16_t2 Feed-forward gain. -
Notes: Requires
USE_PROGRAMMING_FRAMEWORK. SeeprogrammingPid_tstructure.
- Direction: In
- Description: Sets the configuration for a single Programming PID by its index.
-
Payload:
Field C Type Size (Bytes) Description pidIndexuint8_t1 Index of the Programming PID to set (0 to MAX_PROGRAMMING_PID_COUNT - 1).enableduint8_t1 Boolean: 1 to enable the PID. setpointTypeuint8_t1 Enum: Type of the setpoint source. setpointValueuint32_t4 Value/ID of the setpoint source. measurementTypeuint8_t1 Enum: Type of the measurement source. measurementValueuint32_t4 Value/ID of the measurement source. gainPuint16_t2 Proportional gain. gainIuint16_t2 Integral gain. gainDuint16_t2 Derivative gain. gainFFuint16_t2 Feed-forward gain. -
Notes: Requires
USE_PROGRAMMING_FRAMEWORK. Expects 20 bytes. Returns error if index is invalid.
- Direction: Out
- Description: Retrieves the current output value of all Programming PIDs.
-
Payload:
Field C Type Size (Bytes) Description pidOutputsuint32_t[MAX_PROGRAMMING_PID_COUNT]MAX_PROGRAMMING_PID_COUNT * 4Array of current output values for each Programming PID ( programmingPidGetOutput(i)). -
Notes: Requires
USE_PROGRAMMING_FRAMEWORK.
- Direction: Out
- Description: Retrieves the standard PID controller gains (P, I, D, FF) for the current PID profile.
-
Payload: Repeated
PID_ITEM_COUNTtimes:Field C Type Size (Bytes) Description Puint8_t1 Proportional gain ( pidBank()->pid[i].P), constrained 0-255.Iuint8_t1 Integral gain ( pidBank()->pid[i].I), constrained 0-255.Duint8_t1 Derivative gain ( pidBank()->pid[i].D), constrained 0-255.FFuint8_t1 Feed-forward gain ( pidBank()->pid[i].FF), constrained 0-255. -
Notes:
PID_ITEM_COUNTdefines the number of standard PID controllers (Roll, Pitch, Yaw, Alt, Vel, etc.). Updates from EZ-Tune if enabled.
- Direction: In
- Description: Sets the standard PID controller gains (P, I, D, FF) for the current PID profile.
-
Payload: Repeated
PID_ITEM_COUNTtimes:Field C Type Size (Bytes) Description Puint8_t1 Sets Proportional gain ( pidBankMutable()->pid[i].P).Iuint8_t1 Sets Integral gain ( pidBankMutable()->pid[i].I).Duint8_t1 Sets Derivative gain ( pidBankMutable()->pid[i].D).FFuint8_t1 Sets Feed-forward gain ( pidBankMutable()->pid[i].FF). -
Notes: Expects
PID_ITEM_COUNT * 4bytes. CallsschedulePidGainsUpdate()andnavigationUsePIDs().
- Direction: In
- Description: Starts the optical flow sensor calibration procedure.
- Payload: None
-
Notes: Requires
USE_OPFLOW. Will fail if armed. CallsopflowStartCalibration().
- Direction: In
- Description: Prepares the flight controller to receive a firmware update via MSP.
-
Payload:
Field C Type Size (Bytes) Description firmwareSizeuint32_t4 Total size of the incoming firmware file in bytes. -
Notes: Requires
MSP_FIRMWARE_UPDATE. Expects 4 bytes. Returns error if preparation fails (e.g., no storage, invalid size). CallsfirmwareUpdatePrepare().
- Direction: In
- Description: Stores a chunk of firmware data received via MSP.
-
Payload:
Field C Type Size (Bytes) Description firmwareChunkuint8_t[]Variable Chunk of firmware data. -
Notes: Requires
MSP_FIRMWARE_UPDATE. Returns error if storage fails (e.g., out of space, checksum error). Called repeatedly until the entire firmware is transferred. CallsfirmwareUpdateStore().
- Direction: In
- Description: Executes the firmware update process (flashes the stored firmware and reboots).
-
Payload:
Field C Type Size (Bytes) Description updateTypeuint8_t1 Type of update (e.g., full flash, specific section - currently ignored/unused). -
Notes: Requires
MSP_FIRMWARE_UPDATE. Expects 1 byte. Returns error if update cannot start (e.g., not fully received). CallsfirmwareUpdateExec(). If successful, the device will reboot into the new firmware.
- Direction: In
- Description: Prepares the flight controller to perform a firmware rollback to the previously stored version.
- Payload: None
-
Notes: Requires
MSP_FIRMWARE_UPDATE. Returns error if rollback preparation fails (e.g., no rollback image available). CallsfirmwareUpdateRollbackPrepare().
- Direction: In
- Description: Executes the firmware rollback process (flashes the stored backup firmware and reboots).
- Payload: None
-
Notes: Requires
MSP_FIRMWARE_UPDATE. Returns error if rollback cannot start. CallsfirmwareUpdateRollbackExec(). If successful, the device will reboot into the backup firmware.
- Direction: In/Out
- Description: Get or Set configuration for a specific Safe Home location.
-
Request Payload (Get):
Field C Type Size (Bytes) Description safehomeIndexuint8_t1 Index of the safe home location (0 to MAX_SAFE_HOMES - 1). -
Reply Payload (Get):
Field C Type Size (Bytes) Description safehomeIndexuint8_t1 Index requested. enableduint8_t1 Boolean: 1 if this safe home is enabled. latitudeuint32_t4 Latitude (1e7 deg). longitudeuint32_t4 Longitude (1e7 deg). -
Notes: Requires
USE_SAFE_HOME. Used bymspFcSafeHomeOutCommand. SeeMSP2_INAV_SET_SAFEHOMEfor setting.
- Direction: In
- Description: Sets the configuration for a specific Safe Home location.
-
Payload:
Field C Type Size (Bytes) Description safehomeIndexuint8_t1 Index of the safe home location (0 to MAX_SAFE_HOMES - 1).enableduint8_t1 Boolean: 1 to enable this safe home. latitudeuint32_t4 Latitude (1e7 deg). longitudeuint32_t4 Longitude (1e7 deg). -
Notes: Requires
USE_SAFE_HOME. Expects 10 bytes. Returns error if index invalid. Resets corresponding FW autoland approach ifUSE_FW_AUTOLANDis enabled.
- Direction: Out
- Description: Retrieves miscellaneous runtime information including timers and throttle status.
-
Payload:
Field C Type Size (Bytes) Units Description uptimeSecondsuint32_t4 Seconds Time since boot ( micros() / 1000000).flightTimeSecondsuint32_t4 Seconds Accumulated flight time ( getFlightTime()).throttlePercentuint8_t1 % Current throttle output percentage ( getThrottlePercent(true)).autoThrottleFlaguint8_t1 Boolean 1 if navigation is controlling throttle, 0 otherwise ( navigationIsControllingThrottle()).
- Direction: In/Out
- Description: Gets the configuration for a single Logic Condition by its index.
-
Request Payload:
Field C Type Size (Bytes) Description conditionIndexuint8_t1 Index of the condition to retrieve (0 to MAX_LOGIC_CONDITIONS - 1). -
Reply Payload: (Matches structure of one entry in
MSP2_INAV_LOGIC_CONDITIONS)Field C Type Size (Bytes) Description enableduint8_t1 Boolean: 1 if enabled. activatorIduint8_t1 Activator ID. operationuint8_t1 Enum: Logical operation. operandATypeuint8_t1 Enum: Type of operand A. operandAValueuint32_t4 Value/ID of operand A. operandBTypeuint8_t1 Enum: Type of operand B. operandBValueuint32_t4 Value/ID of operand B. flagsuint8_t1 Bitmask: Condition flags. -
Notes: Requires
USE_PROGRAMMING_FRAMEWORK. Used bymspFcLogicConditionCommand.
- Direction: Out
- Description: Retrieves the RPM reported by each ESC via telemetry.
-
Payload: Repeated
getMotorCount()times:Field C Type Size (Bytes) Units Description escRpmuint32_t4 RPM RPM reported by the ESC. -
Notes: Requires
USE_ESC_SENSOR. Payload size depends on the number of detected motors with telemetry.
- Direction: Out
- Description: Retrieves the full telemetry data structure reported by each ESC.
-
Payload:
Field C Type Size (Bytes) Description motorCountuint8_t1 Number of motors reporting telemetry ( getMotorCount()).escDataescSensorData_t[]motorCount * sizeof(escSensorData_t)Array of escSensorData_tstructures containing voltage, current, temp, RPM, errors etc. for each ESC. -
Notes: Requires
USE_ESC_SENSOR. SeeescSensorData_tinsensors/esc_sensor.hfor the exact structure fields.
- Direction: Out
-
Description: Retrieves the full configuration for each LED on the strip using the
ledConfig_tstructure. SupersedesMSP_LED_STRIP_CONFIG. -
Payload: Repeated
LED_MAX_STRIP_LENGTHtimes:Field C Type Size (Bytes) Description ledConfigledConfig_tsizeof(ledConfig_t)Full configuration structure for the LED. -
Notes: Requires
USE_LED_STRIP. SeeledConfig_tinio/ledstrip.hfor structure fields (position, function, overlay, color, direction, params).
- Direction: In
-
Description: Sets the configuration for a single LED on the strip using the
ledConfig_tstructure. SupersedesMSP_SET_LED_STRIP_CONFIG. -
Payload:
Field C Type Size (Bytes) Description ledIndexuint8_t1 Index of the LED to configure (0 to LED_MAX_STRIP_LENGTH - 1).ledConfigledConfig_tsizeof(ledConfig_t)Full configuration structure for the LED. -
Notes: Requires
USE_LED_STRIP. Expects1 + sizeof(ledConfig_t)bytes. Returns error if index invalid. CallsreevaluateLedConfig().
- Direction: In/Out
- Description: Get or Set configuration for a specific Fixed Wing Autoland approach.
-
Request Payload (Get):
Field C Type Size (Bytes) Description approachIndexuint8_t1 Index of the approach setting (0 to MAX_FW_LAND_APPOACH_SETTINGS - 1). -
Reply Payload (Get):
Field C Type Size (Bytes) Units Description approachIndexuint8_t1 Index Index requested. approachAltuint32_t4 cm Altitude for the approach phase. landAltuint32_t4 cm Altitude for the final landing phase. approachDirectionuint8_t1 Enum Direction of approach (From WP, Specific Heading). landHeading1int16_t2 degrees Primary landing heading (if approachDirection requires it). landHeading2int16_t2 degrees Secondary landing heading (if approachDirection requires it). isSeaLevelRefuint8_t1 Boolean 1 if altitudes are relative to sea level, 0 if relative to home. -
Notes: Requires
USE_FW_AUTOLAND. Used bymspFwApproachOutCommand. SeeMSP2_INAV_SET_FW_APPROACHfor setting.
- Direction: In
- Description: Sets the configuration for a specific Fixed Wing Autoland approach.
-
Payload: (Matches
MSP2_INAV_FW_APPROACHreply structure)Field C Type Size (Bytes) Units Description approachIndexuint8_t1 Index Index of the approach setting (0 to MAX_FW_LAND_APPOACH_SETTINGS - 1).approachAltuint32_t4 cm Sets approach altitude. landAltuint32_t4 cm Sets landing altitude. approachDirectionuint8_t1 Enum Sets approach direction. landHeading1int16_t2 degrees Sets primary landing heading. landHeading2int16_t2 degrees Sets secondary landing heading. isSeaLevelRefuint8_t1 Boolean Sets altitude reference. -
Notes: Requires
USE_FW_AUTOLAND. Expects 15 bytes. Returns error if index invalid.
- Direction: In
- Description: Sends a raw command directly to a U-Blox GPS module connected to the FC.
-
Payload:
Field C Type Size (Bytes) Description ubxCommanduint8_t[]Variable (>= 8) Raw U-Blox UBX protocol command frame (including header, class, ID, length, payload, checksum). -
Notes: Requires GPS feature enabled (
FEATURE_GPS) and the GPS driver to be U-Blox (isGpsUblox()). Payload must be at least 8 bytes (minimum UBX frame size). Use with extreme caution, incorrect commands can misconfigure the GPS module. CallsgpsUbloxSendCommand().
- Direction: Out
- Description: Retrieves Rate Dynamics configuration parameters for the current control rate profile.
-
Payload:
Field C Type Size (Bytes) Units Description sensitivityCenteruint8_t1 % Sensitivity at stick center ( currentControlRateProfile->rateDynamics.sensitivityCenter).sensitivityEnduint8_t1 % Sensitivity at stick ends ( currentControlRateProfile->rateDynamics.sensitivityEnd).correctionCenteruint8_t1 % Correction strength at stick center ( currentControlRateProfile->rateDynamics.correctionCenter).correctionEnduint8_t1 % Correction strength at stick ends ( currentControlRateProfile->rateDynamics.correctionEnd).weightCenteruint8_t1 % Transition weight at stick center ( currentControlRateProfile->rateDynamics.weightCenter).weightEnduint8_t1 % Transition weight at stick ends ( currentControlRateProfile->rateDynamics.weightEnd). -
Notes: Requires
USE_RATE_DYNAMICS.
- Direction: In
- Description: Sets Rate Dynamics configuration parameters for the current control rate profile.
-
Payload: (Matches
MSP2_INAV_RATE_DYNAMICSstructure)Field C Type Size (Bytes) Units Description sensitivityCenteruint8_t1 % Sets sensitivity at center. sensitivityEnduint8_t1 % Sets sensitivity at ends. correctionCenteruint8_t1 % Sets correction at center. correctionEnduint8_t1 % Sets correction at ends. weightCenteruint8_t1 % Sets weight at center. weightEnduint8_t1 % Sets weight at ends. -
Notes: Requires
USE_RATE_DYNAMICS. Expects 6 bytes.
- Direction: Out
- Description: Retrieves the current EZ-Tune parameters.
-
Payload:
Field C Type Size (Bytes) Description enableduint8_t1 Boolean: 1 if EZ-Tune is enabled ( ezTune()->enabled).filterHzuint16_t2 Filter frequency used during tuning ( ezTune()->filterHz).axisRatiouint8_t1 Roll vs Pitch axis tuning ratio ( ezTune()->axisRatio).responseuint8_t1 Desired response characteristic ( ezTune()->response).dampinguint8_t1 Desired damping characteristic ( ezTune()->damping).stabilityuint8_t1 Stability preference ( ezTune()->stability).aggressivenessuint8_t1 Aggressiveness preference ( ezTune()->aggressiveness).rateuint8_t1 Resulting rate setting ( ezTune()->rate).expouint8_t1 Resulting expo setting ( ezTune()->expo).snappinessuint8_t1 Snappiness preference ( ezTune()->snappiness). -
Notes: Requires
USE_EZ_TUNE. CallsezTuneUpdate()before sending.
- Direction: In
- Description: Sets the EZ-Tune parameters and triggers an update.
-
Payload: (Matches
MSP2_INAV_EZ_TUNEstructure, potentially omittingsnappiness)Field C Type Size (Bytes) Description enableduint8_t1 Sets enabled state. filterHzuint16_t2 Sets filter frequency. axisRatiouint8_t1 Sets axis ratio. responseuint8_t1 Sets response characteristic. dampinguint8_t1 Sets damping characteristic. stabilityuint8_t1 Sets stability preference. aggressivenessuint8_t1 Sets aggressiveness preference. rateuint8_t1 Sets rate setting. expouint8_t1 Sets expo setting. snappinessuint8_t1 (Optional) Sets snappiness preference. -
Notes: Requires
USE_EZ_TUNE. Expects 10 or 11 bytes. CallsezTuneUpdate()after setting parameters.
- Direction: In
- Description: Selects the active mixer profile and saves configuration.
-
Payload:
Field C Type Size (Bytes) Description mixerProfileIndexuint8_t1 Index of the mixer profile to activate (0-based). -
Notes: Expects 1 byte. Will fail if armed. Calls
setConfigMixerProfileAndWriteEEPROM(). Only applicable ifMAX_MIXER_PROFILE_COUNT> 1.
- Direction: Out
- Description: Retrieves the list of currently tracked ADSB (Automatic Dependent Surveillance–Broadcast) vehicles.
-
Payload:
Field C Type Size (Bytes) Description maxVehiclesuint8_t1 Maximum number of vehicles tracked ( MAX_ADSB_VEHICLES). 0 ifUSE_ADSBdisabled.callsignLengthuint8_t1 Maximum length of callsign string ( ADSB_CALL_SIGN_MAX_LENGTH). 0 ifUSE_ADSBdisabled.totalVehicleMsgsuint32_t4 Total vehicle messages received ( getAdsbStatus()->vehiclesMessagesTotal). 0 ifUSE_ADSBdisabled.totalHeartbeatMsgsuint32_t4 Total heartbeat messages received ( getAdsbStatus()->heartbeatMessagesTotal). 0 ifUSE_ADSBdisabled.Vehicle Data (Repeated maxVehiclestimes):callsignchar[ADSB_CALL_SIGN_MAX_LENGTH]ADSB_CALL_SIGN_MAX_LENGTHVehicle callsign (padded with nulls). icaouint32_t4 ICAO 24-bit address. latitudeuint32_t4 Latitude (1e7 deg). longitudeuint32_t4 Longitude (1e7 deg). altitudeuint32_t4 Altitude (cm). headinguint16_t2 Heading (degrees). tslcuint8_t1 Time Since Last Communication (seconds). emitterTypeuint8_t1 Enum: Type of ADSB emitter. ttluint8_t1 Time-to-live counter for this entry. -
Notes: Requires
USE_ADSB.
- Direction: Out
- Description: Retrieves counts related to custom OSD elements defined by the programming framework.
-
Payload:
Field C Type Size (Bytes) Description maxElementsuint8_t1 Maximum number of custom elements ( MAX_CUSTOM_ELEMENTS).maxTextLengthuint8_t1 Maximum length of the text part ( OSD_CUSTOM_ELEMENT_TEXT_SIZE - 1).maxPartsuint8_t1 Maximum number of parts per element ( CUSTOM_ELEMENTS_PARTS). -
Notes: Requires
USE_PROGRAMMING_FRAMEWORK.
- Direction: In/Out
- Description: Gets the configuration of a single custom OSD element defined by the programming framework.
-
Request Payload:
Field C Type Size (Bytes) Description elementIndexuint8_t1 Index of the custom element (0 to MAX_CUSTOM_ELEMENTS - 1). -
Reply Payload:
Field C Type Size (Bytes) Description Parts Data (Repeated CUSTOM_ELEMENTS_PARTStimes):partTypeuint8_t1 Enum ( customElementType_e): Type of this part (Text, Variable, Symbol).partValueuint16_t2 Value/ID associated with this part (GVAR index, Symbol ID, etc.). Visibility Data: visibilityTypeuint8_t1 Enum ( logicOperandType_e): Type of visibility condition source.visibilityValueuint16_t2 Value/ID of the visibility condition source (e.g., Logic Condition ID). Text Data: elementTextchar[OSD_CUSTOM_ELEMENT_TEXT_SIZE - 1]OSD_CUSTOM_ELEMENT_TEXT_SIZE - 1Static text part of the element (null padding likely). -
Notes: Requires
USE_PROGRAMMING_FRAMEWORK. SeeosdCustomElement_t.
- Direction: In
- Description: Sets the configuration of a single custom OSD element defined by the programming framework.
-
Payload:
Field C Type Size (Bytes) Description elementIndexuint8_t1 Index of the custom element (0 to MAX_CUSTOM_ELEMENTS - 1).Parts Data (Repeated CUSTOM_ELEMENTS_PARTStimes):partTypeuint8_t1 Enum ( customElementType_e): Type of this part.partValueuint16_t2 Value/ID associated with this part. Visibility Data: visibilityTypeuint8_t1 Enum ( logicOperandType_e): Type of visibility condition source.visibilityValueuint16_t2 Value/ID of the visibility condition source. Text Data: elementTextchar[OSD_CUSTOM_ELEMENT_TEXT_SIZE - 1]OSD_CUSTOM_ELEMENT_TEXT_SIZE - 1Static text part of the element. -
Notes: Requires
USE_PROGRAMMING_FRAMEWORK. Expects1 + (CUSTOM_ELEMENTS_PARTS * 3) + 3 + (OSD_CUSTOM_ELEMENT_TEXT_SIZE - 1)bytes. Returns error if index or part type is invalid. Null-terminates the text internally.
- Direction: Out
-
Description: Retrieves the configuration parameters for all supported servos (min, max, middle, rate). Supersedes
MSP_SERVO_CONFIGURATIONS. -
Payload: Repeated
MAX_SUPPORTED_SERVOStimes:Field C Type Size (Bytes) Units Description minuint16_t2 PWM Minimum servo endpoint ( servoParams(i)->min).maxuint16_t2 PWM Maximum servo endpoint ( servoParams(i)->max).middleuint16_t2 PWM Middle/Neutral servo position ( servoParams(i)->middle).rateuint8_t1 % (-100 to 100) Servo rate/scaling ( servoParams(i)->rate).
- Direction: In
-
Description: Sets the configuration parameters for a single servo. Supersedes
MSP_SET_SERVO_CONFIGURATION. -
Payload:
Field C Type Size (Bytes) Units Description servoIndexuint8_t1 Index Index of the servo to configure (0 to MAX_SUPPORTED_SERVOS - 1).minuint16_t2 PWM Sets minimum servo endpoint. maxuint16_t2 PWM Sets maximum servo endpoint. middleuint16_t2 PWM Sets middle/neutral servo position. rateuint8_t1 % Sets servo rate/scaling. -
Notes: Expects 8 bytes. Returns error if index invalid. Calls
servoComputeScalingFactors().
- Direction: In/Out
- Description: Get configuration for a specific Geozone.
-
Request Payload (Get):
Field C Type Size (Bytes) Description geozoneIndexuint8_t1 Index of the geozone (0 to MAX_GEOZONES_IN_CONFIG - 1). -
Reply Payload (Get):
Field C Type Size (Bytes) Description geozoneIndexuint8_t1 Index requested. typeuint8_t1 Enum ( GEOZONE_TYPE_*): Zone type (Inclusion/Exclusion).shapeuint8_t1 Enum ( GEOZONE_SHAPE_*): Zone shape (Polygon/Circular).minAltitudeuint32_t4 Minimum allowed altitude within the zone (cm). maxAltitudeuint32_t4 Maximum allowed altitude within the zone (cm). isSeaLevelRefuint8_t1 Boolean: 1 if altitudes are relative to sea level, 0 if relative to home. fenceActionuint8_t1 Enum ( GEOZONE_ACTION_*): Action to take upon boundary violation.vertexCountuint8_t1 Number of vertices defined for this zone. -
Notes: Requires
USE_GEOZONE. Used bymspFcGeozoneOutCommand.
- Direction: In
- Description: Sets the main configuration for a specific Geozone (type, shape, altitude, action). This command resets (clears) all vertices associated with the zone.
-
Payload:
Field C Type Size (Bytes) Description geozoneIndexuint8_t1 Index of the geozone (0 to MAX_GEOZONES_IN_CONFIG - 1).typeuint8_t1 Enum ( GEOZONE_TYPE_*): Zone type.shapeuint8_t1 Enum ( GEOZONE_SHAPE_*): Zone shape.minAltitudeuint32_t4 Minimum allowed altitude (cm). maxAltitudeuint32_t4 Maximum allowed altitude (cm). isSeaLevelRefuint8_t1 Boolean: Altitude reference. fenceActionuint8_t1 Enum ( GEOZONE_ACTION_*): Fence action.vertexCountuint8_t1 Number of vertices to be defined (used for validation later). -
Notes: Requires
USE_GEOZONE. Expects 14 bytes. Returns error if index invalid. CallsgeozoneResetVertices(). Vertices must be set subsequently usingMSP2_INAV_SET_GEOZONE_VERTEX.
- Direction: In/Out
- Description: Get a specific vertex (or center+radius for circular zones) of a Geozone.
-
Request Payload (Get):
Field C Type Size (Bytes) Description geozoneIndexuint8_t1 Index of the geozone. vertexIduint8_t1 Index of the vertex within the zone (0-based). For circles, 0 = center. -
Reply Payload (Get - Polygon):
Field C Type Size (Bytes) Units Description geozoneIndexuint8_t1 Index Geozone index requested. vertexIduint8_t1 Index Vertex index requested. latitudeuint32_t4 deg * 1e7 Vertex latitude. longitudeuint32_t4 deg * 1e7 Vertex longitude. -
Reply Payload (Get - Circular):
Field C Type Size (Bytes) Units Description geozoneIndexuint8_t1 Index Geozone index requested. vertexIduint8_t1 Index Vertex index requested (always 0 for center). centerLatitudeuint32_t4 deg * 1e7 Center latitude. centerLongitudeuint32_t4 deg * 1e7 Center longitude. radiusuint32_t4 cm Radius of the circular zone. -
Notes: Requires
USE_GEOZONE. Returns error if indexes are invalid or vertex doesn't exist. For circular zones, the radius is stored internally as the 'latitude' of the vertex with index 1.
- Direction: In
- Description: Sets a specific vertex (or center+radius for circular zones) for a Geozone.
-
Payload (Polygon):
Field C Type Size (Bytes) Units Description geozoneIndexuint8_t1 Index Geozone index. vertexIduint8_t1 Index Vertex index (0-based). latitudeuint32_t4 deg * 1e7 Vertex latitude. longitudeuint32_t4 deg * 1e7 Vertex longitude. -
Payload (Circular):
Field C Type Size (Bytes) Units Description geozoneIndexuint8_t1 Index Geozone index. vertexIduint8_t1 Index Vertex index (must be 0 for center). centerLatitudeuint32_t4 deg * 1e7 Center latitude. centerLongitudeuint32_t4 deg * 1e7 Center longitude. radiusuint32_t4 cm Radius of the circular zone. -
Notes: Requires
USE_GEOZONE. Expects 10 bytes (Polygon) or 14 bytes (Circular). Returns error if indexes invalid or if trying to set vertex beyondvertexCountdefined inMSP2_INAV_SET_GEOZONE. CallsgeozoneSetVertex(). For circular zones, sets center (vertex 0) and radius (vertex 1's latitude).
- Direction: In
- Description: Initiates the receiver binding procedure for supported serial protocols (CRSF, SRXL2).
- Payload: None
-
Notes: Requires
rxConfig()->receiverType == RX_TYPE_SERIAL. RequiresUSE_SERIALRX_CRSForUSE_SERIALRX_SRXL2. CallscrsfBind()orsrxl2Bind()respectively. Returns error if receiver type or provider is not supported for binding.
These commands are typically sent to the FC from external sensor modules connected via a serial port configured for MSP sensor input. They usually expect no reply (MSP_RESULT_NO_REPLY).
- Direction: In
- Description: Provides rangefinder data (distance, quality) from an external MSP-based sensor.
-
Payload: (
mspSensorRangefinderDataMessage_t)Field C Type Size (Bytes) Units Description qualityuint8_t1 0-255 Quality of the measurement. distanceMmint32_t4 mm Measured distance. Negative value indicates out of range. -
Notes: Requires
USE_RANGEFINDER_MSP. CallsmspRangefinderReceiveNewData().
- Direction: In
- Description: Provides optical flow data (motion, quality) from an external MSP-based sensor.
-
Payload: (
mspSensorOpflowDataMessage_t)Field C Type Size (Bytes) Description qualityuint8_t1 Quality of the measurement (0-255). motionXint32_t4 Raw integrated flow value X. motionYint32_t4 Raw integrated flow value Y. -
Notes: Requires
USE_OPFLOW_MSP. CallsmspOpflowReceiveNewData().
- Direction: In
- Description: Provides detailed GPS data from an external MSP-based GPS module.
-
Payload: (
mspSensorGpsDataMessage_t)Field C Type Size (Bytes) Units Description instanceuint8_t1 - Sensor instance number (for multi-GPS). gpsWeekuint16_t2 - GPS week number (0xFFFF if unavailable). msTOWuint32_t4 ms Milliseconds Time of Week. fixTypeuint8_t1 Enum Type of GPS fix. satellitesInViewuint8_t1 Count Number of satellites used in solution. hPosAccuracyuint16_t2 cm Horizontal position accuracy estimate. vPosAccuracyuint16_t2 cm Vertical position accuracy estimate. hVelAccuracyuint16_t2 cm/s Horizontal velocity accuracy estimate. hdopuint16_t2 HDOP * 100 Horizontal Dilution of Precision. longitudeint32_t4 deg * 1e7 Longitude. latitudeint32_t4 deg * 1e7 Latitude. mslAltitudeint32_t4 cm Altitude above Mean Sea Level. nedVelNorthint32_t4 cm/s North velocity (NED frame). nedVelEastint32_t4 cm/s East velocity (NED frame). nedVelDownint32_t4 cm/s Down velocity (NED frame). groundCourseuint16_t2 deg * 100 Ground course (0-36000). trueYawuint16_t2 deg * 100 True heading/yaw (0-36000, 65535 if unavailable). yearuint16_t2 - Year (e.g., 2023). monthuint8_t1 - Month (1-12). dayuint8_t1 - Day of month (1-31). houruint8_t1 - Hour (0-23). minuint8_t1 - Minute (0-59). secuint8_t1 - Second (0-59). -
Notes: Requires
USE_GPS_PROTO_MSP. CallsmspGPSReceiveNewData().
- Direction: In
- Description: Provides magnetometer data from an external MSP-based compass module.
-
Payload: (
mspSensorCompassDataMessage_t)Field C Type Size (Bytes) Units Description instanceuint8_t1 - Sensor instance number. timeMsuint32_t4 ms Timestamp from the sensor. magXint16_t2 mGauss Front component reading. magYint16_t2 mGauss Right component reading. magZint16_t2 mGauss Down component reading. -
Notes: Requires
USE_MAG_MSP. CallsmspMagReceiveNewData().
- Direction: In
- Description: Provides barometer data from an external MSP-based barometer module.
-
Payload: (
mspSensorBaroDataMessage_t)Field C Type Size (Bytes) Units Description instanceuint8_t1 - Sensor instance number. timeMsuint32_t4 ms Timestamp from the sensor. pressurePafloat4 Pa Absolute pressure. tempint16_t2 0.01 deg C Temperature. -
Notes: Requires
USE_BARO_MSP. CallsmspBaroReceiveNewData().
- Direction: In
- Description: Provides airspeed data from an external MSP-based pitot sensor module.
-
Payload: (
mspSensorAirspeedDataMessage_t)Field C Type Size (Bytes) Units Description instanceuint8_t1 - Sensor instance number. timeMsuint32_t4 ms Timestamp from the sensor. diffPressurePafloat4 Pa Differential pressure. tempint16_t2 0.01 deg C Temperature. -
Notes: Requires
USE_PITOT_MSP. CallsmspPitotmeterReceiveNewData().
- Direction: In
- Description: Provides head tracker orientation data.
-
Payload: (Structure not defined in provided headers, but likely Roll, Pitch, Yaw angles)
Field C Type Size (Bytes) Units Description ...Varies Variable Head tracker angles (e.g., int16 Roll, Pitch, Yaw in deci-degrees). -
Notes: Requires
USE_HEADTRACKERandUSE_HEADTRACKER_MSP. CallsmspHeadTrackerReceiverNewData(). Payload structure needs verification frommspHeadTrackerReceiverNewDataimplementation.
INAV Version Release Notes
9.1.0 Release Notes
9.0.0 Release Notes
8.0.0 Release Notes
7.1.0 Release Notes
7.0.0 Release Notes
6.0.0 Release Notes
5.1 Release notes
5.0.0 Release Notes
4.1.0 Release Notes
4.0.0 Release Notes
3.0.0 Release Notes
2.6.0 Release Notes
2.5.1 Release notes
2.5.0 Release Notes
2.4.0 Release Notes
2.3.0 Release Notes
2.2.1 Release Notes
2.2.0 Release Notes
2.1.0 Release Notes
2.0.0 Release Notes
1.9.1 Release notes
1.9.0 Release notes
1.8.0 Release notes
1.7.3 Release notes
Older Release Notes
QUICK START GUIDES
Getting started with iNav
Fixed Wing Guide
Howto: CC3D flight controller, minimOSD , telemetry and GPS for fixed wing
Howto: CC3D flight controller, minimOSD, GPS and LTM telemetry for fixed wing
INAV for BetaFlight users
launch mode
Multirotor guide
YouTube video guides
DevDocs Getting Started.md
DevDocs INAV_Fixed_Wing_Setup_Guide.pdf
DevDocs Safety.md
Connecting to INAV
Bluetooth setup to configure your flight controller
DevDocs Wireless Connections (BLE, TCP and UDP).md\
Flashing and Upgrading
Boards, Targets and PWM allocations
Upgrading from an older version of INAV to the current version
DevDocs Installation.md
DevDocs USB Flashing.md
Setup Tab
Live 3D Graphic & Pre-Arming Checks
Calibration Tab
Accelerometer, Compass, & Optic Flow Calibration
Alignment Tool Tab
Adjust mount angle of FC & Compass
Ports Tab
Map Devices to UART Serial Ports
Receiver Tab
Set protocol and channel mapping
Mixer Tab
Set aircraft type and how its controlled
Outputs Tab
Set ESC Protocol and Servo Parameters
Modes Tab
Assign flight modes to transmitter switches
Standard Modes
Navigation Modes
Return to Home
Fixed Wing Autolaunch
Auto Launch
Configuration Tab
No wiki page currently
Failsafe Tab
Set expected behavior of aircraft upon failsafe
PID Tuning
Navigation PID tuning (FW)
Navigation PID tuning (MC)
EZ-Tune
PID Attenuation and scaling
Tune INAV PID-FF controller for fixedwing
DevDocs Autotune - fixedwing.md
DevDocs INAV PID Controller.md
DevDocs INAV_Wing_Tuning_Masterclass.pdf
DevDocs PID tuning.md
DevDocs Profiles.md
Rangefinder & Optic Flow
Optic Flow and Rangefinder Setup
Setup and usage for terrain following & GPS-free position hold
OSD and VTx
DevDocs Betaflight 4.3 compatible OSD.md
OSD custom messages
OSD Hud and ESP32 radars
DevDocs OSD.md
DevDocs VTx.md
LED Strip
DevDocs LedStrip.md
Programming
DevDocs Programming Framework.md
Adjustments
DevDocs Inflight Adjustments.md
Mission Control
iNavFlight Missions
DevDocs Safehomes.md
MultiWii Serial Protocol
MSP V2
MSP Messages reference guide
MSP Navigation Messages
INAV MSP frames changelog
Telemetry
INAV Remote Management, Control and Telemetry
MAVlink Control and Telemetry
Lightweight Telemetry (LTM)
Tethered Logging
Log when FC is connected via USB
Blackbox
DevDocs Blackbox.md
INAV blackbox variables
DevDocs USB_Mass_Storage_(MSC)_mode.md
CLI
iNav CLI variables
DevDocs Cli.md
DevDocs Settings.md
VTOL
DevDocs MixerProfile.md
DevDocs VTOL.md
TROUBLESHOOTING
"Something" is disabled Reasons
Blinkenlights
Sensor auto detect and hardware failure detection
Pixel OSD FAQs
TROUBLESHOOTING
Why do I have limited servo throw in my airplane
ADTL TOPICS, FEATURES, DEV INFO
AAT Automatic Antenna Tracker
Building custom firmware
Default values for different type of aircrafts
Source Enums
Features safe to add and remove to fit your needs.
Developer info
Making a new Virtualbox to make your own INAV[OrangeRX LRS RX and OMNIBUS F4](OrangeRX-LRS-RX-and-OMNIBUS-F4)
Rate Dynamics
Target and Sensor support
Ublox 3.01 firmware and Galileo
DevDocs Controls
DevDocs 1wire.md
DevDocs ADSB.md
DevDocs Battery.md
DevDocs Buzzer.md
DevDocs Channel forwarding.md
DevDocs Display.md
DevDocs Fixed Wing Landing.md
DevDocs GPS_fix_estimation.md
DevDocs LED pin PWM.md
DevDocs Lights.md
DevDocs OSD Joystick.md
DevDocs Servo Gimbal.md
DevDocs Temperature sensors.md
OLD LEGACY INFO
Supported boards
DevDocs Boards.md
Legacy Mixers
Legacy target ChebuzzF3
Legacy target Colibri RACE
Legacy target Motolab
Legacy target Omnibus F3
Legacy target Paris Air Hero 32
Legacy target Paris Air Hero 32 F3
Legacy target Sparky
Legacy target SPRacingF3
Legacy target SPRacingF3EVO
Legacy target SPRacingF3EVO_1SS
DevDocs Configuration.md
Request form new PRESET
DevDocs Introduction.md
Welcome to INAV, useful links and products
UAV Interconnect Bus
DevDocs Rangefinder.md
DevDocs Rssi.md
DevDocs Runcam device.md
DevDocs Serial.md
DevDocs Telemetry.md
DevDocs Rx.md
DevDocs Spektrum bind.md
DevDocs INAV_Autolaunch.pdf