feat(rigctld): answer lock_mode and stop_morse instead of refusing them
Both are ordinary Hamlib commands, and Nexus sends them around every transmit. Refusing with RPRT -11 is permitted and a tolerant client carries on, but nothing obliges it to — and while they sit in the log as "unimplemented" they stay suspects every time something else goes wrong. get_lock_mode answers 0, which is true: OpsLog never locks the dial against its own clients. set_lock_mode is accepted and ignored, like set_vfo — there is no lock to set, and failing would abort a client's transmit sequence over a setting with no effect either way. stop_morse answers success because nothing is queued here: CW is keyed by the rig's own keyer through the backend, never buffered in this server, so "stopped" is accurate rather than polite. Whether this is what Nexus is actually unhappy about is not established. It removes two known irritants and two lines of noise from the log; if the trouble persists, what remains in the log will be about the trouble.
This commit is contained in:
@@ -276,6 +276,24 @@ func (s *Server) handle(line string) (resp string, quit bool) {
|
||||
return "CHKVFO 0\n", false
|
||||
case "\\get_powerstat", "get_powerstat":
|
||||
return "1\n", false
|
||||
|
||||
// Three commands a client may issue as a matter of course. Refusing them with
|
||||
// RPRT -11 is allowed, and a tolerant client carries on — but nothing obliges
|
||||
// it to, and Nexus sends all three around every transmit. Answering costs
|
||||
// nothing and removes them as suspects when something really is wrong.
|
||||
case "\\get_lock_mode", "get_lock_mode":
|
||||
// Truthful: OpsLog never locks the dial against its own clients.
|
||||
return "0\n", false
|
||||
case "\\set_lock_mode", "set_lock_mode":
|
||||
// Accepted and ignored, like set_vfo below: there is no lock to set, and
|
||||
// failing here would abort a client's whole transmit sequence over a
|
||||
// setting that has no effect either way.
|
||||
return rprt(0), false
|
||||
case "\\stop_morse", "stop_morse":
|
||||
// Nothing is queued here — CW over CAT is keyed by the rig's own keyer
|
||||
// through the backend, not buffered in this server. "Stopped" is therefore
|
||||
// accurate rather than polite.
|
||||
return rprt(0), false
|
||||
case "q", "Q", "\\quit":
|
||||
return "", true
|
||||
|
||||
|
||||
Reference in New Issue
Block a user