FrogPilot features - Error log button

This commit is contained in:
FrogAi 2024-05-09 22:20:54 -07:00
parent e560b08376
commit f7a408326e

View File

@ -6,6 +6,7 @@
#include <QDebug>
#include <QLabel>
#include <QProcess>
#include "common/params.h"
#include "common/util.h"
@ -95,6 +96,14 @@ SoftwarePanel::SoftwarePanel(QWidget* parent) : ListWidget(parent), scene(uiStat
});
addItem(uninstallBtn);
// error log button
auto errorLogBtn = new ButtonControl(tr("Error Log"), tr("VIEW"), tr("View the error log for openpilot crashes."));
connect(errorLogBtn, &ButtonControl::clicked, [=]() {
const std::string txt = util::read_file("/data/community/crashes/error.txt");
ConfirmationDialog::rich(QString::fromStdString(txt), this);
});
addItem(errorLogBtn);
fs_watch = new ParamWatcher(this);
QObject::connect(fs_watch, &ParamWatcher::paramChanged, [=](const QString &param_name, const QString &param_value) {
updateLabels();