Skip to content

Commit

Permalink
[Sigma] Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
baku89 committed Feb 1, 2024
1 parent 30082ee commit 45f0c87
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/TethrPTPUSB/TethrSigma.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1171,6 +1171,8 @@ export class TethrSigma extends TethrPTPUSB {
const picts: TethrObject[] = []

if (doDownload) {
const CHUNK_SIZE = 0x00200000 // SampleApp uses this

const pictFileInfos = await this.getPictFileInfo2()

const totalSize = pictFileInfos.reduce((p, i) => p + i.fileSize, 0)
Expand All @@ -1181,8 +1183,6 @@ export class TethrSigma extends TethrPTPUSB {
for await (const info of pictFileInfos) {
const pictArray = new Uint8Array(info.fileSize)

const CHUNK_SIZE = 0x00200000 // SampleApp uses this

// Download the image with splitting every 2MB chunk
for (let offset = 0; offset < info.fileSize; offset += CHUNK_SIZE) {
const length = Math.min(info.fileSize - offset, CHUNK_SIZE)
Expand Down

0 comments on commit 45f0c87

Please sign in to comment.