Overclock F1 targets by default (CC3D excluded) // Fix timer scaling for oneshot125 / oneshot42
This commit is contained in:
parent
6e96adff0d
commit
0de34f14fe
|
@ -500,7 +500,11 @@ static void resetConf(void)
|
|||
|
||||
resetSerialConfig(&masterConfig.serialConfig);
|
||||
|
||||
#if defined(STM32F10X) && !defined(CC3D)
|
||||
masterConfig.emf_avoidance = 1;
|
||||
#else
|
||||
masterConfig.emf_avoidance = 0;
|
||||
#endif
|
||||
|
||||
resetPidProfile(¤tProfile->pidProfile);
|
||||
|
||||
|
|
|
@ -134,7 +134,17 @@ static void pwmWriteStandard(uint8_t index, uint16_t value)
|
|||
{
|
||||
*motors[index]->ccr = value;
|
||||
}
|
||||
#if defined(STM32F10X) && !defined(CC3D)
|
||||
static void pwmWriteOneshot125(uint8_t index, uint16_t value)
|
||||
{
|
||||
*motors[index]->ccr = value * 21 / 6; // 24Mhz -> 8Mhz
|
||||
}
|
||||
|
||||
static void pwmWriteOneshot42(uint8_t index, uint16_t value)
|
||||
{
|
||||
*motors[index]->ccr = value * 7 / 6;
|
||||
}
|
||||
#else
|
||||
static void pwmWriteOneshot125(uint8_t index, uint16_t value)
|
||||
{
|
||||
*motors[index]->ccr = value * 3; // 24Mhz -> 8Mhz
|
||||
|
@ -144,6 +154,7 @@ static void pwmWriteOneshot42(uint8_t index, uint16_t value)
|
|||
{
|
||||
*motors[index]->ccr = value;
|
||||
}
|
||||
#endif
|
||||
|
||||
static void pwmWriteMultiShot(uint8_t index, uint16_t value)
|
||||
{
|
||||
|
|
|
@ -526,9 +526,9 @@ typedef struct {
|
|||
} clivalue_t;
|
||||
|
||||
const clivalue_t valueTable[] = {
|
||||
{ "emf_avoidance", VAR_UINT8 | MASTER_VALUE | MODE_LOOKUP, &masterConfig.emf_avoidance, .config.lookup = { TABLE_OFF_ON } },
|
||||
// { "emf_avoidance", VAR_UINT8 | MASTER_VALUE | MODE_LOOKUP, &masterConfig.emf_avoidance, .config.lookup = { TABLE_OFF_ON } },
|
||||
|
||||
{ "mid_rc", VAR_UINT16 | MASTER_VALUE, &masterConfig.rxConfig.midrc, .config.minmax = { 1200, 1700 } },
|
||||
{ "mid_rc", VAR_UINT16 | MASTER_VALUE, &masterConfig.rxConfig.midrc, .config.minmax = { 1200, 1700 } },
|
||||
{ "min_check", VAR_UINT16 | MASTER_VALUE, &masterConfig.rxConfig.mincheck, .config.minmax = { PWM_RANGE_ZERO, PWM_RANGE_MAX } },
|
||||
{ "max_check", VAR_UINT16 | MASTER_VALUE, &masterConfig.rxConfig.maxcheck, .config.minmax = { PWM_RANGE_ZERO, PWM_RANGE_MAX } },
|
||||
{ "rssi_channel", VAR_INT8 | MASTER_VALUE, &masterConfig.rxConfig.rssi_channel, .config.minmax = { 0, MAX_SUPPORTED_RC_CHANNEL_COUNT } },
|
||||
|
|
Loading…
Reference in New Issue