Skip to content

Commit

Permalink
patch: lost label in some devices
Browse files Browse the repository at this point in the history
  • Loading branch information
andrescvargasr committed Nov 27, 2023
1 parent 2bb1473 commit 40e732b
Show file tree
Hide file tree
Showing 7 changed files with 113 additions and 4 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ Depending the first letter of the device ID we can guess what kind of device it
- `S`: OpenSpectro
- `T`: SimpleSpectro
- `#`: Solar2015
- `P`: PHMeter

## License

Expand Down
9 changes: 9 additions & 0 deletions src/__tests__/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,15 @@ describe('legoino-device-information test', () => {
it('Solar2015', () => {
expect(info.Solar2015).toMatchSnapshot();
});
it('Beemos', () => {
expect(info.Beemos).toMatchSnapshot();
});
it('Computer', () => {
expect(info.Computer).toMatchSnapshot();
});
it('PHMeter', () => {
expect(info.PHMeter).toMatchSnapshot();
});
it('fromDeviceID', () => {
expect(info.fromDeviceID('6b')).toMatchSnapshot();
});
Expand Down
53 changes: 53 additions & 0 deletions src/devices/Beemos.js
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,31 @@ module.exports = {
unit: 'kg',
writable: false,
},

{
label: 'Q',
},

{
label: 'R',
},

{
label: 'S',
},

{
label: 'T',
},

{
label: 'U',
},

{
label: 'V',
},

{
label: 'W',
variable: 'battery',
Expand Down Expand Up @@ -219,6 +244,34 @@ module.exports = {
writable: false,
},

{
label: 'AD',
},

{
label: 'AE',
},

{
label: 'AF',
},

{
label: 'AG',
},

{
label: 'AH',
},

{
label: 'AI',
},

{
label: 'AJ',
},

{
label: 'AK',
variable: 'gate1In',
Expand Down
33 changes: 33 additions & 0 deletions src/devices/OpenSpectro.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,34 @@ module.exports = {
writable: false,
},

{
label: 'N',
},

{
label: 'O',
},

{
label: 'P',
},

{
label: 'Q',
},

{
label: 'R',
},

{
label: 'S',
},

{
label: 'T',
},

{
label: 'U',
name: 'red test',
Expand All @@ -134,6 +162,7 @@ module.exports = {
unit: '',
writable: false,
},

{
label: 'V',
name: 'green test',
Expand All @@ -142,6 +171,7 @@ module.exports = {
unit: '',
writable: false,
},

{
label: 'W',
name: 'blue test',
Expand All @@ -150,6 +180,7 @@ module.exports = {
unit: '',
writable: false,
},

{
label: 'X',
name: 'white test',
Expand All @@ -158,9 +189,11 @@ module.exports = {
unit: '',
writable: false,
},

{
label: 'Y',
},

Check failure on line 196 in src/devices/OpenSpectro.js

View workflow job for this annotation

GitHub Actions / lint

Trailing spaces not allowed
{
label: 'Z',
},
Expand Down
12 changes: 12 additions & 0 deletions src/devices/SimpleSpectro.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ module.exports = {
writable: false,
},

{
label: 'E',
},

{
label: 'F',
name: 'Transmission of blank (Red)',
Expand Down Expand Up @@ -83,6 +87,10 @@ module.exports = {
writable: false,
},

{
label: 'J',
},

{
label: 'K',
name: 'Delay before blank',
Expand Down Expand Up @@ -176,6 +184,10 @@ module.exports = {
writable: true,
},

{
label: 'U',
},

{
label: 'V',
name: 'Active channels',
Expand Down
8 changes: 4 additions & 4 deletions src/devices/pHMeter.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
'use strict';

module.exports = {
name: 'pHMeter',
kind: 'pHMeter',
description: 'pH and conductivity meter',
name: 'PHMeter',
kind: 'PHMeter',
description: 'PH and conductivity meter',
url: 'https://github.com/Hackuarium/phmeter',
id: 'P',
numberParameters: 64,
numberParameters: 68,
numberLogParameters: 26,
parameters: [
{
Expand Down
1 change: 1 addition & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ let devices = {
Solar2015: ensureAllParameters(require('./devices/Solar2015')),
Beemos: ensureAllParameters(require('./devices/Beemos')),
Computer: ensureAllParameters(require('./devices/Computer')),
PHMeter: ensureAllParameters(require('./devices/PHMeter')),

Check failure on line 13 in src/index.js

View workflow job for this annotation

GitHub Actions / lint

Unable to resolve path to module './devices/PHMeter'
fromDeviceID,
};

Expand Down

0 comments on commit 40e732b

Please sign in to comment.