Introduce 6POS default calib for Boxer and tx16s

This commit is contained in:
3djc
2023-06-25 14:32:39 +02:00
committed by Malte Langermann
parent ea27259d84
commit cc47656cd5
3 changed files with 16 additions and 6 deletions
+6 -6
View File
@@ -200,13 +200,13 @@ static void disableUncalibratedXPots()
StepsCalibData* calib = (StepsCalibData*)&g_eeGeneral.calib[i + pot_offset];
if(!IS_MULTIPOS_CALIBRATED(calib)) {
// not enough config points
//
// TODO: a way to provide to 6POS default calibration values
//
// -> check if there is a board supplied default calibration
// -> if not, just disable the input
//
#if defined(XPOS_CALIB_DEFAULT)
size_t index = 0;
calib->count = XPOTS_MULTIPOS_COUNT - 1;
for (const auto &value : XPOS_CALIB_DEFAULT) calib->steps[index++] = value;
#else
g_eeGeneral.potsConfig &= POT_CONFIG_DISABLE_MASK(i);
#endif
}
}
}
+5
View File
@@ -174,6 +174,11 @@ void SDRAM_Init();
#define NUM_FUNCTIONS_SWITCHES 0
#endif
// POTS and SLIDERS default configuration
#if defined(RADIO_TX16S)
#define XPOS_CALIB_DEFAULT {0x3, 0xc, 0x15, 0x1e, 0x26}
#endif
// Trims driver
#define NUM_TRIMS 6
#define NUM_TRIMS_KEYS (NUM_TRIMS * 2)
+5
View File
@@ -137,6 +137,11 @@ uint32_t isBootloaderStart(const uint8_t * buffer);
#define TRAINER_CONNECTED() true
#endif
// POTS and SLIDERS default configuration
#if defined(RADIO_BOXER)
#define XPOS_CALIB_DEFAULT {0x5, 0xd, 0x16, 0x1f, 0x28}
#endif
#if defined(FUNCTION_SWITCHES)
#define NUM_FUNCTIONS_SWITCHES 6