Handle more module combination
This commit is contained in:
@@ -37,13 +37,16 @@ static MixerSchedule mixerSchedules[NUM_MODULES];
|
|||||||
|
|
||||||
uint16_t getMixerSchedulerPeriod()
|
uint16_t getMixerSchedulerPeriod()
|
||||||
{
|
{
|
||||||
|
#if defined(INTERNAL_MODULE)
|
||||||
if (mixerSchedules[INTERNAL_MODULE].period) {
|
if (mixerSchedules[INTERNAL_MODULE].period) {
|
||||||
return 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;
|
return mixerSchedules[EXTERNAL_MODULE].period;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
return MIXER_SCHEDULER_DEFAULT_PERIOD_US;
|
return MIXER_SCHEDULER_DEFAULT_PERIOD_US;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+8
-1
@@ -174,7 +174,14 @@ TASK_FUNCTION(mixerTask)
|
|||||||
doMixerCalculations();
|
doMixerCalculations();
|
||||||
|
|
||||||
// TODO: fix runMask
|
// 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();
|
doMixerPeriodicUpdates();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user