moved to ujson compatibility

This commit is contained in:
DJ2LS 2021-08-23 18:14:24 +02:00 committed by GitHub
parent ee188b882a
commit b073f1192f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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