la5nta / wl2k-go

A Winlink framework for Go.
https://getpat.io
MIT License
50 stars 20 forks source link

Fix VFOMode to check for correct response #87

Closed larsks closed 9 months ago

larsks commented 9 months ago

Previous, VFOMode() was expecting the response CHKVFO 1 from rigctld when running in VFO mode, but in fact rigctld responds with the string 1:

$ nc localhost 4532
\chk_vfo
1

Closes la5nta/pat#427

larsks commented 9 months ago

If we do strings.TrimPrefix(resp, "CHKVFO") == "1" instead, it will work in both cases. Do you mind updating the PR?

Sounds good. I'm happy to update the PR.

We should probably trace down the change in hamlib and check if this is a bug or an intended API change. Maybe they've done similar changes we should take into account as well.

It looks like it changed in https://github.com/Hamlib/Hamlib/commit/44a20c6a1e66b8f73fbc7e200f547702e32f9559, without explanation, in Sept 2019.