Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ui: revert the 'alive' check to compare with scene.started_frame #33794

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion selfdrive/ui/qt/onroad/hud.cc
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ void HudRenderer::updateState(const UIState &s) {
status = s.status;

const SubMaster &sm = *(s.sm);
if (!sm.alive("carState")) {
if (sm.rcv_frame("carState") < s.scene.started_frame) {
is_cruise_set = false;
set_speed = SET_SPEED_NA;
speed = 0.0;
Expand Down
6 changes: 4 additions & 2 deletions selfdrive/ui/qt/onroad/model.cc
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,11 @@ static int get_path_length_idx(const cereal::XYZTData::Reader &line, const float
}

void ModelRenderer::draw(QPainter &painter, const QRect &surface_rect) {
auto &sm = *(uiState()->sm);
auto *s = uiState();
auto &sm = *(s->sm);
// Check if data is up-to-date
if (!(sm.alive("liveCalibration") && sm.alive("modelV2"))) {
if (sm.rcv_frame("liveCalibration") < s->scene.started_frame ||
sm.rcv_frame("modelV2") < s->scene.started_frame) {
return;
}

Expand Down
Loading