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 7d628bf commit 0b53929
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 @@ -194,6 +194,13 @@ void Replay::stream() {
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;
}
}

std::string type;
KJ_IF_MAYBE(e_, static_cast<capnp::DynamicStruct::Reader>(evt->event).which()) {
type = e_->getProto().getName();
Expand Down

0 comments on commit 0b53929

Please sign in to comment.