From: Dan White Date: Wed, 17 Oct 2012 21:03:53 +0000 (-0500) Subject: devboard is now a module, act accordingly X-Git-Tag: bootrom-initial-submission~58 X-Git-Url: http://git.whiteaudio.com/gitweb/?a=commitdiff_plain;h=268ab64940e6dc4ca05ecf31957c665bacb3dcc5;p=430.git devboard is now a module, act accordingly --- 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