mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-20 06:45:16 +03:00
CF/BF - Extract cli settings so they can be re-used.
CF/BF - Save 1280 bytes of flash and delete over 300 lines of code by removing giant switch statement and static variables in the CLI. fix CF/BF - Remove some conditional code because there is a copy of every PG so it will always be found*. * unless a developer makes an error in the value table by specifying an invalid PG. CF/BF - Remove final usages of getCurrentAndDefaultConfigs to save more flash space. CF/BF - Change CLI command 'dump showdefaults' to simply 'dump defaults'. * This will save a few bytes of flash space due to string re-use of the 'defaults' string. CF/BF - Save a few more bytes by re-using the 'defaults' string again. CF/BF - Fix CLI not being size optimized. * The file had moved but the makefile was not updated to reflect that. CF/BF - Add 'fc_init.c' and 'settings.c' to the size optimizations list. CF/BF - Add some config source files to the size-optimized list. CF/BF - De-duplicate CR/LF code by using appropriate methods. Promote additional string re-use. * This saves quite a lot of space when the file is size optimized, but grows it otherwise. CF/BF - Further flash savings by removing more CR/LF on the cliDump/cliDefaultPrintf format strings. * It turns out that all the format strings ended in CR+LF so they could all be removed. CF/BF - Fix LF+CR being used instead of CR+LF for further flash savings.
This commit is contained in:
parent
63552348c0
commit
970f193dd7
5 changed files with 1104 additions and 1300 deletions
1551
src/main/fc/cli.c
1551
src/main/fc/cli.c
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue