|
|
@ -33,6 +33,8 @@ int main(int argc, char *argv[]) { |
|
|
|
parser.addOption({{"b", "block"}, "blacklist of services to send", "block"}); |
|
|
|
parser.addOption({{"b", "block"}, "blacklist of services to send", "block"}); |
|
|
|
parser.addOption({{"c", "cache"}, "cache <n> segments in memory. default is 5", "n"}); |
|
|
|
parser.addOption({{"c", "cache"}, "cache <n> segments in memory. default is 5", "n"}); |
|
|
|
parser.addOption({{"s", "start"}, "start from <seconds>", "seconds"}); |
|
|
|
parser.addOption({{"s", "start"}, "start from <seconds>", "seconds"}); |
|
|
|
|
|
|
|
parser.addOption({"x", QString("playback <speed>. between %1 - %2") |
|
|
|
|
|
|
|
.arg(ConsoleUI::speed_array.front()).arg(ConsoleUI::speed_array.back()), "speed"}); |
|
|
|
parser.addOption({"demo", "use a demo route instead of providing your own"}); |
|
|
|
parser.addOption({"demo", "use a demo route instead of providing your own"}); |
|
|
|
parser.addOption({"data_dir", "local directory with routes", "data_dir"}); |
|
|
|
parser.addOption({"data_dir", "local directory with routes", "data_dir"}); |
|
|
|
parser.addOption({"prefix", "set OPENPILOT_PREFIX", "prefix"}); |
|
|
|
parser.addOption({"prefix", "set OPENPILOT_PREFIX", "prefix"}); |
|
|
@ -67,6 +69,10 @@ int main(int argc, char *argv[]) { |
|
|
|
if (!parser.value("c").isEmpty()) { |
|
|
|
if (!parser.value("c").isEmpty()) { |
|
|
|
replay->setSegmentCacheLimit(parser.value("c").toInt()); |
|
|
|
replay->setSegmentCacheLimit(parser.value("c").toInt()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if (!parser.value("x").isEmpty()) { |
|
|
|
|
|
|
|
replay->setSpeed(std::clamp(parser.value("x").toFloat(), |
|
|
|
|
|
|
|
ConsoleUI::speed_array.front(), ConsoleUI::speed_array.back())); |
|
|
|
|
|
|
|
} |
|
|
|
if (!replay->load()) { |
|
|
|
if (!replay->load()) { |
|
|
|
return 0; |
|
|
|
return 0; |
|
|
|
} |
|
|
|
} |
|
|
|