mirror of
https://github.com/DJ2LS/FreeDATA
synced 2024-05-14 08:04:33 +00:00
moved to ujson compatibility
This commit is contained in:
parent
ee188b882a
commit
b073f1192f
|
@ -100,7 +100,7 @@ client.on('data', function(data) {
|
|||
msg += data.toString('utf8'); // append data to buffer so we can stick long data together
|
||||
//console.log(data)
|
||||
// check if we reached an EOF, if true, clear buffer and parse JSON data
|
||||
if (data.endsWith('"EOF": "EOF"}')) {
|
||||
if (data.endsWith('"EOF":"EOF"}')) {
|
||||
//console.log(msg)
|
||||
try {
|
||||
//console.log(msg)
|
||||
|
@ -111,9 +111,10 @@ client.on('data', function(data) {
|
|||
msg = '';
|
||||
/* console.log("EOF detected!") */
|
||||
|
||||
//console.log(data)
|
||||
|
||||
if (data['COMMAND'] == 'TNC_STATE') {
|
||||
|
||||
console.log(data)
|
||||
rxBufferLengthTnc = data['RX_BUFFER_LENGTH']
|
||||
|
||||
let Data = {
|
||||
|
|
Loading…
Reference in a new issue