[Hamlib-developer] How to handle partial functions?
Library to control radio transceivers and receivers
Brought to you by:
n0nb
From: George B. <geo...@gm...> - 2024-09-10 20:40:03
|
I have been working on implementing rig_{get|set}_clock for the Kenwood TS-890S/990S and need some advice on handling a quirk in the way the clock interacts with other functions. The rigs each have two clocks, called the local clock and auxiliary clock (or secondary.) Common practice is to set the local clock to local time and the aux to UTC. Only the local clock is directly settable; it looks like the rig subtracts the local TZ offset to find UTC, then uses the aux offset (in this case zero) to set the aux. Both offsets are settable. The two rigs are network-capable, and when connected they have the option to sync the base clock(UTC) via NTP. When this is enabled the clock setting function is disabled, both by CAT and the menu system; only the offsets can be changed. The problem I have is what to do with the single rig_set_clock() call. I can't set the clock, but I'd like to set the offset (at least twice a year). Do I just fail the whole thing? Do I ignore the clock if all of YMDhms = 0? Set the offset first and bail if clock setting is disabled? And what kind of result/status do I report? Any way to say this worked, but that didn't? Any suggestions or wisdom welcomed, or any guidelines buried in the history of Hamlib. 73 n3gb |