WiP: Simu and modules fixes

This commit is contained in:
Raphael Coeffic
2021-07-25 08:33:57 +02:00
parent f99389c4a2
commit 74f2445558
16 changed files with 67 additions and 13 deletions
+14 -2
View File
@@ -187,9 +187,13 @@ uint8_t getRequiredProtocol(uint8_t module)
break;
#endif
#if defined(AFHDS3)
#if defined(AFHDS3) || defined(AFHDS2)
case MODULE_TYPE_AFHDS3:
protocol = PROTOCOL_CHANNELS_AFHDS3;
if (isModuleAFHDS3(module)) {
protocol = PROTOCOL_CHANNELS_AFHDS3;
} else if (isModuleAFHDS2A(module)) {
protocol = PROTOCOL_CHANNELS_AFHDS2A;
}
break;
#endif
@@ -505,6 +509,14 @@ static void enablePulsesInternalModule(uint8_t protocol)
break;
#endif
#if defined(AFHDS2)
case PROTOCOL_CHANNELS_AFHDS2A:
extmodulePulsesData.afhds2.init(INTERNAL_MODULE);
extmoduleSerialStart();
mixerSchedulerSetPeriod(INTERNAL_MODULE, 2 * 1000 /* us */);
break;
#endif
default:
// internal module stopped, set internal period to 0 and start the scheduler
mixerSchedulerSetPeriod(INTERNAL_MODULE, 0);