Prettified Code!

This commit is contained in:
DJ2LS 2023-05-15 08:13:33 +00:00 committed by GitHub Action
parent a4a4625c34
commit b50fcf414f

View file

@ -464,8 +464,9 @@ window.addEventListener("DOMContentLoaded", () => {
dxcallsign.starts;
if (dxcallsign.startsWith("BC-")) {
let broadcastChannelId = dxcallsign.split("BC-")[1];
broadcastChannelIdCRC = crc32(broadcastChannelId).toString(16).toUpperCase();
broadcastChannelIdCRC = crc32(broadcastChannelId)
.toString(16)
.toUpperCase();
dxcallsignWithID = "BC-" + broadcastChannelIdCRC;
var tnc_command = "broadcast";
@ -734,18 +735,16 @@ ipcRenderer.on("action-new-msg-received", (event, arg) => {
//handle broadcast
if (item.fec == "broadcast") {
console.log("BROADCAST RECEIVED")
console.log(item)
console.log("BROADCAST RECEIVED");
console.log(item);
var transmitting_station = item.dxcallsign;
var encoded_data = FD.atob_FD(item.data);
var splitted_data = encoded_data.split(split_char);
console.log(splitted_data);
// add callsign to message:
var message = transmitting_station + ":" + splitted_data[4];
console.log(message)
console.log(message);
obj.timestamp = Math.floor(Date.now() / 1000);
obj.dxcallsign = splitted_data[1];
obj.dxgrid = "null";