From e90a9bbcf00d1bee2365f02a6f2d0bbcc358246f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Pleva=C4=8D?= Date: Mon, 9 Oct 2023 21:45:12 +0200 Subject: [PATCH] Fixed time --- station/Makefile | 3 ++- station/config.py | 2 +- station/recorder.py | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/station/Makefile b/station/Makefile index 1ea3a8e..b7fd3f7 100644 --- a/station/Makefile +++ b/station/Makefile @@ -1,2 +1,3 @@ install: - cp baseband_spectogram.py /usr/local/bin/ \ No newline at end of file + cp tools/baseband_spectogram.py /usr/local/bin/ + chmod +x /usr/local/bin/baseband_spectogram.py \ No newline at end of file diff --git a/station/config.py b/station/config.py index 4dae005..fa55356 100644 --- a/station/config.py +++ b/station/config.py @@ -1,4 +1,4 @@ masterUrl = "http://10.0.0.8" -apiKey = "a22c1e54-d35c-4058-993d-9f34c0fba428" +apiKey = "37c82347-f4fb-4552-950c-7e0767275eb6" pullInterval = 120 # in sec planInterval = 1200 # in sec \ No newline at end of file diff --git a/station/recorder.py b/station/recorder.py index 6de8317..7756cc3 100644 --- a/station/recorder.py +++ b/station/recorder.py @@ -48,11 +48,11 @@ class recorder(threading.Thread): time.sleep(50) - realStart = datetime.datetime.utcnow().timestamp() + realStart = int(datetime.datetime.now(tz=datetime.timezone.utc).timestamp()) os.system(f"satdump record {baseband} --source {self.job['receiver']['params']['radio']} --samplerate {fs} --frequency {self.job['transmitter']['centerFrequency']} --gain {self.job['receiver']['params']['gain']} --baseband_format s8 --timeout {recordTime}") - realEnd = datetime.datetime.utcnow().timestamp() + realEnd = int(datetime.datetime.now(tz=datetime.timezone.utc).timestamp()) print(f"Recorder for job {self.job['target']['name']} stoped")