Ewoud
c928df9d70
Usermod class vars pt3:
Moved initDone, addToConfig and readFromConfig to Usermod superclass
Updated cleanup procedure:
Part 1
- remove bool enabled = false/true (now default false)
- remove static const char _name[] and _enabled[]
- add constructor which calls superclass (temp?): XXXUsermod(const char *name, bool enabled):Usermod(name, enabled) {}
- replace _enabled with "enabled"
- remove const char PROGMEM init for _name[] and _enabled[]
Part 2
- Remove bool initDone = false;
- addToConfig: replace createNestedObject with Usermod::addToConfig(root); JsonObject top = root[FPSTR(_name)];
- readFromConfig: replace !top.isNull and enabled with bool configComplete = Usermod::readFromConfig(root);JsonObject top = root[FPSTR(_name)];
See Temperature, MPU6050 and weather as examples (rest to be done)
2023-03-16 15:41:23 +01:00
..
2023-03-16 15:23:15 +01:00
2023-02-22 16:09:27 +01:00
2023-01-06 09:24:29 +01:00
2023-03-12 20:53:22 +01:00
2023-02-14 14:28:10 +01:00
2023-03-12 13:10:40 +01:00
2023-01-12 20:35:34 +01:00
2023-02-24 22:32:04 +01:00
2023-01-07 12:01:03 +01:00
2023-03-12 20:53:22 +01:00
2023-01-07 12:01:03 +01:00
2023-02-21 17:13:15 +01:00
2023-03-16 15:41:23 +01:00
2023-01-06 09:24:29 +01:00
2023-03-11 21:18:21 +01:00
2023-03-13 21:35:48 +01:00
2023-03-11 14:40:51 +01:00
2023-03-11 21:18:21 +01:00
2023-03-16 15:25:00 +01:00
2023-03-16 15:25:00 +01:00
2023-03-16 15:25:00 +01:00
2023-03-16 15:25:00 +01:00
2023-03-16 15:25:00 +01:00
2023-01-06 09:24:29 +01:00
2023-02-22 16:51:27 +01:00
2023-01-06 09:24:29 +01:00
2023-01-06 09:24:29 +01:00
2023-03-08 13:56:20 +01:00
2023-02-21 17:07:32 +01:00
2023-01-06 09:24:29 +01:00
2023-01-12 20:35:34 +01:00
2023-01-06 09:24:29 +01:00
2023-02-24 15:40:16 +01:00
2023-02-24 15:40:16 +01:00
2023-01-06 09:24:29 +01:00
2022-11-02 14:56:50 +01:00
2023-02-21 17:09:04 +01:00
2023-01-06 09:24:29 +01:00
2023-01-07 12:01:03 +01:00
2023-03-14 20:52:48 +01:00
2023-03-14 20:52:48 +01:00
2023-02-04 10:56:07 +01:00
2023-02-06 21:06:13 +01:00
2023-03-13 21:35:48 +01:00
2023-03-12 20:53:22 +01:00
2023-03-16 15:41:23 +01:00
2023-01-06 09:24:29 +01:00
2023-01-06 09:24:29 +01:00
2023-03-16 15:41:23 +01:00
2023-02-22 16:09:27 +01:00
2022-11-06 10:58:19 +01:00
2023-02-21 17:07:32 +01:00
2022-03-20 22:12:18 +01:00
2023-01-06 09:24:29 +01:00
2023-03-16 11:30:12 +01:00
2023-02-23 15:23:35 +01:00
2023-03-11 13:59:23 +01:00
2023-03-16 15:41:23 +01:00
2023-03-11 13:59:23 +01:00
2023-03-06 16:38:45 +01:00