bf
This commit is contained in:
parent
27f6d97cd4
commit
41e80e4016
@ -47,7 +47,7 @@ class plot():
|
||||
ax.set_ylim(-self.max_v, self.max_v)
|
||||
|
||||
self.axs.append(ax)
|
||||
gs.update(left=0.05, bottom=0.05, top=1, right=1, hspace=0, wspace=0)
|
||||
gs.update(left=0.1, bottom=0.05, top=1, right=1, hspace=0, wspace=0)
|
||||
|
||||
|
||||
def GPIO_setup(LED1_pin, LED2_pin, Button1_pin, Button2_pin):
|
||||
@ -371,10 +371,10 @@ def main():
|
||||
|
||||
init_fig = False
|
||||
else:
|
||||
yspan = [np.min(channel_data[power_channel]) / 1000, np.max(channel_data[power_channel])/ 1000]
|
||||
yspan = [np.min(channel_data[power_channel]) / gain, np.max(channel_data[power_channel])/ gain]
|
||||
ylim = [yspan[0] - np.abs(np.diff(yspan)) * 0.2, yspan[1] + np.abs(np.diff(yspan)) * 0.2]
|
||||
for ch in channel_array:
|
||||
Plot.channel_handle[ch].set_data(np.arange(250)[:len(channel_data[ch])] / rate, np.array(channel_data[ch]) / 1000)
|
||||
Plot.channel_handle[ch].set_data(np.arange(250)[:len(channel_data[ch])] / rate, np.array(channel_data[ch]) / gain)
|
||||
Plot.axs[ch].set_ylim(ylim)
|
||||
Plot.fig.canvas.draw()
|
||||
|
||||
|
@ -382,8 +382,8 @@ def main():
|
||||
index = transfer_status.current_index
|
||||
|
||||
if (last_idx > index) and (index != -1):
|
||||
(np.array(data[last_idx:], dtype=np.float32) / 1000).tofile(f)
|
||||
(np.array(data[:index], dtype=np.float32) / 1000).tofile(f)
|
||||
(np.array(data[last_idx:], dtype=np.float32) / gain).tofile(f)
|
||||
(np.array(data[:index], dtype=np.float32) / gain).tofile(f)
|
||||
f.flush()
|
||||
|
||||
if index == -1:
|
||||
|
Loading…
Reference in New Issue
Block a user