Error log button
This commit is contained in:
parent
54519351bc
commit
89925e43a0
|
@ -100,6 +100,7 @@ private:
|
|||
|
||||
QLabel *onroadLbl;
|
||||
LabelControl *versionLbl;
|
||||
ButtonControl *errorLogBtn;
|
||||
ButtonControl *installBtn;
|
||||
ButtonControl *downloadBtn;
|
||||
ButtonControl *targetBranchBtn;
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
|
||||
#include <QDebug>
|
||||
#include <QLabel>
|
||||
#include <QProcess>
|
||||
|
||||
#include "common/params.h"
|
||||
#include "common/util.h"
|
||||
|
@ -129,6 +130,14 @@ SoftwarePanel::SoftwarePanel(QWidget* parent) : ListWidget(parent) {
|
|||
});
|
||||
addItem(uninstallBtn);
|
||||
|
||||
// error log button
|
||||
errorLogBtn = new ButtonControl(tr("Error Log"), tr("VIEW"), "View the error log for debugging purposes when 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 ¶m_name, const QString ¶m_value) {
|
||||
updateLabels();
|
||||
|
|
Loading…
Reference in New Issue