mirror of
https://github.com/wled/WLED.git
synced 2025-07-22 18:26:32 +00:00
intermediate update
This commit is contained in:
parent
a9d6a15924
commit
bd69c24231
@ -111,6 +111,7 @@
|
||||
#define USERMOD_BATTERY_LOW_POWER_INDICATOR_DURATION 5
|
||||
#endif
|
||||
|
||||
// battery types
|
||||
typedef enum
|
||||
{
|
||||
unknown=0,
|
||||
|
@ -86,6 +86,11 @@ Specification from: [Molicel INR18650-M35A, 3500mAh 10A Lithium-ion battery, 3.
|
||||
|
||||
## 📝 Change Log
|
||||
|
||||
2024-04-30
|
||||
|
||||
- integrate factory pattern to make it easier to add other / custom battery types
|
||||
- update readme
|
||||
|
||||
2023-01-04
|
||||
|
||||
- basic support for LiPo rechargeable batteries ( `-D USERMOD_BATTERY_USE_LIPO`)
|
||||
|
@ -13,8 +13,7 @@ class Lion : public Battery
|
||||
private:
|
||||
|
||||
public:
|
||||
Lion()
|
||||
: Battery()
|
||||
Lion() : Battery()
|
||||
{
|
||||
this->setMinVoltage(USERMOD_BATTERY_LION_MIN_VOLTAGE);
|
||||
this->setMaxVoltage(USERMOD_BATTERY_LION_MAX_VOLTAGE);
|
||||
|
@ -13,8 +13,7 @@ class Lipo : public Battery
|
||||
private:
|
||||
|
||||
public:
|
||||
Lipo()
|
||||
: Battery()
|
||||
Lipo() : Battery()
|
||||
{
|
||||
this->setMinVoltage(USERMOD_BATTERY_LIPO_MIN_VOLTAGE);
|
||||
this->setMaxVoltage(USERMOD_BATTERY_LIPO_MAX_VOLTAGE);
|
||||
|
@ -13,8 +13,7 @@ class Unkown : public Battery
|
||||
private:
|
||||
|
||||
public:
|
||||
Unkown()
|
||||
: Battery()
|
||||
Unkown() : Battery()
|
||||
{
|
||||
this->setMinVoltage(USERMOD_BATTERY_UNKOWN_MIN_VOLTAGE);
|
||||
this->setMaxVoltage(USERMOD_BATTERY_UNKOWN_MAX_VOLTAGE);
|
||||
|
@ -9,9 +9,8 @@
|
||||
|
||||
/*
|
||||
* Usermod by Maximilian Mewes
|
||||
* Mail: mewes.maximilian@gmx.de
|
||||
* GitHub: itCarl
|
||||
* Date: 25.12.2022
|
||||
* E-mail: mewes.maximilian@gmx.de
|
||||
* Created at: 25.12.2022
|
||||
* If you have any questions, please feel free to contact me.
|
||||
*/
|
||||
class UsermodBattery : public Usermod
|
||||
@ -140,7 +139,6 @@ class UsermodBattery : public Usermod
|
||||
}
|
||||
#else //ESP8266 boards have only one analog input pin A0
|
||||
pinMode(batteryPin, INPUT);
|
||||
// voltage = readVoltage();
|
||||
#endif
|
||||
|
||||
// plug in the right battery type
|
||||
|
Loading…
x
Reference in New Issue
Block a user