fix: Internal PXX exclusive S.PORT (#3822)
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user