diff options
author | HoodieJeansJordans <104365411+HoodieJeansJordans@users.noreply.github.com> | 2022-06-05 13:21:09 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-05 13:21:09 +0200 |
commit | bc283424c699effcfa84816c609ca7f00ed5259a (patch) | |
tree | ff67ced022120ae05997c1b1f3a49db992e4fcbf /shared/consts.h | |
parent | 5692ca8c65f5f5617d6987b610e425a32c0d8e1d (diff) | |
parent | 38d71eb97dbd8f895ed483128b332f018a5ae1d4 (diff) |
Merge branch 'lonkaars:master' into master
Diffstat (limited to 'shared/consts.h')
-rw-r--r-- | shared/consts.h | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/shared/consts.h b/shared/consts.h index c65e50f..cdd96b3 100644 --- a/shared/consts.h +++ b/shared/consts.h @@ -1,28 +1,38 @@ #pragma once +/** @file consts.h */ + #ifndef W2_BUILD_STR // is defined by CFLAGS += -DW2_BUILD_STR in makefile #define W2_BUILD_STR ("????????") #endif -/** max logic module execution time in milliseconds */ -#define W2_MAX_MODULE_CYCLE_MS (20) +#if !defined W2_HOST_WIN32 && !defined W2_HOST_LINUX +#define W2_HOST_UNKNOWN +#warning "host operating system unknown" +#endif + /** serial baud rate (bit/s) */ #define W2_SERIAL_BAUD (9600) +/** size of input (receive) buffer (in bytes) */ +#define W2_SERIAL_READ_BUFFER_SIZE (255) + /** size of the error handling buffer (in errors, not bytes) */ #define W2_ERROR_BUFFER_SIZE (16) /** size of the serial communication buffer (in messages, not bytes) */ #define W2_SERCOMM_BUFFER_SIZE (16) -/** size of input (receive) buffer (in bytes) */ -#define W2_SERIAL_READ_BUFFER_SIZE (255) -/** exponential moving average new measurement weight (double 0-1) */ -#define W2_EMA_WEIGHT (0.10) /** size of mode history buffer */ #define W2_MODE_HISTORY_BUFFER_SIZE (4) +/** max logic module execution time in milliseconds */ +#define W2_MAX_MODULE_CYCLE_MS (20) + +/** exponential moving average new measurement weight (double 0-1) */ +#define W2_EMA_WEIGHT (0.10) + /** front-facing distance sensor pinout */ #define W2_FRONT_SENSOR_PIN 5 /** battery voltage sensor pinout */ #define W2_BATTERY_PIN 6 /** side-facing distance sensor pinout */ -#define W2_SIDE_SENSOR_PIN 7
\ No newline at end of file +#define W2_SIDE_SENSOR_PIN 7 |