add button to read display from rnode

This commit is contained in:
liamcottle
2024-12-15 23:16:10 +13:00
parent 252ee55a8a
commit ff7b16c8d2
2 changed files with 116 additions and 0 deletions

View File

@@ -83,6 +83,8 @@ class RNode {
CMD_BT_CTRL = 0x46;
CMD_BT_PIN = 0x62;
CMD_DISP_READ = 0x66;
CMD_DETECT = 0x08;
DETECT_REQ = 0x73;
DETECT_RESP = 0x46;
@@ -567,6 +569,20 @@ class RNode {
}
async readDisplay() {
await this.sendKissCommand([
this.CMD_DISP_READ,
0x01,
]);
// read response from device
const [ command, ...displayBuffer ] = await this.readFromSerialPort();
return displayBuffer;
}
async setFrequency(frequencyInHz) {
const c1 = frequencyInHz >> 24;