aboutsummaryrefslogtreecommitdiffstats
path: root/src/components
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'refactor_adv' of https://github.com/evergreen22/InfiniTime ↵Jean-François Milants2021-09-132-45/+87
|\ | | | | | | | | | | | | into evergreen22-refactor_adv # Conflicts: # src/components/ble/NimbleController.cpp
| * Advertise fast for at least 30 secs then slow downJames A. Jerkins2021-09-052-1/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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).
| * Revert "Linear decrease of advert rate to conserve battery"James A. Jerkins2021-09-052-6/+0
| | | | | | | | This reverts commit c32ba844e04017a3fd31444c384deb3542bd76be.
| * Linear decrease of advert rate to conserve batteryJames A. Jerkins2021-09-042-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * Fix styles issues - no change to functionalityJames A. Jerkins2021-09-011-6/+6
| |
| * Fix race condition, connect->disconnect->discoveryJames A. Jerkins2021-09-011-1/+3
| |
| * Completely reset connection state on failJames A. Jerkins2021-08-301-0/+3
| |
| * WIP Refactor ble advertisingJames A. Jerkins2021-08-292-40/+60
| | | | | | | | | | Refactor ble advertising based on ble standards and conventions. Changes are based on the bleprph example code, bluetooth docs, and nimble docs.
* | Merge pull request #549 from hubmartin/pinmapJF0022021-09-136-30/+26
|\ \ | | | | | | Put all duplicated GPIO pin definitions to a single file
| * \ Merge branch 'develop' into pinmaphubmartin2021-09-133-8/+12
| |\ \
| * \ \ Merge branch 'develop' into pinmaphubmartin2021-08-291-3/+40
| |\ \ \
| * \ \ \ Merge branch 'develop' into pinmaphubmartin2021-08-222-10/+34
| |\ \ \ \ | | | |_|/ | | |/| |
| * | | | Merge branch 'develop' into pinmaphubmartin2021-08-113-67/+26
| |\ \ \ \
| * | | | | Rename backlight level pinshubmartin2021-08-041-15/+15
| | | | | |
| * | | | | Cleanup, set Pinetime as defaulthubmartin2021-08-032-1/+1
| | | | | |
| * | | | | PinMap with namespace and constexprhubmartin2021-08-036-29/+24
| | | | | |
| * | | | | DRAFT: Put gpio pins to separate filehubmartin2021-08-021-1/+2
| | | | | |
* | | | | | docs: Fix a few typos (#606)Tim Gates2021-09-131-1/+1
| |_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * docs: Fix a few typos There are small typos in: - doc/versioning.md - src/components/ble/NimbleController.cpp - src/libs/mynewt-nimble/CODING_STANDARDS.md - src/libs/mynewt-nimble/docs/btshell/btshell_GAP.rst - src/systemtask/SystemTask.cpp Fixes: - Should read `milliseconds` rather than `miliseconds`. - Should read `unnecessary` rather than `uncesseray`. - Should read `target` rather than `tharget`. - Should read `project` rather than `projct`. - Should read `preferred` rather than `prefered`. - Should read `functioning` rather than `functionning`. - Should read `forever` rather than `forver`. - Should read `existing` rather than `exisiting`.
* | | | | Merge pull request #617 from ColinKinloch/wake_up_mode_setting_changeJF0022021-09-121-1/+1
|\ \ \ \ \ | | | | | | | | | | | | Correct change test for wake up mode setting
| * | | | | Correct change test for wake up mode settingColin Kinloch2021-08-261-1/+1
| | |_|/ / | |/| | |
* | | | | Merge remote-tracking branch 'upstream/develop' into timer_battery_readingRiku Isokoski2021-08-301-3/+40
|\ \ \ \ \ | | |_|_|/ | |/| | |
| * | | | Settings : use enums instead of ints to store colors. Group all PTS settings ↵Jean-François Milants2021-08-281-20/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | into a struct. PTS/SettingsPTS : Convert to/from LVGL color and Settings::Color, add functions to reduce code duplication. Adapt SettingPineTimeStyle with the last Screen Interface
| * | | | Merge remote-tracking branch 'upstream/develop' into pinetimestyle-colorpickerKieran Cawthray2021-08-152-10/+34
| |\| | |
| * | | | Merge remote-tracking branch 'upstream/develop' into pinetimestyle-colorpickerKieran Cawthray2021-08-123-67/+26
| |\ \ \ \ | | | |_|/ | | |/| |
| * | | | Increment settings value, remove old hacky fixKieran Cawthray2021-07-251-1/+1
| | | | |
| * | | | Merge remote-tracking branch 'upstream/develop' into pinetimestyle-colorpickerKieran Cawthray2021-07-231-5/+4
| |\ \ \ \ | | | |_|/ | | |/| |
| * | | | Merge remote-tracking branch 'upstream/develop' into pinetimestyle-colorpickerKieran Cawthray2021-07-207-29/+60
| |\ \ \ \
| * \ \ \ \ Merge remote-tracking branch 'upstream/develop' into pinetimestyle-colorpickerKieran Cawthray2021-07-128-194/+399
| |\ \ \ \ \
| * \ \ \ \ \ Merge remote-tracking branch 'upstream/develop' into pinetimestyle-colorpickerKieran Cawthray2021-06-291-0/+5
| |\ \ \ \ \ \
| * | | | | | | PineTimeStyle color picker add settings integrationKieran Cawthray2021-06-241-0/+31
| | | | | | | |
* | | | | | | | Merge branch 'develop' into timer_battery_readingRiku Isokoski2021-08-142-10/+34
|\ \ \ \ \ \ \ \ | | |_|_|_|_|_|/ | |/| | | | | |
| * | | | | | | Merge branch 'call-improvements' of https://github.com/Riksu9000/InfiniTime ↵Jean-François Milants2021-08-142-10/+34
| |\ \ \ \ \ \ \ | | |_|_|_|_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | into Riksu9000-call-improvements # Conflicts: # src/displayapp/screens/Metronome.cpp
| | * | | | | | ImprovementsRiku Isokoski2021-08-012-28/+24
| | | | | | | |
| | * | | | | | Merge branch 'develop' into HEADRiku Isokoski2021-08-0128-372/+665
| | |\ \ \ \ \ \ | | | | |_|_|_|/ | | | |/| | | |
| | * | | | | | cleaned up the code and reduced the size of the diff by removing things like ↵Florian Kraupa2021-05-162-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | additional whitespaces
| | * | | | | | implemented continuous vibration pattern for incoming callsFlorian Kraupa2021-05-162-8/+35
| | | | | | | |
* | | | | | | | Make battery reading periodic. Add events. Disable pullupRiku Isokoski2021-08-142-7/+11
|/ / / / / / /
* | | | | | | Merge pull request #483 from Riksu9000/fix_adcJF0022021-08-102-57/+16
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | Fix misconfigured ADC and remove now unnecessary filtering
| * | | | | | | Remove floating point calculationRiku Isokoski2021-08-011-2/+2
| | | | | | | |
| * | | | | | | Increase ADC precisionRiku Isokoski2021-07-271-4/+4
| | | | | | | |
| * | | | | | | Merge branch 'develop' into fix_adcRiku Isokoski2021-07-272-13/+35
| |\ \ \ \ \ \ \ | | | |/ / / / / | | |/| | | | |
| * | | | | | | Merge branch 'develop' into fix_adcRiku Isokoski2021-07-136-17/+28
| |\ \ \ \ \ \ \
| * | | | | | | | Fix misconfigured ADC and remove now unnecessary filteringRiku Isokoski2021-07-122-48/+4
| | |_|_|_|_|/ / | |/| | | | | |
* | | | | | | | Code cleaning in Clock, WatchFaceAnalog, WatchFaceDigital and PineTimeStyle, ↵Jean-François Milants2021-08-101-10/+10
| |_|/ / / / / |/| | | | | | | | | | | | | | | | | | | | inspired by PR #232 by nscooling.
* | | | | | | Make firmware updating more foolproof (#469)Riku Isokoski2021-07-221-5/+4
| |_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Make firmware updating more foolproof and fix bugs * No need to manually handle overflow * Make startTime TickType_t * Don't process TouchEvents::None * Fix sleep getting re-enabled issue more directly
* | | | | | Multiple wakeup sources (#290)Kozova12021-07-141-8/+31
| |/ / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Allow multiple wakeup modes at the same time. This commit adds multiple wakeup modes support. It does so by storing them as a uint8_t bitfield enum. It changes the following functions: Since multiple modes can be on now, older version would not cut it: WakeUpMode getWakeupMode() -> std::bitset<3> getWakeUpModes() Where each bit corresponds to a WakeUpMode We still need a way to check whether a specific wakeup mode is on, so: bool isWakeUpModeOn(const WakeUpMode mode) This function was changed to work correctly with the new implementation. setWakeUpMode(WakeupMode mode, bool enable) Previously, systemtask would exit SystemTask::OnTouchEvent() if the wake up mode was None or RaiseWrist, to prevent waking up when a touch was received. However, after enabling using multiple WakeUpModes, this caused a bug where when RaiseWrist was checked with SingleTap or DoubleTap, the tap detection wouldn't work. This commit fixes that bug. Next commit will update the settings WakeUpMode select UI to reflect these changes. Signed-off-by: Kozova1 <mug66kk@gmail.com> * Updated UI to reflect multiple WakeUp sources being available. Signed-off-by: Kozova1 <mug66kk@gmail.com>
* | | | | Notify battery level every 10 minutes when connected to a BLE host.Jean-François Milants2021-07-116-21/+29
|/ / / / | | | | | | | | | | | | Refactor battery percent : only use uint8_t to store the battery % remaining.
* | | | Using littlefs (#438)joaquim.org2021-07-114-112/+314
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * add submodule littlefs * base fs * Save settings using littlefs * Small fixes and suggestions from PR * More small fixes from PR suggestions * Code clean up * Change SpiNorFlash functions to be private in FS
* | | | Whitespace and brace fixes (#456)Avamander2021-07-041-1/+2
| | | | | | | | | | | | | | | | | | | | * Brace style and whitespace fixes * Additional whitespace fixes
* | | | Inititialize members in class declarationJonathan Vander Mey2021-07-022-22/+12
| | | | | | | | | | | | | | | | Also added initializers for previously unintialized members.