Compare commits
No commits in common. "c81bb3cdb812ee890b8bc93b5bed5df40a259752" and "90d5d885a311f00db2629a8fa8ad78e871012977" have entirely different histories.
c81bb3cdb8
...
90d5d885a3
3 changed files with 21 additions and 11 deletions
|
|
@ -633,6 +633,7 @@ def init_irena(scope, name="xRENA", prod=None, options="", long_options=[]):
|
|||
else:
|
||||
_ifc_uart = uartterm.init_uart(scope=scope, prefix="serial_", dname=name, addr=v, isp=False)
|
||||
_ifc_uart._shell_scope = scope
|
||||
_ifc_uart.uart.wait_for_message(b"Altera")
|
||||
if o in "-N --network":
|
||||
import udpterm
|
||||
_ifc = udpterm.init_udp(scope=scope, dname=name, addr=v)
|
||||
|
|
@ -647,7 +648,7 @@ def init_irena(scope, name="xRENA", prod=None, options="", long_options=[]):
|
|||
vvv=vv.split(".")
|
||||
bus = int(vvv[0]) if vvv[0] else None
|
||||
address = int(vvv[1]) if len(vvv)>1 and vvv[1] else None
|
||||
if _ifc_uart:
|
||||
if bus and _ifc_uart:
|
||||
address = _ifc_uart.uart.wait_for_usb()
|
||||
_ifc = usbterm.init_usb(scope=scope, dname=name,
|
||||
prod=prod, bus=bus, address=address)
|
||||
|
|
@ -657,8 +658,6 @@ def init_irena(scope, name="xRENA", prod=None, options="", long_options=[]):
|
|||
|
||||
if not _ifc:
|
||||
import usbterm
|
||||
if _ifc_uart:
|
||||
_ifc_uart.uart.wait_for_usb()
|
||||
_ifc = usbterm.init_usb(scope, dname=name, prod=prod)
|
||||
|
||||
set_prompt(_ifc._prompt)
|
||||
|
|
|
|||
17
dorn.py
Normal file → Executable file
17
dorn.py
Normal file → Executable file
|
|
@ -40,6 +40,21 @@ l2_set6 = (
|
|||
(7, 1125, -1888),
|
||||
)
|
||||
|
||||
l2cal = [
|
||||
[
|
||||
0.99964,
|
||||
None,
|
||||
0.99117,
|
||||
None,
|
||||
None, None, None, None,
|
||||
1.00178,
|
||||
None, None, None,
|
||||
None, None, None, None,
|
||||
],
|
||||
[], [], [],
|
||||
]
|
||||
|
||||
|
||||
def calib_l2(cal, l2_set6):
|
||||
if cal is None:
|
||||
return coeff
|
||||
|
|
@ -87,7 +102,7 @@ def l3banana(
|
|||
p2 = 12737,
|
||||
p3 = -3698 ):
|
||||
for sl in AHEPAM_CONFIG.slices:
|
||||
for ch in range(AHEPAM_CONFIG.n_channels):
|
||||
for ch in range(12):
|
||||
write_l3(sl, ch, p0, p1, p2, p3)
|
||||
|
||||
def c16log2(A):
|
||||
|
|
|
|||
10
uartterm.py
10
uartterm.py
|
|
@ -874,6 +874,7 @@ class irena_uart(irena_ifc):
|
|||
irena_ifc.__init__(self, dname=dname)
|
||||
self._data = uart(self, dev, baudrate)
|
||||
self.uart = self._data
|
||||
self.resp = self._data.resp
|
||||
if isp:
|
||||
self._prompt += "-ISP"
|
||||
self.uart.Init_ISP()
|
||||
|
|
@ -885,19 +886,14 @@ class irena_uart(irena_ifc):
|
|||
def arm_reset(self):
|
||||
self.uart.Reset_ARM()
|
||||
|
||||
def ucmd(self, c, timeout=10000, raise_e=None):
|
||||
def cmd(self, c, timeout=10000):
|
||||
self._data.flush_responses()
|
||||
self._data.serial.write(utf8_encode(c).strip()+b'\n')
|
||||
r = self._data.resp(timeout=timeout/1000)
|
||||
r = self._data.resp(timeout=timeout/1000.)
|
||||
if self.verbosity >= 2:
|
||||
sys.stderr.write("sent: %s recv: %s\n" % (repr(c),repr(r)))
|
||||
return r
|
||||
|
||||
def resp(self, timeout=1000, raise_e=None):
|
||||
return self._data.resp(timeout = timeout/1000,
|
||||
blocking = timeout > 0,
|
||||
verbose = self.verbosity )
|
||||
|
||||
DataThread = None
|
||||
|
||||
class md3_gse(uart):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue