aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/battery
Commit message (Collapse)AuthorAgeFilesLines
* linearapproximation: Move to src/utilityFinlay Davidson2023-03-271-1/+1
|
* Revert "added low battery message"Riku Isokoski2023-03-022-17/+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
* Format header filesFinlay Davidson2023-01-091-0/+1
| | | | In my PR updating clang-format, I forgot to also format the headers.
* formatminacode2022-12-271-1/+0
|
* changed to boolminacode2022-12-272-3/+8
|
* fixed a comment, set threshold to 15%minacode2022-12-272-2/+2
|
* cutout scaling hackminacode2022-12-271-5/+0
|
* formatminacode2022-12-271-1/+1
|
* added message, changed UIminacode2022-12-272-5/+9
|
* add percentage rescalingminacode2022-12-271-1/+7
|
* added low battery messageminacode2022-12-272-0/+7
|
* 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-192-36/+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-192-5/+36
|
* 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-092-2/+7
|
* Improve battery percentage calculation and reportingRiku Isokoski2021-10-042-5/+11
| | | | | 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-222-11/+14
|\
| * Merge branch 'develop' into pinmaphubmartin2021-09-132-7/+11
| |\
| | * Make battery reading periodic. Add events. Disable pullupRiku Isokoski2021-08-142-7/+11
| | |
| * | Merge branch 'develop' into pinmaphubmartin2021-08-112-57/+16
| |\|
| * | Cleanup, set Pinetime as defaulthubmartin2021-08-032-1/+1
| | |
| * | PinMap with namespace and constexprhubmartin2021-08-032-5/+3
| | |
| * | DRAFT: Put gpio pins to separate filehubmartin2021-08-021-1/+2
| | |
* | | Use percentage instead of IsFullRiku Isokoski2021-09-031-4/+0
| | |
* | | Detect full charge and improve watchface displayRiku Isokoski2021-09-032-3/+16
| |/ |/|
* | 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-132-13/+13
|\|
| * Notify battery level every 10 minutes when connected to a BLE host.Jean-François Milants2021-07-112-17/+14
| | | | | | | | Refactor battery percent : only use uint8_t to store the battery % remaining.
* | Fix misconfigured ADC and remove now unnecessary filteringRiku Isokoski2021-07-122-48/+4
|/
* 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-022-8/+12
| | | | * 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
* Changed access modified indentationAvamander2021-04-241-4/+4
|
* Reformatted all the files according to clang-format styleAvamander2021-04-242-82/+85
|
* In order to stabilize the battery reading,Joaquim2021-04-162-8/+22
| | | | | | 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-082-10/+40
|
* Fix wake up lock in twiJoaquim2021-04-052-29/+31
| | | | optimize battery code
* double tap wakeup error fixJoaquim2021-04-042-54/+67
| | | | battery nonblocking read
* Added more descriptive comments in doxygen format.panky-codes2021-01-171-9/+15
|
* Changed float to int in battery controller file.panky-codes2021-01-161-2/+2
|
* Changed std accumulate to use int instead of a float.panky-codes2021-01-161-1/+1
|
* Converted all the other float usage to int.panky-codes2021-01-161-1/+1
|
* Converted percent remaining calc to int.panky-codes2021-01-162-6/+6
|
* Adapted the accumulate function to return float.panky-codes2021-01-141-1/+2
|