ok2cqr / cqrlog

Linux logging program for amateur radio operators
https://www.cqrlog.com
GNU General Public License v2.0
129 stars 54 forks source link

Fix for rig settings #544

Closed OH1KH closed 1 year ago

OH1KH commented 1 year ago
-Added support for user defined amount of rigs (1-6). Max number of rigs
 is easy to change later, but who needs even six rig definitions?
 Should be enough!
 Change tries to have backward compatibility as much as possible.
 In testing between legacy two radio system cqrlog and new one
 I have not found serious problems. When running both mixed it
 usually needs some checking of TRX,CWkeyer and modes when jumping
 between new and old cqrlog version using same log.

-fixed CWkeyer setup so that every rig can have different keyer setup
 - fixed broken "use potentiometer speed" with winkeyer

-fixed modes/bandwidth setting so that every rig can have own bandwidth
 settings.
 - fixed RTTY to be named as DATA that fits better to modern modes. 
User can define what mode (in log) is the favorite mode and what CAT command should be sent to rig when that
DATA mode is selected (PKTUSB, USB, 
DATA etc.. depending on rig model) User defined DATA mod is now called DATA also in 
preferences/bands/frequencies.
Definition can be set also backwards: certain mode read from rig sets defined 
logging mode. How ever this can have some unwanted effects, specially if working DATA uses USB/LSB as CAT 
command while using also phone as USB/LSB

Now effects also when double click DXCluster spot that is within DATA definition: Rig will be set for user defined 
mode instead of old RTTY mode and coloring of spot line is set against defined DATA mode qsos found in log.

For backward compatibility default mode is RTTY and cat command is RTTY Also configuration settings used for 
DATA is legacy named: RTTY

 -fixed help files

I have used this version now few months with my setup: IC7300, IC706, Hamlib dummy (as I do not have more rigs!)

I believe most bugs are cleaned, but time will show what will be found when more users are using this code.

Squashed commit of the following:

commit 4f59d7e6c45a9637fb8cfe191ef610016c36e545 Author: OH1KH oh1kh@sral.fi Date: Mon Nov 28 09:08:38 2022 +0200

Set Version date

commit 46d4240d82d086c51500499346c00c7c1f6e5028 Author: OH1KH oh1kh@sral.fi Date: Tue Oct 25 19:50:16 2022 +0300

Fixed TRXControl USR buttons text loading. Fixed CWkeyer: do not reset keyer checbox

commit e63e8e1109a9d736275082281bf97abb3608b11d Author: OH1KH oh1kh@sral.fi Date: Fri Oct 21 16:13:40 2022 +0300

Fixed 'use Potentiometer CW speed' with Winkeyer (and tested) in NewQSO, Contest, CWtype and CW keys

commit 25a8ec3f3932e5d65287bbee1e6d6276c50ad9b4 Author: OH1KH oh1kh@sral.fi Date: Thu Oct 20 14:22:18 2022 +0300

Fixed winkey poti speed select

commit 8def318afad6bf103bdd36169e2f51054355f767 Author: OH1KH oh1kh@sral.fi Date: Tue Oct 18 10:52:52 2022 +0300

Fixed some RTTY text to DATA

commit df0dff35d96c5929dc463b319faf3c2405e41aff Author: OH1KH oh1kh@sral.fi Date: Thu Sep 15 13:22:16 2022 +0300

fixes when rig is 'None'

commit e2f5ca64a9e9a7b549c22a233ae405fecb46b287 Author: OH1KH oh1kh@sral.fi Date: Thu Sep 15 10:25:13 2022 +0300

Small fix to help

commit aa86ada4d5b929c76548176178d3168bbe481d59 Author: OH1KH oh1kh@sral.fi Date: Thu Sep 15 10:15:35 2022 +0300

Fixed preferences.lfm cleanup

commit b7a6b918ee50d45d75db07a59d2ebf96ca030150 Author: OH1KH oh1kh@sral.fi Date: Thu Sep 15 09:52:16 2022 +0300

