Handle more module combination

This commit is contained in:
3djc
2020-12-22 10:07:37 +01:00
parent f3ffdbff0a
commit d712a17f62
2 changed files with 13 additions and 3 deletions
+5 -2
View File
@@ -37,13 +37,16 @@ static MixerSchedule mixerSchedules[NUM_MODULES];
uint16_t getMixerSchedulerPeriod()
{
#if defined(INTERNAL_MODULE)
if (mixerSchedules[INTERNAL_MODULE].period) {
return mixerSchedules[INTERNAL_MODULE].period;
}
else if (mixerSchedules[EXTERNAL_MODULE].period) {
#endif
#if defined(EXTERNAL_MODULE)
if (mixerSchedules[EXTERNAL_MODULE].period) {
return mixerSchedules[EXTERNAL_MODULE].period;
}
#endif
return MIXER_SCHEDULER_DEFAULT_PERIOD_US;
}
+8 -1
View File
@@ -174,7 +174,14 @@ TASK_FUNCTION(mixerTask)
doMixerCalculations();
// TODO: fix runMask
sendSynchronousPulses((1 << INTERNAL_MODULE) | (1 << EXTERNAL_MODULE));
uint8_t runMask = 0;
#if defined(INTERNAL_MODULE)
runMask != (1 << INTERNAL_MODULE)
#endif
#if defined(EXTERNAL_MODULE)
runMask != (1 << EXTERNAL_MODULE)
#endif
sendSynchronousPulses(runMask);
doMixerPeriodicUpdates();