bitcraze / crazyflie2-ios-client

The Crazyflie 2.0 iOS client
36 stars 36 forks source link

Disable the idle timer whilst updating #24

Closed matthewspear closed 5 years ago

matthewspear commented 5 years ago

I got a Crazyflie for Christmas, did an update and my phone auto locked during the update. I'm an iOS developer pretty excited to get involved in this project so I've written a quick fix.

Commit message:

The idle timer causes the system to sleep based on the user’s Auto-Lock duration.

If a user has set a short Auto-Lock duration this could disrupt an update.

Applied on viewDidAppear / viewDidDisapear for simplicity.
matthewspear commented 5 years ago

Sorry I should have read the issues first 🙈, this solves issue #3 but overlooks the battery usage. I would make the assumption that since updating is a specific task a user would be aware (along with the onscreen message) that it could take around 10 minutes.

ataffanel commented 5 years ago

This looks good, thanks a lot I merged it!