add button to read display from rnode
This commit is contained in:
16
js/rnode.js
16
js/rnode.js
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user