Send to rado platform; show_dbdata, db loads after start
This commit is contained in:
parent
ed0fe5b15d
commit
f63ac50497
22 changed files with 6380 additions and 2279 deletions
|
|
@ -40,18 +40,17 @@ async function writeData(port, data, readbytes, timeout){
|
|||
return new Promise((resolve, reject) => {
|
||||
|
||||
// If first item in data array is 255, we just write broadcast command to rsPort
|
||||
// We wait 3 seconds and resolve([ "b", "r", "o", "a", "d", "c", "a", "s", "t" ])
|
||||
// We wait 3 seconds and resolve(["broadcast"])
|
||||
// It is important to resolve with array
|
||||
if(data[0] == 255) {
|
||||
|
||||
port.write(Buffer.from(data), function(err) {
|
||||
if (err) {
|
||||
port.removeListener('data', callback);
|
||||
reject(err.message);
|
||||
}
|
||||
});
|
||||
|
||||
setTimeout(resolve, 3000, [ "b", "r", "o", "a", "d", "c", "a", "s", "t" ]);
|
||||
setTimeout(resolve, 3000, ["broadcast"]);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue