JosephHewitt/wardriver_rev3

Implement power saving

JosephHewitt opened this issue · 0 comments

It would be good to have a few customizable options for this, such as:

  • Power saving entirely off (eg, the device works exactly how it does right now)
  • Power saving always on (maybe with different levels, TBD)
  • Auto power savings (maybe with an optional high/low version, TBD)

To implement the auto mode, I think the following 2 things at a minimum need to be in place:

  • Get current speed, this can be determined simply by storing the GPS coordinates from 1,2, and 3 minutes ago (for example) and calculating the speed.
  • Get the current rate of new WiFi networks found, this can be calculated by counting the number of networks logged in a short period of time.

By using this data, the device can go into powersaving when not moving or not picking up many signals. It can also powersave when there is no GPS at all and when the web interface is in use.

The actual powersaving is easy to implement and will put the processor to sleep for x milliseconds. It would be good to determine a "strength" for the powersaving which will map to the number of milliseconds of low-power sleep between each scan; this can be related to the levels in "always on" and the device speed etc.

I expect this feature would reduce the energy usage of the device significantly, and if implemented well, with minimal impact to scanning performance.

It may be nice to make this fully customizable where users can state the duration of low-power sleep per scan based upon the travel speed but this would be harder to implement and the UI could be quite messy.