1
0
mirror of https://github.com/KubaPro010/fm-dx-webserver.git synced 2026-02-26 22:13:53 +01:00

fmlist integration, new admin panel, bugfixes

This commit is contained in:
NoobishSVK
2024-09-15 00:00:42 +02:00
parent acc0c4fb16
commit ab000412fa
22 changed files with 834 additions and 540 deletions

View File

@@ -235,7 +235,7 @@ var dataToSend = {
dist: '',
azi: '',
id: '',
reg: '',
reg: false,
pi: '',
},
country_name: '',
@@ -394,21 +394,26 @@ function handleData(wss, receivedData, rdsWss) {
}
// Get the received TX info
const currentTx = fetchTx(parseFloat(dataToSend.freq).toFixed(1), dataToSend.pi, dataToSend.ps);
if(currentTx && currentTx.station !== undefined) {
dataToSend.txInfo = {
tx: currentTx.station,
pol: currentTx.pol,
erp: currentTx.erp,
city: currentTx.city,
itu: currentTx.itu,
dist: currentTx.distance,
azi: currentTx.azimuth,
id: currentTx.id,
pi: currentTx.pi,
reg: currentTx.reg
}
}
fetchTx(parseFloat(dataToSend.freq).toFixed(1), dataToSend.pi, dataToSend.ps)
.then((currentTx) => {
if (currentTx && currentTx.station !== undefined) {
dataToSend.txInfo = {
tx: currentTx.station,
pol: currentTx.pol,
erp: currentTx.erp,
city: currentTx.city,
itu: currentTx.itu,
dist: currentTx.distance,
azi: currentTx.azimuth,
id: currentTx.id,
pi: currentTx.pi,
reg: currentTx.reg
};
}
})
.catch((error) => {
logError("Error fetching Tx info:", error);
});
// Send the updated data to the client
const dataToSendJSON = JSON.stringify(dataToSend);