cabana: fix missing opendbc files (#30555)
* fix missing dbc files * remove suffix old-commit-hash: d87191c1c1982e5c044e5654d7a69c5cc222986c
This commit is contained in:
@@ -77,9 +77,10 @@ void MainWindow::loadFingerprints() {
|
||||
QFile json_file(QApplication::applicationDirPath() + "/dbc/car_fingerprint_to_dbc.json");
|
||||
if (json_file.open(QIODevice::ReadOnly)) {
|
||||
fingerprint_to_dbc = QJsonDocument::fromJson(json_file.readAll());
|
||||
auto dbc_names = fingerprint_to_dbc.object().toVariantMap().values();
|
||||
std::transform(dbc_names.begin(), dbc_names.end(), std::inserter(opendbc_names, opendbc_names.begin()),
|
||||
[](const auto &name) { return name.toString(); });
|
||||
}
|
||||
// get opendbc names
|
||||
for (auto fn : QDir(OPENDBC_FILE_PATH).entryList({"*.dbc"}, QDir::Files, QDir::Name)) {
|
||||
opendbc_names << QFileInfo(fn).baseName();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -86,7 +86,7 @@ protected:
|
||||
QProgressBar *progress_bar;
|
||||
QLabel *status_label;
|
||||
QJsonDocument fingerprint_to_dbc;
|
||||
std::set<QString> opendbc_names;
|
||||
QStringList opendbc_names;
|
||||
QSplitter *video_splitter = nullptr;
|
||||
enum { MAX_RECENT_FILES = 15 };
|
||||
QAction *recent_files_acts[MAX_RECENT_FILES] = {};
|
||||
|
||||
Reference in New Issue
Block a user