bug fix
This commit is contained in:
parent
9418ab96df
commit
ad15cac368
10
rasp_grid.py
10
rasp_grid.py
@ -195,8 +195,8 @@ def main():
|
|||||||
end_clock = [int(sys.argv[2][:2]), int(sys.argv[2][2:])]
|
end_clock = [int(sys.argv[2][:2]), int(sys.argv[2][2:])]
|
||||||
valid = True
|
valid = True
|
||||||
if not valid:
|
if not valid:
|
||||||
start_clock = [10, 00]
|
start_clock = [10, 15]
|
||||||
end_clock = [10, 30]
|
end_clock = [15, 0]
|
||||||
|
|
||||||
|
|
||||||
# get init cfg
|
# get init cfg
|
||||||
@ -528,17 +528,17 @@ def main():
|
|||||||
continue
|
continue
|
||||||
|
|
||||||
if index > last_idx:
|
if index > last_idx:
|
||||||
(np.array(data[last_idx:index] / gain, dtype=np.float32)).tofile(f)
|
(np.array(data[last_idx:index], dtype=np.float32) / gain).tofile(f)
|
||||||
|
|
||||||
else:
|
else:
|
||||||
(np.array(data[last_idx:] / gain, dtype=np.float32)).tofile(f)
|
(np.array(data[last_idx:], dtype=np.float32) / gain).tofile(f)
|
||||||
if datetime.datetime.now().hour * 60 + datetime.datetime.now().minute >= end_clock[0] * 60 + end_clock[1]:
|
if datetime.datetime.now().hour * 60 + datetime.datetime.now().minute >= end_clock[0] * 60 + end_clock[1]:
|
||||||
f.flush()
|
f.flush()
|
||||||
GPIO.output(LED1_pin, GPIO.LOW)
|
GPIO.output(LED1_pin, GPIO.LOW)
|
||||||
GPIO.output(LED_out_pin, GPIO.LOW)
|
GPIO.output(LED_out_pin, GPIO.LOW)
|
||||||
break
|
break
|
||||||
|
|
||||||
(np.array(data[:index] / gain, dtype=np.float32)).tofile(f)
|
(np.array(data[:index], dtype=np.float32) / gain).tofile(f)
|
||||||
f.flush()
|
f.flush()
|
||||||
|
|
||||||
buffer_no += 1
|
buffer_no += 1
|
||||||
|
Loading…
Reference in New Issue
Block a user