fix: Quick fix to let CRSF be used with MPM wireless trainer - limiations apply (#1724)
* Let's do some dirty hack with MPM RX Resolves #1671 * Use the right function to sync and shutdown sync on external MPM as well
This commit is contained in:
@@ -76,6 +76,20 @@ static void sendMulti(uint8_t moduleIdx, uint8_t b)
|
||||
sendByteSbus(b);
|
||||
}
|
||||
|
||||
static void updateMultiSync(uint8_t module)
|
||||
{
|
||||
const auto& status = getMultiModuleStatus(module);
|
||||
if (status.isValid() && status.isRXProto) {
|
||||
mixerSchedulerSetPeriod(module, 0);
|
||||
} else {
|
||||
auto& sync = getModuleSyncStatus(module);
|
||||
if (sync.isValid())
|
||||
mixerSchedulerSetPeriod(module, sync.getAdjustedRefreshRate());
|
||||
else
|
||||
mixerSchedulerSetPeriod(module, MULTIMODULE_PERIOD);
|
||||
}
|
||||
}
|
||||
|
||||
static void sendFailsafeChannels(uint8_t moduleIdx)
|
||||
{
|
||||
uint32_t bits = 0;
|
||||
@@ -118,6 +132,8 @@ void setupPulsesMulti(uint8_t moduleIdx)
|
||||
};
|
||||
uint8_t type=MULTI_NORMAL;
|
||||
|
||||
updateMultiSync(moduleIdx);
|
||||
|
||||
// not scanning protos && not spectrum analyser
|
||||
if (getModuleMode(moduleIdx) == MODULE_MODE_NORMAL) {
|
||||
// Failsafe packets
|
||||
@@ -202,12 +218,6 @@ void setupPulsesMultiExternalModule()
|
||||
}
|
||||
|
||||
#if defined(INTERNAL_MODULE_MULTI)
|
||||
void setupPulsesMultiInternalModule()
|
||||
{
|
||||
intmodulePulsesData.multi.initFrame();
|
||||
setupPulsesMulti(INTERNAL_MODULE);
|
||||
}
|
||||
|
||||
static void* multiInit(uint8_t module)
|
||||
{
|
||||
(void)module;
|
||||
|
||||
Reference in New Issue
Block a user