sbus invertion in config
This commit is contained in:
@ -31,6 +31,7 @@ static const char *TAG = "CONFIG";
|
||||
#define HARDCODED_CONFIG_SBUS_TRIGGER_CHANNEL 3U // Channel 4
|
||||
#define HARDCODED_CONFIG_SBUS_THRESHOLD_LOW 800U
|
||||
#define HARDCODED_CONFIG_SBUS_THRESHOLD_HIGH 1100U
|
||||
#define HARDCODED_CONFIG_SBUS_INVERTED true // Set inverted RX for FrSky receivers (they output inverted SBUS)
|
||||
|
||||
#if defined(CONFIG_IDF_TARGET_ESP32C3)
|
||||
#define HARDCODED_CONFIG_LOCALBTN_PIN 9
|
||||
@ -54,6 +55,7 @@ static config_t current_config = {
|
||||
.sbus_trigger_channel = 3,
|
||||
.sbus_threshold_low = 800,
|
||||
.sbus_threshold_high = 1100,
|
||||
.sbus_inverted = false,
|
||||
};
|
||||
|
||||
static void calculate_config_hash(const config_t *cfg, uint8_t *out_hash);
|
||||
@ -197,6 +199,7 @@ esp_err_t config_init(void)
|
||||
current_config.sbus_trigger_channel = HARDCODED_CONFIG_SBUS_TRIGGER_CHANNEL;
|
||||
current_config.sbus_threshold_low = HARDCODED_CONFIG_SBUS_THRESHOLD_LOW;
|
||||
current_config.sbus_threshold_high = HARDCODED_CONFIG_SBUS_THRESHOLD_HIGH;
|
||||
current_config.sbus_inverted = HARDCODED_CONFIG_SBUS_INVERTED;
|
||||
|
||||
save_config_to_nvs();
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user