-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathtrig.py
executable file
·37 lines (30 loc) · 1.11 KB
/
trig.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/usr/bin/env python
from __future__ import print_function
import gxs700.usbint
import argparse
import binascii
if __name__ == "__main__":
parser = argparse.ArgumentParser(description='Dump device data')
parser.add_argument('--verbose', '-v', action='store_true', help='verbose')
parser.add_argument('dout', nargs='?', default='dump', help='File out')
args = parser.parse_args()
usbcontext, dev, gxs = gxs700.usbint.ez_open_ex()
print("")
print('Versions')
gxs.versions()
print("")
print('FPGA signature: 0x%04X' % gxs.fpga_rsig())
print('State: %d' % gxs.state())
print('Error: %d' % gxs.error())
print('Int time: %s' % gxs.int_time())
print('Img ctr: %s' % binascii.hexlify(gxs.img_ctr_r()))
w, h = gxs.img_wh()
print('Sensor dimensions: %dw x %dh' % (w, h))
print("")
print("")
print("")
print('Trigger params: %s' % binascii.hexlify(gxs.trig_param_r()))
print('exp_cal_last: %s' % gxs.exp_cal_last())
print('exp_since_manu: %s' % gxs.exp_since_manu())
print('exp_ts: %s' % gxs.exp_ts())
print('img_ctr_r: %s' % gxs.img_ctr_r())