Re: [Hamlib-developer] Pull Request: Restore AI on exit - needs testing
Library to control radio transceivers and receivers
Brought to you by:
n0nb
|
From: Greg T. <gd...@le...> - 2015-12-03 13:39:33
|
Bill Somerville <g4...@cl...> writes:
> Related to this, it occurs to me that there needs to be a way of using
> rigctl to turn on/off AI mode. Obviously with the new restore
> functionality that cannot be done. I can see a "Hamlib" way of doing it
> but it requires a new config token and quite a few code changes to make
> it work for all the rigs that support AI mode. I wondered if, for this
> special case, it might be simpler to use an environment variable to
> disable the AI state restore facility. Something like:
>
> HAMLIB_NO_AI_RESTORE=1 rigctl <options> A ON
Two thoughts:
probably should be a --no-ai-restore option, not an environment
variable
if someone calls 'rigctl do-something', arguably it should just do
that, and not have any save/restore logic. The save/restore notion
would seem to belong in a program that has logic that looks like:
open with request to save/retore persistent flags (just AI for now)
do stuff for a while
close (clean shutdown)
So basically I'm suggesting that save/restore be (possibly default)
behavior for the open/close sequence used by full-blown programs, and be
not the default for bare rigctl usage. rigctl could have options
--no-save-restore
--save-restore
with one of them (I vote for --no) being default.
73 de n1dam
|