Skip to content

Conversation

klutvott123
Copy link
Member

@klutvott123 klutvott123 commented Nov 12, 2019

Removed some unused variables.
Made global variables in msp related files local as they don't have to be global.
Made getProtocol() a local function.

Have tested it and it works.
Looks like it saves about 1.5-2k of memory.

Edit:
Made payload local to saveSettings(). We don't need access to it outside of this function. This reduces the memory spike when saving and prevents payload from sticking around after saving.

mikeller
mikeller previously approved these changes Nov 12, 2019
@mikeller mikeller added this to the 1.5 milestone Nov 12, 2019
@mikeller mikeller merged commit 50270c6 into betaflight:master Nov 15, 2019
@klutvott123 klutvott123 deleted the more-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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants