diff --git a/docs/Settings.md b/docs/Settings.md index 89c7bf1c70..815944ebba 100644 --- a/docs/Settings.md +++ b/docs/Settings.md @@ -3038,7 +3038,7 @@ Mask of RX channels that may be overridden by MSP `SET_RAW_RC`. Note that this r | Default | Min | Max | | --- | --- | --- | -| 0 | 0 | 65535 | +| 0 | 0 | 4294967295 | --- diff --git a/src/main/fc/settings.yaml b/src/main/fc/settings.yaml index 17f44e3a9b..e361d62e10 100644 --- a/src/main/fc/settings.yaml +++ b/src/main/fc/settings.yaml @@ -775,7 +775,7 @@ groups: field: mspOverrideChannels condition: USE_MSP_RC_OVERRIDE min: 0 - max: 65535 + max: UINT32_MAX - name: PG_BLACKBOX_CONFIG type: blackboxConfig_t diff --git a/src/main/rx/msp_override.c b/src/main/rx/msp_override.c index 376eba49e5..789d7d2d88 100755 --- a/src/main/rx/msp_override.c +++ b/src/main/rx/msp_override.c @@ -59,7 +59,7 @@ static timeMs_t validRxDataFailedAt = 0; static timeUs_t rxNextUpdateAtUs = 0; static timeUs_t needRxSignalBefore = 0; -static uint16_t mspOverrideCtrlChannels = 0; // bitmask representing which channels are used to control MSP override +static uint32_t mspOverrideCtrlChannels = 0; // bitmask representing which channels are used to control MSP override static rcChannel_t mspRcChannels[MAX_SUPPORTED_RC_CHANNEL_COUNT]; static rxRuntimeConfig_t rxRuntimeConfigMSP; @@ -215,7 +215,7 @@ bool mspOverrideCalculateChannels(timeUs_t currentTimeUs) void mspOverrideChannels(rcChannel_t *rcChannels) { - for (uint16_t channel = 0, channelMask = 1; channel < rxRuntimeConfigMSP.channelCount; ++channel, channelMask <<= 1) { + for (uint32_t channel = 0, channelMask = 1; channel < rxRuntimeConfigMSP.channelCount; ++channel, channelMask <<= 1) { if (rxConfig()->mspOverrideChannels & ~mspOverrideCtrlChannels & channelMask) { rcChannels[channel].raw = rcChannels[channel].data = mspRcChannels[channel].data; } diff --git a/src/main/rx/rx.c b/src/main/rx/rx.c index 00ed23ab25..0531904d06 100755 --- a/src/main/rx/rx.c +++ b/src/main/rx/rx.c @@ -98,7 +98,7 @@ rxLinkStatistics_t rxLinkStatistics; rxRuntimeConfig_t rxRuntimeConfig; static uint8_t rcSampleIndex = 0; -PG_REGISTER_WITH_RESET_TEMPLATE(rxConfig_t, rxConfig, PG_RX_CONFIG, 12); +PG_REGISTER_WITH_RESET_TEMPLATE(rxConfig_t, rxConfig, PG_RX_CONFIG, 13); #ifndef SERIALRX_PROVIDER #define SERIALRX_PROVIDER 0 diff --git a/src/main/rx/rx.h b/src/main/rx/rx.h index 64b97b172e..3ed6add3e4 100644 --- a/src/main/rx/rx.h +++ b/src/main/rx/rx.h @@ -126,7 +126,7 @@ typedef struct rxConfig_s { uint8_t rcFilterFrequency; // RC filter cutoff frequency (smoothness vs response sharpness) uint8_t autoSmooth; // auto smooth rx input (0 = off, 1 = on) uint8_t autoSmoothFactor; // auto smooth rx input factor (1 = no smoothing, 100 = lots of smoothing) - uint16_t mspOverrideChannels; // Channels to override with MSP RC when BOXMSPRCOVERRIDE is active + uint32_t mspOverrideChannels; // Channels to override with MSP RC when BOXMSPRCOVERRIDE is active uint8_t rssi_source; #ifdef USE_SERIALRX_SRXL2 uint8_t srxl2_unit_id;