summaryrefslogtreecommitdiff
path: root/static
diff options
context:
space:
mode:
Diffstat (limited to 'static')
-rw-r--r--static/js/web-install.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/static/js/web-install.js b/static/js/web-install.js
index 957c4131..5fa4da41 100644
--- a/static/js/web-install.js
+++ b/static/js/web-install.js
@@ -148,6 +148,8 @@ const legacyQualcommDevices = ["sunfish", "coral", "flame", "bonito", "sargo", "
const tensorDevices = ["cheetah", "panther", "bluejay", "raven", "oriole"];
+const day1SnapshotCancelDevices = ["cheetah", "panther", "bluejay", "raven", "oriole", "barbet", "redfin", "bramble"];
+
async function getLatestRelease() {
let product = await device.getVariable("product");
if (!supportedDevices.includes(product)) {
@@ -213,6 +215,15 @@ async function flashRelease(setProgress) {
throw new Error("You need to download a release first!");
}
+ setProgress("Cancelling any pending OTAs...");
+ // Cancel snapshot update if in progress on devices which support it on all bootloader versions
+ if (day1SnapshotCancelDevices.includes(product)) {
+ let snapshotStatus = await device.getVariable("snapshot-update-status");
+ if (snapshotStatus !== null && snapshotStatus !== "none") {
+ await device.runCommand("snapshot-update:cancel");
+ }
+ }
+
setProgress("Flashing release...");
safeToLeave = false;
try {