diff options
author | lonkaars <loek@pipeframe.xyz> | 2022-05-26 15:39:31 +0200 |
---|---|---|
committer | lonkaars <loek@pipeframe.xyz> | 2022-05-26 15:39:31 +0200 |
commit | 60f07661602a5dfe8e39b8038964b38bddcb33a5 (patch) | |
tree | 0b257acda0797a13cd09e7df2d16a6da0a6aef11 /shared/consts.h | |
parent | 333eea840a17d0f8ecf0110d952df2857fea4da0 (diff) | |
parent | f073c9d3848dab915bed4844e9d13684aa5e23eb (diff) |
merge dev into master
Diffstat (limited to 'shared/consts.h')
-rw-r--r-- | shared/consts.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/shared/consts.h b/shared/consts.h new file mode 100644 index 0000000..25ca94f --- /dev/null +++ b/shared/consts.h @@ -0,0 +1,21 @@ +#pragma once + +#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) +/** serial baud rate (bit/s) */ +#define W2_SERIAL_BAUD (9600) +/** 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) |