mirror of
https://github.com/DJ2LS/FreeDATA
synced 2024-05-14 08:04:33 +00:00
added hamlib windows bin
and smaller adjustements to rigctl path selection
This commit is contained in:
parent
d5ddb95644
commit
d99187837f
|
@ -386,6 +386,11 @@ if __name__ == '__main__':
|
||||||
ARGS = PARSER.parse_args()
|
ARGS = PARSER.parse_args()
|
||||||
PORT = ARGS.socket_port
|
PORT = ARGS.socket_port
|
||||||
HAMLIB_USE_RIGCTL = ARGS.hamlib_use_rigctl
|
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:
|
if HAMLIB_USE_RIGCTL:
|
||||||
structlog.get_logger("structlog").warning("using hamlib rigctl module...")
|
structlog.get_logger("structlog").warning("using hamlib rigctl module...")
|
||||||
hamlib_version = 0
|
hamlib_version = 0
|
||||||
|
|
1
tnc/lib/hamlib/win32/README
Normal file
1
tnc/lib/hamlib/win32/README
Normal file
|
@ -0,0 +1 @@
|
||||||
|
# hamlib win32 4.4
|
BIN
tnc/lib/hamlib/win32/libgcc_s_sjlj-1.dll
Executable file
BIN
tnc/lib/hamlib/win32/libgcc_s_sjlj-1.dll
Executable file
Binary file not shown.
BIN
tnc/lib/hamlib/win32/libhamlib-4.dll
Executable file
BIN
tnc/lib/hamlib/win32/libhamlib-4.dll
Executable file
Binary file not shown.
BIN
tnc/lib/hamlib/win32/libusb-1.0.dll
Normal file
BIN
tnc/lib/hamlib/win32/libusb-1.0.dll
Normal file
Binary file not shown.
BIN
tnc/lib/hamlib/win32/libwinpthread-1.dll
Executable file
BIN
tnc/lib/hamlib/win32/libwinpthread-1.dll
Executable file
Binary file not shown.
BIN
tnc/lib/hamlib/win32/rigctl.exe
Executable file
BIN
tnc/lib/hamlib/win32/rigctl.exe
Executable file
Binary file not shown.
1
tnc/lib/hamlib/win64/README
Normal file
1
tnc/lib/hamlib/win64/README
Normal file
|
@ -0,0 +1 @@
|
||||||
|
# hamlib win64 4.4
|
BIN
tnc/lib/hamlib/win64/libgcc_s_sjlj-1.dll
Executable file
BIN
tnc/lib/hamlib/win64/libgcc_s_sjlj-1.dll
Executable file
Binary file not shown.
BIN
tnc/lib/hamlib/win64/libhamlib-4.dll
Executable file
BIN
tnc/lib/hamlib/win64/libhamlib-4.dll
Executable file
Binary file not shown.
BIN
tnc/lib/hamlib/win64/libusb-1.0.dll
Normal file
BIN
tnc/lib/hamlib/win64/libusb-1.0.dll
Normal file
Binary file not shown.
BIN
tnc/lib/hamlib/win64/libwinpthread-1.dll
Executable file
BIN
tnc/lib/hamlib/win64/libwinpthread-1.dll
Executable file
Binary file not shown.
BIN
tnc/lib/hamlib/win64/rigctl.exe
Executable file
BIN
tnc/lib/hamlib/win64/rigctl.exe
Executable file
Binary file not shown.
|
@ -59,6 +59,10 @@ if __name__ == '__main__':
|
||||||
static.HAMLIB_USE_RIGCTL = ARGS.hamlib_use_rigctl
|
static.HAMLIB_USE_RIGCTL = ARGS.hamlib_use_rigctl
|
||||||
print(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
|
# we need to wait until we got all parameters from argparse first before we can load the other modules
|
||||||
import sock
|
import sock
|
||||||
|
|
||||||
|
|
|
@ -9,6 +9,8 @@
|
||||||
import subprocess
|
import subprocess
|
||||||
import structlog
|
import structlog
|
||||||
import time
|
import time
|
||||||
|
import sys
|
||||||
|
|
||||||
# for rig_model -> rig_number only
|
# for rig_model -> rig_number only
|
||||||
|
|
||||||
|
|
||||||
|
@ -47,10 +49,16 @@ class radio:
|
||||||
else:
|
else:
|
||||||
self.devicenumber = 6 #dummy
|
self.devicenumber = 6 #dummy
|
||||||
structlog.get_logger("structlog").warning("[TNC] RADIO NOT FOUND USING DUMMY!", error=e)
|
structlog.get_logger("structlog").warning("[TNC] RADIO NOT FOUND USING DUMMY!", error=e)
|
||||||
|
|
||||||
|
|
||||||
print(self.devicenumber, self.deviceport, self.serialspeed)
|
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
|
# eseguo semplicemente rigctl con il solo comando T 1 o T 0 per
|
||||||
# il set e t per il get
|
# il set e t per il get
|
||||||
|
|
Loading…
Reference in a new issue