mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-06-29 10:32:10 +08:00
fix offroad alert precedence (#21517)
old-commit-hash: 5a20cc6cae95f0f3eb7518acbce8fa380fb9ad80
This commit is contained in:
@@ -97,7 +97,6 @@ void OffroadAlert::refresh() {
|
||||
|
||||
void OffroadAlert::updateAlerts() {
|
||||
alertCount = 0;
|
||||
updateAvailable = params.getBool("UpdateAvailable");
|
||||
for (const auto& [key, label] : alerts) {
|
||||
auto bytes = params.get(key.c_str());
|
||||
if (bytes.size()) {
|
||||
@@ -109,4 +108,5 @@ void OffroadAlert::updateAlerts() {
|
||||
label->setText("");
|
||||
}
|
||||
}
|
||||
updateAvailable = params.getBool("UpdateAvailable") && alertCount < 1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user