feat(msp): add MSP2_INAV_WIND (0x2231) to expose wind estimator#11508
Open
MartinovEm wants to merge 1 commit intoiNavFlight:maintenance-9.xfrom
Open
feat(msp): add MSP2_INAV_WIND (0x2231) to expose wind estimator#11508MartinovEm wants to merge 1 commit intoiNavFlight:maintenance-9.xfrom
MartinovEm wants to merge 1 commit intoiNavFlight:maintenance-9.xfrom
Conversation
eaec734 to
c375104
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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