WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/Settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 |

---

Expand Down
2 changes: 1 addition & 1 deletion src/main/fc/settings.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/main/rx/msp_override.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/rx/rx.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/main/rx/rx.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Loading