ENH: parse net conf for network wired status
JIRA: STUDIO-5195 Change-Id: Ida3cd5c60b25d1eff4f04e324a74d63394a9ffeb Signed-off-by: Stone Li <stone.li@bambulab.com> (cherry picked from commit 6b6787b30736f87491171237a36c6badc8e51878)
This commit is contained in:
parent
8f45467b49
commit
acfdcadac0
|
@ -3208,6 +3208,13 @@ int MachineObject::parse_json(std::string payload, bool key_field_only)
|
||||||
mc_print_line_number = atoi(jj["mc_print_line_number"].get<std::string>().c_str());
|
mc_print_line_number = atoi(jj["mc_print_line_number"].get<std::string>().c_str());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (!key_field_only) {
|
||||||
|
if (jj.contains("net")) {
|
||||||
|
if (jj["net"].contains("conf")) {
|
||||||
|
network_wired = (jj["net"]["conf"].get<int>() & (0x1)) != 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
#pragma endregion
|
#pragma endregion
|
||||||
|
|
||||||
#pragma region online
|
#pragma region online
|
||||||
|
|
Loading…
Reference in New Issue