ENH:add humidity display/surplus material

Change-Id: I1a04df257c9b09fef7ff06cfa192644478a30716
This commit is contained in:
tao wang authored and Lane.Wei committed 2022-12-15 04:38:15 -05:00
1 parent 3a9397307d
commit 3925ceb9f4
9 files changed
+218 -31

No files matched your search

+13 -1
View File
@@ -334,7 +334,7 @@ MachineObject::MachineObject(NetworkAgent* agent, std::string name, std::string
ams_insert_flag = false;
ams_power_on_flag = false;
ams_support_use_ams = false;
ams_humidity = -1;
ams_humidity = 5;
/* signals */
wifi_signal = "";
@@ -2531,6 +2531,18 @@ int MachineObject::parse_json(std::string payload)
}
if (!curr_ams) continue;
if (it->contains("humidity")) {
std::string humidity = (*it)["humidity"].get<std::string>();
try {
curr_ams->humidity = atoi(humidity.c_str());
}
catch (...) {
;
}
}
if (it->contains("tray")) {
std::set<std::string> tray_id_set;
for (auto it = curr_ams->trayList.begin(); it != curr_ams->trayList.end(); it++) {