Skip to content

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.

2 participants