mirror of
https://github.com/iNavFlight/inav.git
synced 2025-07-26 01:35:35 +03:00
Refactor handling of RC input data
- Remove globals rcData and rcRaw - Use accesor functions to retrieve RX input data - Refactor rx.c to use an array of structs instead of multiple arrays - Drop the RC Preview menu from CMS. Implementing this without globals requires significant flash and the usefulness of this menu is questionable. If we get complains, we can add it back later. Flash usage goes down ~250 bytes due to the removed menu. Final binary is mostly unaffected, since LTO is able to inline the new accessor functions in most cases.
This commit is contained in:
parent
fb62330722
commit
d524d8c8cc
19 changed files with 118 additions and 131 deletions
|
@ -507,7 +507,7 @@ static bool mspFcProcessOutCommand(uint16_t cmdMSP, sbuf_t *dst, mspPostProcessF
|
|||
|
||||
case MSP_RC:
|
||||
for (int i = 0; i < rxRuntimeConfig.channelCount; i++) {
|
||||
sbufWriteU16(dst, rcRaw[i]);
|
||||
sbufWriteU16(dst, rxGetRawChannelValue(i));
|
||||
}
|
||||
break;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue