-
Notifications
You must be signed in to change notification settings - Fork 48
Description
Is there already an issue for this?
- I have searched the issues and there is no existing issue for this feature request.
Is your feature request related to a problem?
Hi! 👋
I’m using CRSFforArduino as a PlatformIO dependency and would like to selectively disable certain telemetry frame types (GPS, baro, battery, etc.) at build time, without modifying the library sources.
There is already a CFA_Config.hpp file, but when the library is used as a dependency it’s not practical to edit that file directly.
Currently the telemetry feature flags are defined like this:
#define CRSF_TELEMETRY_ENABLED 1
#define CRSF_TELEMETRY_ATTITUDE_ENABLED 1
#define CRSF_TELEMETRY_BAROALTITUDE_ENABLED 1
#define CRSF_TELEMETRY_BATTERY_ENABLED 1
#ifndef CRSF_TELEMETRY_FLIGHTMODE_ENABLED
#define CRSF_TELEMETRY_FLIGHTMODE_ENABLED 0
#endif
#define CRSF_TELEMETRY_GPS_ENABLED 1Only CRSF_TELEMETRY_FLIGHTMODE_ENABLED is guarded with #ifndef, so it can be overridden via a build flag:
build_flags = -DCRSF_TELEMETRY_FLIGHTMODE_ENABLED=0
How would I disable GPS for example?
Describe the solution you'd like
I'd like to define build flag CRSF_TELEMETRY_GPS_ENABLED=0 etc to disable certain feature.
Describe alternatives you've considered
Currently I just placed the downloaded the library in /lib/CRSFforArduino and modified CFA_Config.hpp but this loses the cleaner project dependency approach.
Additional context
No response
Metadata
Metadata
Assignees
Labels
Projects
Status