mirror of
https://github.com/iNavFlight/inav.git
synced 2025-07-13 11:29:56 +03:00
extend msp_override_mask to 32bits / channels (#10891)
* extend msp_override_mask to 32bits / channels * update other override 16bit variables
This commit is contained in:
parent
498526bdd0
commit
c60abeaca8
5 changed files with 6 additions and 6 deletions
|
@ -3038,7 +3038,7 @@ Mask of RX channels that may be overridden by MSP `SET_RAW_RC`. Note that this r
|
||||||
|
|
||||||
| Default | Min | Max |
|
| Default | Min | Max |
|
||||||
| --- | --- | --- |
|
| --- | --- | --- |
|
||||||
| 0 | 0 | 65535 |
|
| 0 | 0 | 4294967295 |
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|
|
@ -775,7 +775,7 @@ groups:
|
||||||
field: mspOverrideChannels
|
field: mspOverrideChannels
|
||||||
condition: USE_MSP_RC_OVERRIDE
|
condition: USE_MSP_RC_OVERRIDE
|
||||||
min: 0
|
min: 0
|
||||||
max: 65535
|
max: UINT32_MAX
|
||||||
|
|
||||||
- name: PG_BLACKBOX_CONFIG
|
- name: PG_BLACKBOX_CONFIG
|
||||||
type: blackboxConfig_t
|
type: blackboxConfig_t
|
||||||
|
|
|
@ -59,7 +59,7 @@ static timeMs_t validRxDataFailedAt = 0;
|
||||||
static timeUs_t rxNextUpdateAtUs = 0;
|
static timeUs_t rxNextUpdateAtUs = 0;
|
||||||
static timeUs_t needRxSignalBefore = 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 rcChannel_t mspRcChannels[MAX_SUPPORTED_RC_CHANNEL_COUNT];
|
||||||
|
|
||||||
static rxRuntimeConfig_t rxRuntimeConfigMSP;
|
static rxRuntimeConfig_t rxRuntimeConfigMSP;
|
||||||
|
@ -215,7 +215,7 @@ bool mspOverrideCalculateChannels(timeUs_t currentTimeUs)
|
||||||
|
|
||||||
void mspOverrideChannels(rcChannel_t *rcChannels)
|
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) {
|
if (rxConfig()->mspOverrideChannels & ~mspOverrideCtrlChannels & channelMask) {
|
||||||
rcChannels[channel].raw = rcChannels[channel].data = mspRcChannels[channel].data;
|
rcChannels[channel].raw = rcChannels[channel].data = mspRcChannels[channel].data;
|
||||||
}
|
}
|
||||||
|
|
|
@ -98,7 +98,7 @@ rxLinkStatistics_t rxLinkStatistics;
|
||||||
rxRuntimeConfig_t rxRuntimeConfig;
|
rxRuntimeConfig_t rxRuntimeConfig;
|
||||||
static uint8_t rcSampleIndex = 0;
|
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
|
#ifndef SERIALRX_PROVIDER
|
||||||
#define SERIALRX_PROVIDER 0
|
#define SERIALRX_PROVIDER 0
|
||||||
|
|
|
@ -126,7 +126,7 @@ typedef struct rxConfig_s {
|
||||||
uint8_t rcFilterFrequency; // RC filter cutoff frequency (smoothness vs response sharpness)
|
uint8_t rcFilterFrequency; // RC filter cutoff frequency (smoothness vs response sharpness)
|
||||||
uint8_t autoSmooth; // auto smooth rx input (0 = off, 1 = on)
|
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)
|
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;
|
uint8_t rssi_source;
|
||||||
#ifdef USE_SERIALRX_SRXL2
|
#ifdef USE_SERIALRX_SRXL2
|
||||||
uint8_t srxl2_unit_id;
|
uint8_t srxl2_unit_id;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue