mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2026-02-15 17:09:43 -07:00
FIX: fix the humidity display of N3S_AMS
jira: [STUDIO-10641] Change-Id: I48ac96443f851262b3ce720d4b4948b7b515a381 (cherry picked from commit 51042edcbdc1d8d24c11fa8a479559d4fd000fc7)
This commit is contained in:
parent
8f143a1764
commit
b998ddd1bd
1 changed files with 24 additions and 0 deletions
|
|
@ -4052,6 +4052,30 @@ int MachineObject::parse_json(std::string payload, bool key_field_only)
|
|||
} catch (...) {
|
||||
;
|
||||
}
|
||||
|
||||
if (curr_ams->humidity_raw != -1)
|
||||
{
|
||||
if (curr_ams->humidity_raw < 20)
|
||||
{
|
||||
curr_ams->humidity = 5;
|
||||
}
|
||||
else if (curr_ams->humidity_raw < 40)
|
||||
{
|
||||
curr_ams->humidity = 4;
|
||||
}
|
||||
else if (curr_ams->humidity_raw < 60)
|
||||
{
|
||||
curr_ams->humidity = 3;
|
||||
}
|
||||
else if (curr_ams->humidity_raw < 80)
|
||||
{
|
||||
curr_ams->humidity = 2;
|
||||
}
|
||||
else
|
||||
{
|
||||
curr_ams->humidity = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (it->contains("tray")) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue