node-red-contrib-periph-gyroscope 1.5.0 → 1.5.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -17,9 +17,9 @@ npm install node-red-contrib-periph-gyroscope
17
17
  | Node | Kind | Description |
18
18
  |------|------|-------------|
19
19
  | `l3g4200d-device` | config | Bus configuration for a L3G4200D |
20
- | `periph-l3g4200d` | input | Reads angular rate on the X, Y, and Z axes from an L3G4200D MEMS gyroscope. |
20
+ | `l3g4200d` | input | Reads angular rate on the X, Y, and Z axes from an L3G4200D MEMS gyroscope. |
21
21
  | `l3gd20h-device` | config | Bus configuration for a L3GD20H |
22
- | `periph-l3gd20h` | input | Reads angular rate on the X, Y, and Z axes from an L3GD20H (or L3GD20) MEMS gyroscope. |
22
+ | `l3gd20h` | input | Reads angular rate on the X, Y, and Z axes from an L3GD20H (or L3GD20) MEMS gyroscope. |
23
23
 
24
24
  ## Links
25
25
 
@@ -28,7 +28,7 @@
28
28
  },
29
29
  {
30
30
  "id": "l3g4200d-read-1",
31
- "type": "periph-l3g4200d",
31
+ "type": "l3g4200d",
32
32
  "name": "L3G4200D Angular Rate",
33
33
  "device": "l3g4200d-device-1",
34
34
  "wires": [["debug-l3g4200d-1", "chart-x-1", "chart-y-1", "chart-z-1"]]
@@ -28,7 +28,7 @@
28
28
  },
29
29
  {
30
30
  "id": "l3gd20h-read-1",
31
- "type": "periph-l3gd20h",
31
+ "type": "l3gd20h",
32
32
  "name": "L3GD20H Angular Rate",
33
33
  "device": "l3gd20h-device-1",
34
34
  "wires": [["debug-l3gd20h-1", "chart-x-1", "chart-y-1", "chart-z-1"]]
@@ -62,7 +62,7 @@
62
62
 
63
63
  <!-- Read node: trigger → measurements -->
64
64
  <script type="text/javascript">
65
- RED.nodes.registerType('periph-l3g4200d', {
65
+ RED.nodes.registerType('l3g4200d', {
66
66
  category: 'Peripheral',
67
67
  color: '#C084FC',
68
68
  defaults: {
@@ -77,7 +77,7 @@
77
77
  });
78
78
  </script>
79
79
 
80
- <script type="text/html" data-template-name="periph-l3g4200d">
80
+ <script type="text/html" data-template-name="l3g4200d">
81
81
  <div class="form-row">
82
82
  <label for="node-input-device"><i class="fa fa-microchip"></i> Device</label>
83
83
  <input type="text" id="node-input-device">
@@ -88,7 +88,7 @@
88
88
  </div>
89
89
  </script>
90
90
 
91
- <script type="text/html" data-help-name="periph-l3g4200d">
91
+ <script type="text/html" data-help-name="l3g4200d">
92
92
  <p>Reads angular rate on the X, Y, and Z axes from an L3G4200D MEMS gyroscope.</p>
93
93
  <p>Any input message triggers a measurement. The device is configured via an <b>l3g4200d-device</b> config node.</p>
94
94
 
@@ -48,5 +48,5 @@ module.exports = function(RED) {
48
48
  }
49
49
  });
50
50
  }
51
- RED.nodes.registerType('periph-l3g4200d', L3G4200DReadNode);
51
+ RED.nodes.registerType('l3g4200d', L3G4200DReadNode);
52
52
  };
@@ -62,7 +62,7 @@
62
62
 
63
63
  <!-- Read node: trigger -> measurements -->
64
64
  <script type="text/javascript">
65
- RED.nodes.registerType('periph-l3gd20h', {
65
+ RED.nodes.registerType('l3gd20h', {
66
66
  category: 'Peripheral',
67
67
  color: '#C084FC',
68
68
  defaults: {
@@ -77,7 +77,7 @@
77
77
  });
78
78
  </script>
79
79
 
80
- <script type="text/html" data-template-name="periph-l3gd20h">
80
+ <script type="text/html" data-template-name="l3gd20h">
81
81
  <div class="form-row">
82
82
  <label for="node-input-device"><i class="fa fa-microchip"></i> Device</label>
83
83
  <input type="text" id="node-input-device">
@@ -88,7 +88,7 @@
88
88
  </div>
89
89
  </script>
90
90
 
91
- <script type="text/html" data-help-name="periph-l3gd20h">
91
+ <script type="text/html" data-help-name="l3gd20h">
92
92
  <p>Reads angular rate on the X, Y, and Z axes from an L3GD20H (or L3GD20) MEMS gyroscope.</p>
93
93
  <p>Any input message triggers a measurement. The device is configured via an <b>l3gd20h-device</b> config node.</p>
94
94
 
@@ -48,5 +48,5 @@ module.exports = function(RED) {
48
48
  }
49
49
  });
50
50
  }
51
- RED.nodes.registerType('periph-l3gd20h', L3GD20HReadNode);
51
+ RED.nodes.registerType('l3gd20h', L3GD20HReadNode);
52
52
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "node-red-contrib-periph-gyroscope",
3
- "version": "1.5.0",
3
+ "version": "1.5.2",
4
4
  "description": "Node-RED nodes for gyroscope chips",
5
5
  "keywords": [
6
6
  "node-red",
@@ -12,7 +12,8 @@
12
12
  ],
13
13
  "node-red": {
14
14
  "nodes": {
15
- "l3g4200d": "nodes/l3g4200d/l3g4200d.js"
15
+ "l3g4200d": "nodes/l3g4200d/l3g4200d.js",
16
+ "l3gd20h": "nodes/l3gd20h/l3gd20h.js"
16
17
  }
17
18
  },
18
19
  "dependencies": {
package/index.js DELETED
@@ -1,11 +0,0 @@
1
- const fs = require('fs');
2
- const path = require('path');
3
-
4
- module.exports = function(RED) {
5
- const nodesDir = path.join(__dirname, 'nodes');
6
- if (!fs.existsSync(nodesDir)) return;
7
- fs.readdirSync(nodesDir).forEach(function(chip) {
8
- const nodeFile = path.join(nodesDir, chip, chip + '.js');
9
- if (fs.existsSync(nodeFile)) require(nodeFile)(RED);
10
- });
11
- };