ClockSelect / myevic

This is myevic Custom Firmware.
GNU General Public License v3.0
299 stars 101 forks source link

Configurable low battery cut off range #282

Open fOmey opened 7 years ago

fOmey commented 7 years ago

Configurable fixed low battery cut off range : 3.40v - 3.80 or what ever

Box Model: RX 2/3 Coil setup: Fused clapton : 0.16

arafey commented 7 years ago

This could be useful but there may be some constraints. For example, if you want to use the built-in functionality for this, the M451 datasheet states some restrictions:

  • Brown-out detector
    • With 4 levels: 4.4 V/ 3.7 V/ 2.7 V/ 2.2 V

Both 2.2 V and 4.4 V is out of range for the vast majority of 18650 batteries. 2.7 V is the value Joyetech chose and I don't know how/if that's even done in the firmware.

Another way it could be implemented that's more flexible is to make the weak battery warning voltage configurable and add an option for "alert" and "enforce" (or whatever you want to call it) which allows you to maintain the current behavior or to enforce a device lock until the voltage increases above the setpoint. This should be possible unless there's some constraint (ie. firmware would exceed flash size or API doesn't let you do something).