-
Notifications
You must be signed in to change notification settings - Fork 322
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
memory cleanup #169
memory cleanup #169
Conversation
a42817e
to
f89a334
Compare
f89a334
to
8296ff7
Compare
f7f0d97
to
672c3b4
Compare
This allows the Lua complier to execute the zoneToPin function directly from flash with no RAM used for the previous table.
* Allows for modules to access mqtt methods for situations where it may be required. * When settings are pushed the mqtt client will now be disconnected before writing the new settings, which is now handled in the "offline" method of the mqtt client. This allows for larger payloads by freeing memory before processing, preventing "out of RAM" errors.
if zone == 5 or zone == '5' then return 7 end | ||
if zone == 6 or zone == '6' then return 9 end | ||
if zone == "out" then return 8 end | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✨
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😆
local request = require("httpd_req")(payload) | ||
local response = require("httpd_res")() | ||
request = require("httpd_req")(payload) | ||
response = require("httpd_res")() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
curious what does removing the local
declaration actually do?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This makes the variables global so they can be accessed in the offline callback before being garbage collected.
No description provided.