mirror of
https://github.com/DJ2LS/FreeDATA
synced 2024-05-14 08:04:33 +00:00
different changes
network fixes, chat fixes, gui fixes...
This commit is contained in:
parent
cbcb17870e
commit
f5f7060672
9 changed files with 133 additions and 102 deletions
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "FreeDATA",
|
"name": "FreeDATA",
|
||||||
"version": "0.1.0-alpha.2",
|
"version": "0.1.2-alpha",
|
||||||
"description": "FreeDATA ",
|
"description": "FreeDATA ",
|
||||||
"main": "main.js",
|
"main": "main.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|
|
@ -58,11 +58,9 @@ db.allDocs({
|
||||||
// WINDOW LISTENER
|
// WINDOW LISTENER
|
||||||
window.addEventListener('DOMContentLoaded', () => {
|
window.addEventListener('DOMContentLoaded', () => {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// SEND MSG
|
// SEND MSG
|
||||||
document.getElementById("sendMessage").addEventListener("click", () => {
|
document.getElementById("sendMessage").addEventListener("click", () => {
|
||||||
|
|
||||||
var dxcallsign = document.getElementById('chatModuleDxCall').value
|
var dxcallsign = document.getElementById('chatModuleDxCall').value
|
||||||
dxcallsign = dxcallsign.toUpperCase()
|
dxcallsign = dxcallsign.toUpperCase()
|
||||||
message = document.getElementById('chatModuleMessage').value
|
message = document.getElementById('chatModuleMessage').value
|
||||||
|
@ -106,8 +104,12 @@ window.addEventListener('DOMContentLoaded', () => {
|
||||||
console.log(err);
|
console.log(err);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// scroll to bottom
|
||||||
|
var element = document.getElementById("message-container");
|
||||||
|
element.scrollTo(0,element.scrollHeight);
|
||||||
|
|
||||||
|
// clear input
|
||||||
|
document.getElementById('chatModuleMessage').value = ''
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -121,11 +123,11 @@ window.addEventListener('DOMContentLoaded', () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
ipcRenderer.on('action-new-msg-received', (event, arg) => {
|
ipcRenderer.on('action-new-msg-received', (event, arg) => {
|
||||||
//console.log(arg.data)
|
console.log(arg.data)
|
||||||
|
|
||||||
var new_msg = arg.data
|
var new_msg = arg.data
|
||||||
new_msg.forEach(function(item) {
|
new_msg.forEach(function(item) {
|
||||||
//console.log(item)
|
console.log(item)
|
||||||
//for (i = 0; i < arg.data.length; i++) {
|
//for (i = 0; i < arg.data.length; i++) {
|
||||||
|
|
||||||
let obj = new Object();
|
let obj = new Object();
|
||||||
|
@ -178,13 +180,15 @@ ipcRenderer.on('action-new-msg-received', (event, arg) => {
|
||||||
|
|
||||||
db.get(item.uuid).then(function (doc) {
|
db.get(item.uuid).then(function (doc) {
|
||||||
// handle doc
|
// handle doc
|
||||||
|
|
||||||
|
// timestamp
|
||||||
update_chat(doc)
|
update_chat(doc)
|
||||||
}).catch(function (err) {
|
}).catch(function (err) {
|
||||||
console.log(err);
|
console.log(err);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
console.log("...................................")
|
||||||
|
return
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -238,6 +242,11 @@ update_chat = function(obj) {
|
||||||
// create eventlistener for listening on clicking on a callsign
|
// create eventlistener for listening on clicking on a callsign
|
||||||
document.getElementById('chat-' + dxcallsign + '-list').addEventListener('click', function() {
|
document.getElementById('chat-' + dxcallsign + '-list').addEventListener('click', function() {
|
||||||
document.getElementById('chatModuleDxCall').value = dxcallsign;
|
document.getElementById('chatModuleDxCall').value = dxcallsign;
|
||||||
|
|
||||||
|
// scroll to bottom
|
||||||
|
var element = document.getElementById("message-container");
|
||||||
|
element.scrollTo(0,element.scrollHeight);
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -250,10 +259,12 @@ update_chat = function(obj) {
|
||||||
if(!(document.getElementById('msg-' + obj._id))){
|
if(!(document.getElementById('msg-' + obj._id))){
|
||||||
if (obj.type == 'received'){
|
if (obj.type == 'received'){
|
||||||
var new_message = `
|
var new_message = `
|
||||||
<div class="card border-light mb-3 w-75" id="msg-${obj._id}">
|
<div class="mt-3 mb-0 w-75" id="msg-${obj._id}">
|
||||||
|
<p class="font-monospace text-small mb-0 text-muted text-break">${timestamp}</p>
|
||||||
|
<div class="card border-light bg-light" id="msg-${obj._id}">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<p class="text-small mb-0 text-muted text-break">${timestamp}</p>
|
<p class="card-text text-break text-wrap">${obj.msg}</p>
|
||||||
<p class="card-text">${obj.msg}</p>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
`;
|
`;
|
||||||
|
@ -263,28 +274,22 @@ update_chat = function(obj) {
|
||||||
|
|
||||||
|
|
||||||
var new_message = `
|
var new_message = `
|
||||||
<div class="card text-right border-primary ml-auto mb-3 w-75" style="margin-left: auto;"id="msg-${obj._id}">
|
<div class="ml-auto mt-3 mb-0 w-75" style="margin-left: auto;">
|
||||||
|
<p class="font-monospace text-right mb-0 text-muted" style="text-align: right;">${timestamp}</p>
|
||||||
|
<div class="card text-right border-primary bg-primary" id="msg-${obj._id}">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<p class="text-small mb-0 text-muted text-break">${timestamp}</p>
|
<p class="card-text text-white text-break text-wrap">${obj.msg}</p>
|
||||||
<p class="card-text">${obj.msg}</p>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
var id = "chat-" + obj.dxcallsign
|
var id = "chat-" + obj.dxcallsign
|
||||||
document.getElementById(id).insertAdjacentHTML("beforeend", new_message);
|
document.getElementById(id).insertAdjacentHTML("beforeend", new_message);
|
||||||
|
var element = document.getElementById("message-container");
|
||||||
|
element.scrollTo(0,element.scrollHeight);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,8 +22,8 @@ var configPath = path.join(configFolder, 'config.json');
|
||||||
const config = require(configPath);
|
const config = require(configPath);
|
||||||
|
|
||||||
// START INTERVALL COMMAND EXECUTION FOR STATES
|
// START INTERVALL COMMAND EXECUTION FOR STATES
|
||||||
setInterval(sock.getRxBuffer, 1000);
|
//setInterval(sock.getRxBuffer, 1000);
|
||||||
setInterval(sock.getMsgRxBuffer, 1000);
|
|
||||||
|
|
||||||
// WINDOW LISTENER
|
// WINDOW LISTENER
|
||||||
window.addEventListener('DOMContentLoaded', () => {
|
window.addEventListener('DOMContentLoaded', () => {
|
||||||
|
|
31
gui/sock.js
31
gui/sock.js
|
@ -104,6 +104,9 @@ writeTncCommand = function(command) {
|
||||||
//socketLog.info(command)
|
//socketLog.info(command)
|
||||||
// we use the writingCommand function to update our TCPIP state because we are calling this function a lot
|
// we use the writingCommand function to update our TCPIP state because we are calling this function a lot
|
||||||
// if socket openend, we are able to run commands
|
// if socket openend, we are able to run commands
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (client.readyState == 'open') {
|
if (client.readyState == 'open') {
|
||||||
client.write(command + '\n');
|
client.write(command + '\n');
|
||||||
|
|
||||||
|
@ -216,22 +219,25 @@ client.on('data', function(socketdata) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/* A TEST WITH STREAMING DATA .... */
|
/* A TEST WITH STREAMING DATA .... */
|
||||||
|
// if we received data through network stream, we get a single data item
|
||||||
if (data['arq'] == 'received') {
|
if (data['arq'] == 'received') {
|
||||||
dataArray = []
|
dataArray = []
|
||||||
messageArray = []
|
messageArray = []
|
||||||
|
|
||||||
|
socketLog.info(data)
|
||||||
|
// we need to encode here to do a deep check for checking if file or message
|
||||||
|
var encoded_data = atob(data['data'])
|
||||||
|
var splitted_data = encoded_data.split(split_char)
|
||||||
|
|
||||||
if(data['data'][0]['dt'] == 'f'){
|
|
||||||
|
if(splitted_data[0] == 'f'){
|
||||||
dataArray.push(data)
|
dataArray.push(data)
|
||||||
}
|
}
|
||||||
|
|
||||||
if(data['data'][0]['dt'] == 'm'){
|
if(splitted_data[0] == 'm'){
|
||||||
messageArray.push(data)
|
messageArray.push(data)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
rxBufferLengthGui = dataArray.length
|
rxBufferLengthGui = dataArray.length
|
||||||
let Files = {
|
let Files = {
|
||||||
data: dataArray,
|
data: dataArray,
|
||||||
|
@ -242,19 +248,21 @@ client.on('data', function(socketdata) {
|
||||||
let Messages = {
|
let Messages = {
|
||||||
data: messageArray,
|
data: messageArray,
|
||||||
};
|
};
|
||||||
ipcRenderer.send('request-update-rx-msg-buffer', Messages);
|
|
||||||
|
|
||||||
|
//ipcRenderer.send('request-update-rx-msg-buffer', Messages);
|
||||||
|
ipcRenderer.send('request-new-msg-received', Messages);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// if we manually checking for the rx buffer we are getting an array of multiple data
|
||||||
if (data['command'] == 'rx_buffer') {
|
if (data['command'] == 'rx_buffer') {
|
||||||
|
socketLog.info(data)
|
||||||
// iterate through buffer list and sort it to file or message array
|
// iterate through buffer list and sort it to file or message array
|
||||||
dataArray = []
|
dataArray = []
|
||||||
messageArray = []
|
messageArray = []
|
||||||
|
|
||||||
|
|
||||||
for (i = 0; i < data['data-array'].length; i++) {
|
for (i = 0; i < data['data-array'].length; i++) {
|
||||||
try{
|
try{
|
||||||
|
// we need to encode here to do a deep check for checking if file or message
|
||||||
var encoded_data = atob(data['data-array'][i]['data'])
|
var encoded_data = atob(data['data-array'][i]['data'])
|
||||||
var splitted_data = encoded_data.split(split_char)
|
var splitted_data = encoded_data.split(split_char)
|
||||||
|
|
||||||
|
@ -274,7 +282,6 @@ client.on('data', function(socketdata) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
socketLog.info(dataArray)
|
|
||||||
|
|
||||||
|
|
||||||
rxBufferLengthGui = dataArray.length
|
rxBufferLengthGui = dataArray.length
|
||||||
|
@ -287,7 +294,9 @@ client.on('data', function(socketdata) {
|
||||||
let Messages = {
|
let Messages = {
|
||||||
data: messageArray,
|
data: messageArray,
|
||||||
};
|
};
|
||||||
ipcRenderer.send('request-update-rx-msg-buffer', Messages);
|
//ipcRenderer.send('request-update-rx-msg-buffer', Messages);
|
||||||
|
ipcRenderer.send('request-new-msg-received', Messages);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -361,6 +370,8 @@ exports.sendMessage = function(dxcallsign, mode, frames, data, checksum) {
|
||||||
|
|
||||||
//command = '{"type" : "arq", "command" : "send_message", "parameter" : [{ "dxcallsign" : "' + dxcallsign + '", "mode" : "' + mode + '", "n_frames" : "' + frames + '", "data" : "' + data + '" , "checksum" : "' + checksum + '"}]}'
|
//command = '{"type" : "arq", "command" : "send_message", "parameter" : [{ "dxcallsign" : "' + dxcallsign + '", "mode" : "' + mode + '", "n_frames" : "' + frames + '", "data" : "' + data + '" , "checksum" : "' + checksum + '"}]}'
|
||||||
command = '{"type" : "arq", "command" : "send_raw", "parameter" : [{"dxcallsign" : "' + dxcallsign + '", "mode" : "' + mode + '", "n_frames" : "' + frames + '", "data" : "' + data + '"}]}'
|
command = '{"type" : "arq", "command" : "send_raw", "parameter" : [{"dxcallsign" : "' + dxcallsign + '", "mode" : "' + mode + '", "n_frames" : "' + frames + '", "data" : "' + data + '"}]}'
|
||||||
|
socketLog.info(command)
|
||||||
|
socketLog.info("-------------------------------------")
|
||||||
writeTncCommand(command)
|
writeTncCommand(command)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,9 @@
|
||||||
<meta http-equiv="Content-Security-Policy" content="script-src 'self';">
|
<meta http-equiv="Content-Security-Policy" content="script-src 'self';">
|
||||||
<!-- Bootstrap CSS -->
|
<!-- Bootstrap CSS -->
|
||||||
<link rel="stylesheet" href="../node_modules/bootstrap/dist/css/bootstrap.min.css">
|
<link rel="stylesheet" href="../node_modules/bootstrap/dist/css/bootstrap.min.css">
|
||||||
|
<link rel="stylesheet" href="../node_modules/bootstrap-icons/font/bootstrap-icons.css">
|
||||||
|
<!-- Custom CSS -->
|
||||||
|
<link rel="stylesheet" type="text/css" href="styles.css" />
|
||||||
<title>FreeDATA - CHAT</title>
|
<title>FreeDATA - CHAT</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
@ -18,34 +20,59 @@
|
||||||
<script src="../node_modules/chart.js/dist/chart.min.js"></script>
|
<script src="../node_modules/chart.js/dist/chart.min.js"></script>
|
||||||
<script src="../node_modules/chartjs-plugin-annotation/dist/chartjs-plugin-annotation.min.js"></script>
|
<script src="../node_modules/chartjs-plugin-annotation/dist/chartjs-plugin-annotation.min.js"></script>
|
||||||
|
|
||||||
<div class="input-group m-1">
|
|
||||||
<input class="form-control" maxlength="6" style="max-width: 6rem; text-transform:uppercase" id="chatModuleDxCall" placeholder="DX CALL"></input>
|
|
||||||
<input class="form-control" id="chatModuleMessage" placeholder="Message"></input>
|
|
||||||
<button class="btn btn-sm btn-primary me-2" id="sendMessage" type="button">SEND MSG</button>
|
<div class="container-fluid">
|
||||||
|
<div class="row h-100">
|
||||||
|
<div class="col-4 p-0">
|
||||||
|
<! ------Chats area ---------------------------------------------------------------------->
|
||||||
|
|
||||||
|
<div class="list-group rounded-0" id="list-tab" role="tablist">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<table class="table">
|
|
||||||
<thead>
|
</div>
|
||||||
<tr>
|
<div class="col-8 border vh-100 ">
|
||||||
<th scope="col">Time</th>
|
<! ------messages area ---------------------------------------------------------------------->
|
||||||
<th scope="col">DXCall</th>
|
<div class="container overflow-auto" id="message-container" style="height: 90%">
|
||||||
<!--<th scope="col">DXGrid</th>
|
|
||||||
<th scope="col">Distance</th>-->
|
<div class="tab-content" id="nav-tabContent">
|
||||||
<th scope="col">Message</th>
|
</div>
|
||||||
<!--<th scope="col">SNR</th>-->
|
|
||||||
</tr>
|
<!--<div class="container position-absolute bottom-0">-->
|
||||||
</thead>
|
|
||||||
<tbody id="rx-msg-data">
|
|
||||||
<!--
|
</div>
|
||||||
<tr>
|
<!-- </div>-->
|
||||||
<th scope="row">1</th>
|
|
||||||
<td>Mark</td>
|
|
||||||
<td>Otto</td>
|
|
||||||
<td>@mdo</td>
|
</div>
|
||||||
</tr>
|
</div>
|
||||||
-->
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
|
|
||||||
|
<nav class="navbar fixed-bottom navbar-light bg-light">
|
||||||
|
<div class="container-fluid">
|
||||||
|
|
||||||
|
<div class="input-group bottom-0 w-100">
|
||||||
|
<input class="form-control" maxlength="8" style="max-width: 6rem; text-transform:uppercase" id="chatModuleDxCall" placeholder="DX CALL"></input>
|
||||||
|
<input class="form-control" id="chatModuleMessage" placeholder="Message"></input>
|
||||||
|
<button class="btn btn-sm btn-primary me-2" id="sendMessage" type="button"><i class="bi bi-send" style="font-size: 1.2rem; color: white;"></i></button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -602,6 +602,7 @@
|
||||||
|
|
||||||
</span>
|
</span>
|
||||||
<select class="form-select form-select-sm" aria-label=".form-select-sm" id="hamlib_ptt_protocol" style="width: 0.5rem">
|
<select class="form-select form-select-sm" aria-label=".form-select-sm" id="hamlib_ptt_protocol" style="width: 0.5rem">
|
||||||
|
<option value="NONE">NONE</option>
|
||||||
<option value="RIG">RIG</option>
|
<option value="RIG">RIG</option>
|
||||||
<option value="USB">USB</option>
|
<option value="USB">USB</option>
|
||||||
<option value="RTS">Serial RTS</option>
|
<option value="RTS">Serial RTS</option>
|
||||||
|
|
|
@ -546,33 +546,15 @@ class DATA():
|
||||||
static.ARQ_COMPRESSION_FACTOR = len(data_frame_decompressed) / len(data_frame)
|
static.ARQ_COMPRESSION_FACTOR = len(data_frame_decompressed) / len(data_frame)
|
||||||
data_frame = data_frame_decompressed
|
data_frame = data_frame_decompressed
|
||||||
|
|
||||||
# decode to utf-8 string
|
|
||||||
#data_frame = data_frame.decode("utf-8")
|
|
||||||
|
|
||||||
|
|
||||||
# decode json objects from data frame to inspect if we received a file or message
|
|
||||||
#rawdata = json.loads(data_frame)
|
|
||||||
'''
|
|
||||||
if datatype is a file, we append to RX_BUFFER, which contains files only
|
|
||||||
dt = datatype
|
|
||||||
--> f = file
|
|
||||||
--> m = message
|
|
||||||
fn = filename
|
|
||||||
ft = filetype
|
|
||||||
d = data
|
|
||||||
crc = checksum
|
|
||||||
'''
|
|
||||||
#if rawdata["dt"] == "f" or rawdata["dt"] == "m":
|
|
||||||
# datatype = rawdata["dt"]
|
|
||||||
#else:
|
|
||||||
# datatype = "raw"
|
|
||||||
|
|
||||||
uniqueid = str(uuid.uuid4())
|
uniqueid = str(uuid.uuid4())
|
||||||
|
timestamp = int(time.time())
|
||||||
base64_data = base64.b64encode(data_frame)
|
base64_data = base64.b64encode(data_frame)
|
||||||
base64_data = base64_data.decode("utf-8")
|
base64_data = base64_data.decode("utf-8")
|
||||||
static.RX_BUFFER.append([uniqueid, int(time.time()), static.DXCALLSIGN,static.DXGRID, base64_data])
|
static.RX_BUFFER.append([uniqueid, timestamp, static.DXCALLSIGN, static.DXGRID, base64_data])
|
||||||
jsondata = {"arq":"received", "uuid" : static.RX_BUFFER[i][0], "timestamp": static.RX_BUFFER[i][1], "dxcallsign": str(static.RX_BUFFER[i][2], 'utf-8'), "dxgrid": str(static.RX_BUFFER[i][3], 'utf-8'), "data": base64_data}
|
jsondata = {"arq":"received", "uuid" : uniqueid, "timestamp": timestamp, "dxcallsign": str(static.DXCALLSIGN, 'utf-8'), "dxgrid": str(static.DXGRID, 'utf-8'), "data": base64_data}
|
||||||
data_out = json.dumps(jsondata)
|
data_out = json.dumps(jsondata)
|
||||||
|
print(data_out)
|
||||||
sock.SOCKET_QUEUE.put(data_out)
|
sock.SOCKET_QUEUE.put(data_out)
|
||||||
static.INFO.append("ARQ;RECEIVING;SUCCESS")
|
static.INFO.append("ARQ;RECEIVING;SUCCESS")
|
||||||
|
|
||||||
|
|
|
@ -235,8 +235,6 @@ class RF():
|
||||||
|
|
||||||
length_x = len(x)
|
length_x = len(x)
|
||||||
|
|
||||||
time_buffer_start = time.time()
|
|
||||||
|
|
||||||
# avoid decoding when transmitting to reduce CPU
|
# avoid decoding when transmitting to reduce CPU
|
||||||
if not static.TRANSMITTING:
|
if not static.TRANSMITTING:
|
||||||
# avoid buffer overflow by filling only if buffer not full
|
# avoid buffer overflow by filling only if buffer not full
|
||||||
|
|
|
@ -93,8 +93,10 @@ class ThreadedTCPRequestHandler(socketserver.StreamRequestHandler):
|
||||||
for client in CONNECTED_CLIENTS:
|
for client in CONNECTED_CLIENTS:
|
||||||
try:
|
try:
|
||||||
client.send(sock_data)
|
client.send(sock_data)
|
||||||
except:
|
except Exception as e:
|
||||||
print("connection lost...")
|
print("connection lost...")
|
||||||
|
print(e)
|
||||||
|
self.connection_alive = False
|
||||||
|
|
||||||
# we want to transmit scatter data only once to reduce network traffic
|
# we want to transmit scatter data only once to reduce network traffic
|
||||||
static.SCATTER = []
|
static.SCATTER = []
|
||||||
|
@ -114,10 +116,12 @@ class ThreadedTCPRequestHandler(socketserver.StreamRequestHandler):
|
||||||
chunk = self.request.recv(1024)
|
chunk = self.request.recv(1024)
|
||||||
data += chunk
|
data += chunk
|
||||||
|
|
||||||
|
print(data)
|
||||||
if chunk == b'':
|
if chunk == b'':
|
||||||
#print("connection broken. Closing...")
|
#print("connection broken. Closing...")
|
||||||
self.connection_alive = False
|
self.connection_alive = False
|
||||||
|
|
||||||
|
|
||||||
if data.startswith(b'{') and data.endswith(b'}\n'):
|
if data.startswith(b'{') and data.endswith(b'}\n'):
|
||||||
# split data by \n if we have multiple commands in socket buffer
|
# split data by \n if we have multiple commands in socket buffer
|
||||||
data = data.split(b'\n')
|
data = data.split(b'\n')
|
||||||
|
@ -274,6 +278,9 @@ def process_tnc_commands(data):
|
||||||
# TRANSMIT RAW DATA -------------------------------------------
|
# TRANSMIT RAW DATA -------------------------------------------
|
||||||
if received_json["type"] == 'arq' and received_json["command"] == "send_raw":
|
if received_json["type"] == 'arq' and received_json["command"] == "send_raw":
|
||||||
|
|
||||||
|
print(received_json)
|
||||||
|
|
||||||
|
|
||||||
static.BEACON_PAUSE = True
|
static.BEACON_PAUSE = True
|
||||||
try:
|
try:
|
||||||
if not static.ARQ_SESSION:
|
if not static.ARQ_SESSION:
|
||||||
|
|
Loading…
Reference in a new issue