Wykres commitów

138 Commity (acc32916c3c7b6ac36a0c9d6c23ff1a448ab69d8)

Autor SHA1 Wiadomość Data
Jim Whitelaw acc32916c3
Add multiple configuration options for a minimized build (GPS,WiFi,BT,MQTT,Screen). (#3469)
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
2024-03-25 06:33:57 -05:00
Wolfgang Nagele 7f063fbf81
Support external charge detection (#3386)
* Support external charge detection

* trunk fmt
2024-03-12 11:55:31 -05:00
Andre K 51df4fc775
fix: turn off T-Echo peripherals on deep sleep (#3162)
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
2024-03-08 20:15:37 -06:00
Gabriele Russo 7c9d1b0abf
Battery level with proportional filter and lookup table (#3216)
* 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>
2024-02-16 06:09:57 -06:00
todd-herbert 0b466fdca9
fix: Wireless Paper (v1.0 & v1.1) not showing battery percentage (#3208)
* fix: Wireless Paper (v1.0 & v1.1) not showing battery percentage
Addresses https://github.com/meshtastic/firmware/issues/3131

* refactor: count only valid samples
Responds to https://github.com/meshtastic/firmware/pull/3208#discussion_r1485661096

---------

Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
2024-02-13 10:20:48 -06:00
Gabrielerusso 124be247c7 Fixed ESP32 ADC resolution bug introduced by #3184
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? .
2024-02-12 20:14:50 +01:00
Ben Meadors a3755dfce5 Trunk fmt 2024-02-08 14:56:46 -06:00
code8buster ca5795d3e7
Fix init resolution for all architectures 2024-02-08 20:46:22 +00:00
code8buster d1ea589757
Allow NRF52 ADC overrides; begin simplifying analog battery logic (#3134)
* 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>
2024-01-29 06:14:21 -06:00
Ben Meadors 4720b2874f
Cpp-check warnings cleanup (#3014)
* cpp-check warnings cleanup

* Supressions and more fixes
2023-12-14 07:35:46 -06:00
S5NC 4c69d06ac0
Update Power.cpp (#2979) 2023-12-02 06:30:00 -06:00
HookdomPonix cbb8eb65ba
Add USB detection to RAK4631 based boards. (#2956)
* 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>
2023-11-22 10:30:55 -06:00
Ric In New Mexico 9d4af1146e
INA3221 bugfixes & refinement (#2944)
Reorganized and refactored some INA3221 code
Added comments
Added missing shunt resistor value (100mΩ)
Added INA3221 Channel 1 to getINAVoltage() for device battery monitoring
	modified:   src/Power.cpp
	modified:   src/modules/Telemetry/PowerTelemetry.cpp
	modified:   src/modules/Telemetry/Sensor/INA3221Sensor.cpp
	modified:   src/modules/Telemetry/Sensor/INA3221Sensor.h
	modified:   src/power.h
2023-11-17 06:46:59 -06:00
Manuel 142d56c663
allow sensors connected to second I2C port (#2891) 2023-10-14 19:33:45 -05:00
Thomas Göttgens fc06754e1f
Possibly fix #2704 "Heltec Wireless Tracker screen doesn't display anything" (#2749)
* fix #2704


Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
Co-authored-by: Jonathan Bennett <jbennett@incomsystems.biz>
2023-10-04 22:24:25 -05:00
Ben Meadors 1552aa0081
Tracker role wakeup and sleep cycle when power.is_power_saving true (#2846)
* WIP

* Sleepy sleepy low power tracker

* Sleepy tracker clear

* NRF52 PoC

* Simplify NRF52 "sleep"

* Trackers aren't polite

* Remove unnecessary include

* Removed accidental commit

* Fixed not-so-sleepy T-Beam due to button gpio mask precendence

* Added sleepOnNextExecution for allowing fulfillment of pending messages before shutting down

* Cleanup

* Don't wantResponse for trackers

* Heltec wireless tracker doesn't like the button interrupt (maybe all s3 because user button press doubles as bootloader mode trigger?)
2023-09-30 21:09:17 -05:00
Jonathan Bennett 4767bd5497
Rename utils.h to avoid collision with library. (#2730) 2023-08-17 20:22:34 -05:00
Jm Casler 794948d7e4 fixing trunk problems 2023-08-03 10:05:38 +02:00
Jm Casler e9cbe54eca add more documentaiton 2023-08-03 10:05:38 +02:00
Ben Meadors 0739bc0cea
T-Watch S3 Support (#2632)
* 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
2023-07-22 09:26:54 -05:00
luzpaz 003047baaf
Fix various typos (#2607)
* Fix various typos

Found via `codespell -q 3 -L acount,clen,dout`

* Trunk reformatting

---------

Co-authored-by: code8buster <communismisgreat@national.shitposting.agency>
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
2023-07-14 16:25:20 -05:00
Ben Meadors cd787232ca
Use INA for device battery level (#2536)
* 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
2023-06-02 06:32:34 -05:00
code8buster 99a31c1fad
Make sure the mosfet gate for adc measuring circuit is low (#2530)
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
2023-05-30 06:15:19 -05:00
Thomas Göttgens fbcd6743fd trunk fmt 2023-05-27 10:29:01 +02:00
lewishe 1b35cc018f Fix t-beam-s3-core display not working 2023-05-27 10:29:01 +02:00
code8buster 7475c8647c
2.5dB could be a more appropriate attenuation for heltec ADCs (#2511)
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
2023-05-26 06:16:40 -05:00
Thomas Göttgens 59b1adf12f
Move to our own logging system (#2513) 2023-05-24 10:29:50 -05:00
code8buster a9fed83d9a Make pull request targets happy 2023-05-16 21:46:55 +02:00
code8buster c0979e29ff Fix a few platformio envs, maybe make cppcheck happy 2023-05-16 21:46:55 +02:00
code8buster 9878ff3836 Tryfix datatype errors 2023-05-16 21:46:55 +02:00
code8buster 3219ad33ef Add ADC channels to esp variants, plug code back in to make sure other archs work 2023-05-16 21:46:55 +02:00
code8buster 6113a1fb70 Tryfix heltec v2 adc issues being on SAR2 2023-05-16 21:46:55 +02:00
code8buster d11bcda292 Implementing a calibrated ESP32 ADC reading 2023-05-16 21:46:55 +02:00
Manuel Verch 6e26f95df9 Make trunk happy again 2023-04-22 09:08:55 +02:00
Manuel Verch 5dfb5172c2 try-fix: router goes sporadically into DS 2023-04-22 09:08:55 +02:00
Thomas Göttgens 87c59d7d61 fmt 2023-04-18 14:08:06 +02:00
Thomas Göttgens 584615bb4b fix topic construction for mqtt debug 2023-04-18 13:37:50 +02:00
Thomas Göttgens a13775bd70
Merge branch 'master' into 2264-feature-check-for-low-heap-before-adding-to-nodedb-was-reboot-loop-heap-too-low 2023-04-13 23:50:21 +02:00
Thomas Göttgens b43a5bc4f8 Fix missing msh default topic. 2023-04-13 23:17:05 +02:00
Thomas Göttgens a284439d7e
Merge branch 'master' into 2264-feature-check-for-low-heap-before-adding-to-nodedb-was-reboot-loop-heap-too-low 2023-04-12 16:27:36 +02:00
Thomas Göttgens 29c13b5c30 resolve #2364
- 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
2023-04-11 14:37:08 +02:00
Ben Meadors f8db02c622
Merge branch 'master' into 2264-feature-check-for-low-heap-before-adding-to-nodedb-was-reboot-loop-heap-too-low 2023-04-04 07:22:40 -05:00
Thomas Göttgens 1398611276 trunk fmt 2023-04-02 11:35:25 +02:00
Vladislav Osmanov fbc3b2beee missing `EXT_PWR_DETECT` pinMode definition 2023-04-02 11:35:25 +02:00
Vladislav Osmanov 6bf538e26f `EXT_PWR_DETECT` pin to detect external power source for boards without the power management chip 2023-04-02 11:35:25 +02:00
Thomas Göttgens 6e685b0a54
Merge branch 'master' into 2264-feature-check-for-low-heap-before-adding-to-nodedb-was-reboot-loop-heap-too-low 2023-03-27 15:31:32 +02:00
lewishe eda00b7b9c Change to Variation Macro Definition 2023-03-27 11:27:57 +02:00
Thomas Göttgens 1898fe850e trunk format 2023-03-27 11:27:57 +02:00
lewishe 15dbe5da97 Added t-beam v1.2 support 2023-03-27 11:27:57 +02:00
Thomas Göttgens 8db7316ae1
Merge branch 'master' into 2264-feature-check-for-low-heap-before-adding-to-nodedb-was-reboot-loop-heap-too-low 2023-03-12 20:22:46 +01:00