Quisk version 4.2.39
This commit is contained in:
@@ -1,3 +1,10 @@
|
|||||||
|
Quisk Version 4.2.39 October 2024
|
||||||
|
==================================
|
||||||
|
I added an optional Hardware method PollGuiControl(self). If you define this in your Hardware file,
|
||||||
|
the GUI thread will call it frequently. It can be used to set PTT from your hardware.
|
||||||
|
|
||||||
|
I am trying to work around a wxPython quirk that causes mouse wheel tuning to fail. Please test.
|
||||||
|
|
||||||
Quisk Version 4.2.38 September 2024
|
Quisk Version 4.2.38 September 2024
|
||||||
====================================
|
====================================
|
||||||
This is a bugfix release. I fixed a bug in the Hamlib serial port when using a physical TTY instead
|
This is a bugfix release. I fixed a bug in the Hamlib serial port when using a physical TTY instead
|
||||||
|
|||||||
+1
-1
@@ -1,2 +1,2 @@
|
|||||||
#Quisk version 4.2.38
|
#Quisk version 4.2.39
|
||||||
from .quisk import main
|
from .quisk import main
|
||||||
|
|||||||
@@ -91,6 +91,8 @@ class Hardware(BaseHardware):
|
|||||||
conf.si570_direct_control = False
|
conf.si570_direct_control = False
|
||||||
conf.si570_xtal_freq = 114285000
|
conf.si570_xtal_freq = 114285000
|
||||||
conf.repeater_delay = 0.25
|
conf.repeater_delay = 0.25
|
||||||
|
self.ptt_count = 200
|
||||||
|
self.ptt_on = 0
|
||||||
BaseHardware.__init__(self, app, conf)
|
BaseHardware.__init__(self, app, conf)
|
||||||
QS.set_sparams(multus_cw_samples=1)
|
QS.set_sparams(multus_cw_samples=1)
|
||||||
self.use_softrock = True
|
self.use_softrock = True
|
||||||
@@ -104,6 +106,13 @@ class Hardware(BaseHardware):
|
|||||||
self.usb_dev.ctrl_transfer(OUT, address, self.si570_i2c_address + 0x700, 0, message)
|
self.usb_dev.ctrl_transfer(OUT, address, self.si570_i2c_address + 0x700, 0, message)
|
||||||
if DEBUG:
|
if DEBUG:
|
||||||
print ("USB send to 0x%X" % address, message)
|
print ("USB send to 0x%X" % address, message)
|
||||||
|
def TransferIn(self, address, length):
|
||||||
|
if self.usb_dev:
|
||||||
|
recv = self.usb_dev.ctrl_transfer(IN, address, self.si570_i2c_address + 0x700, 0, length)
|
||||||
|
if DEBUG:
|
||||||
|
print ("USB receive from 0x%X" % address, recv)
|
||||||
|
return recv
|
||||||
|
return None
|
||||||
def open(self):
|
def open(self):
|
||||||
text = BaseHardware.open(self)
|
text = BaseHardware.open(self)
|
||||||
self.InitKeyer()
|
self.InitKeyer()
|
||||||
@@ -120,8 +129,20 @@ class Hardware(BaseHardware):
|
|||||||
print ("Mode is not CW")
|
print ("Mode is not CW")
|
||||||
self.TransferOut(0x70, cw_mode)
|
self.TransferOut(0x70, cw_mode)
|
||||||
return ret
|
return ret
|
||||||
def PollCwKey(self): # Called frequently by Quisk to check the CW key status
|
def PollCwKey(self): # Called frequently from the sound thread to check the CW key status
|
||||||
return # Quisk is always in Rx
|
return # Quisk is always in Rx
|
||||||
|
def PollGuiControl(self): # Called frequently from the GUI thread
|
||||||
|
self.ptt_count -= 1
|
||||||
|
if self.ptt_count <= 0:
|
||||||
|
self.ptt_count = 200
|
||||||
|
reply = self.TransferIn(0xA5, 1)
|
||||||
|
if DEBUG:
|
||||||
|
print ("PollGuiControl got", reply)
|
||||||
|
if reply:
|
||||||
|
ptt = reply[0] # This is 255 for error
|
||||||
|
if ptt in (0, 1) and ptt != self.ptt_on:
|
||||||
|
self.ptt_on = ptt
|
||||||
|
self.application.pttButton.SetValue(ptt, True)
|
||||||
def InitKeyer(self):
|
def InitKeyer(self):
|
||||||
# Initialize the keyer parameters
|
# Initialize the keyer parameters
|
||||||
conf = self.conf
|
conf = self.conf
|
||||||
|
|||||||
@@ -2123,7 +2123,7 @@ class GraphScreen(wx.Window):
|
|||||||
"""For mouse clicks in our display, translate to our screen coordinates."""
|
"""For mouse clicks in our display, translate to our screen coordinates."""
|
||||||
mouse_x, mouse_y = event.GetPosition()
|
mouse_x, mouse_y = event.GetPosition()
|
||||||
win = event.GetEventObject()
|
win = event.GetEventObject()
|
||||||
if win is not self:
|
if win and win is not self:
|
||||||
x, y = win.GetPosition().Get()
|
x, y = win.GetPosition().Get()
|
||||||
mouse_x += x
|
mouse_x += x
|
||||||
mouse_y += y
|
mouse_y += y
|
||||||
@@ -3524,6 +3524,7 @@ class App(wx.App):
|
|||||||
if not os.path.isdir(self.QuiskFilesDir):
|
if not os.path.isdir(self.QuiskFilesDir):
|
||||||
self.QuiskFilesDir = DefaultConfigDir
|
self.QuiskFilesDir = DefaultConfigDir
|
||||||
self.std_out_err = StdOutput(self)
|
self.std_out_err = StdOutput(self)
|
||||||
|
self.std_out_err.Logfile("WxPython " + wx.version())
|
||||||
QS.set_params(quisk_is_vna=0) # We are not the VNA program
|
QS.set_params(quisk_is_vna=0) # We are not the VNA program
|
||||||
# Read in configuration from the selected radio
|
# Read in configuration from the selected radio
|
||||||
self.BandPlan = []
|
self.BandPlan = []
|
||||||
@@ -3614,6 +3615,7 @@ class App(wx.App):
|
|||||||
setattr(conf, 'widgets_file_name', '')
|
setattr(conf, 'widgets_file_name', '')
|
||||||
Hardware = self.Hardware
|
Hardware = self.Hardware
|
||||||
self.use_fast_heart_beat = hasattr(Hardware, "FastHeartBeat")
|
self.use_fast_heart_beat = hasattr(Hardware, "FastHeartBeat")
|
||||||
|
self.poll_gui_control = hasattr(Hardware, "PollGuiControl")
|
||||||
# Initialization - may be over-written by persistent state
|
# Initialization - may be over-written by persistent state
|
||||||
self.local_conf.Initialize()
|
self.local_conf.Initialize()
|
||||||
self.clip_time0 = 0 # timer to display a CLIP message on ADC overflow
|
self.clip_time0 = 0 # timer to display a CLIP message on ADC overflow
|
||||||
@@ -6455,6 +6457,8 @@ class App(wx.App):
|
|||||||
self.hamlib_com2_handler.Process()
|
self.hamlib_com2_handler.Process()
|
||||||
if self.use_fast_heart_beat:
|
if self.use_fast_heart_beat:
|
||||||
Hardware.FastHeartBeat()
|
Hardware.FastHeartBeat()
|
||||||
|
if self.poll_gui_control:
|
||||||
|
Hardware.PollGuiControl()
|
||||||
if conf.do_repeater_offset:
|
if conf.do_repeater_offset:
|
||||||
hold = QS.tx_hold_state(-1)
|
hold = QS.tx_hold_state(-1)
|
||||||
if hold == 2: # Tx is being held for an FM repeater TX frequency shift
|
if hold == 2: # Tx is being held for an FM repeater TX frequency shift
|
||||||
|
|||||||
@@ -120,6 +120,8 @@ class Hardware:
|
|||||||
self.application.bandscope_clock = clock
|
self.application.bandscope_clock = clock
|
||||||
#def PollCwKey(self): # Optional. Called frequently by the sound thread to check the CW key status.
|
#def PollCwKey(self): # Optional. Called frequently by the sound thread to check the CW key status.
|
||||||
# pass # Do not define if not needed.
|
# pass # Do not define if not needed.
|
||||||
|
#def PollGuiControl(self): # Optional. Called frequently by the GUI thread to change GUI settings (PTT etc.)
|
||||||
|
# pass # Do not define if not needed.
|
||||||
def StartSamples(self): # Quisk calls this from the sound thread to start sending samples.
|
def StartSamples(self): # Quisk calls this from the sound thread to start sending samples.
|
||||||
# If you return a string, it replaces the string returned from hardware open()
|
# If you return a string, it replaces the string returned from hardware open()
|
||||||
pass
|
pass
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import os
|
|||||||
# You must define the version here. A title string including
|
# You must define the version here. A title string including
|
||||||
# the version will be written to __init__.py and read by quisk.py.
|
# the version will be written to __init__.py and read by quisk.py.
|
||||||
|
|
||||||
Version = '4.2.38'
|
Version = '4.2.39'
|
||||||
|
|
||||||
fp = open("__init__.py", "w") # write title string
|
fp = open("__init__.py", "w") # write title string
|
||||||
fp.write("#Quisk version %s\n" % Version)
|
fp.write("#Quisk version %s\n" % Version)
|
||||||
|
|||||||
Reference in New Issue
Block a user