Improve
This commit is contained in:
@@ -480,14 +480,16 @@ bool setupPulsesInternalModule(uint8_t protocol)
|
||||
}
|
||||
}
|
||||
|
||||
void stopPulsesInternalModule()
|
||||
{
|
||||
intmoduleStop();
|
||||
moduleState[INTERNAL_MODULE].protocol = PROTOCOL_CHANNELS_NONE;
|
||||
}
|
||||
|
||||
bool setupPulsesInternalModule()
|
||||
{
|
||||
uint8_t protocol = getRequiredProtocol(INTERNAL_MODULE);
|
||||
|
||||
if(protocol != PROTOCOL_CHANNELS_NONE) {
|
||||
INTERNAL_MODULE_ON();
|
||||
}
|
||||
|
||||
heartbeat |= (HEART_TIMER_PULSES << INTERNAL_MODULE);
|
||||
|
||||
if (moduleState[INTERNAL_MODULE].protocol != protocol) {
|
||||
@@ -502,14 +504,16 @@ bool setupPulsesInternalModule()
|
||||
}
|
||||
#endif
|
||||
|
||||
void stopPulsesExternalModule()
|
||||
{
|
||||
extmoduleStop();
|
||||
moduleState[EXTERNAL_MODULE].protocol = PROTOCOL_CHANNELS_NONE;
|
||||
}
|
||||
|
||||
bool setupPulsesExternalModule()
|
||||
{
|
||||
uint8_t protocol = getRequiredProtocol(EXTERNAL_MODULE);
|
||||
|
||||
if(protocol != PROTOCOL_CHANNELS_NONE) {
|
||||
EXTERNAL_MODULE_ON();
|
||||
}
|
||||
|
||||
heartbeat |= (HEART_TIMER_PULSES << EXTERNAL_MODULE);
|
||||
|
||||
if (moduleState[EXTERNAL_MODULE].protocol != protocol) {
|
||||
|
||||
@@ -315,8 +315,12 @@ extern TrainerPulsesData trainerPulsesData;
|
||||
|
||||
#if defined(HARDWARE_INTERNAL_MODULE)
|
||||
bool setupPulsesInternalModule();
|
||||
void stopPulsesInternalModule();
|
||||
#endif
|
||||
#if defined(HARDWARE_EXTERNAL_MODULE)
|
||||
bool setupPulsesExternalModule();
|
||||
void stopPulsesExternalModule();
|
||||
#endif
|
||||
void setupPulsesDSM2();
|
||||
void setupPulsesCrossfire();
|
||||
void setupPulsesGhost();
|
||||
|
||||
@@ -53,11 +53,11 @@ void preModelLoad()
|
||||
}
|
||||
pauseMixerCalculations();
|
||||
|
||||
#if defined(INTMODULE_PWR_GPIO)
|
||||
INTERNAL_MODULE_OFF();
|
||||
#if defined(HARDWARE_INTERNAL_MODULE)
|
||||
stopPulsesInternalModule();
|
||||
#endif
|
||||
#if defined(EXTMODULE_PWR_GPIO)
|
||||
EXTERNAL_MODULE_OFF();
|
||||
#if defined(HARDWARE_EXTERNAL_MODULE)
|
||||
stopPulsesExternalModule();
|
||||
#endif
|
||||
|
||||
stopTrainer();
|
||||
|
||||
Reference in New Issue
Block a user