Skip to content

Commit

Permalink
use start of frame time if set
Browse files Browse the repository at this point in the history
  • Loading branch information
pd0wm committed Sep 28, 2021
1 parent f09cae6 commit c03dbf7
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions selfdrive/ui/replay/replay.cc
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,13 @@ void Replay::stream() {
const Event *evt = (*eit);
cur_which = evt->which;
cur_mono_time = evt->mono_time;

if (evt->which == cereal::Event::ROAD_ENCODE_IDX) {
uint64_t sof = evt->event.getRoadEncodeIdx().getTimestampSof();
if (sof > 0) {
cur_mono_time = sof;
}
}
current_ts = (cur_mono_time - route_start_ts) / 1e9;

std::string type;
Expand Down

0 comments on commit c03dbf7

Please sign in to comment.