NEW RUN
This commit is contained in:
12
mainv2.py
12
mainv2.py
@@ -72,7 +72,7 @@ lbl.grid(row=4, column=0, columnspan=2)
|
||||
labels.append(lbl) # index 16
|
||||
|
||||
lbl = tk.Label(root, text="Delta Tick:0", width=20, height=3, borderwidth=2, relief="groove", font=("Arial", 14))
|
||||
lbl.grid(row=4, column=2, columnspan=2)
|
||||
lbl.grid(row=4, column=1, columnspan=2)
|
||||
labels.append(lbl) # index 17
|
||||
|
||||
# Checkboxes to select plotted (derived) channels
|
||||
@@ -232,7 +232,7 @@ def update_SI(value: SD.ReturnDecoder):
|
||||
# NOTE: mode should be "a" or "a+", not "+a"
|
||||
with open(f"{FILENAME}_SI.csv", "a") as file:
|
||||
file.write(f"{value.timestamp},{value.log_message}\n")
|
||||
print(f"\033[F\033[2Ktime:{value.timestamp}, SI:{value.log_message}", end="\n")
|
||||
print(f"Time:{value.timestamp}, SI:{value.log_message}", end="\n")
|
||||
|
||||
|
||||
Last_history_call: int = 0
|
||||
@@ -262,8 +262,12 @@ def append_history(adc_values: list, timestamp: int):
|
||||
|
||||
# 7-14: Pressures from channels 8..15
|
||||
for i in range(8, 16): # eight pressure sensors
|
||||
pres = 0.0000153522 * adc_values[i] - 6.5652036917
|
||||
history_y[i - 1].append(pres) # 8→7, 15→14
|
||||
if i == 12:
|
||||
pres = 0.0000153522 * (adc_values[i] / 2) - 6.5652036917
|
||||
history_y[i - 1].append(pres) # 8→7, 15→14
|
||||
else:
|
||||
pres = 0.0000153522 * adc_values[i] - 6.5652036917
|
||||
history_y[i - 1].append(pres) # 8→7, 15→14
|
||||
|
||||
|
||||
def update_plot():
|
||||
|
||||
Reference in New Issue
Block a user