пропажа слешей
Dependencies: mbed mbed-STM32F103C8T6 MLX90614 Watchdog DS1820
config.h@10:51960145754a, 2020-09-30 (annotated)
- Committer:
- spin7ion
- Date:
- Wed Sep 30 16:40:29 2020 +0000
- Revision:
- 10:51960145754a
- Parent:
- 9:e8a07983289f
- Child:
- 11:57fa27cb533e
Now it can send jsons
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
spin7ion | 6:70d0218c2a28 | 1 | #pragma once |
spin7ion | 10:51960145754a | 2 | #define xstr(s) str(s) |
spin7ion | 10:51960145754a | 3 | #define str(s) #s |
spin7ion | 6:70d0218c2a28 | 4 | |
spin7ion | 10:51960145754a | 5 | // State machine states |
spin7ion | 6:70d0218c2a28 | 6 | #define STATE_INIT 0 |
spin7ion | 6:70d0218c2a28 | 7 | #define STATE_STARTING_GPS 1 |
spin7ion | 6:70d0218c2a28 | 8 | #define STATE_WAITING_FIX 2 |
spin7ion | 6:70d0218c2a28 | 9 | #define STATE_COLLECTING_TELEMETRY 3 |
spin7ion | 6:70d0218c2a28 | 10 | #define STATE_SENDING_TELEMETRY 4 |
spin7ion | 6:70d0218c2a28 | 11 | #define STATE_SLEEPING 5 |
spin7ion | 6:70d0218c2a28 | 12 | |
spin7ion | 10:51960145754a | 13 | // Times of working |
spin7ion | 9:e8a07983289f | 14 | #define SLEEP_CHECK_TIME 5 |
spin7ion | 10:51960145754a | 15 | #define SLEEP_TIME_S 60*3 |
spin7ion | 9:e8a07983289f | 16 | #define FIX_CHECK_TIME_S 5 |
spin7ion | 10:51960145754a | 17 | #define PARSER_TIMEOUT_S 10 |
spin7ion | 10:51960145754a | 18 | #define WATCHDOG_INTERVAL_S 60 |
spin7ion | 6:70d0218c2a28 | 19 | |
spin7ion | 10:51960145754a | 20 | #define FIX_MAX_TRIES 25 |
spin7ion | 10:51960145754a | 21 | |
spin7ion | 10:51960145754a | 22 | // Pinouts |
spin7ion | 6:70d0218c2a28 | 23 | #define PIN_SDA PB_9 |
spin7ion | 6:70d0218c2a28 | 24 | #define PIN_SCL PB_8 |
spin7ion | 6:70d0218c2a28 | 25 | #define PIN_ONEWIRE PC_14 |
spin7ion | 6:70d0218c2a28 | 26 | #define PIN_SIM_TX PA_9 |
spin7ion | 6:70d0218c2a28 | 27 | #define PIN_SIM_RX PA_10 |
spin7ion | 6:70d0218c2a28 | 28 | #define PIN_TX PA_2 |
spin7ion | 6:70d0218c2a28 | 29 | #define PIN_RX PA_3 |
spin7ion | 6:70d0218c2a28 | 30 | |
spin7ion | 10:51960145754a | 31 | // Debug options |
spin7ion | 10:51960145754a | 32 | #define DEBUG_SIM 1 |
spin7ion | 6:70d0218c2a28 | 33 | #define DEBUG_PC 1 |
spin7ion | 10:51960145754a | 34 | #define ENABLE_WATCHDOG 1 |
spin7ion | 6:70d0218c2a28 | 35 | |
spin7ion | 10:51960145754a | 36 | // NBIoT settings |
spin7ion | 10:51960145754a | 37 | #define MTS_COAP_SERVER_IP 195.34.49.22 |
spin7ion | 10:51960145754a | 38 | #define MTS_COAP_SERVER_PORT 6683 |
spin7ion | 10:51960145754a | 39 | #define MTS_COAP_TOKEN HJne7HnjcPMy8pjZ2GfI |
spin7ion | 10:51960145754a | 40 | |
spin7ion | 10:51960145754a | 41 | #define MTS_TELEMETRY_URL_STRING "coap://" xstr(MTS_COAP_SERVER_IP) ":" xstr(MTS_COAP_SERVER_PORT) "/api/v1/" xstr(MTS_COAP_TOKEN) "/telemetry\"" |