Compilation fixes

This commit is contained in:
Bertrand Songis
2019-03-20 16:32:58 +01:00
parent 683a737c99
commit 04ba9e5c68
32 changed files with 110 additions and 71 deletions
+1 -1
View File
@@ -148,7 +148,7 @@ void setupPulsesDSM2()
dsmDat[0] |= DSM2_SEND_RANGECHECK;
}
else {
moduleSettings[port].mode = 0;
moduleSettings[EXTERNAL_MODULE].mode = 0;
}
#else
if (moduleSettings[EXTERNAL_MODULE].mode == MODULE_MODE_BIND) {
-7
View File
@@ -48,7 +48,6 @@ inline bool isModuleMultimoduleDSM2(uint8_t)
}
#endif
#if defined(PCBHORUS) || defined(PCBTARANIS)
inline bool isModuleXJT(uint8_t idx)
{
return g_model.moduleData[idx].type == MODULE_TYPE_XJT;
@@ -64,12 +63,6 @@ inline bool isModuleXJTVariant(uint8_t idx)
return g_model.moduleData[idx].type == MODULE_TYPE_XJT || g_model.moduleData[idx].type == MODULE_TYPE_XJT2;
}
#else
inline bool isModuleXJT(uint8_t idx)
{
return idx == EXTERNAL_MODULE && g_model.moduleData[EXTERNAL_MODULE].type == MODULE_TYPE_XJT;
}
#endif
#if defined(CROSSFIRE)
inline bool isModuleCrossfire(uint8_t idx)
+1 -1
View File
@@ -65,7 +65,7 @@ void setupPulsesPPMTrainer()
setupPulsesPPM<trainer_pulse_duration_t>(&trainerPulsesData.ppm, g_model.trainerData.channelsStart, g_model.trainerData.channelsCount, g_model.trainerData.frameLength);
}
#if defined(PCBSKY9X) || defined(TARANIS_INTERNAL_PPM)
#if defined(PCBTARANIS) && defined(TARANIS_INTERNAL_PPM)
void setupPulsesPPMInternalModule()
{
setupPulsesPPM(&intmodulePulsesData.ppm, g_model.moduleData[INTERNAL_MODULE].channelsStart, g_model.moduleData[INTERNAL_MODULE].channelsCount, g_model.moduleData[INTERNAL_MODULE].ppm.frameLength);
+5 -1
View File
@@ -31,9 +31,11 @@ TrainerPulsesData trainerPulsesData __DMA;
uint8_t getModuleType(uint8_t module)
{
uint8_t type = g_model.moduleData[module].type;
#if defined(PCBTARANIS) || defined(PCBHORUS)
if (module == INTERNAL_MODULE && isInternalModuleAvailable(type)) {
return type;
}
#endif
if (module == EXTERNAL_MODULE && isExternalModuleAvailable(type)) {
return type;
}
@@ -255,7 +257,7 @@ void setupPulsesInternalModule(uint8_t protocol)
break;
#endif
#if defined(PCBSKY9X) || defined(TARANIS_INTERNAL_PPM)
#if defined(PCBTARANIS) && defined(TARANIS_INTERNAL_PPM)
case PROTOCOL_CHANNELS_PPM:
setupPulsesPPM(&extmodulePulsesData.ppm, g_model.moduleData[INTERNAL_MODULE].channelsStart, g_model.moduleData[INTERNAL_MODULE].channelsCount, g_model.moduleData[INTERNAL_MODULE].ppm.frameLength);
scheduleNextMixerCalculation(INTERNAL_MODULE, PPM_PERIOD(INTERNAL_MODULE));
@@ -332,9 +334,11 @@ void setupPulsesExternalModule(uint8_t protocol)
void setupPulses(uint8_t module, uint8_t protocol)
{
switch (module) {
#if defined(PCBTARANIS) && defined(PCBHORUS)
case INTERNAL_MODULE:
setupPulsesInternalModule(protocol);
break;
#endif
case EXTERNAL_MODULE:
setupPulsesExternalModule(protocol);