* Add battery level with lookup table
now uses a lookup table to better calculate battery level of different cells
* LifePo4 and PB battery table - added voltage filter
removed delay from adc reading, added a software filter to smooth out voltage readings. In those applications battery would last hours to days, no sudden change should be expected so a less frequent voltage reading or a more aggressive filtering could be done.
Note: to speed up convergence i initiliazied the last value to the minimum voltage, there are other and better ways to init the filter.
Added LiFePO4 and PB open circuit volta battery tables,
* Fixed ADC_CTRL , Checks for valid ADC readings
line 230/386 For heltec v3 and heltec tracker a different approach was used with the ADC_CTRL pin, now is more uniform using the same code for the 3 boards.
line 236 Check if the raw reading we are getting is Valid or not, count only the valid readings. This could lead to a division by 0 (improbable) so that's why at line 258 there is a check for that.
* updated OCV values
updated value to not OCV but to very low current, almost the same anyway
* Added Alkaline/Nimh voltage curve
Added Alkaline/Nimh voltage curve for AA/AAA and similar cells
* updates variants for new capacity measurement
* trunk reformatting
* trunk fmt
* Add LTO chemistry
---------
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
Co-authored-by: code8buster <20384924+code8buster@users.noreply.github.com>
Fixed ESP32 ADC resolution bug introduced by #3184 as esp32 analog resolution is already set some line of code before to 12 bit default.
For our usage wouldn't be faster to use 10 bit? .
* Isolate esp32 adc logic gymnastics, try simplifying getBattVoltage
* Set sense resolution for pico platforms
* try silencing cppcheck when variant has no battery pin
* ADC channel for esp-idf calibration
* Missed an rp2040 device
---------
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
* Add support for the rak10701 board, no touch
* Moved tftblack fillin and changed teh src flags
* Added rak10701 to platformio.ini
* Add USB detection to RAK4631 units.
* Eliminate spurious symbol in comment field.
---------
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
* T-Watch WIP
* Updates
* Temp
* Update screen spi bus and and backlight en
* Peripherals progress
* Fixes
* Fixes
* Updates
* DRV scaffolding
* Fixed touch-screen driver selection. WIP on DRV haptic feedback
* DRV2605 pmu channel
* Trunk
* Fixes and defaults
* Dropped an s
* Move PMU and turn off screen that way
* Add t-deck and t-watch-s3 to CI and cleanup
* More cleanup
* WIP
* Continued wip
* We got em
* Voltage sensor base class
* INA voltage
* Log it
* Stacie's mom has got it going on
* Move declaration up
* Last one
* Sneaky little bugger
* Macro guard to avoid calling methods
- fix wrong debug print
- change shutdown logic for t-beam if PMU is detected
- wait for 10 seconds instead of 5 for shutdown and resurrect screen brightness adjust for @karamo