Compilation fixes

This commit is contained in:
3djc
2022-03-21 11:48:49 +01:00
committed by Raphael Coeffic
parent e63eeb0984
commit c0e6f2a7f9
5 changed files with 44 additions and 22 deletions
+33
View File
@@ -69,6 +69,39 @@ void ModuleState::startBind(BindInformation* destination,
#endif
}
#if defined(HARDWARE_INTERNAL_MODULE)
void restartInternalModule()
{
if (!IS_INTERNAL_MODULE_ON()) {
return;
}
pauseMixerCalculations();
pausePulses();
INTERNAL_MODULE_OFF();
RTOS_WAIT_MS(20); // 20ms so that the pulses interrupt will reinit the frame rate
telemetryProtocol = 255; // force telemetry port + module reinitialization
INTERNAL_MODULE_ON();
resumePulses();
resumeMixerCalculations();
}
#endif
#if defined(HARDWARE_EXTERNAL_MODULE)
void restartExternalModule()
{
if (!IS_EXTERNAL_MODULE_ON()) {
return;
}
pauseMixerCalculations();
pausePulses();
EXTERNAL_MODULE_OFF();
RTOS_WAIT_MS(20); // 20ms so that the pulses interrupt will reinit the frame rate
telemetryProtocol = 255; // force telemetry port + module reinitialization
EXTERNAL_MODULE_ON();
resumePulses();
resumeMixerCalculations();
}
#endif
void ModuleState::readModuleInformation(ModuleInformation* destination,
int8_t first, int8_t last)
{