setup events

This commit is contained in:
liamcottle 2025-02-11 22:07:10 +13:00
parent 6f2d4ce1f7
commit feb149ad35
5 changed files with 65 additions and 15 deletions

View file

@ -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){