Skip to content

Conversation

klutvott123
Copy link
Member

A number of small savings that add up to 1-1.5KB.

lcdResolution/radio.resolution removed. Use highRes bool for high resolution LCDs instead.

SCRIPT_HOME removed. Use chdir("/SCRIPTS/BF") instead.

Removed some unused/unnecessary code/variables.

Made some changes to reduce the size of ui.lua. Removed unnecessary paranthesis, newlines, indents. Also removed comments where they aren't really needed. Reducing the size of a file helps with on device compilation. ui.lua size reduced by approximately 1.5KB.

A number of small savings that add up to 1-1.5KB.

lcdResolution/radio.resolution removed. Use highRes bool for high resolution LCDs instead.

SCRIPT_HOME removed. Use chdir("/SCRIPTS/BF") instead.

Removed some unused/unnecessary code/variables.

Made some changes to reduce the size of ui.lua. Removed unnecessary paranthesis, newlines, indents. Also removed comments where they aren't really needed.  Reducing the size of a file helps with on device compilation. ui.lua size reduced by approximately 1.5KB.
@@ -1,8 +1,8 @@
SCRIPT_HOME = "/SCRIPTS/BF"
chdir("/SCRIPTS/BF")
Copy link
Member

Choose a reason for hiding this comment

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

Good idea!

Copy link
Member Author

Choose a reason for hiding this comment

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

👍

@mikeller mikeller added this to the 1.5 milestone Feb 10, 2020
@mikeller mikeller merged commit 423b026 into betaflight:master Feb 12, 2020
@klutvott123 klutvott123 deleted the memory-saving branch March 19, 2020 16:31
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