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, [=]() {
QProcess process;
label->setText("Attempting to connect to wifi");
wifi = new WifiManager(null);
connect(wifi, &WifiManager::refreshSignal, [=]() {
label->setText("Performing update");
process.setWorkingDirectory("/data/openpilot/");
process.start("/bin/bash", QStringList{"-c", "update.sh"});
process.waitForFinished();
label->setText("Rebooting");
Hardware::reboot();
});
wifi->start();
// TODO: make this work, then copy the compiled binary into git
// wifi = new WifiManager(null);
// connect(wifi, &WifiManager::refreshSignal, [=]() {
// label->setText("Performing update");
// process.setWorkingDirectory("/data/openpilot/");
// process.start("/bin/bash", QStringList{"-c", "update.sh"});
// process.waitForFinished();
// label->setText("Rebooting");
// Hardware::reboot();
// });
// wifi->start();
});
#else
btnupdate->setText(QObject::tr("Exit"));