MCPcopy Create free account
hub / github.com/Moddable-OpenSource/moddable / constructor

Method constructor

examples/drivers/lora-ui/main.js:33–46  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

31 encoder = new TextEncoder;
32
33 constructor() {
34 this.lora = new device.peripheral.lora.Default({
35 onReadable: () => this.receive(this.lora.read())
36 });
37
38 this.button = new device.peripheral.button.Flash({
39 onPush: () => {
40 if (this.button.pressed)
41 this.send();
42 }
43 });
44
45 this.update();
46 }
47 send() {
48 this.sent += 1;
49 this.messageSent = `hello #${this.sent}`

Callers

nothing calls this directly

Calls 4

receiveMethod · 0.95
sendMethod · 0.95
updateMethod · 0.95
readMethod · 0.65

Tested by

no test coverage detected