mirror of
https://github.com/Quill-OS/quill.git
synced 2024-12-26 23:57:22 -08:00
Tiny fixes in OTA updater
This commit is contained in:
parent
fe88cc43e9
commit
c328761bc5
2 changed files with 7 additions and 1 deletions
|
@ -29,6 +29,7 @@ otaManager::otaManager(QWidget *parent) :
|
||||||
}
|
}
|
||||||
unsigned long currentEpoch = QDateTime::currentSecsSinceEpoch();
|
unsigned long currentEpoch = QDateTime::currentSecsSinceEpoch();
|
||||||
string_writeconfig("/external_root/opt/storage/update/last_sync", std::to_string(currentEpoch));
|
string_writeconfig("/external_root/opt/storage/update/last_sync", std::to_string(currentEpoch));
|
||||||
|
QFile::remove("/run/can_ota_update");
|
||||||
otaManager::close();
|
otaManager::close();
|
||||||
}
|
}
|
||||||
} );
|
} );
|
||||||
|
|
|
@ -903,7 +903,12 @@ void settings::on_globalReadingSettingsCheckBox_toggled(bool checked)
|
||||||
void settings::on_checkOtaUpdateBtn_clicked()
|
void settings::on_checkOtaUpdateBtn_clicked()
|
||||||
{
|
{
|
||||||
log("'Check for OTA update' button clicked", className);
|
log("'Check for OTA update' button clicked", className);
|
||||||
|
if(testPing(true) == 0 or global::deviceID == "emu\n") {
|
||||||
launchOtaUpdater();
|
launchOtaUpdater();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
emit showToast("Wi-Fi connection error");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void settings::openUpdateDialog() {
|
void settings::openUpdateDialog() {
|
||||||
|
|
Loading…
Reference in a new issue