1
0
Fork 0
InfiniTime/src/components
James A. Jerkins c32ba844e0 Linear decrease of advert rate to conserve battery
Start advertising aggressively when powered on then
slow down linearly over 75 seconds. This will conserve
battery by not advertising rapidly the whole time we
are seeking a connection. The slowest rate is
approximately once every 4.5 seconds to balance
responsiveness and battery life.

We use a fixed advertising duration of 5 seconds and start
with a 62.5 ms advertising interval. Every 5 seconds
(the advertising duration) we step up to a larger
advertising interval (slower advertising). We continue
to increase the advertising interval linearly for
75 seconds from the start of advertising. At 75 seconds
we have an advertising interval of 4.44 seconds which we
keep until connected. A reboot will restart the sequence.

When we receive a disconnect event we restart the sequence
with fast advertising and then slow down as described above.
Note that we are not using the BLE high duty cycle setting to
change the advertising rate. The rate is managed by repeatedly
setting the minimum and maximum intervals.

The linear rate of decrease and the slowest interval size
were determined experimentally by the author. The 5.3 Core
spec suggests that you not advertise slower than once
every 1.2 seconds to preserve responsiveness but we
ignored that suggestion.
2021-09-04 15:57:07 -05:00
..
battery Remove floating point calculation 2021-08-01 16:19:09 +03:00
ble Linear decrease of advert rate to conserve battery 2021-09-04 15:57:07 -05:00
brightness Changed access modified indentation 2021-04-24 12:00:45 +03:00
datetime Code cleaning in Clock, WatchFaceAnalog, WatchFaceDigital and PineTimeStyle, inspired by PR #232 by nscooling. 2021-08-10 11:39:25 +02:00
firmwarevalidator Changed access modified indentation 2021-04-24 12:00:45 +03:00
fs Using littlefs (#438) 2021-07-11 15:06:06 +02:00
gfx Changed access modified indentation 2021-04-24 12:00:45 +03:00
heartrate Initialize SystemTask, DisplayApp and HeartRateTask as global static variable instead of variables on the heap. We don't need them on the heap as we know their size at build time, it'll reduce memory fragmentation and it'll make memory analysis easier. 2021-06-06 15:56:03 +02:00
motion Add support for BMA425 acceleration sensor. (#440) 2021-06-19 20:27:59 +02:00
motor Improvements 2021-08-01 13:05:48 +03:00
rle Fix signed/unsigned comparison warning 2021-06-12 20:04:19 +02:00
settings Multiple wakeup sources (#290) 2021-07-14 20:51:51 +02:00
timer Initialize SystemTask, DisplayApp and HeartRateTask as global static variable instead of variables on the heap. We don't need them on the heap as we know their size at build time, it'll reduce memory fragmentation and it'll make memory analysis easier. 2021-06-06 15:56:03 +02:00