mirror of
https://github.com/DJ2LS/FreeDATA
synced 2024-05-14 08:04:33 +00:00
added maxlength for broadcast
This commit is contained in:
parent
210336a1dd
commit
a73ce2f706
2 changed files with 18 additions and 6 deletions
|
@ -481,6 +481,10 @@ window.addEventListener("DOMContentLoaded", () => {
|
|||
//dxcallsignWithID = "BC-" + broadcastChannelIdCRC;
|
||||
var tnc_command = "broadcast";
|
||||
var message_type = "broadcast_transmit";
|
||||
|
||||
// slice uuid for reducing overhead
|
||||
uuid = uuid.slice(-4);
|
||||
|
||||
let Data = {
|
||||
command: tnc_command,
|
||||
broadcastChannel: dxcallsign,
|
||||
|
@ -2318,8 +2322,13 @@ function getSetUserInformation(selected_callsign) {
|
|||
|
||||
if (selected_callsign.startsWith("BC-")) {
|
||||
var userIcon = defaultGroupIcon;
|
||||
document.getElementById("chatModuleMessage").setAttribute("maxlength", 16);
|
||||
|
||||
} else {
|
||||
var userIcon = defaultUserIcon;
|
||||
document.getElementById("chatModuleMessage").setAttribute("maxlength", 524288);
|
||||
|
||||
|
||||
}
|
||||
|
||||
document.getElementById("user-image-" + selected_callsign).src =
|
||||
|
@ -2381,9 +2390,12 @@ function getSetUserInformation(selected_callsign) {
|
|||
console.log(err);
|
||||
|
||||
if (selected_callsign.startsWith("BC-")) {
|
||||
document.getElementById("chatModuleMessage").setAttribute("maxlength", 16);
|
||||
var userIcon = defaultGroupIcon;
|
||||
} else {
|
||||
var userIcon = defaultUserIcon;
|
||||
document.getElementById("chatModuleMessage").setAttribute("maxlength", 524288);
|
||||
|
||||
}
|
||||
|
||||
// Callsign list elements
|
||||
|
|
12
gui/sock.js
12
gui/sock.js
|
@ -852,21 +852,21 @@ exports.sendFecIsWriting = function (mycallsign) {
|
|||
};
|
||||
|
||||
// SEND FEC TO BROADCASTCHANNEL
|
||||
exports.sendBroadcastChannel = function (channel, data, uuid) {
|
||||
exports.sendBroadcastChannel = function (channel, data_out, uuid) {
|
||||
let checksum = "";
|
||||
let command = "";
|
||||
data = FD.btoa_FD(
|
||||
let data = FD.btoa_FD(
|
||||
"m" +
|
||||
split_char +
|
||||
channel +
|
||||
split_char +
|
||||
checksum +
|
||||
//split_char +
|
||||
//checksum +
|
||||
split_char +
|
||||
uuid +
|
||||
split_char +
|
||||
data
|
||||
data_out
|
||||
);
|
||||
|
||||
console.log(data.length)
|
||||
let payload = data;
|
||||
command =
|
||||
'{"type" : "fec", "command" : "transmit", "mode": "datac4", "wakeup": "True", "payload" : "' +
|
||||
|
|
Loading…
Reference in a new issue