Expand description
Transmit confirmation prompt and script-mode gating. Transmit confirmation prompt and script-mode gating.
Every transmit command in the REPL (cq, beacon, position, msg,
echo, link) calls tx_confirm before keying the radio. This
guards blind operators from accidentally transmitting on air by
mistyping an argument or pasting the wrong line at the prompt.
Two global atomic flags steer the prompt behaviour:
CONFIRM_TX(defaulttrue) - require the prompt at all. Turned off globally by--yesorconfirm off.SCRIPT_MODE(defaultfalse) - the REPL is running a non-interactive script (stdin piped or--scriptpassed). In script mode the prompt cannot be answered, so every transmit command aborts with a clear error unless confirmation has been explicitly disabled via--yes.
Statics§
- CONFIRM_
TX - When
true(the default) every transmit command prompts the user before keying the radio. Cleared by--yeson the command line and by the interactiveconfirm offcommand. - SCRIPT_
MODE - When
truethe REPL is running under a script or--scriptfile. Prompts cannot be answered, sotx_confirmprints an error and returnsfalseunlessCONFIRM_TXis also cleared.
Functions§
- is_
required - Whether a transmit confirmation prompt is currently required.
- set_
required - Enable or disable transmit confirmation.
- set_
script_ mode - Mark the REPL as running under a non-interactive script.
- tx_
confirm - Prompt the user to confirm a transmit action.