added hamlib windows bin

and smaller adjustements to rigctl path selection
This commit is contained in:
dj2ls 2022-01-07 17:42:11 +01:00
parent d5ddb95644
commit d99187837f
15 changed files with 22 additions and 3 deletions

View file

@ -386,6 +386,11 @@ if __name__ == '__main__':
ARGS = PARSER.parse_args()
PORT = ARGS.socket_port
HAMLIB_USE_RIGCTL = ARGS.hamlib_use_rigctl
# force use of rigctl when on windows
if sys.platform == 'win32' or sys.platform == 'win64':
HAMLIB_USE_RIGCTL = True
if HAMLIB_USE_RIGCTL:
structlog.get_logger("structlog").warning("using hamlib rigctl module...")
hamlib_version = 0

View file

@ -0,0 +1 @@
# hamlib win32 4.4

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
tnc/lib/hamlib/win32/rigctl.exe Executable file

Binary file not shown.

View file

@ -0,0 +1 @@
# hamlib win64 4.4

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
tnc/lib/hamlib/win64/rigctl.exe Executable file

Binary file not shown.

View file

@ -59,6 +59,10 @@ if __name__ == '__main__':
static.HAMLIB_USE_RIGCTL = ARGS.hamlib_use_rigctl
print(ARGS.hamlib_use_rigctl)
# force use of rigctl when on windows
if sys.platform == 'win32' or sys.platform == 'win64':
HAMLIB_USE_RIGCTL = True
# we need to wait until we got all parameters from argparse first before we can load the other modules
import sock

View file

@ -9,6 +9,8 @@
import subprocess
import structlog
import time
import sys
# for rig_model -> rig_number only
@ -47,10 +49,16 @@ class radio:
else:
self.devicenumber = 6 #dummy
structlog.get_logger("structlog").warning("[TNC] RADIO NOT FOUND USING DUMMY!", error=e)
print(self.devicenumber, self.deviceport, self.serialspeed)
self.cmd = 'rigctl -m %d -r %s -s %d ' % (int(self.devicenumber), self.deviceport, int(self.serialspeed))
# select precompiled executable for win32/win64 rigctl
# this is really a hack...somewhen we need a native hamlib integration for windows
if sys.platform == 'win32' or sys.platform == 'win64':
self.cmd = 'lib\\hamlib\\'+sys.platform+'\\rigctl -m %d -r %s -s %d ' % (int(self.devicenumber), self.deviceport, int(self.serialspeed))
else:
self.cmd = 'rigctl -m %d -r %s -s %d ' % (int(self.devicenumber), self.deviceport, int(self.serialspeed))
# eseguo semplicemente rigctl con il solo comando T 1 o T 0 per
# il set e t per il get