Compare commits

..
7 changed files with 65 additions and 18 deletions

No files matched your search

+32 -2
View File
@@ -62,6 +62,12 @@ body{background:var(--msh-bg);color:var(--msh-text);font-family:"Inter",system-u
#received-packets .table{--bs-table-color:var(--msh-text);--bs-table-border-color:var(--msh-border);color:var(--msh-text);}
#received-packets th{white-space:nowrap;}
#received-packets td:nth-child(1),#received-packets td:nth-child(2),#received-packets td:nth-child(4),#received-packets td:nth-child(5){white-space:nowrap;}
#received-packets th:nth-child(1){width:calc(10ch + 1rem);min-width:calc(10ch + 1rem);}
#received-packets th:nth-child(2){width:calc(8ch + 1rem);min-width:calc(8ch + 1rem);}
#received-packets th:nth-child(4){width:calc(4ch + 1rem);min-width:calc(4ch + 1rem);}
#received-packets th:nth-child(5){width:calc(6ch + 1rem);min-width:calc(6ch + 1rem);}
#received-packets td:nth-child(1),#received-packets td:nth-child(2),#received-packets td:nth-child(4),#received-packets td:nth-child(5){font-variant-numeric:tabular-nums;}
#received-packets td:nth-child(3){overflow-wrap:anywhere;}
@media(max-width:768px){.app-sidebar{width:60px;padding:12px 6px;}.side-link .label,.nav-group-label{display:none;}.app-main{padding:14px;}}
</style>
</head>
@@ -198,7 +204,7 @@ body{background:var(--msh-bg);color:var(--msh-text);font-family:"Inter",system-u
<tr>
<th scope="col">Date</th>
<th scope="col">Time</th>
<th scope="col">Frame</th>
<th scope="col">Packet</th>
<th scope="col">RSSI</th>
<th scope="col">SNR</th>
</tr>
@@ -285,7 +291,7 @@ body{background:var(--msh-bg);color:var(--msh-text);font-family:"Inter",system-u
oninput="this.value = this.value.toUpperCase();"
/>
</div>
<div class="col-12 mt-3">
<div class="col-12 col-md-9 mt-3">
<label
for="beacon.comment"
class="form-label"
@@ -299,6 +305,30 @@ body{background:var(--msh-bg);color:var(--msh-text);font-family:"Inter",system-u
placeholder=""
/>
</div>
<div class="col-12 col-md-3 mt-3">
<label
for="beacon.rfCommentEveryXBeacons"
class="form-label"
>RF Comment every</label
>
<div class="input-group">
<input
type="number"
name="beacon.rfCommentEveryXBeacons"
id="beacon.rfCommentEveryXBeacons"
class="form-control"
value="1"
min="1"
max="100"
step="1"
required
/>
<span class="input-group-text"
>beacons
</span>
</div>
<small>(1 = every beacon, RF only)</small>
</div>
<div class="col-12 mt-3">
<label
for="beacon.path"
+21 -13
View File
@@ -56,6 +56,7 @@ function loadSettings(settings) {
document.getElementById("callsign").value = settings.callsign;
document.getElementById("tacticalCallsign").value = settings.tacticalCallsign;
document.getElementById("beacon.comment").value = settings.beacon.comment;
document.getElementById("beacon.rfCommentEveryXBeacons").value = settings.beacon.rfCommentEveryXBeacons;
document.getElementById("beacon.path").value = settings.beacon.path;
document.getElementById("beacon.symbol").value = settings.beacon.symbol;
document.getElementById("beacon.overlay").value = settings.beacon.overlay;
@@ -606,13 +607,11 @@ function loadReceivedPackets(packets) {
packets.forEach((packet) => {
const element = document.createElement("tr");
element.innerHTML = `
<td>${packet.rxDate}</td>
<td>${packet.rxTime}</td>
<td>${packet.packet}</td>
<td>${packet.RSSI}</td>
<td>${packet.SNR}</td>
`;
['rxDate', 'rxTime', 'packet', 'RSSI', 'SNR'].forEach((field) => {
const cell = document.createElement("td");
cell.textContent = String(packet[field]);
element.appendChild(cell);
});
container.appendChild(element);
})
@@ -655,6 +654,15 @@ let mapTileErrShown = false;
let iGateLatLng = null;
let mapAutoFitDone = false;
function escapeHtml(value) { // shows received data as text inside HTML strings (map popups / icons)
return String(value ?? "")
.replace(/&/g, "&amp;")
.replace(/</g, "&lt;")
.replace(/>/g, "&gt;")
.replace(/"/g, "&quot;")
.replace(/'/g, "&#39;");
}
function setMapMessage(text) {
const el = document.getElementById("map");
if (el) {
@@ -833,7 +841,7 @@ function getAprsSymbolIcon(symbol, callsign = "") {
-1px 1px 0 #fff,
1px 1px 0 #fff;
pointer-events:none;
">${callsign}</span>
">${escapeHtml(callsign)}</span>
</div>
`,
iconSize: [24, 24],
@@ -935,12 +943,12 @@ function loadMapStations(stations) {
(stations || []).forEach((s) => {
if (s.lat === 0 && s.lon === 0) return; // descartar estaciones sin fix
const popup = `<b>${s.callsign}</b>`
+ (s.lastHeard ? `<br>Last: ${s.lastHeard}` : "")
const popup = `<b>${escapeHtml(s.callsign)}</b>`
+ (s.lastHeard ? `<br>Last: ${escapeHtml(s.lastHeard)}` : "")
+ `<br>RSSI ${s.RSSI} / SNR ${s.SNR}`
+ `<br>Packets: ${s.count}`
+ `<br><b>${describeMapPath(s)}</b>`
+ (s.path ? `<br><small>Path: ${s.path}</small>` : "");
+ `<br><b>${escapeHtml(describeMapPath(s))}</b>`
+ (s.path ? `<br><small>Path: ${escapeHtml(s.path)}</small>` : "");
const aprsIcon =
getAprsSymbolIcon(s.symbol, s.callsign);
@@ -1172,4 +1180,4 @@ form.addEventListener("invalid", function (event) {
el.scrollIntoView({ block: "center", behavior: "smooth" });
}, 0);
}
}, true);
}, true);
+1
View File
@@ -42,6 +42,7 @@ public:
double latitude;
double longitude;
String comment;
int rfCommentEveryXBeacons;
int interval;
String overlay;
String symbol;
+1 -1
View File
@@ -68,7 +68,7 @@ ___________________________________________________________________*/
#endif
String versionDate = "2026-10-01";
String versionDate = "2026-10-02";
String versionNumber = "4.0.2";
Configuration Config;
WiFiClient aprsIsClient;
+4
View File
@@ -65,6 +65,7 @@ bool Configuration::writeFile() {
data["aprs_is"]["objectsToRF"] = aprs_is.objectsToRF;
data["beacon"]["comment"] = beacon.comment;
data["beacon"]["rfCommentEveryXBeacons"] = beacon.rfCommentEveryXBeacons;
data["beacon"]["interval"] = beacon.interval;
data["beacon"]["latitude"] = beacon.latitude;
data["beacon"]["longitude"] = beacon.longitude;
@@ -249,6 +250,7 @@ bool Configuration::readFile() {
if (data["beacon"]["latitude"].isNull() ||
data["beacon"]["longitude"].isNull() ||
data["beacon"]["comment"].isNull() ||
data["beacon"]["rfCommentEveryXBeacons"].isNull() ||
data["beacon"]["interval"].isNull() ||
data["beacon"]["overlay"].isNull() ||
data["beacon"]["symbol"].isNull() ||
@@ -263,6 +265,7 @@ bool Configuration::readFile() {
beacon.latitude = data["beacon"]["latitude"] | 0.0;
beacon.longitude = data["beacon"]["longitude"] | 0.0;
beacon.comment = data["beacon"]["comment"] | "LoRa APRS";
beacon.rfCommentEveryXBeacons = data["beacon"]["rfCommentEveryXBeacons"] | 1;
beacon.interval = data["beacon"]["interval"] | 15;
beacon.overlay = data["beacon"]["overlay"] | "L";
beacon.symbol = data["beacon"]["symbol"] | "a";
@@ -472,6 +475,7 @@ void Configuration::setDefaultValues() {
aprs_is.objectsToRF = false;
beacon.comment = "LoRa APRS";
beacon.rfCommentEveryXBeacons = 1;
beacon.latitude = 0.0;
beacon.longitude = 0.0;
beacon.interval = 15;
+5 -2
View File
@@ -71,6 +71,7 @@ uint32_t lastStatusTx = 0;
bool stationCallsignIsValid = false;
String beaconPacket;
String secondaryBeaconPacket;
uint32_t rfBeaconCounter = 0;
namespace Utils {
@@ -214,8 +215,9 @@ namespace Utils {
beaconPacket += sensorData;
secondaryBeaconPacket += sensorData;
}
beaconPacket += Config.beacon.comment;
secondaryBeaconPacket += Config.beacon.comment;
beaconPacket += Config.beacon.comment; // APRS-IS beacon always carries the comment
int commentEveryX = max(1, Config.beacon.rfCommentEveryXBeacons); // safety: 0 or negative behaves as "every beacon"
if (rfBeaconCounter % commentEveryX == 0) secondaryBeaconPacket += Config.beacon.comment;
if (stationCallsignIsValid && Config.tacticalCallsign != "") {
beaconPacket += " de ";
beaconPacket += Config.callsign;
@@ -300,6 +302,7 @@ namespace Utils {
displayShow(firstLine, secondLine, thirdLine, fourthLine, fifthLine, sixthLine, "SENDING DIGI BEACON", 0);
seventhLine = " listening...";
STATION_Utils::addToOutputPacketBuffer(secondaryBeaconPacket, true);
rfBeaconCounter++;
}
lastBeaconTx = millis();
+1
View File
@@ -246,6 +246,7 @@ namespace WEB_Utils {
Config.beacon.latitude = getParamDoubleSafe("beacon.latitude", Config.beacon.latitude);
Config.beacon.longitude = getParamDoubleSafe("beacon.longitude", Config.beacon.longitude);
Config.beacon.comment = getParamStringSafe("beacon.comment", Config.beacon.comment);
Config.beacon.rfCommentEveryXBeacons = getParamIntSafe("beacon.rfCommentEveryXBeacons", Config.beacon.rfCommentEveryXBeacons);
Config.beacon.overlay = getParamStringSafe("beacon.overlay", Config.beacon.overlay);
Config.beacon.symbol = getParamStringSafe("beacon.symbol", Config.beacon.symbol);
Config.beacon.path = getParamStringSafe("beacon.path", Config.beacon.path);