Allow manual packet preparation outside the selected scan channels
This commit is contained in:
1 parent
c0204f6b02
commit
e64b69e50f
3 files changed
+7
-1
No files matched your search
@@ -1,4 +1,5 @@
|
||||
// Accelerate BPQ's native scanner rather than bypassing its V0 modem interlock.
|
||||
export function packetPreparationMode(enabled,packetChannelId){return enabled?.includes(packetChannelId)?'scan':'direct';}
|
||||
export function canExpeditePacket({request,manualRequestId,txSuspended,ptt,connections,radioState,users,radioPorts=null,lastPtt=0,now=Date.now()}){
|
||||
const attached=[...(users||'').matchAll(/(?:TNC Uplink Port|Attached to Port)\s+(\d+)\//g)].some(m=>!radioPorts||radioPorts.includes(Number(m[1])));
|
||||
return Boolean(request&&request.id!==manualRequestId&&!txSuspended&&!ptt&&!connections&&now-lastPtt>=1000&&!/^(?:connecting|connected|calling|interlocked)\b/i.test(radioState||'')&&!attached);
|
||||
|
||||
Reference in new issue
Block a user