From 941326d9d5f70b75972f31b57dc747c2c7fe0038 Mon Sep 17 00:00:00 2001 From: Jonas Hahn Date: Wed, 24 Dec 2025 14:23:46 +0100 Subject: [PATCH] Say that batch was receive --- main.go | 2 ++ main/station_example_main.c | 2 +- plot.py | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/main.go b/main.go index b2a6fd8..4e2f998 100644 --- a/main.go +++ b/main.go @@ -74,6 +74,8 @@ func handler(w http.ResponseWriter, r *http.Request) { ) } + log.Println("Got batch!") + w.WriteHeader(http.StatusOK) w.Write([]byte("ok")) } diff --git a/main/station_example_main.c b/main/station_example_main.c index fe37693..17d72b3 100755 --- a/main/station_example_main.c +++ b/main/station_example_main.c @@ -192,7 +192,7 @@ static void measure_task(void *arg) count = 0; } - int jitter = (rand() % 10) - 5; // ±2 ms random + int jitter = rand() % 41; // 0..40 ms vTaskDelayUntil(&last_wake, pdMS_TO_TICKS(SAMPLE_PERIOD_MS + jitter)); } diff --git a/plot.py b/plot.py index 8fc887d..30e9ce7 100644 --- a/plot.py +++ b/plot.py @@ -30,7 +30,7 @@ with open(filepath, "r") as f: # Plot plt.figure(figsize=(12, 5)) -plt.scatter(timestamps, voltages, marker='o', linestyle='-', s=0.1) +plt.scatter(timestamps, voltages, marker='o', linestyle='-', s=0.2) plt.xlabel("Time (CET)") plt.ylabel("Voltage (V)")