From 14779cb187dac9ed4a0b6e7645e76e78587ad024 Mon Sep 17 00:00:00 2001 From: lonkaars Date: Thu, 2 Jun 2022 17:22:48 +0200 Subject: ping working --- shared/consts.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'shared/consts.h') diff --git a/shared/consts.h b/shared/consts.h index cdd96b3..3f792b4 100644 --- a/shared/consts.h +++ b/shared/consts.h @@ -30,6 +30,11 @@ /** exponential moving average new measurement weight (double 0-1) */ #define W2_EMA_WEIGHT (0.10) +/** minimal time between pings */ +#define W2_PING_FREQUENCY (1e3) +/** max time between ping and answer */ +#define W2_PING_TIMEOUT (5e3) + /** front-facing distance sensor pinout */ #define W2_FRONT_SENSOR_PIN 5 /** battery voltage sensor pinout */ -- cgit v1.2.3