Skip to content
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

Add a sleep/dsleep chapter to Lua Developer FAQ #1861

Closed
marcelstoer opened this issue Mar 12, 2017 · 7 comments
Closed

Add a sleep/dsleep chapter to Lua Developer FAQ #1861

marcelstoer opened this issue Mar 12, 2017 · 7 comments

Comments

@marcelstoer
Copy link
Member

marcelstoer commented Mar 12, 2017

@TerryE's FAQ has a nice chapter about techniques for reducing RAM and SPIFFS footprint. I believe it'd be very useful to add a related chapter about "How to reduce power consumption and how to sleep/dsleep".

We have documentation on node.sleep, wifi.nullmodesleep, rtctime.dsleep, and rtcfio.sleep_until_sample. What we're missing is the bigger picture. When to use which? Which function is intended for which use case? What is the best strategy for (quasi-)autonomous, battery/solar-powered devices? What are the gotchas? It'd also be nice to document the required wiring graphically (linking to node.sleep).

@eyaleb or @jmattsson would you have time to put together a draft (assuming you agree with my request)?

@jmattsson
Copy link
Member

Good idea, but at the moment I'm still somewhat overloaded :/ While I've started to catch up on things a wee bit, I've still got something like 250 outstanding github notifications to make my way through.

@TerryE
Copy link
Collaborator

TerryE commented Mar 12, 2017

I've just finished doing the plumbing and central heating system for my new house. And then I want to crack on with the Lua 5.3 implementation which kinda got stalled with the house work. Sorry. In terms of the FAQ, there's bits that really need updating like once we've got the early memory leaks out of the way, using UpVals is solid, fast and efficient, but there are gotcha's which need explained for the beginners.

So what I am saying is that this is a great idea, but not one that I've got time for at the moment.

@flip111
Copy link
Contributor

flip111 commented Mar 26, 2017

@TerryE i was going to open a new issue, but i saw you mentioning lua 5.3. Is Lua 5.3 support in the works? That be pretty sweet, i just checked the lua homepage and 5.1.* seems pretty old.

@TerryE
Copy link
Collaborator

TerryE commented Mar 26, 2017

@flip111, see #1661 for this discussion.

@TerryE
Copy link
Collaborator

TerryE commented Apr 5, 2017

@marcelstoer Marcel, I need to add this and I will include this in the next push of my draft. Thanks 😄

@TerryE
Copy link
Collaborator

TerryE commented Apr 5, 2017

#1861 and #1862. I wasn't going to mention them but since you explicitly asked for such feedback I saw no point in withholding them.

Marcel, definitely #1861 belongs in here. #1862 belong in the Extension Developers FAQ, though there is a parallel one about how Lua developers have debugger support. Even if we ported the rest of the debugger library it is really only an set of RTS hooks so an IDE can integrate with Lua. I am not sure the best way to progress this one.

@stale
Copy link

stale bot commented Jun 7, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Jun 7, 2019
@stale stale bot closed this as completed Jun 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants