diff --git a/README.md b/README.md index 179f0fc..dffe41b 100644 --- a/README.md +++ b/README.md @@ -201,3 +201,5 @@ The local packet controller can use `packet-preparation.mjs` to prioritize an id Manual forwarding and Winlink sync buttons open a live progress dialog (preparation, calling, message exchange, restoration and outcome). Minimize keeps the session running. Interrupt cancels pending packet preparation or disconnects only the matching native BBS partner, then restores the temporary radio profile. Progress jobs are kept by the Console process; restarting the Console clears their visual history. Mail column headings share the same scroll area as their rows. Sync status responses carry a revision; the browser rejects late responses for previous jobs and never revives a terminal session. The local radio controller can use `canRecoverIdleScan` to release stale scan holds only after eight seconds of verified RF inactivity, without overriding active links, manual packet reservations or TX pause. + +Manual packet sync is independent of the listening scan selection. When the packet channel is excluded from scanning, the local station adapter can reserve it directly: stop the idle HF modem, verify the packet frequency and DATA-FM mode through CAT, and start the packet modem. After release, restore HF and the original scan selection without editing the scan configuration. TX pause and active radio sessions still prevent transmission. Forwarding and Winlink use the same reservation path. diff --git a/packet-preparation.mjs b/packet-preparation.mjs index 9f26280..9bfdc95 100644 --- a/packet-preparation.mjs +++ b/packet-preparation.mjs @@ -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); diff --git a/packet-preparation.test.mjs b/packet-preparation.test.mjs index cc90917..d484b85 100644 --- a/packet-preparation.test.mjs +++ b/packet-preparation.test.mjs @@ -1,6 +1,9 @@ import {test} from 'node:test'; import assert from 'node:assert/strict'; -import {canExpeditePacket,shouldAdvancePacketScan} from './packet-preparation.mjs'; +import {canExpeditePacket,shouldAdvancePacketScan,packetPreparationMode} from './packet-preparation.mjs'; +test('manual packet preparation is independent of listening channel selection',()=>{ + const selected=['7050000-USB','14122000-USB'];assert.equal(packetPreparationMode(selected,'144950000-DATA-FM'),'direct');assert.equal(packetPreparationMode([...selected,'144950000-DATA-FM'],'144950000-DATA-FM'),'scan');assert.deepEqual(selected,['7050000-USB','14122000-USB']); +}); test('a manual packet request may advance the scanner from either HF band while idle',()=>{ const idle={request:{id:'new'},manualRequestId:null,ptt:false,connections:0,radioState:'Free',users:'',lastPtt:0,now:100000}; assert.equal(canExpeditePacket(idle),true);assert.equal(canExpeditePacket({...idle,radioPorts:[4,7],users:'Attached to Port 2/1'}),true);assert.equal(canExpeditePacket({...idle,radioPorts:[4,7],users:'Attached to Port 7/1'}),false);