Skip to content

Conversation

codecae
Copy link
Member

@codecae codecae commented Mar 30, 2018

Removed events.lua to prevent userEvent table from being added to the heap. Replaced calls to the userEvent table with the original constants in OpenTX.

@codecae codecae force-pushed the remove_event_table_for_memory_savings branch from ff36fef to a75ee73 Compare March 30, 2018 18:37
@codecae codecae requested a review from mikeller March 30, 2018 19:01
@codecae codecae force-pushed the remove_event_table_for_memory_savings branch from a75ee73 to 097de8d Compare March 30, 2018 21:09
@codecae
Copy link
Member Author

codecae commented Mar 30, 2018

Rather than rebasing, I'm of the opinion that custom frequency selection in master should be reverted and optimized.

I've included a revert for this commit to restore the vtx and ui code to it's previous state.

@codecae codecae force-pushed the remove_event_table_for_memory_savings branch from 097de8d to a8b461d Compare March 30, 2018 21:31
@ethomas997
Copy link
Contributor

Looks like the memory situation should improve when an OpenTX version with opentx/opentx#5579 is released (but I've not been following the situation there closely).

@codecae
Copy link
Member Author

codecae commented Mar 30, 2018

I mean no disrespect regarding the revert @ethomas997 ... likely a temporary measure in order to get the memory issues addressed until a more adequate solution can be provided by OpenTX.

I have tested the effect of these changes on 2.2.1 and have not had a single memory failure.

Try this version if you'd like to assist with testing.

@codecae
Copy link
Member Author

codecae commented Mar 30, 2018

I rescind my comment -- I did get a memory error, but it only occured when switching pages too quickly. If the page is permitted to load completely before switching, the error does not occur.

@ethomas997
Copy link
Contributor

@codecae No disrespect taken; I know it's kind of a messy situation. Do we have a sense of if opentx/opentx#5579 will fix this and if it will get into a release soon?

Copy link
Member

@mikeller mikeller left a comment

Choose a reason for hiding this comment

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

Apart from that one comment I am with @codecae: Seeing that the fixed update to OpenTX did not eventuate when it was promised, and that most lua users are stuck with an almost unusable script for now, I think rolling these changes back and then pushing a release that will significantly improve the situation for the users is a win.
We can always reinstate the changes after an updated OpenTX has been released and we've confirmed that the memory woes have been fixed.

-- Proto
{ x = 130, y = 68, vals = { 1 }, to = MIDSIZE,
write = false, ro = true,
table = { [1]="RTC6705",[3]="SmartAudio",[4]="Tramp",[255]="None"} },
Copy link
Member

Choose a reason for hiding this comment

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

I think the RTC6705 entry should be reinstated.

@mikeller
Copy link
Member

opentx/opentx#5579 should fix it - there are custom builds out there with this patch on top of 2.2.1, and they seem to be fixing the memory woes. But then, 2.2.2 might also include other changes that use more memory, negating this effect.
Re release, the last date that I've heard was 'mid February'. This has long passed, and no indication of a new release yet...

@ethomas997
Copy link
Contributor

@mikeller Understood. You might want to check if the scripts still overflow memory even with the rollback.

BTW I have a "basic" version posted based on the previous edition of the scripts, with the "VTX freq editable" changes and two other screens (only), here: https://github.com/ethomas997/betaflight-tx-lua-basic/releases

@stale
Copy link

stale bot commented May 6, 2018

This issue / pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs within a week.

@stale stale bot added the Inactive label May 6, 2018
@stale
Copy link

stale bot commented May 13, 2018

Automatically closing as inactive.

@stale stale bot closed this May 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3 participants