diff --git a/radio/src/edgetx.cpp b/radio/src/edgetx.cpp index 75b96e008..e4a1da5e8 100644 --- a/radio/src/edgetx.cpp +++ b/radio/src/edgetx.cpp @@ -419,6 +419,15 @@ void generalDefault() g_eeGeneral.hatsMode = HATSMODE_SWITCHABLE; #endif +#if defined(DEFAULT_6POS_CALIB) + uint8_t defaultCalib[] = DEFAULT_6POS_CALIB; + StepsCalibData* calib = (StepsCalibData*)&g_eeGeneral.calib[DEFAULT_6POS_IDX]; + + for (int i = 0; i < 5; i++) { + calib->steps[i] = defaultCalib[i]; + } +#endif + g_eeGeneral.chkSum = 0xFFFF; } diff --git a/radio/src/targets/horus/hal.h b/radio/src/targets/horus/hal.h index b3ea19d1e..8f0ea885d 100644 --- a/radio/src/targets/horus/hal.h +++ b/radio/src/targets/horus/hal.h @@ -572,6 +572,11 @@ #error "Missing ADC_DIRECTION array" #endif +#if defined(RADIO_TX16S) + #define DEFAULT_6POS_CALIB {3, 12, 21, 30, 38} + #define DEFAULT_6POS_IDX 5 +#endif + // Power #if defined(RADIO_T18) diff --git a/radio/src/targets/taranis/hal.h b/radio/src/targets/taranis/hal.h index b895b53ba..4219029fe 100644 --- a/radio/src/targets/taranis/hal.h +++ b/radio/src/targets/taranis/hal.h @@ -1832,6 +1832,11 @@ #define ADC_DIRECTION {1,-1,-1,1, -1,1, 1, 1} #endif +#if defined(RADIO_BOXER) + #define DEFAULT_6POS_CALIB {5, 13, 22, 31, 40} + #define DEFAULT_6POS_IDX 6 +#endif + // PWR and LED driver #if defined(PCBX9LITE) diff --git a/radio/util/hw_defs/legacy_names.py b/radio/util/hw_defs/legacy_names.py index 382267a13..3e98eab70 100644 --- a/radio/util/hw_defs/legacy_names.py +++ b/radio/util/hw_defs/legacy_names.py @@ -335,11 +335,11 @@ LEGACY_NAMES = [ "description": "Potentiometer 2" }, "P3": { - "yaml": "POT3", - "lua": "s3", - "label": "S3", + "yaml": "6POS", + "lua": "6P", + "label": "6P", "short_label": "3", - "description": "6 pos" + "description": "Multipos Switch" } } }, diff --git a/radio/util/hw_defs/pot_config.py b/radio/util/hw_defs/pot_config.py index 6f4f6b327..53bc2d551 100644 --- a/radio/util/hw_defs/pot_config.py +++ b/radio/util/hw_defs/pot_config.py @@ -4,8 +4,7 @@ POT_CONFIG = { "boxer": { "P1": {"default": "POT_CENTER"}, "P2": {"default": "POT_CENTER"}, - "S1": {"default": "SLIDER"}, - "S2": {"default": "SLIDER"} + "P3": {"default": "MULTIPOS"} }, "gx12": { "P1": {"default": "POT_CENTER"},