From 268ab64940e6dc4ca05ecf31957c665bacb3dcc5 Mon Sep 17 00:00:00 2001 From: Dan White Date: Wed, 17 Oct 2012 16:03:53 -0500 Subject: [PATCH] devboard is now a module, act accordingly --- python-lib/calibrate.py | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/python-lib/calibrate.py b/python-lib/calibrate.py index 4bf8ab3..8ea42f3 100644 --- a/python-lib/calibrate.py +++ b/python-lib/calibrate.py @@ -1,5 +1,5 @@ -from pprint import pprint +from time import sleep from termplotter import TermPlotter @@ -7,6 +7,23 @@ tplot = TermPlotter([-2**11, 2**11], width=80) tpx = TermPlotter([-128, 127], width=80) + +# devboard is assumed to be imported as: +# +# import devboard as dev +# +# and already initialized/setup to the desired state +# + +#helpers +chain = dev.chain +mux = dev.mux +arb = dev.arb +amux = dev.amux +adc = dev.adc +dac = dev.dac + + def bisect(fset, limits=[0.0, 1.0], dgmin=None, up='uk', down='dj'): """Given a one-input function fset and list of limits, interactively bisect the range by sending fset(guess) and asking to go (u)p or (d)own for the -- 2.25.1