Usermod class vars part1: add enabled and _name for imu and dallas

usermod_mpu6050_imu.h and usermod_temperature.h:
- remove bool enabled = false/true (now default false)
- remove static const char _name[] and _enabled[]
- add constructor which calls superclass (temp?)
- replace _enabled with "enabled"
- remove const char PROGMEM init for  _name[] and _enabled[]

settings_um.htm:
- Add usermod table with class properties (name and enabled) -> WIP as not all UM's now and enable will be checkbox ? (compare with info tab...?)

fcn_declare.h
- add _name and enabled to Usermod class and add name to constructor

usermods_list.cpp
- add Usermod name to constructor for mpu6050 and temperature)
- to do add enabled is true to constructor
This commit is contained in:
Ewoud
2023-03-15 17:48:37 +01:00
parent 2de7971623
commit 7337efec02
6 changed files with 223 additions and 215 deletions

View File

@@ -219,7 +219,7 @@ void registerUsermods()
#endif
#ifdef USERMOD_DALLASTEMPERATURE
usermods.add(new UsermodTemperature());
usermods.add(new UsermodTemperature("Temperature"));
#endif
#ifdef USERMOD_SN_PHOTORESISTOR
@@ -385,7 +385,7 @@ void registerUsermods()
#ifdef USERMOD_MPU6050_IMU
usermods.add(new MPU6050Driver());
usermods.add(new MPU6050Driver("mpu6050-IMU"));
#endif
#ifdef USERMOD_GAMES