mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-12 19:10:32 +03:00
Ensure MSP channel data is valid (#13352)
This commit is contained in:
parent
d84ec8da63
commit
24e7dabed3
1 changed files with 2 additions and 1 deletions
|
@ -32,7 +32,8 @@ uint16_t rxMspOverrideReadRawRc(const rxRuntimeState_t *rxRuntimeState, const rx
|
|||
{
|
||||
uint16_t rxSample = (rxRuntimeState->rcReadRawFn)(rxRuntimeState, chan);
|
||||
|
||||
uint16_t overrideSample = rxMspReadRawRC(rxRuntimeState, chan);
|
||||
uint16_t overrideSample = constrainf(rxMspReadRawRC(rxRuntimeState, chan), rxConfig->rx_min_usec, rxConfig->rx_max_usec);
|
||||
|
||||
bool override = (1 << chan) & rxConfig->msp_override_channels_mask;
|
||||
|
||||
if (IS_RC_MODE_ACTIVE(BOXMSPOVERRIDE) && override) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue