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:])]
|
||||
valid = True
|
||||
if not valid:
|
||||
start_clock = [10, 00]
|
||||
end_clock = [10, 30]
|
||||
start_clock = [10, 15]
|
||||
end_clock = [15, 0]
|
||||
|
||||
|
||||
# get init cfg
|
||||
@ -528,17 +528,17 @@ def main():
|
||||
continue
|
||||
|
||||
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:
|
||||
(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]:
|
||||
f.flush()
|
||||
GPIO.output(LED1_pin, GPIO.LOW)
|
||||
GPIO.output(LED_out_pin, GPIO.LOW)
|
||||
break
|
||||
|
||||
(np.array(data[:index] / gain, dtype=np.float32)).tofile(f)
|
||||
(np.array(data[:index], dtype=np.float32) / gain).tofile(f)
|
||||
f.flush()
|
||||
|
||||
buffer_no += 1
|
||||
|
Loading…
Reference in New Issue
Block a user