summaryrefslogtreecommitdiff
path: root/src/components/ble/NimbleController.h
AgeCommit message (Collapse)AuthorFilesLines
2021-11-15Update includes to to be relative to src directoryReinhold Gschweicher1-13/+13
Don't use relative imports like `../foo.h` as those depend on the relative position of both files. Rather than that use imports relative to the `src` directory, which explicitly is part of the include directories.
2021-10-17Add MotionService : expose step count and RAW X/Y/Z values to the host.Jean-François Milants1-1/+4
2021-09-05Advertise fast for at least 30 secs then slow downJames A. Jerkins1-0/+5
On power up, advertise aggressively for at least 30 seconds then switch to a longer interval to conserve battery life. This fast/slow pattern is designed to balance connection response time and battery life. When a disconnect event is received restart the fast/slow pattern. When a failed connect event is received, restart the fast/slow pattern. When the screen is activated and ble is not connected, restart the fast/slow pattern. This pattern is consistent with Apple's BLE developer standards (QA 1931).
2021-09-05Revert "Linear decrease of advert rate to conserve battery"James A. Jerkins1-1/+0
This reverts commit c32ba844e04017a3fd31444c384deb3542bd76be.
2021-09-04Linear decrease of advert rate to conserve batteryJames A. Jerkins1-0/+1
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-08-29WIP Refactor ble advertisingJames A. Jerkins1-0/+2
Refactor ble advertising based on ble standards and conventions. Changes are based on the bleprph example code, bluetooth docs, and nimble docs.
2021-07-11Notify battery level every 10 minutes when connected to a BLE host.Jean-François Milants1-1/+2
Refactor battery percent : only use uint8_t to store the battery % remaining.
2021-04-24Changed access modified indentationAvamander1-2/+2
2021-04-24Reformatted all the files according to clang-format styleAvamander1-56/+63
2021-01-21Add incoming call functionalityRasmus Schenstrom1-0/+1
Add categories to AlertNotification Add new alert notification screens bases Add Incoming Call Add Modal Add event to AlertNotification Co-authored-by: Robin Karlsson <robin.karlsson@protonmail.com>
2021-01-20Merge branch piggz/nav into develop:Jean-François Milants1-0/+3
- fix conflict - add a icon for the navigation app.
2021-01-17Add heart rate BLE service.Jean-François Milants1-1/+4
2020-11-16Include cleanup: componentsokaestne1-6/+17
2020-10-29Refactoring of BLE service discovery : it is now implemented into the ↵JF1-0/+3
classes of the services.
2020-10-02Fixed all the includes that were broken due to the renamesAvamander1-0/+76