aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/battery/BatteryController.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Revert "added low battery message"Riku Isokoski2023-03-021-10/+0
| | | | This reverts PR https://github.com/InfiniTimeOrg/InfiniTime/pull/1352
* batt: Improve discharge curve valuesFinlay Davidson2023-01-231-9/+4
| | | | Values calculated using multiple tests on 3 PineTimes
* formatminacode2022-12-271-1/+0
|
* changed to boolminacode2022-12-271-2/+7
|
* fixed a comment, set threshold to 15%minacode2022-12-271-1/+1
|
* cutout scaling hackminacode2022-12-271-5/+0
|
* formatminacode2022-12-271-1/+1
|
* added message, changed UIminacode2022-12-271-5/+4
|
* add percentage rescalingminacode2022-12-271-1/+7
|
* added low battery messageminacode2022-12-271-0/+6
|
* Update clang-tidy configuration and fix some warnings (#1474)Riku Isokoski2022-12-181-6/+4
| | | | | Don't enable coding conventions from unrelated projects. Only enable generic checks.
* Add linear approximation and use it for improving battery percentageAlex Dolzhenkov2022-11-191-35/+10
| | | | | | | | Add linear approximation class and use it to better model the non-linear discharge curve of the battery. Changed the minimum voltage level to 3.5V and the maximum to 4.18V. For reference the maximum observed voltage is 4.21V during charging.
* Update BatteryController.h with non-linear discharge curvehassless2022-11-191-5/+35
|
* Switched to non-deprecated math headerAvamander2021-12-041-0/+1
|
* Update includes to to be relative to src directoryReinhold Gschweicher2021-11-151-1/+1
| | | | | | | 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.
* Don't measure and notify percentage on charging event.Riku Isokoski2021-10-091-1/+5
|
* Improve battery percentage calculation and reportingRiku Isokoski2021-10-041-5/+10
| | | | | While charging, percentage should only go up, and while discharging, percentage should only go down.
* Show plug icon while plugged inRiku Isokoski2021-09-221-1/+1
|
* Merge branch 'develop' into detect_full_chargeRiku Isokoski2021-09-221-6/+10
|\
| * Merge branch 'develop' into pinmaphubmartin2021-09-131-4/+7
| |\
| | * Make battery reading periodic. Add events. Disable pullupRiku Isokoski2021-08-141-4/+7
| | |
| * | Merge branch 'develop' into pinmaphubmartin2021-08-111-16/+14
| |\|
| * | Cleanup, set Pinetime as defaulthubmartin2021-08-031-0/+1
| | |
| * | PinMap with namespace and constexprhubmartin2021-08-031-3/+3
| | |
* | | Detect full charge and improve watchface displayRiku Isokoski2021-09-031-2/+8
| |/ |/|
* | 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-131-10/+9
|\|
| * Notify battery level every 10 minutes when connected to a BLE host.Jean-François Milants2021-07-111-10/+3
| | | | | | | | Refactor battery percent : only use uint8_t to store the battery % remaining.
* | Fix misconfigured ADC and remove now unnecessary filteringRiku Isokoski2021-07-121-11/+3
|/
* Whitespace and brace fixes (#456)Avamander2021-07-041-1/+2
| | | | | * Brace style and whitespace fixes * Additional whitespace fixes
* Float voltage to int (#444)Riku Isokoski2021-07-021-5/+9
| | | | * Change voltage float to millivolt integer * Explain the ADC to milliVolts conversion
* static_cast cleanupAvamander2021-07-021-1/+1
|
* Emit event on power-present toggle (#320)David Ventura2021-05-161-1/+0
| | | | | | | | | | | | | | | * Emit event on power-present toggle * clang-format on changes * also update battery status on any event * update comments; remove double battery update * Fix formatting * Vibrate shortly on charging event * debounce charge event
* Reformatted all the files according to clang-format styleAvamander2021-04-241-41/+37
|
* In order to stabilize the battery reading,Joaquim2021-04-161-6/+17
| | | | | | I modified the process to make 5 consecutive readings, as the process is asynchronous, there is no interference in the main process.
* restore battery bufferJoaquim2021-04-081-8/+2
|
* Fix wake up lock in twiJoaquim2021-04-051-27/+21
| | | | optimize battery code
* double tap wakeup error fixJoaquim2021-04-041-17/+57
| | | | battery nonblocking read
* Converted percent remaining calc to int.panky-codes2021-01-161-3/+3
|
* Implemented a circular buffer and added an average alg for batter remaining ↵panky-codes2021-01-141-1/+3
| | | | percentage.
* Include cleanup: componentsokaestne2020-11-161-2/+1
|
* Fixed all the includes that were broken due to the renamesAvamander2020-10-021-0/+48