This commit is contained in:
2025-12-03 17:41:59 +01:00
parent 1708bdbac4
commit 5dcb617991
5 changed files with 85 additions and 37 deletions

View File

@@ -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():