Skip to content

Commit

Permalink
Formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
JasXSL committed Aug 25, 2018
1 parent 832399f commit 57481a0
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions RandObject.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,14 @@ class RandObject{
RandObject(){};
void load(JsonVariant data){
reset();
if(data.is<bool>()){
if(data.is<bool>())
useDefault = true;
}
else if(data.is<int>()){

else if(data.is<int>())
min = max = data.as<int>();
}

else if(data.is<JsonObject>()){

JsonObject &d = data.as<JsonObject&>();
if(d.containsKey("min"))
min = d["min"];
Expand All @@ -30,6 +31,7 @@ class RandObject{
offset = d["offset"];
if(d.containsKey("multi"))
multi = d["multi"];

}
else
Serial.println("RandObject is INVALID");
Expand Down

0 comments on commit 57481a0

Please sign in to comment.