implementing ota update over ui
This commit is contained in:
parent
c1700adc0c
commit
425d9747bb
|
|
@ -10,8 +10,11 @@
|
|||
<q-toggle v-model="data.res_ota_enab" label="Enable reset after update" />
|
||||
<q-input v-model="data.ota_url" label="OTA firmware file URL" />
|
||||
<q-input type="number" v-model="data.ota_auto_int" label="New firmware check interval, sec" />
|
||||
<div>Current firmware version:: {{ data.fw_rev }}</div>
|
||||
<div>Available firmware version:: {{ data.fw_rev }}</div>
|
||||
<div>Current firmware version: {{ data.fw_rev }}</div>
|
||||
<div>Available firmware version: {{ data.fw_rev }}</div>
|
||||
<div>Firmware status: {{ data.ota_state }}
|
||||
</div>
|
||||
<q-btn color="primary" label="Check firmware" @click="CheckFirmware()"></q-btn>
|
||||
</div>
|
||||
</div>
|
||||
</q-card-section>
|
||||
|
|
@ -29,10 +32,13 @@ defineOptions({
|
|||
})
|
||||
|
||||
const init = {
|
||||
ota_enab: false, res_ota_enab: false, ota_url: "", ota_auto_int: 0, fw_rev: ""
|
||||
ota_enab: false, res_ota_enab: false, ota_url: '',
|
||||
ota_auto_int: 0, fw_rev: '', ota_newver: '', ota_state: ''
|
||||
}
|
||||
|
||||
const data = reactive(init);
|
||||
PostData(data, 2, 0, null);
|
||||
|
||||
function CheckFirmware() {
|
||||
PostData({ ota_start: 1 }, 2, 0, () => { });
|
||||
}
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -14,7 +14,8 @@ function ShowDelayDialog(mess, time, onexpire) {
|
|||
message: '',
|
||||
progress: true,
|
||||
persistent: true, // we want the user to not be able to close it
|
||||
ok: false // we want the user to not be able to close it
|
||||
ok: false, // we want the user to not be able to close it
|
||||
square: true
|
||||
})
|
||||
|
||||
let percentage = 0
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user