Commit d39e53ad2b39f4e74245c7f9492a0c08db4bccc6

Authored by bmarechal
1 parent 9d344927ea
Exists in master

.

Showing 2 changed files with 0 additions and 36 deletions Side-by-side Diff

redpitaya/server/test.py
1   -import time
2   -
3   -with open('/dev/data16_adc12', 'r') as f:
4   - for line in f:
5   - print(line.encode('bin'))
6   - time.sleep(0.1)
redpitaya/server/test_emb.py
1   -#!/usr/bin/env python
2   -import ctypes, argparse
3   -import liboscimp_fpga
4   -
5   -def parse():
6   - parser = argparse.ArgumentParser(description = 'Set offsets to DAC1 and DAC2')
7   - parser.add_argument('-of1',
8   - action='store',
9   - dest='of1',
10   - default=0,
11   - help='DAC1 offset (bits)')
12   - parser.add_argument('-of2',
13   - action='store',
14   - dest='of2',
15   - default=0,
16   - help='DAC2 offset (bits)')
17   - args = parser.parse_args()
18   - return args
19   -
20   -def main():
21   - args = parse()
22   - of1 = int(args.of1)
23   - of2 = int(args.of2)
24   - liboscimp_fpga.add_const_set_offset("/dev/add_const_0", of1)
25   - liboscimp_fpga.add_const_set_offset("/dev/add_const_1", of2)
26   - print('offset DAC1 : %i'%of1)
27   - print('offset DAC2 : %i'%of2)
28   -
29   -if __name__ == "__main__":
30   - main()