Cleanup useless code
This commit is contained in:
@@ -329,18 +329,12 @@ bool setupPulsesExternalModule(uint8_t protocol)
|
||||
#if defined(PXX1)
|
||||
case PROTOCOL_CHANNELS_PXX1_PULSES:
|
||||
extmodulePulsesData.pxx.setupFrame(EXTERNAL_MODULE);
|
||||
#if defined(PCBSKY9X)
|
||||
scheduleNextMixerCalculation(EXTERNAL_MODULE, PXX_PULSES_PERIOD);
|
||||
#endif
|
||||
return true;
|
||||
#endif
|
||||
|
||||
#if defined(PXX1) && defined(HARDWARE_EXTERNAL_MODULE_SIZE_SML)
|
||||
case PROTOCOL_CHANNELS_PXX1_SERIAL:
|
||||
extmodulePulsesData.pxx_uart.setupFrame(EXTERNAL_MODULE);
|
||||
#if defined(PCBSKY9X)
|
||||
scheduleNextMixerCalculation(EXTERNAL_MODULE, EXTMODULE_PXX1_SERIAL_PERIOD);
|
||||
#endif
|
||||
return true;
|
||||
#endif
|
||||
|
||||
@@ -348,32 +342,22 @@ bool setupPulsesExternalModule(uint8_t protocol)
|
||||
case PROTOCOL_CHANNELS_PXX2_HIGHSPEED:
|
||||
case PROTOCOL_CHANNELS_PXX2_LOWSPEED:
|
||||
extmodulePulsesData.pxx2.setupFrame(EXTERNAL_MODULE);
|
||||
#if defined(PCBSKY9X)
|
||||
scheduleNextMixerCalculation(EXTERNAL_MODULE, PXX2_NO_HEARTBEAT_PERIOD);
|
||||
#endif
|
||||
return true;
|
||||
#endif
|
||||
|
||||
#if defined(SBUS)
|
||||
case PROTOCOL_CHANNELS_SBUS:
|
||||
setupPulsesSbus();
|
||||
#if defined(PCBSKY9X)
|
||||
scheduleNextMixerCalculation(EXTERNAL_MODULE, SBUS_PERIOD);
|
||||
#else
|
||||
// SBUS_PERIOD is not a constant! It can be set from UI
|
||||
mixerSchedulerSetPeriod(EXTERNAL_MODULE, SBUS_PERIOD);
|
||||
return true;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(DSM2)
|
||||
case PROTOCOL_CHANNELS_DSM2_LP45:
|
||||
case PROTOCOL_CHANNELS_DSM2_DSM2:
|
||||
case PROTOCOL_CHANNELS_DSM2_DSMX:
|
||||
setupPulsesDSM2();
|
||||
#if defined(PCBSKY9X)
|
||||
scheduleNextMixerCalculation(EXTERNAL_MODULE, DSM2_PERIOD);
|
||||
#endif
|
||||
return true;
|
||||
#endif
|
||||
|
||||
@@ -386,9 +370,6 @@ bool setupPulsesExternalModule(uint8_t protocol)
|
||||
else
|
||||
mixerSchedulerSetPeriod(EXTERNAL_MODULE, CROSSFIRE_PERIOD);
|
||||
setupPulsesCrossfire();
|
||||
#if defined(PCBSKY9X)
|
||||
scheduleNextMixerCalculation(EXTERNAL_MODULE, CROSSFIRE_PERIOD);
|
||||
#endif
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
@@ -402,9 +383,6 @@ bool setupPulsesExternalModule(uint8_t protocol)
|
||||
else
|
||||
mixerSchedulerSetPeriod(EXTERNAL_MODULE, GHOST_PERIOD);
|
||||
setupPulsesGhost();
|
||||
#if defined(PCBSKPCBSKY9X)
|
||||
scheduleNextMixerCalculation(EXTERNAL_MODULE, GHOST_PERIOD);
|
||||
#endif
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
@@ -418,9 +396,6 @@ bool setupPulsesExternalModule(uint8_t protocol)
|
||||
else
|
||||
mixerSchedulerSetPeriod(EXTERNAL_MODULE, MULTIMODULE_PERIOD);
|
||||
setupPulsesMultiExternalModule();
|
||||
#if defined(PCBSKY9X)
|
||||
scheduleNextMixerCalculation(EXTERNAL_MODULE, MULTIMODULE_PERIOD);
|
||||
#endif
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
@@ -428,18 +403,12 @@ bool setupPulsesExternalModule(uint8_t protocol)
|
||||
#if defined(PPM)
|
||||
case PROTOCOL_CHANNELS_PPM:
|
||||
setupPulsesPPMExternalModule();
|
||||
#if defined(PCBSKY9X)
|
||||
scheduleNextMixerCalculation(EXTERNAL_MODULE, PPM_PERIOD(EXTERNAL_MODULE));
|
||||
#endif
|
||||
return true;
|
||||
#endif
|
||||
|
||||
#if defined(AFHDS3)
|
||||
case PROTOCOL_CHANNELS_AFHDS3:
|
||||
extmodulePulsesData.afhds3.setupFrame();
|
||||
#if defined(PCBSKY9X)
|
||||
scheduleNextMixerCalculation(EXTERNAL_MODULE, AFHDS3_COMMAND_TIMEOUT);
|
||||
#endif
|
||||
return true;
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user