]> git.rkrishnan.org Git - dttsp.git/blob - pyhw2/hw2.py
add a readme
[dttsp.git] / pyhw2 / hw2.py
1 #/usr/bin/env python
2
3 import sys
4 from sdr1khw import *
5
6 FALSE = 0
7 TRUE = 1
8
9 openPort("/dev/parport0")
10 DttSP_SampleRate = 48000.0
11
12 setRFE_Enabled(TRUE)
13 ResetRFE()
14 setXVTR_Enabled(FALSE)
15 setExtended(FALSE)
16 setXVTR_TR_Relay(FALSE)
17 setBandRelay(bs0)
18
19 Init()
20
21 setVFOOffset(0.0)
22 setATTN_Relay(TRUE)
23 setTransmitRelay(FALSE)
24 setGainRelay(TRUE)
25 setSpurReduction(FALSE)
26 setExternalOutput(FALSE)
27 setDDSClockCorrection(0.0)
28 setDDSFreq(13.845)
29 setMuteRelay(FALSE)
30
31 print "Ready"
32
33 cmd = sys.stdin.readline()
34 while not cmd == '':
35     res = eval(cmd)
36     print res
37     cmd = sys.stdin.readline()
38
39 closePort()