mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-23 08:15:30 +03:00
Move OSD elements into their own parameter group
Separates the OSD elements position/visible/profile flags from the `osdConfig` PG and moves them to a new `osdElementConfig` PG. Allows new elements to be added without having to constantly update the PG version for `osdConfig`.
This commit is contained in:
parent
7d215e8f84
commit
afeb88850f
11 changed files with 158 additions and 149 deletions
|
@ -838,7 +838,7 @@ static bool mspCommonProcessOutCommand(uint8_t cmdMSP, sbuf_t *dst, mspPostProce
|
|||
|
||||
// Element position and visibility
|
||||
for (int i = 0; i < OSD_ITEM_COUNT; i++) {
|
||||
sbufWriteU16(dst, osdConfig()->item_pos[i]);
|
||||
sbufWriteU16(dst, osdElementConfig()->item_pos[i]);
|
||||
}
|
||||
|
||||
// Post flight statistics
|
||||
|
@ -3294,7 +3294,7 @@ static mspResult_e mspCommonProcessInCommand(mspDescriptor_t srcDesc, uint8_t cm
|
|||
osdStatSetState(addr, (value != 0));
|
||||
} else if (addr < OSD_ITEM_COUNT) {
|
||||
/* Set element positions */
|
||||
osdConfigMutable()->item_pos[addr] = value;
|
||||
osdElementConfigMutable()->item_pos[addr] = value;
|
||||
osdAnalyzeActiveElements();
|
||||
} else {
|
||||
return MSP_RESULT_ERROR;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue