config changes
This commit is contained in:
parent
0414290b87
commit
f884c0cb1d
@ -270,6 +270,8 @@ def main():
|
|||||||
ranges = ai_info.get_ranges(input_mode)
|
ranges = ai_info.get_ranges(input_mode)
|
||||||
if range_index >= len(ranges):
|
if range_index >= len(ranges):
|
||||||
range_index = len(ranges) - 1
|
range_index = len(ranges) - 1
|
||||||
|
embed()
|
||||||
|
quit()
|
||||||
|
|
||||||
# Allocate a buffer to receive the data.
|
# Allocate a buffer to receive the data.
|
||||||
data = create_float_buffer(channel_count, samples_per_channel)
|
data = create_float_buffer(channel_count, samples_per_channel)
|
||||||
|
10
rasp_grid.py
10
rasp_grid.py
@ -58,8 +58,8 @@ def read_cfg(cfg_file, now, init_read=False):
|
|||||||
n_rows = int(line.split(':')[1].strip())
|
n_rows = int(line.split(':')[1].strip())
|
||||||
elif "AISampleRate" in line:
|
elif "AISampleRate" in line:
|
||||||
samplerate = int(float(line.split(':')[-1].strip().replace('kHz', '')) * 1000)
|
samplerate = int(float(line.split(':')[-1].strip().replace('kHz', '')) * 1000)
|
||||||
elif 'AIMaxVolt' in Line:
|
elif "AIMaxVolt" in line:
|
||||||
AImaxVolt = float(line.split(':')[-1].strip().replace('mV', ''))
|
max_v = float(line.split(':')[1].strip().replace('mV', ''))
|
||||||
channels = n_rows * n_cols
|
channels = n_rows * n_cols
|
||||||
|
|
||||||
### alter information and re-write ###
|
### alter information and re-write ###
|
||||||
@ -75,7 +75,7 @@ def read_cfg(cfg_file, now, init_read=False):
|
|||||||
cfg_f.write(line)
|
cfg_f.write(line)
|
||||||
cfg_f.close()
|
cfg_f.close()
|
||||||
|
|
||||||
return channels, samplerate, AImaxVolt
|
return channels, samplerate, max_v
|
||||||
|
|
||||||
# for line in cfg:
|
# for line in cfg:
|
||||||
# if 'Columns1' in line:
|
# if 'Columns1' in line:
|
||||||
@ -171,7 +171,7 @@ def main():
|
|||||||
cfgfile = os.path.join(path, 'fishgrid.cfg')
|
cfgfile = os.path.join(path, 'fishgrid.cfg')
|
||||||
|
|
||||||
# read and edit config file
|
# read and edit config file
|
||||||
channels, rate, AImaxVolt = read_cfg(cfgfile, now)
|
channels, rate, max_v = read_cfg(cfgfile, now)
|
||||||
|
|
||||||
file = os.path.join(path, 'traces-grid1.raw')
|
file = os.path.join(path, 'traces-grid1.raw')
|
||||||
temp_file = os.path.join(path, 'temperatures.csv')
|
temp_file = os.path.join(path, 'temperatures.csv')
|
||||||
@ -262,8 +262,6 @@ def main():
|
|||||||
ranges = ai_info.get_ranges(input_mode)
|
ranges = ai_info.get_ranges(input_mode)
|
||||||
if range_index >= len(ranges):
|
if range_index >= len(ranges):
|
||||||
range_index = len(ranges) - 1
|
range_index = len(ranges) - 1
|
||||||
embed()
|
|
||||||
quit()
|
|
||||||
|
|
||||||
# Allocate a buffer to receive the data.
|
# Allocate a buffer to receive the data.
|
||||||
data = create_float_buffer(channel_count, samples_per_channel)
|
data = create_float_buffer(channel_count, samples_per_channel)
|
||||||
|
Loading…
Reference in New Issue
Block a user