FIX: The humidity popup with humidity_percent/temperature/dry_time

jira: [STUDIO-9268]
Change-Id: Ic6e923ae7cff56fa3e053d48e5dea6e393cd41eb
(cherry picked from commit 75da1db2f926125a0cb3595a8cae9f4d7588c6a8)
This commit is contained in:
xin.zhang
2025-02-21 15:57:10 +08:00
committed by Noisyfox
parent e924a04fb8
commit 0b98094dac
10 changed files with 375 additions and 18 deletions

View File

@@ -4127,6 +4127,20 @@ int MachineObject::parse_json(std::string payload, bool key_field_only)
}
}
if (it->contains("temp"))
{
std::string temp = (*it)["temp"].get<std::string>();
try
{
curr_ams->current_temperature = string_to_float(temp);
}
catch (...)
{
curr_ams->current_temperature = INVALID_AMS_TEMPERATURE;
}
}
if (it->contains("tray")) {
std::set<std::string> tray_id_set;
for (auto it = curr_ams->trayList.begin(); it != curr_ams->trayList.end(); it++) {