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) (cherry picked from commit acfdcadac09f05f2e008340d485c4781744c95f9)
This commit is contained in:
parent
1b1288c435
commit
c336ae660b
1 changed files with 7 additions and 0 deletions
|
@ -3167,6 +3167,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());
|
||||
}
|
||||
}
|
||||
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 region online
|
||||
|
|
Loading…
Reference in a new issue