ui: remove GPS status from the sidebar (#33304)

* Remove usage of llk in ui

* Remove GPS from sidebar

* Remove it from test
old-commit-hash: c61d504516
This commit is contained in:
Kacper Rączy 2024-08-14 15:52:47 -07:00 committed by GitHub
parent 8c8a4b4961
commit e66855c54d
15 changed files with 3 additions and 92 deletions

View File

@ -382,6 +382,7 @@ class Controls:
# TODO: fix simulator
if not SIMULATION or REPLAY:
# Not show in first 1.5 km to allow for driving out of garage. This event shows after 5 minutes
gps_ok = self.sm.recv_frame[self.gps_location_service] > 0 and (self.sm.frame - self.sm.recv_frame[self.gps_location_service]) * DT_CTRL < 2.0
if not gps_ok and self.sm['livePose'].inputsOK and (self.distance_traveled > 1500):
self.events.add(EventName.noGps)

View File

@ -102,8 +102,6 @@ void Sidebar::updateState(const UIState &s) {
ItemStatus pandaStatus = {{tr("VEHICLE"), tr("ONLINE")}, good_color};
if (s.scene.pandaType == cereal::PandaState::PandaType::UNKNOWN) {
pandaStatus = {{tr("NO"), tr("PANDA")}, danger_color};
} else if (s.scene.started && !sm["liveLocationKalman"].getLiveLocationKalman().getGpsOK()) {
pandaStatus = {{tr("GPS"), tr("SEARCH")}, warning_color};
}
setProperty("pandaStatus", QVariant::fromValue(pandaStatus));
}

View File

@ -116,7 +116,7 @@ class TestUI:
def setup(self):
self.sm = SubMaster(["uiDebug"])
self.pm = PubMaster(["deviceState", "pandaStates", "controlsState", 'roadCameraState', 'wideRoadCameraState', 'liveLocationKalman'])
self.pm = PubMaster(["deviceState", "pandaStates", "controlsState", 'roadCameraState', 'wideRoadCameraState'])
while not self.sm.valid["uiDebug"]:
self.sm.update(1)
time.sleep(UI_DELAY) # wait a bit more for the UI to start rendering

View File

@ -779,14 +779,6 @@ This may take up to a minute.</source>
<source>PANDA</source>
<translation>PANDA</translation>
</message>
<message>
<source>GPS</source>
<translation>GPS</translation>
</message>
<message>
<source>SEARCH</source>
<translation>بحث</translation>
</message>
<message>
<source>--</source>
<translation>--</translation>

View File

@ -762,14 +762,6 @@ This may take up to a minute.</source>
<source>PANDA</source>
<translation>PANDA</translation>
</message>
<message>
<source>GPS</source>
<translation>GPS</translation>
</message>
<message>
<source>SEARCH</source>
<translation>SUCHEN</translation>
</message>
<message>
<source>--</source>
<translation>--</translation>

View File

@ -763,14 +763,6 @@ Esto puede tardar un minuto.</translation>
<source>PANDA</source>
<translation>PANDA</translation>
</message>
<message>
<source>GPS</source>
<translation>GPS</translation>
</message>
<message>
<source>SEARCH</source>
<translation>BÚSQUEDA</translation>
</message>
<message>
<source>--</source>
<translation>--</translation>

View File

@ -763,14 +763,6 @@ Cela peut prendre jusqu&apos;à une minute.</translation>
<source>PANDA</source>
<translation>PANDA</translation>
</message>
<message>
<source>GPS</source>
<translation>GPS</translation>
</message>
<message>
<source>SEARCH</source>
<translation>RECHERCHE</translation>
</message>
<message>
<source>--</source>
<translation>--</translation>

View File

@ -757,14 +757,6 @@ This may take up to a minute.</source>
<source>PANDA</source>
<translation>PANDA</translation>
</message>
<message>
<source>GPS</source>
<translation>GPS</translation>
</message>
<message>
<source>SEARCH</source>
<translation></translation>
</message>
<message>
<source>--</source>
<translation>--</translation>

View File

@ -759,14 +759,6 @@ This may take up to a minute.</source>
<source>PANDA</source>
<translation>PANDA</translation>
</message>
<message>
<source>GPS</source>
<translation>GPS</translation>
</message>
<message>
<source>SEARCH</source>
<translation></translation>
</message>
<message>
<source>--</source>
<translation>--</translation>

View File

@ -763,14 +763,6 @@ Isso pode levar até um minuto.</translation>
<source>PANDA</source>
<translation>PANDA</translation>
</message>
<message>
<source>GPS</source>
<translation>GPS</translation>
</message>
<message>
<source>SEARCH</source>
<translation>PROCURA</translation>
</message>
<message>
<source>--</source>
<translation>--</translation>

View File

@ -759,14 +759,6 @@ This may take up to a minute.</source>
<source>PANDA</source>
<translation>PANDA</translation>
</message>
<message>
<source>GPS</source>
<translation></translation>
</message>
<message>
<source>SEARCH</source>
<translation></translation>
</message>
<message>
<source>--</source>
<translation>--</translation>

View File

@ -757,14 +757,6 @@ This may take up to a minute.</source>
<source>PANDA</source>
<translation>PANDA</translation>
</message>
<message>
<source>GPS</source>
<translation>GPS</translation>
</message>
<message>
<source>SEARCH</source>
<translation>ARA</translation>
</message>
<message>
<source>--</source>
<translation>--</translation>

View File

@ -759,14 +759,6 @@ This may take up to a minute.</source>
<source>PANDA</source>
<translation>PANDA</translation>
</message>
<message>
<source>GPS</source>
<translation>GPS</translation>
</message>
<message>
<source>SEARCH</source>
<translation></translation>
</message>
<message>
<source>--</source>
<translation>--</translation>

View File

@ -759,14 +759,6 @@ This may take up to a minute.</source>
<source>PANDA</source>
<translation></translation>
</message>
<message>
<source>GPS</source>
<translation>GPS</translation>
</message>
<message>
<source>SEARCH</source>
<translation></translation>
</message>
<message>
<source>--</source>
<translation>--</translation>

View File

@ -242,7 +242,7 @@ void UIState::updateStatus() {
UIState::UIState(QObject *parent) : QObject(parent) {
sm = std::make_unique<SubMaster, const std::initializer_list<const char *>>({
"modelV2", "controlsState", "liveCalibration", "radarState", "deviceState",
"pandaStates", "carParams", "driverMonitoringState", "carState", "liveLocationKalman", "driverStateV2",
"pandaStates", "carParams", "driverMonitoringState", "carState", "driverStateV2",
"wideRoadCameraState", "managerState", "clocks",
});