Commit graph

902 commits

Author SHA1 Message Date
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
James A. Jerkins 3e1fe687b8 Fix styles issues - no change to functionality 2021-09-01 22:50:56 -05:00
James A. Jerkins d69a8e84fa Fix race condition, connect->disconnect->discovery 2021-09-01 22:48:01 -05:00
James A. Jerkins 00a3f84ea7 Completely reset connection state on fail 2021-08-30 23:17:16 -05:00
James A. Jerkins be31f417db WIP Refactor ble advertising
Refactor ble advertising based on ble standards and conventions.
Changes are based on the bleprph example code, bluetooth docs, and nimble docs.
2021-08-29 15:50:04 -05:00
hubmartin df8ea7fe52 Add memory print usage 2021-08-18 20:21:10 +02:00
Riku Isokoski b91100573e Fix music app buttons 2021-08-18 20:19:02 +02:00
Riku Isokoski ee44b6ff49 Adjust inner padding in applist 2021-08-15 11:19:47 +02:00
Riku Isokoski bc82905371 Clean up using variables 2021-08-15 11:19:47 +02:00
Riku Isokoski 637ed8033b Adjust previously missed scrollbar and firmware validation buttons 2021-08-15 11:19:47 +02:00
Riku Isokoski fc6458a35c Add image with example layouts 2021-08-15 11:19:47 +02:00
Riku Isokoski e0d01411d7 Ui update 2021-08-15 11:19:47 +02:00
Jean-François Milants df8d396472 Merge branch 'Riksu9000-call-improvements' into develop 2021-08-14 21:54:15 +02:00
Jean-François Milants 0eeed5ac33 Merge branch 'call-improvements' of https://github.com/Riksu9000/InfiniTime into Riksu9000-call-improvements
# Conflicts:
#	src/displayapp/screens/Metronome.cpp
2021-08-14 21:54:00 +02:00
Martin Hub dec4bab334
Add VSCode ST-link debug config (#567) 2021-08-14 21:24:26 +02:00
Riku Isokoski 6192775161 Improve metronome 2021-08-14 21:08:42 +02:00
Riku Isokoski 7c28de0b6f Set pin before loop 2021-08-14 21:00:33 +02:00
Riku Isokoski 10f610b219 Better pin configuration 2021-08-14 21:00:33 +02:00
Riku Isokoski e51c3eee4e Try to fix bootloop 2021-08-14 21:00:33 +02:00
Riku Isokoski f0e9d13329
Update contribute.md (#475)
* Update contribute.md
* Add newlines and remove spaces
* Replace CONTRIBUTING.md with doc/contribute.md
2021-08-14 20:58:38 +02:00
JF002 643077341b
Merge pull request #505 from geekbozu/devcon
VSCode Devcontainer
2021-08-10 16:54:13 +02:00
JF002 9fb3755088
Merge pull request #483 from Riksu9000/fix_adc
Fix misconfigured ADC and remove now unnecessary filtering
2021-08-10 12:32:09 +02:00
Jean-François Milants 707446ed52 Merge branch 'hassless-improve-battery-percentage-to-battery-icon-mapping' into develop 2021-08-10 12:31:03 +02:00
Jean-François Milants 81a143173f Merge branch 'improve-battery-percentage-to-battery-icon-mapping' of https://github.com/hassless/InfiniTime into hassless-improve-battery-percentage-to-battery-icon-mapping
# Conflicts:
#	src/displayapp/screens/BatteryIcon.cpp
2021-08-10 12:30:42 +02:00
Jean-François Milants c086520c97 Code cleaning in Clock, WatchFaceAnalog, WatchFaceDigital and PineTimeStyle, inspired by PR #232 by nscooling. 2021-08-10 11:39:25 +02:00
Tim Keller 44889adda0 Setup plugins for Clang-tidy/format 2021-08-09 00:16:17 +00:00
Tim Keller d2dc719b31 Fix intellisense 2021-08-08 22:51:31 +00:00
Tim Keller 7f2ee62aed Typos for days 2021-08-07 18:19:11 +00:00
Tim Keller e9248b225e Updated documentation 2021-08-07 18:19:11 +00:00
Tim Keller f7643a4d82 Added cmake variants 2021-08-07 18:19:11 +00:00
Niall Cooling c0b84537b3 added extra .sh build files 2021-08-07 17:18:18 +00:00
Niall Cooling c50f2b70c2 added clang-tidy/format to container 2021-08-07 17:17:38 +00:00
Niall Cooling 937d3e1933 added dos2unix to docker for Win10 and default to release build 2021-08-07 17:17:38 +00:00
Niall Cooling 382db668ed macOS and Win10 dockerfile 2021-08-07 17:17:38 +00:00
AzureAD\NiallCooling 273a94f298 removed dependency on build.sh 2021-08-07 17:17:38 +00:00
Niall Cooling 65423b3c94 added devcontainer files 2021-08-07 17:17:38 +00:00
Riku Isokoski f9319dfb91 Remove leftover 2021-08-01 21:19:33 +03:00
Riku Isokoski 09aaa58710 Remove floating point calculation 2021-08-01 16:19:09 +03:00
Riku Isokoski a618f43b4d Fixes 2021-08-01 14:13:32 +03:00
Riku Isokoski e6dcb3009f Improvements 2021-08-01 13:05:48 +03:00
Riku Isokoski 5bdef365f2 Merge branch 'develop' into HEAD 2021-08-01 11:47:26 +03:00
Riku Isokoski 79ee65bfd5 Increase ADC precision 2021-07-27 22:41:48 +03:00
Riku Isokoski a0a05553cf Merge branch 'develop' into fix_adc 2021-07-27 21:57:21 +03:00
Jean-François Milants 514481ef7f Tile event handler : read the event data only if the event is a "value changed event". LVGL sends many other event and some of them do not set the event data (global static variable) to a valid address, which may cause an invalid read. I noticed that when porting this class on RISC-V platform (BL602). 2021-07-25 19:55:21 +02:00
Jonathan Vander Mey 7b75ca591d Fix compile warnings 2021-07-25 18:01:13 +02:00
Riku Isokoski 574434550a Fix slow scroll 2021-07-25 17:59:58 +02:00
Grant 6222b7c223
Correct spelling issue in documentation (#509)
* Correct spelling issue
2021-07-25 17:58:55 +02:00
Riku Isokoski 1ae22f45f9 Fix cases where Get() isn't used 2021-07-25 17:56:07 +02:00
Riku Isokoski f2f22184b0 Add new unique icons for some apps 2021-07-25 17:55:08 +02:00
Riku Isokoski a69be1520a Add task state info to SystemInfo 2021-07-25 17:52:19 +02:00