wip
This commit is contained in:
@@ -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"));
|
||||
|
||||
Reference in New Issue
Block a user