Auto-create segments based on configured busses

This commit is contained in:
cschwinne
2021-06-24 02:29:14 +02:00
parent b73aaecd22
commit 660de0b4e5
5 changed files with 44 additions and 11 deletions

View File

@@ -137,7 +137,9 @@ class MyExampleUsermod : public Usermod {
void readFromConfig(JsonObject& root)
{
JsonObject top = root["top"];
userVar0 = top["great"] | 42; //The value right of the pipe "|" is the default value in case your setting was not present in cfg.json (e.g. first boot)
if (!top.isNull()) {
userVar0 = top["great"] | 42; //The value right of the pipe "|" is the default value in case your setting was not present in cfg.json (e.g. first boot)
}
}