1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-13 03:20:00 +03:00

Fix arming disable flag and OSD warning buffer size (#14057)

* Fix missing arming disable flag

* Add test for array length

* Fix array init && add getter

* armingDisableFlagNames is no longer external

* Update array

* Thanks ledvinap

* Revert designated initializers

* Increase OSD Warnings buffer size

* Remove standard libraries

* Refactor

* Update pos

* Restore comment

* Micro optimize

* Extract condition

* Another optimization

* Use cmpTimeUs (not cmp32)

* Revert STATIC ASSERT string change

* Adjust esc sensor warning

* I like this

* Optimize intended minimum width

* revert Optimize intended minimum width

* Is dshot telemetry and esc telemetry exclusive

* Fix conflict

* OSD - WARNINGS_PREFERRED_SIZE

* OSD - Return NONE for no flag
This commit is contained in:
Mark Haslinghuis 2024-12-06 15:33:25 +01:00 committed by GitHub
parent 3138141cd1
commit 4b78aeec51
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 77 additions and 71 deletions

View file

@ -4892,9 +4892,9 @@ if (buildKey) {
cliPrint("Arming disable flags:");
armingDisableFlags_e flags = getArmingDisableFlags();
while (flags) {
const int bitpos = ffs(flags) - 1;
flags &= ~(1 << bitpos);
cliPrintf(" %s", armingDisableFlagNames[bitpos]);
const armingDisableFlags_e flag = 1 << (ffs(flags) - 1);
flags &= ~flag;
cliPrintf(" %s", getArmingDisableFlagName(flag));
}
cliPrintLinefeed();
}