Skip to content

Commit

Permalink
follow the lint
Browse files Browse the repository at this point in the history
  • Loading branch information
johntalton committed Mar 27, 2024
1 parent 52a33f8 commit 7cef975
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 21 deletions.
4 changes: 1 addition & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,11 @@
},
"eslintConfig": {
"extends": [
"eslint:recommended",
"eslint:recommended",
"plugin:promise/recommended",
"plugin:import/recommended",
"plugin:import/errors",
"plugin:import/warnings",
"plugin:security/recommended",
"plugin:node/recommended",
"@johntalton/eslint-config/ts"
],
"plugins": [
Expand Down
36 changes: 18 additions & 18 deletions src/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -145,24 +145,24 @@ export class Common {

static async setProfile(_bus: I2CAddressedBus, _profile: Profile): Promise<void> {
throw new Error('no impl')
// const enable = Converter.encodeEnable(profile) // todo do not pass entire profile
// const [wtime, wlong] = Converter.encodeWTimingMs(profile.waitTimeMs)
// const threshold = profile.threshold || { low: profile.low, high: profile.high }
// const persistence = Converter.encodePersistence(profile.filtering)
// const config = Converter.encodeConfiguration({ wlong })
// const control = Converter.encodeControl(profile.gain)

// // sets all independently, though, all may not run in order
// await Promise.all([
// Common.setIntegrationTiming(bus, profile.integrationTimeMs),
// Common.setWaitTiming(bus, wtime),
// Common.setThreshold(bus, threshold),
// Common.setPersistence(bus, persistence),
// Common.setConfig(bus, config),
// Common.setControl(bus, control)
// ])

// await Common.setEnabled(bus, enable)
// const enable = Converter.encodeEnable(profile) // todo do not pass entire profile
// const [wtime, wlong] = Converter.encodeWTimingMs(profile.waitTimeMs)
// const threshold = profile.threshold || { low: profile.low, high: profile.high }
// const persistence = Converter.encodePersistence(profile.filtering)
// const config = Converter.encodeConfiguration({ wlong })
// const control = Converter.encodeControl(profile.gain)

// // sets all independently, though, all may not run in order
// await Promise.all([
// Common.setIntegrationTiming(bus, profile.integrationTimeMs),
// Common.setWaitTiming(bus, wtime),
// Common.setThreshold(bus, threshold),
// Common.setPersistence(bus, persistence),
// Common.setConfig(bus, config),
// Common.setControl(bus, control)
// ])

// await Common.setEnabled(bus, enable)
}

static setIntegrationTiming(_bus: I2CAddressedBus, _integrationTimeMs: number) {
Expand Down

0 comments on commit 7cef975

Please sign in to comment.