Error log button

This commit is contained in:
FrogAi
2024-03-26 22:41:56 -07:00
parent 163a626b2b
commit ede4727e54
@@ -6,6 +6,7 @@
#include <QDebug>
#include <QLabel>
#include <QProcess>
#include "common/params.h"
#include "common/util.h"
@@ -102,6 +103,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, [=]() {
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();