FIX:fixed the calculation error for tray existence

jira:[none]

Change-Id: Ibfeec9bef3d961b3c09a2a080a105a47840fafb6
(cherry picked from commit d55fd74e000fa069835824558d5a4b753ed9cb86)
This commit is contained in:
tao wang 2024-12-31 21:36:16 +08:00 committed by Noisyfox
parent 50a9bb66ee
commit 285927574e

View file

@ -4154,9 +4154,11 @@ int MachineObject::parse_json(std::string payload, bool key_field_only)
if (jj["ams"].contains("ams_exist_bits")) {
ams_exist_bits = stol(jj["ams"]["ams_exist_bits"].get<std::string>(), nullptr, 16);
}
if (jj["ams"].contains("tray_exist_bits")) {
tray_exist_bits = stol(jj["ams"]["tray_exist_bits"].get<std::string>(), nullptr, 16);
}
if (!key_field_only) {
if (jj["ams"].contains("tray_read_done_bits")) {
tray_read_done_bits = stol(jj["ams"]["tray_read_done_bits"].get<std::string>(), nullptr, 16);