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