init
Dependencies: aconno_I2C Lis2dh12 WatchdogTimer
Diff: main.h
- Revision:
- 48:64b1613941d5
- Parent:
- 47:cc6d4d0bf897
- Child:
- 49:15ddd84ec9fa
--- a/main.h Mon Jan 21 19:43:17 2019 +0000 +++ b/main.h Tue Feb 05 14:30:57 2019 +0000 @@ -16,7 +16,8 @@ //------------------------------------------------------------------------------ //DEFINES //------------------------------------------------------------------------------ -#define FW_VERSION 2 +#define FW_VERSION 4 +//#define SKU "GPSPLUSDEV" #define SKU "GPSPLUS" #define HW_MAJORREVISION "001" @@ -25,20 +26,22 @@ #define DEBUG_ON 1 //DEFAULT SETTINGS -#define DEFAULT_SLEEP_FRAME 30000 +#define DEFAULT_SLEEP_FRAME 60000 #define DEFAULT_FORCE2G true -#define DEFAULT_LOCATION_MODE 2 -#define DEFAULT_LOCATION_ACCURACY 2 // 0 = no location, 1 = cl only, 2 = gps then cl +#define DEFAULT_LOCATION_MODE 1 +#define DEFAULT_LOCATION_ACCURACY 1 // 0 = no location, 1 = cl only, 2 = gps then cl #define DEFAULT_LOCATION_TX_INTERVAL_MINS 1440 #define DEFAULT_LOCATION_TX_FAILSAFE_HRS 168 -#define DEFAULT_LOCATION_TIMEOUT 180 -#define DEFAULT_MOTION_G 10 +#define DEFAULT_LOCATION_TIMEOUT 120 +#define DEFAULT_MOTION_G 7 #define DEFAULT_MOTION_START_SECONDS 120 #define DEFAULT_MOTION_STOP_SECONDS 120 #define DEFAULT_IMPACT_G 127 #define DEFAULT_CONNECTION_ATTEMPTS 1 -#define DEFAULT_CONNECTION_TIMEOUT 180 +#define DEFAULT_CONNECTION_TIMEOUT 120 #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 //CONSTS #define ONEDAYINSECONDS 86400 @@ -84,7 +87,6 @@ //#define lowByte(w) ((uint8_t) ((w) & 0xff)) //#define highByte(w) ((uint8_t) ((w) >> 8)) - //------------------------------------------------------------------------------ //GLOBAL VARS //------------------------------------------------------------------------------ @@ -100,7 +102,7 @@ extern time_t GLOBAL_RTCunixtime; extern time_t GLOBAL_wakeTime; extern char GLOBAL_debug_buffer[200]; -extern bool RET_force2G; +extern uint8_t RTCtick_ledflash_count; //FUNCS extern void watchdogKick();