Skip to content

Commit

Permalink
expose VERSION_SUPPORTED (#63)
Browse files Browse the repository at this point in the history
  • Loading branch information
taichunmin authored Sep 26, 2023
2 parents 39b357b + c5873aa commit 75e2ae8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 11 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"name": "chameleon-ultra.js",
"repository": "git@github.com:taichunmin/chameleon-ultra.js.git",
"unpkg": "dist/iife/index.min.js",
"version": "0.1.17",
"version": "0.1.18",
"bugs": {
"url": "https://github.com/taichunmin/chameleon-ultra.js/issues"
},
Expand Down
13 changes: 3 additions & 10 deletions src/ChameleonUltra.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import * as Decoder from './ResponseDecoder'

const READ_DEFAULT_TIMEOUT = 5e3
const START_OF_FRAME = new Buffer(2).writeUInt16BE(0x11EF)
const VERSION_SUPPORTED = { gte: '1.0', lt: '2.0' }
const VERSION_SUPPORTED = { gte: '1.0', lt: '2.0' } as const

/**
* The core library of "chameleon-ultra.js". The instance of this class must use exactly one adapter plugin to communication to ChameleonUltra.
Expand Down Expand Up @@ -62,14 +62,9 @@ export class ChameleonUltra {
supportedCmds: Set<Cmd> = new Set<Cmd>()

/**
* The firmware version of device.
* The supported version of SDK.
*/
appVersion?: string

/**
* The git version of firmware.
*/
gitVersion?: string
static VERSION_SUPPORTED = VERSION_SUPPORTED

/**
* Create a new instance of ChameleonUltra.
Expand Down Expand Up @@ -227,8 +222,6 @@ export class ChameleonUltra {
try {
// clean up
this.supportedCmds.clear()
this.appVersion = undefined
this.gitVersion = undefined

// close port
this.rxSink?.controller.abort(err)
Expand Down

0 comments on commit 75e2ae8

Please sign in to comment.