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:
@@ -332,6 +332,15 @@
|
||||
}
|
||||
}
|
||||
if (userMod != null && urows==="") urows = "Usermods configuration not found.<br>Press <i>Save</i> to initialize defaults.";
|
||||
if (userMod == null) {
|
||||
urows += `<hr>`;
|
||||
urows += `<table>`;
|
||||
urows += `<tr><th>Usermod</th><th>Enabled</th></tr>`
|
||||
for (const [k,o] of Object.entries(umCfg)) {
|
||||
urows += `<tr><td>${k}</td><td>${o.enabled}</td></tr>`;
|
||||
}
|
||||
urows += `</table>`;
|
||||
}
|
||||
}
|
||||
|
||||
gId("um").innerHTML = urows;
|
||||
@@ -361,6 +370,7 @@
|
||||
<span id="lserr" style="color:red; display:none">⚠ Could not load configuration.</span>
|
||||
</div>
|
||||
<!-- WLEDMM: no gpios here as it is generated -->
|
||||
<hr>
|
||||
<div id="um">Loading settings...</div>
|
||||
<div name="errorMessage"></div>
|
||||
<hr><button type="button" onclick="B()">Back</button><button type="submit">Save</button>
|
||||
|
||||
Reference in New Issue
Block a user