-
Notifications
You must be signed in to change notification settings - Fork 32
Fix problems when HAMLIB_KEYER is set, but rig control is disabled #494
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
|
Also, in the HAMLIB_KEYER + Lines 952 to 956 in e3b7cb8
|
|
There were more problems (PgUp would crash tlf), so I updated the PR and also included the 2s->1s change I proposed in the 2nd comment above. |
|
I believe the reason behind that "Radio control disabled - no keying" message is that with other keying modes (net, serial) it's still possible to use TLF with somewhat reduced functionality, but still with normal keying. For hamlib keying it is not the case hence the user is warned not to expect it. |
I see it the other way round: The assert() should make sure we used the functions correctly - calling rig_has_stop_morse () and rig_stop_morse() only after we make sure that it is supported (via init_tlf_rig() ). The fix should be to call that function only it rig control is enabled in hamlib_keyer_stop(). I think the same goes for hamlib_keyer_send() . |
Yes, it was the intention to tell the user about an possible configuration error - requiring HAMLIB_KEYER but disabling rig control. |
dl1jbe
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As discussed please keep the content of sendqrg.c
|
sendqrg.c was the first bit I changed, and only later added the if(trx_control) protection to the functions. I had not realized that the 2nd change actually made the 1st redundant. Thanks for spotting! Updated patch pushed. |
When HAMLIB_KEYER is set, but rig control and keying is disabled via `tlf -r`, hitting ESC will trip the assert(init_called) in rig_has_stop_morse. Protect the hamlib_keyer_* functions against being called in that mode. In passing, decrease the timeout after showing the "keying disabled" message to 1s.
When HAMLIB_KEYER is set, but rig control and keying is disabled via
tlf -r, hitting ESC will trip the assert(init_called) in rig_has_stop_morse. Since init_tlf_rig is called early in main(), it seems unlikely that this assert would ever find an actual bug, so just remove it (along with the init_called variable).