-
Notifications
You must be signed in to change notification settings - Fork 1.7k
CRSF Baro Altitude and Vario, AirSpeed #11100
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
CRSF Baro Altitude and Vario, AirSpeed #11100
Conversation
PR Compliance Guide 🔍All compliance sections have been disabled in the configurations. |
PR Code Suggestions ✨Explore these optional code suggestions:
|
|||||||||||
|
Looking good. For the docs. Did you update it using the Python script? |
|
Oops, i did it manualy. Fixed |
|
Can you resolve the conflicts please. |
|
@MrD-RC I don't understand how I can resolve conflicts with a branch that isn't yet in master without creating a new branch and a new merge request for the merged version. Could you please merge pull request 11025 so I can change my pull request later? |
He may have been referring to conflicts you later fixed here: If Mr D can please confirm that's what you meant and this commit is good for RC1? |
|
Yes, there are no longer any conflicts. Conflicts appear in the status box. They need to be resolved before merging. |
User description
The previous merge request unfortunately had to be closed. Attempting to merge it with the main branch resulted in a huge number of conflicts.
This implementation has been tested and has the crsf_use_legacy_baro_packet setting disabled by default.
If this setting is disabled:
If this setting is enabled, data is transmitted in compatibility mode with current scripts:
The airspeed packet (0x0A) is transmitted in any case (if Pitot in use).
PR Type
Enhancement
Description
Adds barometric altitude and vertical speed sensor packet (0x09)
Implements airspeed sensor packet (0x0A) for Pitot tube support
Introduces legacy mode toggle for backward compatibility
Refactors GPS altitude handling based on configuration mode
Diagram Walkthrough
File Walkthrough
crsf.h
Define new CRSF frame types and payload sizessrc/main/rx/crsf.h
CRSF_FRAME_BAROMETER_ALTITUDE_VARIO_PAYLOAD_SIZEconstant (3bytes)
CRSF_FRAME_AIRSPEED_PAYLOAD_SIZEconstant (2 bytes)CRSF_FRAMETYPE_BAROMETER_ALTITUDEtoCRSF_FRAMETYPE_BAROMETER_ALTITUDE_VARIO_SENSORCRSF_FRAMETYPE_AIRSPEED_SENSOR(0x0A)crsf.c
Implement barometric altitude/vario and airspeed telemetrysrc/main/telemetry/crsf.c
#includeforSCHAR_MINandSCHAR_MAXconstants#include "sensors/pitotmeter.h"for airspeed supportcrsfFrameGps()to conditionally send ASL or relative altitudebased on
crsf_use_legacy_baro_packetsettingcrsfBarometerAltitude()tocrsfFrameBarometerAltitudeVarioSensor()and added vertical speedcalculation using logarithmic vario algorithm
crsfFrameAirSpeedSensor()function to transmit airspeed databarometric packet modes
telemetry.c
Add legacy barometric packet configuration optionsrc/main/telemetry/telemetry.c
PG_TELEMETRY_CONFIGversion from 8 to 9crsf_use_legacy_baro_packetfield initialization in resettemplate with default value
telemetry.h
Define legacy barometric packet configuration fieldsrc/main/telemetry/telemetry.h
bool crsf_use_legacy_baro_packetfield totelemetryConfig_tstructure
settings.yaml
Register CRSF legacy mode configuration settingsrc/main/fc/settings.yaml
crsf_use_legacy_baro_packetconfiguration entrySettings.md
Document CRSF legacy barometric packet settingdocs/Settings.md
crsf_use_legacy_baro_packetsetting(OFF)