Skip to content

Commit 1e9717b

Browse files
committed
Config change; quick dac display
1 parent 19cd6df commit 1e9717b

File tree

3 files changed

+23
-3
lines changed

3 files changed

+23
-3
lines changed

cli/ppmac_plugin.py

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ class PpmacCore(Configurable):
8686
instance = None
8787

8888
ide_host = traitlets.Unicode('10.0.0.6', config=True)
89-
host = traitlets.Unicode('10.0.0.98', config=True)
89+
host = traitlets.Unicode('10.3.2.115', config=True)
9090
port = traitlets.Int(22, config=True)
9191
user = traitlets.Unicode('root', config=True)
9292
password = traitlets.Unicode('deltatau', config=True)
@@ -203,6 +203,8 @@ def connect(self, host=None, port=None, user=None, password=None):
203203
self.completer = None
204204
self.open_completer_db()
205205

206+
self.shell.user_ns['conn'] = self.comm.gpascii
207+
206208
def check_comm(self):
207209
if self.comm is None:
208210
if self.auto_connect:
@@ -1530,6 +1532,24 @@ def clock(self, magic_self, arg):
15301532
if not args.accept:
15311533
print('--- dry run ---')
15321534

1535+
@magic_arguments()
1536+
@argument('device', type=str,
1537+
help='')
1538+
@argument('channels', type=int,
1539+
help='')
1540+
@argument('dacs', type=int,
1541+
help='')
1542+
def dac(self, magic_self, arg):
1543+
args = parse_argstring(self.dac, arg)
1544+
1545+
if not args or not self.check_comm():
1546+
return
1547+
1548+
for chan in range(args.channels):
1549+
for dac in range(args.dacs):
1550+
dac_chan = '%s.Chan[%d].Dac[%d]' % (args.device, chan, dac)
1551+
self.get_verbose(dac_chan)
1552+
15331553

15341554
@PpmacExport
15351555
def create_util_makefile(source_files, output_name):

misc/pos

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
python position_gui.py 1 6 -f %.4f -r 0.05 -t &
1+
python position_gui.py 3 5 -f %.4f -r 0.05 -t &
22
PID1=$!
33

44
python position_gui.py 11 12 -f %.4f -r 0.05 -t &

misc/position_gui.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
sys.path.insert(0, os.path.join(MODULE_PATH, '..'))
2323
from ppmac import pp_comm
2424

25-
PPMAC_HOST = os.environ.get('PPMAC_HOST', '10.0.0.98')
25+
PPMAC_HOST = os.environ.get('PPMAC_HOST', '10.3.2.115')
2626
PPMAC_PORT = int(os.environ.get('PPMAC_PORT', '22'))
2727
PPMAC_USER = os.environ.get('PPMAC_USER', 'root')
2828
PPMAC_PASS = os.environ.get('PPMAC_PASS', 'deltatau')

0 commit comments

Comments
 (0)