Add home scan frequency controls and BPQ radio transmission pause

This commit is contained in:
alberto committed 2026-10-17 00:42:47 +02:00
1 parent 0c0a716985
commit 9bb62cf731
10 files changed
+47 -5

No files matched your search

+1 -1
View File
@@ -56,7 +56,7 @@ export class Forwarding{
const p=(await this.profiles()).find(p=>p.call===peer);if(!p?.configured)throw new Error('Profilo di forwarding non configurato');
if(Date.now()-(this.requested.get(peer)||0)<30000)throw new Error('Sincronizzazione già richiesta: attendi 30 secondi');
const last=forwardingHistory(await this.logs().catch(()=>''),peer)[0];if(last&&!last.endedAt&&['calling','connected'].includes(last.status))throw new Error('Forwarding già in corso per questo partner');
const radio=this.radio();if(p.transport==='Radio'&&(radio?.active||radio?.connecting))throw new Error('Modem occupato da una connessione: riprova al termine');
const radio=this.radio();if(p.transport==='Radio'&&radio?.txSuspended)throw Error('Trasmissioni radio sospese dalla console');if(p.transport==='Radio'&&(radio?.active||radio?.connecting))throw new Error('Modem occupato da una connessione: riprova al termine');
const key=await this.context();await this.bpq('/Mail/FwdDetails?'+key,{method:'POST',body:peer});await this.bpq('/Mail/FWDSave?'+key,{method:'POST',body:'StartForward'});
this.requested.set(peer,Date.now());this.cached=null;return {ok:true,peer,requestedAt:new Date().toISOString()};
});}