mirror of
https://github.com/meshcore-dev/meshcore.js.git
synced 2026-04-20 22:13:49 +00:00
setup events
This commit is contained in:
parent
6f2d4ce1f7
commit
feb149ad35
5 changed files with 65 additions and 15 deletions
|
|
@ -99,9 +99,13 @@
|
|||
methods: {
|
||||
async askForSerialPort() {
|
||||
this.connection = await SerialConnection.open();
|
||||
this.connection.on("tx", (data) => console.log("tx", data));
|
||||
this.connection.on("rx", (data) => console.log("rx", data));
|
||||
},
|
||||
async askForBleDevice() {
|
||||
this.connection = await BleConnection.open();
|
||||
this.connection.on("tx", (data) => console.log("tx", data));
|
||||
this.connection.on("rx", (data) => console.log("rx", data));
|
||||
},
|
||||
async disconnect() {
|
||||
if(this.connection){
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue