Skip to content

Conversation

klutvott123
Copy link
Member

Have vtx_defaults.lua/modelname.lua return their tables to vtx.lua instead of using globals. This prevents the tables that are specific only to vtx.lua to be loaded all the time. Should save between 1 and 2k of memory when the vtx page is not selected.

mikeller
mikeller previously approved these changes Nov 11, 2019
@mikeller mikeller added this to the 1.5 milestone Nov 11, 2019
Copy link
Contributor

@frozenskys frozenskys left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good... Just missing a matching change in the updatePowerTable function as well.

@klutvott123
Copy link
Member Author

@frozenskys Done!

@frozenskys
Copy link
Contributor

@klutvott123 looks good - did you see @mikeller's comments on betaflight/betaflight-configurator#1822 ? What does everyone think?

Have vtx_defaults return it's tables to vtx instead of loading them as globals.
@klutvott123
Copy link
Member Author

@frozenskys I just moved deviceTable and pitModeTable to vtx.lua. We can always change it later without making more changes to the configurator.

@frozenskys
Copy link
Contributor

@klutvott123 looks spot on.. Thanks for your help on this...

@mikeller mikeller merged commit a387275 into betaflight:master Nov 12, 2019
@klutvott123 klutvott123 deleted the vtx-memory-savings branch November 15, 2019 12:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

3 participants