-
Notifications
You must be signed in to change notification settings - Fork 0
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 wake locks #88
base: main
Are you sure you want to change the base?
Add wake locks #88
Conversation
…nalrobotics/feeding_web_interface into raidak/prevent_phone_sleep
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.
Hmm, as opposed to enabling NoSleep
in every MealState that leads to RobotMotion, instead can't you enable it in the RobotMotion page instead? Specifically, in this useEffect
you can call nosleep.enable()
and then in the return value from that useEffect
, you can call nosleep.disable()
. In theory, that should enable nosleep every time the RobotMotion
component mounts, and disable it every time the component unmounts. See here for more details on useEffect
.
Let me know what you think. If you tried this, let me know why it didn't work.
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.
The code looks good. I'll test more on my mobile phone, with the actual robot, make any necessary changes, and merge it in after that.
Describe this pull request. Link to relevant GitHub issues, if any.
In service of issue #86
Explain how this pull request was tested, including but not limited to the below checkmarks.
In iPhone device, with EC2 link of updated pulled code.
Before creating a pull request
npm run format
python3 -m black .
in the top-level of this repositoryBefore merging a pull request
Squash and Merge
)