пропажа слешей
Dependencies: mbed mbed-STM32F103C8T6 MLX90614 Watchdog DS1820
Diff: config.h
- Revision:
- 10:51960145754a
- Parent:
- 9:e8a07983289f
- Child:
- 11:57fa27cb533e
--- a/config.h Tue Sep 29 19:48:56 2020 +0000 +++ b/config.h Wed Sep 30 16:40:29 2020 +0000 @@ -1,5 +1,8 @@ #pragma once +#define xstr(s) str(s) +#define str(s) #s +// State machine states #define STATE_INIT 0 #define STATE_STARTING_GPS 1 #define STATE_WAITING_FIX 2 @@ -7,12 +10,16 @@ #define STATE_SENDING_TELEMETRY 4 #define STATE_SLEEPING 5 +// Times of working #define SLEEP_CHECK_TIME 5 -#define SLEEP_TIME_S 60 -#define WATCHDOG_INTERVAL_S SLEEP_TIME_S+5 +#define SLEEP_TIME_S 60*3 #define FIX_CHECK_TIME_S 5 -#define FIX_MAX_TRIES 3 +#define PARSER_TIMEOUT_S 10 +#define WATCHDOG_INTERVAL_S 60 +#define FIX_MAX_TRIES 25 + +// Pinouts #define PIN_SDA PB_9 #define PIN_SCL PB_8 #define PIN_ONEWIRE PC_14 @@ -21,8 +28,14 @@ #define PIN_TX PA_2 #define PIN_RX PA_3 - -#define DEBUG_SIM 0 +// Debug options +#define DEBUG_SIM 1 #define DEBUG_PC 1 +#define ENABLE_WATCHDOG 1 -#define NBIOT_TELEMETRY_URL "http://iotsandbox.mts.ru:8080/api/v1/msyDlNiOZVAzKkkmVNVU/telemetry" \ No newline at end of file +// NBIoT settings +#define MTS_COAP_SERVER_IP 195.34.49.22 +#define MTS_COAP_SERVER_PORT 6683 +#define MTS_COAP_TOKEN HJne7HnjcPMy8pjZ2GfI + +#define MTS_TELEMETRY_URL_STRING "coap://" xstr(MTS_COAP_SERVER_IP) ":" xstr(MTS_COAP_SERVER_PORT) "/api/v1/" xstr(MTS_COAP_TOKEN) "/telemetry\""