Introduce 6POS default calib for Boxer and tx16s
This commit is contained in:
@@ -200,13 +200,13 @@ static void disableUncalibratedXPots()
|
|||||||
StepsCalibData* calib = (StepsCalibData*)&g_eeGeneral.calib[i + pot_offset];
|
StepsCalibData* calib = (StepsCalibData*)&g_eeGeneral.calib[i + pot_offset];
|
||||||
if(!IS_MULTIPOS_CALIBRATED(calib)) {
|
if(!IS_MULTIPOS_CALIBRATED(calib)) {
|
||||||
// not enough config points
|
// not enough config points
|
||||||
//
|
#if defined(XPOS_CALIB_DEFAULT)
|
||||||
// TODO: a way to provide to 6POS default calibration values
|
size_t index = 0;
|
||||||
//
|
calib->count = XPOTS_MULTIPOS_COUNT - 1;
|
||||||
// -> check if there is a board supplied default calibration
|
for (const auto &value : XPOS_CALIB_DEFAULT) calib->steps[index++] = value;
|
||||||
// -> if not, just disable the input
|
#else
|
||||||
//
|
|
||||||
g_eeGeneral.potsConfig &= POT_CONFIG_DISABLE_MASK(i);
|
g_eeGeneral.potsConfig &= POT_CONFIG_DISABLE_MASK(i);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -174,6 +174,11 @@ void SDRAM_Init();
|
|||||||
#define NUM_FUNCTIONS_SWITCHES 0
|
#define NUM_FUNCTIONS_SWITCHES 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// POTS and SLIDERS default configuration
|
||||||
|
#if defined(RADIO_TX16S)
|
||||||
|
#define XPOS_CALIB_DEFAULT {0x3, 0xc, 0x15, 0x1e, 0x26}
|
||||||
|
#endif
|
||||||
|
|
||||||
// Trims driver
|
// Trims driver
|
||||||
#define NUM_TRIMS 6
|
#define NUM_TRIMS 6
|
||||||
#define NUM_TRIMS_KEYS (NUM_TRIMS * 2)
|
#define NUM_TRIMS_KEYS (NUM_TRIMS * 2)
|
||||||
|
|||||||
@@ -137,6 +137,11 @@ uint32_t isBootloaderStart(const uint8_t * buffer);
|
|||||||
#define TRAINER_CONNECTED() true
|
#define TRAINER_CONNECTED() true
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// POTS and SLIDERS default configuration
|
||||||
|
#if defined(RADIO_BOXER)
|
||||||
|
#define XPOS_CALIB_DEFAULT {0x5, 0xd, 0x16, 0x1f, 0x28}
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(FUNCTION_SWITCHES)
|
#if defined(FUNCTION_SWITCHES)
|
||||||
|
|
||||||
#define NUM_FUNCTIONS_SWITCHES 6
|
#define NUM_FUNCTIONS_SWITCHES 6
|
||||||
|
|||||||
Reference in New Issue
Block a user