fix: Internal PXX exclusive S.PORT (#3822)

This commit is contained in:
Raphael Coeffic
2023-10-13 09:48:32 +10:00
committed by GitHub
parent c270ec18bf
commit ff2b3ac22a
24 changed files with 435 additions and 186 deletions
+2 -13
View File
@@ -28,6 +28,7 @@
#include "storage/storage.h"
#include "globals.h"
#include "MultiProtoDefs.h"
#include "hal/module_port.h"
#if defined(MULTIMODULE)
#include "telemetry/multi.h"
@@ -728,25 +729,13 @@ inline bool isBindCh9To16Allowed(uint8_t moduleIndex)
}
}
#if defined(PCBTARANIS) || defined(PCBHORUS)
inline bool isSportLineUsedByInternalModule()
{
return g_model.moduleData[INTERNAL_MODULE].type == MODULE_TYPE_XJT_PXX1;
}
#else
inline bool isSportLineUsedByInternalModule()
{
return false;
}
#endif
inline bool isTelemAllowedOnBind(uint8_t moduleIndex)
{
#if defined(HARDWARE_INTERNAL_MODULE)
if (moduleIndex == INTERNAL_MODULE)
return true;
if (isSportLineUsedByInternalModule())
if (!modulePortIsPortUsedByModule(moduleIndex, ETX_MOD_PORT_SPORT))
return false;
#endif