commit 06da4ca0c308732e334995087ac72c0c73d2ccf3
parent 52ab36175313bc21e8b9322d4579e7008e702ce2
Author: Friedel Schön <[email protected]>
Date: Thu, 30 Jun 2022 13:06:50 +0200
timing
Diffstat:
4 files changed, 11 insertions(+), 10 deletions(-)
diff --git a/.vscode/arduino.json b/.vscode/arduino.json
@@ -1,6 +1,6 @@
{
"sketch": "client/client.ino",
"board": "SODAQ:samd:sodaq_sara",
- "port": "/dev/tty.usbmodem14101",
+ "port": "/dev/tty.usbmodem14201",
"output": "build"
}
\ No newline at end of file
diff --git a/client/client.ino b/client/client.ino
@@ -89,6 +89,7 @@ void loop() {
}
last = now;
}
+ delay(loopDelay * 1000);
}
int batteryVoltage() {
diff --git a/client/include/config.h b/client/include/config.h
@@ -26,14 +26,14 @@
#define blockDebug true // print if command is blocking
// -*- timing settings (seconds) -*-
-#define remoteFirstTimeout 5 // seconds to wait for the first timeout
-#define remoteTimeout 1 // seconds to wait for remote to timeout
-#define commandTimeout 10 // seconds to cancel a command
-#define commandDelay 0.1 // delay after every command
-#define ignoreDelay 2 // seconds to wait if command is run with COMMAND_IGNORE
-#define blinkInterval 0.25 // seconds to wait for blink
-#define gpsTimeout 15 // seconds to gps-timeout
-#define statusInterval 5 // send status every n seconds
+#define remoteFirstTimeout 5 // seconds to wait for the first timeout
+#define remoteTimeout 1 // seconds to wait for remote to timeout
+#define commandTimeout 10 // seconds to cancel a command
+#define commandDelay 0.1 // delay after every command
+#define ignoreDelay 2 // seconds to wait if command is run with COMMAND_IGNORE
+#define gpsTimeout 30 // seconds to gps-timeout
+#define statusInterval 60 // send status every n seconds
+#define loopDelay 10 // seconds to wait each loop()
// -*- battery stuff -*-
#define adcAREF 3.3
diff --git a/server/models.py b/server/models.py
@@ -48,7 +48,7 @@ class Trap(db.Model):
return User.query.get(self.owner)
def offline(self):
- return datetime.now() - self.last_status > timedelta(hours=1)
+ return datetime.now() - self.last_status > timedelta(minutes=10)
def to_json(self):
owner = self.owner_class()