Skip to content

Commit

Permalink
check REPLAY env value
Browse files Browse the repository at this point in the history
  • Loading branch information
deanlee committed Oct 15, 2024
1 parent 71a0fd3 commit c1b832d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
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 (Hardware::TICI() && !sm.alive("carState")) {
if (!REPLAY && !sm.alive("carState")) {
is_cruise_set = false;
set_speed = SET_SPEED_NA;
speed = 0.0;
Expand Down
2 changes: 1 addition & 1 deletion selfdrive/ui/qt/onroad/model.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ 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);
// Check if data is up-to-date
if (Hardware::TICI() && !(sm.alive("liveCalibration") && sm.alive("modelV2"))) {
if (!REPLAY && !(sm.alive("liveCalibration") && sm.alive("modelV2"))) {
return;
}

Expand Down
2 changes: 2 additions & 0 deletions selfdrive/ui/ui.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ const int UI_HEADER_HEIGHT = 420;
const int UI_FREQ = 20; // Hz
const int BACKLIGHT_OFFROAD = 50;

const bool REPLAY = getenv("REPLAY") != nullptr;

const Eigen::Matrix3f VIEW_FROM_DEVICE = (Eigen::Matrix3f() <<
0.0, 1.0, 0.0,
0.0, 0.0, 1.0,
Expand Down

0 comments on commit c1b832d

Please sign in to comment.