cleaned preferences.lfm

commit d27f7727cc84942eb689d88bde7a0a807497b763 Author: OH1KH oh1kh@sral.fi Date: Wed Sep 14 18:31:39 2022 +0300

Fixed some help files

commit 9ef0a20b846d4941abf177fabfc1b96b504d70a3 Author: OH1KH oh1kh@sral.fi Date: Tue Sep 13 12:13:13 2022 +0300

Changed 'modes/data mode' edit to mode selector. exit from user digital modes will update selector.

commit a29e38cbdcc6fda06bed180dff260adeb740520e Author: OH1KH oh1kh@sral.fi Date: Mon Sep 12 19:11:25 2022 +0300

prefereneces fix. Help image refresh. ToDO: help text fix

commit 35b878af5192dfb733d6f3cfd6bc8de5047029b2 Author: OH1KH oh1kh@sral.fi Date: Mon Sep 12 15:53:48 2022 +0300

Fixed localconf bug, fixed Cw init, fixed winkeyer use pot speed, fixed WPN display now 0WPM when no key, -1WPM if winkey poti used

commit b756151a6b126085a05f6cb3152937b79bfc8f85 Author: OH1KH oh1kh@sral.fi Date: Mon Sep 12 13:11:49 2022 +0300

TRX cmb works  now. Todo : set selected modes and keyer visible on init

commit f9f4a4369d9bb62323e66d019ee15ac060d4c58f Author: OH1KH oh1kh@sral.fi Date: Fri Sep 9 16:29:53 2022 +0300

Now preferences nearly works. Just TRX cmb loses its text (why)

commit 934694ea63984038f812206b6d23b21f7d7222c3 Author: OH1KH oh1kh@sral.fi Date: Fri Sep 9 13:33:02 2022 +0300

added cw setup in pref. Whole setup is still broken...AHhhhhhh

commit 1553f48abb831695eb1736cd2a7993e3aac737a4 Author: OH1KH oh1kh@sral.fi Date: Thu Sep 8 12:49:22 2022 +0300

CWkeyer selection fixed. Not tested at all yet

commit 7631a8eed152e4aeb348f9b3b63df20af379fb74 Author: OH1KH oh1kh@sral.fi Date: Thu Sep 8 11:37:03 2022 +0300

CW interface layout fix

commit 3d0ea64f5df36bf0e4fe802e6fe56760a8378608 Author: OH1KH oh1kh@sral.fi Date: Wed Sep 7 13:04:48 2022 +0300

fixed powerbuttons, initial powerON checkbox usage, preferences loading

commit 5fbd310db3b86215651e3392ba6fb319664662d6 Author: OH1KH oh1kh@sral.fi Date: Wed Sep 7 11:51:30 2022 +0300

fixed errors in preferences/trxcontrol&modes

commit 9cec1355498a2bf3a5a3ad6755ee87a4eb50093a Author: OH1KH oh1kh@sral.fi Date: Tue Sep 6 20:26:51 2022 +0300

fixed local storage. TODO rig naming in selector does not work

commit 63dac701a59de76f4ae1a665cfe2e6216b4b4f5b Author: OH1KH oh1kh@sral.fi Date: Tue Sep 6 12:55:56 2022 +0300

added adjustable rig count 1-6. Needs testing still

commit 5d599f358f10b8194126cc1d5b4e9ecc386a673c Author: OH1KH oh1kh@sral.fi Date: Sun Sep 4 21:22:21 2022 +0300

fixed rig selections, not tested yet!

commit 058b183166ea3728dfa5d8b3317e4bcbb2f68de0 Author: OH1KH oh1kh@sral.fi Date: Sat Sep 3 12:23:47 2022 +0300

fixed rig selection a bit, still needs work

commit c079448a1be01cc8faa5fc81f53ccf72b1c59ac0 Author: OH1KH oh1kh@sral.fi Date: Fri Sep 2 17:01:00 2022 +0300

rtty/datamode change done. Still completely untested. Compiles ok.

