Skip to content
Snippets Groups Projects
Commit 3a78f64a authored by echicken's avatar echicken :chicken:
Browse files

test

parent 4a59525f
No related branches found
No related tags found
No related merge requests found
...@@ -27,7 +27,13 @@ export default class SocketDevice extends Device { ...@@ -27,7 +27,13 @@ export default class SocketDevice extends Device {
this.host = host; this.host = host;
this.port = port; this.port = port;
this.socket = new js.global.Socket(); this.socket = new js.global.Socket();
js.setInterval(() => this.getChannel(0, (mp: protobuf.Mesh.MeshPacket): boolean => true), 30000, this); function hb(this: Device) {
this.getChannel(0, (mp: protobuf.Mesh.MeshPacket): boolean => {
js.global.writeln(JSON.stringify(mp));
return true;
});
}
js.setInterval(hb.bind(this), 30000, this);
} }
/** /**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment