Usermod class vars pt2: enabled default value
This commit is contained in:
@@ -264,7 +264,7 @@ class Usermod {
|
||||
bool enabled = false; //WLEDMM
|
||||
const char *_name; //WLEDMM
|
||||
public:
|
||||
Usermod(const char *name = nullptr) { um_data = nullptr; _name = name;}
|
||||
Usermod(const char *_name = nullptr, bool enabled=false) { um_data = nullptr; this->_name = _name; this->enabled=enabled;}
|
||||
virtual ~Usermod() { if (um_data) delete um_data; }
|
||||
virtual void setup() = 0; // pure virtual, has to be overriden
|
||||
virtual void loop() = 0; // pure virtual, has to be overriden
|
||||
|
||||
@@ -219,7 +219,7 @@ void registerUsermods()
|
||||
#endif
|
||||
|
||||
#ifdef USERMOD_DALLASTEMPERATURE
|
||||
usermods.add(new UsermodTemperature("Temperature"));
|
||||
usermods.add(new UsermodTemperature("Temperature", true));
|
||||
#endif
|
||||
|
||||
#ifdef USERMOD_SN_PHOTORESISTOR
|
||||
@@ -385,7 +385,7 @@ void registerUsermods()
|
||||
|
||||
|
||||
#ifdef USERMOD_MPU6050_IMU
|
||||
usermods.add(new MPU6050Driver("mpu6050-IMU"));
|
||||
usermods.add(new MPU6050Driver("mpu6050-IMU", true));
|
||||
#endif
|
||||
|
||||
#ifdef USERMOD_GAMES
|
||||
|
||||
Reference in New Issue
Block a user