feat(msp): add MSP2_INAV_WIND (0x2231) to expose wind estimator#11508
feat(msp): add MSP2_INAV_WIND (0x2231) to expose wind estimator#11508MartinovEm wants to merge 1 commit into
Conversation
c375104 to
e39aa82
Compare
|
Test firmware build ready — commit Download firmware for PR #11508 234 targets built. Find your board's
|
|
This looks like it is really well done, thanks. It may need to be added to msp_messages.json It might make sense to run isEstimatedWindSpeedValid() and include a validity bit. You have bits to spare. |
e39aa82 to
ff76b5d
Compare
|
@sensei-hacker Thanks so much for the kind words and for adding this to the 9.1 milestone — really appreciate it! Updated the implementation based on your suggestions:
Payload is now 5 bytes: \uint16 windSpeed | uint16 windAngle | uint8 flags. |
Summary
Adds a new read-only MSP command
MSP2_INAV_WIND(ID0x2231) that exposes the internal wind estimator output over MSP telemetry.This allows ground station software, OSD overlays, and companion computers to read the estimated wind speed and direction without requiring direct firmware integration.
Response Payload
Total: 4 bytes.
Implementation Details
getEstimatedHorizontalWindSpeed()returns angle in centidegrees [0–35999]; divided by 100 to give 0–359° output.USE_WIND_ESTIMATOR: when the estimator is not compiled in, both fields return zero, ensuring backward-compatible behaviour on builds without wind estimation.#include "flight/wind_estimator.h"infc_msp.cis also wrapped in#ifdef USE_WIND_ESTIMATOR.Files Changed
src/main/msp/msp_protocol_v2_inav.h— definesMSP2_INAV_WIND 0x2231src/main/fc/fc_msp.c— conditional include + newcase MSP2_INAV_WIND:handler