commit d5e27773bb0ed541d9885f576f9f2597e98f4ebe Author: OH1KH oh1kh@sral.fi Date: Wed Aug 31 15:41:25 2022 +0300

done some modes usage. todo:Test dxspt click and mode set. Part of rtty/datamode change done. Todo:finish it

commit 89a8eee812ee4426e1bb234f38d696fea71e2fe5 Author: OH1KH oh1kh@sral.fi Date: Tue Aug 30 16:22:44 2022 +0300

Added preferences/TRXControl/Rig Power ON checkbox. If rig supports power cat commands and checked will send PowerON cmd to rig at initialize phase.

commit 374624a03bf7a9dd1b067063fa510c95610fb3a0 Author: OH1KH oh1kh@sral.fi Date: Sun Aug 28 17:05:57 2022 +0300

added 3-6 to config storage TRX and BAND. NOT tested yet

commit d4b5189aa78a486a0e279cd2f309d99b5375bdbe Author: OH1KH oh1kh@sral.fi Date: Fri Aug 26 21:25:09 2022 +0300

fixed spinedt width.Todo: modes usage in other units, add Data mode code

commit 64146a66c17f89803de4e0d1b5dd29d64956a576 Author: OH1KH oh1kh@sral.fi Date: Fri Aug 26 12:03:50 2022 +0300

fixed modes preferences.Todo: fix spinedt width, modes to other units, add data mode code

commit 1814733715c10505ed5592154ebf290f3efd4fda Author: OH1KH oh1kh@sral.fi Date: Thu Aug 25 13:11:13 2022 +0300

Empty rig model will erase whole TRXnr section

commit a1662e24845ed66247aeffc625be8b00703d1e78 Author: OH1KH oh1kh@sral.fi Date: Thu Aug 25 10:54:40 2022 +0300

TRXcontrol rig change works

commit a25ddbe0f47087db9914d33e267bef250d6de113 Author: OH1KH oh1kh@sral.fi Date: Tue Aug 23 20:12:47 2022 +0300

Tabulation orders

commit 011fa17faf0a7b8cb9fa2810b91933729e11ec94 Author: OH1KH oh1kh@sral.fi Date: Tue Aug 23 19:45:17 2022 +0300

Load and save works

commit 8c53ab313a8a4783c5e6facea3f918bda820c6bb Author: OH1KH oh1kh@sral.fi Date: Tue Aug 23 19:05:40 2022 +0300

added TRX(nr) Load and Save

commit baaeb011748b7125ab4a6c6fbf6a4766f467a89e Author: OH1KH oh1kh@sral.fi Date: Tue Aug 23 15:50:04 2022 +0300

Remove rig tabs and insert rig number combo box, continue from fromShow/loadrig
OH1KH commented 1 year ago

One user reported mysterious bug: When starting Cqrlog it does not initialize rig. That was true, I could reproduce that.

It happens when TRXControl window does not open during start. Then rig init fails. If TRXCwindow was open previously, and so opens during startup, rig is initialized.

Bug lays on dData.pas: procedure TdmData.OpenDatabase(nr : Word); where Cqrlog tries to initialize rig first time. It calls frmTRXControl.InitializeRig; There it does not get rig model and exits. When the same procedure frmTRXControl.InitializeRig is called again when TRXControl window opens a bit later it gets the rig model !!! But if TRXControl window is not opened at all in startup rig stays uninitialized.

I can put a breakpoint there and see that initializerig procedure is really run at first time, but when I put a writeln command there it does not appear ever! But when initializerig is called again during TRXControl window open then also the writeln works!

Why?

When I did run this "fix4rigs" (outside lazarus-ide) it worked ok for me. Even when TRXControl window stayed closed. On the other hand my Alpha test soure that includes same "fix4rigs" patch did not work(outside lazarus-ide).

It might be some kind of time critical moment when database just opens.

This needs investigation now and I will close this pull request until I know the reason (or create a workaround if no proper reason is not found).