Skip to content

Commit

Permalink
fix: init should check for ring indication status in case of stuck ring
Browse files Browse the repository at this point in the history
  • Loading branch information
brendongitx committed Jul 27, 2022
1 parent 01c512b commit 5a859c5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@ export class IridiumController extends TypedEmitter<IridiumControllerInterface>
.then(() => this.clearBuffers())
.then(() => this.autoRegistrationEnable())
.then(() => this.ringAlertEnable())
.then(() => this.getRingIndicationStatus())
.then((status) =>
status === RingIndicationStatus.RING_ALERT_RECEIVED ? this.mailboxCheck : 0)
.then(() => {
resolve()
})
Expand Down Expand Up @@ -424,7 +427,7 @@ export class IridiumController extends TypedEmitter<IridiumControllerInterface>
successRegex: OK_REGEXP,
bufferRegex: /^\+CRIS:[0-1]/,
errorRegex: ERROR_REGEXP
}).then((result) => result.split(',')[1][0] as unknown as RingIndicationStatus)
}).then((result) => parseInt(result.split(',')[1]) as RingIndicationStatus)
}

'AT+CSQ' = this.getSignalQuality
Expand Down

0 comments on commit 5a859c5

Please sign in to comment.