mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-07-01 11:32:21 +08:00
Cabana: warn and exit if no rlogs in route (#26784)
warn and exit if no rlogs in route old-commit-hash: 322dec1ec835e18a162b32dc75a293f57130ee62
This commit is contained in:
@@ -26,6 +26,11 @@ bool CANMessages::loadRoute(const QString &route, const QString &data_dir, uint3
|
||||
QObject::connect(replay, &Replay::segmentsMerged, this, &CANMessages::eventsMerged);
|
||||
QObject::connect(replay, &Replay::streamStarted, this, &CANMessages::streamStarted);
|
||||
if (replay->load()) {
|
||||
const auto &segments = replay->route()->segments();
|
||||
if (std::none_of(segments.begin(), segments.end(), [](auto &s) { return s.second.rlog.length() > 0; })) {
|
||||
qWarning() << "no rlogs in route" << route;
|
||||
return false;
|
||||
}
|
||||
replay->start();
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user