mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-15 20:35:33 +03:00
Extract range definition so it can be reused.
This commit is contained in:
parent
b2db6b3b80
commit
18abad5dd7
5 changed files with 41 additions and 38 deletions
|
@ -845,8 +845,8 @@ static bool processOutCommand(uint8_t cmdMSP)
|
|||
const box_t *box = &boxes[mac->modeId];
|
||||
serialize8(box->permanentId);
|
||||
serialize8(mac->auxChannelIndex);
|
||||
serialize8(mac->rangeStartStep);
|
||||
serialize8(mac->rangeEndStep);
|
||||
serialize8(mac->range.startStep);
|
||||
serialize8(mac->range.endStep);
|
||||
}
|
||||
break;
|
||||
case MSP_BOXNAMES:
|
||||
|
@ -1088,8 +1088,8 @@ static bool processInCommand(void)
|
|||
if (box) {
|
||||
mac->modeId = box->boxId;
|
||||
mac->auxChannelIndex = read8();
|
||||
mac->rangeStartStep = read8();
|
||||
mac->rangeEndStep = read8();
|
||||
mac->range.startStep = read8();
|
||||
mac->range.endStep = read8();
|
||||
} else {
|
||||
headSerialError(0);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue