Settings: The device can report when defaults were applied

This commit is contained in:
Paul Hollinsky
2022-02-24 15:50:39 -05:00
parent 80362e7f81
commit 6cc0f08e2b
4 changed files with 10 additions and 3 deletions
+4 -2
View File
@@ -125,8 +125,10 @@ bool Communication::getSettingsSync(std::vector<uint8_t>& data, std::chrono::mil
return false;
}
if(gsmsg->response != ReadSettingsMessage::Response::OK) {
report(APIEvent::Type::Unknown, APIEvent::Severity::Error);
if(gsmsg->response == ReadSettingsMessage::Response::OKDefaultsUsed) {
report(APIEvent::Type::SettingsDefaultsUsed, APIEvent::Severity::EventInfo);
} else if(gsmsg->response != ReadSettingsMessage::Response::OK) {
report(APIEvent::Type::SettingsReadError, APIEvent::Severity::Error);
return false;
}