![](/media/cache/group/default_image.jpg.50x50_q85.jpg)
init
Dependencies: aconno_I2C Lis2dh12 WatchdogTimer
Diff: main.h
- Revision:
- 51:9078e6928412
- Parent:
- 50:a94e70c00fff
- Child:
- 52:bd7678eade77
diff -r a94e70c00fff -r 9078e6928412 main.h --- a/main.h Thu May 16 12:31:44 2019 +0000 +++ b/main.h Thu May 23 11:39:28 2019 +0000 @@ -16,14 +16,13 @@ //------------------------------------------------------------------------------ //DEFINES //------------------------------------------------------------------------------ -#define FW_VERSION 18 +#define FW_VERSION 20 //#define SKU "GPSPLUSDEV" #define SKU "GPSPLUS" #define HW_MAJORREVISION "001" //MODES #define USE_NRF_TEMP_SENSOR 1 -#define DEBUG_ON 1 //DEFAULT SETTINGS #define DEFAULT_SLEEP_FRAME 60000 @@ -39,9 +38,8 @@ #define DEFAULT_IMPACT_G 127 #define DEFAULT_CONNECTION_ATTEMPTS 1 #define DEFAULT_CONNECTION_TIMEOUT 140 -#define DEFAULT_BEACON_INTERVAL_SECONDS 20 -#define DEFAULT_MAX_FAILED_CONNECTIONS 2 //max number of failed connections before device stops broadcasting until movement detected -#define DEFAULT_MAX_FAILED_GPS 2 //max number of failed gps searches before device stops trying gps until movement detected +#define DEFAULT_MAX_FAILED_CONNECTIONS 3 //max number of failed connections before device stops broadcasting until movement detected +#define DEFAULT_MAX_FAILED_GPS 3 //max number of failed gps searches before device stops trying gps until movement detected //CONSTS #define ONEDAYINSECONDS 86400 @@ -49,6 +47,12 @@ #define SEVENDAYSINSECONDS 604800 #define TENDAYSINSECONDS 864000 +//MODES +#define LOCATION_MODE_INTERVAL 1 +#define LOCATION_MODE_INTERVAL_MOTION 2 +#define LOCATION_MODE_INTELLIGENT 3 +#define LOCATION_MODE_REALTIME 4 + //DEFINES #define ACTIVITY_BUFFERSIZE 100 @@ -56,19 +60,18 @@ //mbed Libraries //------------------------------------------------------------------------------ #include "mbed.h" -#include "nrf_soc.h" +//#include "nrf_soc.h" #include "nrf_temp.h" #include "board.h" //#include "ble/BLE.h" -//#include "nvstore.h" -#include "FlashIAPBlockDevice.h" +//#include "FlashIAPBlockDevice.h" //------------------------------------------------------------------------------ //peripheral Libraries //------------------------------------------------------------------------------ #include "WatchdogTimer.h" #include "LIS3DH.h" -#include "SI7060.h" +//#include "SI7060.h" #include "acd_nrf52_saadc.h" //------------------------------------------------------------------------------ @@ -102,7 +105,6 @@ extern time_t GLOBAL_RTCunixtime; extern time_t GLOBAL_wakeTime; extern char GLOBAL_debug_buffer[200]; -extern uint8_t RTCtick_ledflash_count; //FUNCS extern void watchdogKick();