From f7a408326e37292b7f18799202ebca0a1f6ae5b5 Mon Sep 17 00:00:00 2001 From: FrogAi <91348155+FrogAi@users.noreply.github.com> Date: Thu, 9 May 2024 22:20:54 -0700 Subject: [PATCH] FrogPilot features - Error log button --- selfdrive/ui/qt/offroad/software_settings.cc | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/selfdrive/ui/qt/offroad/software_settings.cc b/selfdrive/ui/qt/offroad/software_settings.cc index 7a5e162..4d450be 100644 --- a/selfdrive/ui/qt/offroad/software_settings.cc +++ b/selfdrive/ui/qt/offroad/software_settings.cc @@ -6,6 +6,7 @@ #include #include +#include #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 ¶m_name, const QString ¶m_value) { updateLabels();