Skip to content

Commit 6f66a26

Browse files
committed
Add unknown unit case
1 parent 3ae43cd commit 6f66a26

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

main/ZgatewayBT.ino

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1129,6 +1129,8 @@ JsonObject& process_scale_v1(JsonObject& BLEdata) {
11291129
} else if (servicedata[1] == '3') { //lbs
11301130
weight = (double)value_from_hex_data(servicedata, 2, 4, true) / 100;
11311131
BLEdata.set("unit", "lbs");
1132+
} else { //unknown unit
1133+
BLEdata.set("unit", "unknown");
11321134
}
11331135
//Set Json value
11341136
BLEdata.set("weight", (double)weight);

0 commit comments

Comments
 (0)