1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-16 04:45:24 +03:00

Merge pull request #5208 from jflyper/bfdev-piniobox-cleanup

PINIOBOX Separation of boxId and permanentId.
This commit is contained in:
Michael Keller 2018-02-20 01:53:07 +13:00 committed by GitHub
commit b4667332d7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 32 additions and 25 deletions

View file

@ -269,15 +269,20 @@ void initActiveBoxIds(void)
// Turn BOXUSERx only if pinioBox facility monitors them, as the facility is the only BOXUSERx observer.
// Note that pinioBoxConfig can be set to monitor any box.
for (int i = 0; i < PINIO_COUNT; i++) {
switch(pinioBoxConfig()->boxId[i]) {
case BOXUSER1:
case BOXUSER2:
case BOXUSER3:
case BOXUSER4:
BME(pinioBoxConfig()->boxId[i]);
break;
default:
break;
if (pinioBoxConfig()->permanentId[i] != PERMANENT_ID_NONE) {
const box_t *box = findBoxByPermanentId(pinioBoxConfig()->permanentId[i]);
if (box) {
switch(box->boxId) {
case BOXUSER1:
case BOXUSER2:
case BOXUSER3:
case BOXUSER4:
BME(box->boxId);
break;
default:
break;
}
}
}
}
#endif