File: quisk_conf_kx3.py

package info (click to toggle)
quisk 4.2.32-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 3,064 kB
  • sloc: python: 22,219; ansic: 19,027; makefile: 38; sh: 2
file content (37 lines) | stat: -rwxr-xr-x 1,353 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
from __future__ import absolute_import
# Please do not change this configuration file for Quisk.  Copy it to
# your own config file and make changes there.
#
# This config file is for hamlib control of a KX3 through hamlib, with Quisk
# acting as a panadapter.  The daemon rigctld must be running.  The open() method
# below tries to start it, or you can start it by hand.

import sys, os

if sys.platform == "win32":
  name_of_sound_capt = 'Primary'
  name_of_sound_play = 'Primary'
  latency_millisecs = 150
  data_poll_usec = 20000
else:
  name_of_sound_capt = 'hw:0'
  name_of_sound_play = 'hw:0'
  latency_millisecs = 150
  data_poll_usec = 5000

# Use the hamlib hardware module to talk to the KX3
from quisk_hardware_hamlib import Hardware as BaseHardware

class Hardware(BaseHardware):
  def __init__(self, app, conf):
    BaseHardware.__init__(self, app, conf)
    # Change the port and timing parameters here:
    # self.hamlib_rigctld_port = 4532		# Standard rigctld control port
    # self.hamlib_poll_seconds = 0.2		# Time interval to poll for changes
  def open(self):
    ret = BaseHardware.open(self)
    if not self.hamlib_connected:	# rigctld is not started.  Try to start it.
      os.system("rigctld -m 229 -r /dev/ttyUSB0 -s 4800 & ")	# Check the baud rate menu setting
      # If this fails, start rigctld by hand.
    return ret