meshtastic / firmware

Meshtastic device firmware
https://meshtastic.org
GNU General Public License v3.0
3.03k stars 726 forks source link

Allow rate for tbeam battery charger to be configurable #615

Closed mc-hamster closed 3 years ago

mc-hamster commented 3 years ago

I found and fixed #601 (tbeam draws too much current) but there are valid cases where someone may want a faster (or slower) charge rate for the onboard battery.

Allow rate for axp battery to be configurable via protobufs.

Proposed:

RadioConfig.UserPreferences.charge_current

mc-hamster commented 3 years ago

It should be an enum that lines up with the axp enums.

AXP1XX_CHARGE_CUR_100MA,
AXP1XX_CHARGE_CUR_190MA,
AXP1XX_CHARGE_CUR_280MA,
AXP1XX_CHARGE_CUR_360MA,
AXP1XX_CHARGE_CUR_450MA,
AXP1XX_CHARGE_CUR_550MA,
AXP1XX_CHARGE_CUR_630MA,
AXP1XX_CHARGE_CUR_700MA,
AXP1XX_CHARGE_CUR_780MA,
AXP1XX_CHARGE_CUR_880MA,
AXP1XX_CHARGE_CUR_960MA,
AXP1XX_CHARGE_CUR_1000MA,
AXP1XX_CHARGE_CUR_1080MA,
AXP1XX_CHARGE_CUR_1160MA,
AXP1XX_CHARGE_CUR_1240MA,
AXP1XX_CHARGE_CUR_1320MA,
mc-hamster commented 3 years ago

This is done but needs to be tested once a new Python API is built with the new params.

geeksville commented 3 years ago

This issue has been mentioned on Meshtastic. There might be relevant details there:

https://meshtastic.discourse.group/t/new-device-alpha-1-1-33/2270/1