Skip to content

Commit

Permalink
[Sigma] Fix runAutoFocus
Browse files Browse the repository at this point in the history
  • Loading branch information
baku89 committed Sep 17, 2024
1 parent 5e52ab8 commit 50a8e15
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions core/src/TethrPTPUSB/TethrSigma.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1228,11 +1228,16 @@ export class TethrSigma extends TethrPTPUSB {
SnapCaptureMode.StartAF
)

if (!startAFSucceed) return {status: 'general error'}
if (!startAFSucceed) {
await this.executeSnapCommand(SnapCaptureMode.StopAF)
return {status: 'general error'}
}

const stopAFSucceed = await this.executeSnapCommand(SnapCaptureMode.StopAF)

if (!stopAFSucceed) return {status: 'general error'}
if (!stopAFSucceed) {
return {status: 'general error'}
}

return {status: 'ok'}
}
Expand Down

0 comments on commit 50a8e15

Please sign in to comment.