mbridak / not1mm

Not1MM != N1MM, An amateur radio contest logger for Linux.
GNU General Public License v3.0
93 stars 20 forks source link

Switch to direct hamlib #12

Open darvark opened 1 year ago

darvark commented 1 year ago

Hi, can we switch to use directly hamlib instead of fetching data from third party software like flrig? It should simplify cat communication and can be easily extended to add rotor support. Only cons of such solution is that we have to configure hamlib from not1mm level, but still this would be much closer to n1mm than current solution.

mbridak commented 1 year ago

I'm not opposed to it. I wouldn't do it as a replacement. More like a 3rd option. I personally prefer rigctld. I have it (rigctld) start up as a service in the background and never have to think about it.

darvark commented 1 year ago

Ok, great. I think I can start working on this issue. Eventually we can discuss how I should solve hamlib configuration, should it be new window, textfile, or in current configuration window

mbridak commented 1 year ago

Okay, I made a branch for it.

mbridak commented 1 year ago

All the hamlib specific code should live in cat_interface.py The settings should live in the same dialog as the other CAT settings. I'll figure out the dialog.

mbridak commented 1 year ago

Added initial fields to dialog.

Screenshot from 2023-07-11 15-43-08

hamlib_device QComboBox hamlib_baud QComboBox hamlib_radio QComboBox update_devices QPushButton usehamlib_radioButton QRadioButton

Some more will be needed I assume.

darvark commented 1 year ago

Generally that's all. In case of any custom settings maybe in the future interface can be extended, but for now it's enough.

One additional question. Why do you query PTT status? Is it needed for anything? Python bindings for hamlib has very poor documentation and it simply won't work in some cases (some rigs doesn't provide information about ptt so hamlib can't get that info)

mbridak commented 1 year ago

Setting PTT state is needed for voice keying. Polling PTT was/is used when n1mm radio state packets are sent, and will be used if I get around to so2r stuff.

You can just have it return False if it's not available.

darvark commented 1 year ago

Ok, finally I manage to set and get status of PTT, only setting RF power left. Maybe today I'll push changes as draft for first review (without tests and not aligned to your branch)

darvark commented 1 year ago

Strange, I'm applying your changes from your branch in configuration.ui file, rebuilding with rebuild.sh script, and still I can't see those new controls in configuration window. Am I missing something?

mbridak commented 1 year ago

Hmm that is strange. I haven't hook up the controls to any code yet. No laptop on my vacation. But you should still see them.

On Fri, Jul 21, 2023, 11:47 PM darvark @.***> wrote:

Strange, I'm applying your changes in configuration.ui file, rebuilding with rebuild.sh script, and still I can't see those new controls in configuration window. Am I missing something?

— Reply to this email directly, view it on GitHub https://github.com/mbridak/not1mm/issues/12#issuecomment-1646509034, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALWVLROFRUD2SRAK4K6OETTXRNZPJANCNFSM6AAAAAA2FVT62E . You are receiving this because you were assigned.Message ID: @.***>

mbridak commented 1 year ago

Ah, I think I know why your not seeing it. I think you haven't checked out and applied your changes to the branch created for the issue.

The branch should be called something like 12-switch-to-direct-hamlb

darvark commented 1 year ago

I've made changes on my own branch and then applied your changes to configuration.ui (I've found only those changes in your branch), so still it should be visible since changes were applied to UI file