Skip to content

Commit a97870e

Browse files
committed
Add setup event
1 parent e5e416e commit a97870e

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

examples/Node/Decoder.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,10 @@ function Decoder(bytes, port) {
1515
var decoded = {};
1616

1717
var ports = {
18-
1: 'interval',
19-
2: 'motion',
20-
3: 'button'
18+
1: 'setup',
19+
2: 'interval',
20+
3: 'motion',
21+
4: 'button'
2122
};
2223

2324
decoded.event = ports[port];

examples/Node/Node.ino

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ TheThingsNode *node;
1616

1717
enum port : byte
1818
{
19-
PORT_INTERVAL = 1,
19+
PORT_SETUP = 1,
20+
PORT_INTERVAL,
2021
PORT_MOTION,
2122
PORT_BUTTON
2223
};
@@ -49,6 +50,8 @@ void setup() {
4950

5051
debugSerial.println("-- NODE: STATUS");
5152
node->showStatus();
53+
54+
sendData(PORT_SETUP);
5255
}
5356

5457
void loop() {

0 commit comments

Comments
 (0)