From 57481a02faf52d8adcf33810fdf23dfdee727350 Mon Sep 17 00:00:00 2001 From: JasXSL Date: Sat, 25 Aug 2018 16:20:51 +0200 Subject: [PATCH] Formatting --- RandObject.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/RandObject.h b/RandObject.h index b7e0d8e..6657737 100644 --- a/RandObject.h +++ b/RandObject.h @@ -14,13 +14,14 @@ class RandObject{ RandObject(){}; void load(JsonVariant data){ reset(); - if(data.is()){ + if(data.is()) useDefault = true; - } - else if(data.is()){ + + else if(data.is()) min = max = data.as(); - } + else if(data.is()){ + JsonObject &d = data.as(); if(d.containsKey("min")) min = d["min"]; @@ -30,6 +31,7 @@ class RandObject{ offset = d["offset"]; if(d.containsKey("multi")) multi = d["multi"]; + } else Serial.println("RandObject is INVALID");