mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-07 06:57:36 -06:00
ENH:add humidity display/surplus material
Change-Id: I1a04df257c9b09fef7ff06cfa192644478a30716
This commit is contained in:
parent
3a9397307d
commit
3925ceb9f4
9 changed files with 218 additions and 31 deletions
|
@ -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++) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue