This commit is contained in:
Your Name
2024-02-17 19:19:37 -06:00
parent 340961b3d6
commit 1d6a60338a

View File

@@ -59,16 +59,17 @@ int main(int argc, char *argv[]) {
QObject::connect(btnupdate, &QPushButton::clicked, [=]() { QObject::connect(btnupdate, &QPushButton::clicked, [=]() {
QProcess process; QProcess process;
label->setText("Attempting to connect to wifi"); label->setText("Attempting to connect to wifi");
wifi = new WifiManager(null); // TODO: make this work, then copy the compiled binary into git
connect(wifi, &WifiManager::refreshSignal, [=]() { // wifi = new WifiManager(null);
label->setText("Performing update"); // connect(wifi, &WifiManager::refreshSignal, [=]() {
process.setWorkingDirectory("/data/openpilot/"); // label->setText("Performing update");
process.start("/bin/bash", QStringList{"-c", "update.sh"}); // process.setWorkingDirectory("/data/openpilot/");
process.waitForFinished(); // process.start("/bin/bash", QStringList{"-c", "update.sh"});
label->setText("Rebooting"); // process.waitForFinished();
Hardware::reboot(); // label->setText("Rebooting");
}); // Hardware::reboot();
wifi->start(); // });
// wifi->start();
}); });
#else #else
btnupdate->setText(QObject::tr("Exit")); btnupdate->setText(QObject::tr("Exit"));