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

Sleepy Mesh #164

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

Sleepy Mesh #164

wants to merge 6 commits into from

Conversation

quartzjer
Copy link
Contributor

This adds two new scoutscript commands to enable a sleepy mode:

  • power.sleepy(ms, [command]) - works identically to power.sleep except that after ms it will wake up and run a loop (and run the command if given) and then go back to sleep for ms again, looping indefinitely
  • power.wake(ms) - when sleepy, it will keep the scout awake for this many ms before going back to sleep

Together these commands can be used to make a whole mesh sleep but still be responsive, command.all("power.sleepy",1000) will make everyone sleepy, and when the mesh needs to wake up just run a command.all("power.wake",1000) continuously until it's ready to sleep again.

@ghost
Copy link

ghost commented Oct 27, 2014

Would be nice if this can be checked in

@quartzjer quartzjer self-assigned this Nov 14, 2014
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.

1 participant