Fix Orion AMS mapping and show printer health details

This commit is contained in:
Joshua King
2026-10-18 09:29:07 -04:00
parent f672de484e
commit 3c940f8027
15 changed files with 1104 additions and 24 deletions
+17 -1
View File
@@ -50,9 +50,25 @@ int main() {
assert(data.status_color() == RED);
data.print_error = "off";
data.hms_error = "True";
assert(data.status_text() == "HMS ALERT");
assert(data.status_text() == "HEALTH NOTICE");
assert(data.status_color() == AMBER);
assert(data.health_details().find("have not arrived") != std::string::npos);
data.hms_count = "1";
data.health_notices = {{"DEMO_CODE", "A synthetic information message", "info"}};
assert(data.status_text() == "HEALTH INFO");
assert(data.health_details().find("DEMO_CODE") != std::string::npos);
assert(data.alert_summary() == "A synthetic information message");
data.health_notices.push_back({"DEMO_2", "A synthetic serious message", "serious"});
data.hms_count = "2";
assert(data.status_text() == "HEALTH ERROR");
assert(data.status_color() == RED);
assert(data.health_details().find("A synthetic serious message") != std::string::npos);
data.health_notices.pop_back();
data.hms_count = "5";
assert(data.status_text() == "HEALTH NOTICE");
assert(data.health_details().find("4 more") != std::string::npos);
data.hms_error = "off";
assert(data.health_details() == "No current printer health notifications.");
data.status = "finish";
assert(data.status_text() == "COMPLETE");
assert(data.status_color() == GREEN);