Skip to content

Commit

Permalink
Download a zip file for HDZero goggles
Browse files Browse the repository at this point in the history
  • Loading branch information
pkendall64 committed Dec 20, 2024
1 parent 3e24262 commit f551886
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/pages/Download.vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ async function downloadFirmware() {
const bin = pako.gzip(files.firmwareFiles[files.firmwareFiles.length - 1].data)
const data = new Blob([bin], {type: 'application/octet-stream'})
FileSaver.saveAs(data, 'firmware.bin.gz')
} else if (store.target.config.upload_methods.includes('zip')) {
} else if (store.target.config.upload_methods.includes('zip') ||
(store.targetType === 'vrx' && store.vendor === 'hdzero-goggle')) { // or HDZero Goggles
// create zip file
const zipper = new zip.ZipWriter(new zip.BlobWriter("application/zip"), {bufferedWrite: true})
await zipper.add('bootloader.bin', new Blob([files.firmwareFiles[0].data.buffer], {type: 'application/octet-stream'}).stream())
Expand Down

0 comments on commit f551886

Please sign in to comment.