init

Dependencies:   aconno_I2C Lis2dh12 WatchdogTimer

Revision:
57:066dfbe8b4b9
Parent:
56:efd9f5613549
Child:
58:8d4a354816b1
--- a/main.h	Fri Aug 09 14:22:21 2019 +0000
+++ b/main.h	Thu Feb 13 00:57:06 2020 +0000
@@ -16,34 +16,23 @@
 //------------------------------------------------------------------------------
 //FW DETAILS
 //------------------------------------------------------------------------------ 
-#define FW_VERSION          35
-//#define SKU                 "GPSPLUSDEV"
-#define SKU                 "GPSPLUS"
+#define FW_VERSION          1
+#define SKU                 "UWBBEACON"
 #define HW_MAJORREVISION    "001"
 
 //OPTIONS
 #define USE_NRF_TEMP_SENSOR                 false
-#define BLE_ENABLED                         true
 
 //DEFAULT VELUES
-#define DEFAULT_SLEEP_FRAME                 30000
-#define DEFAULT_FORCE2G                     false
-#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            120
+#define DEFAULT_SLEEP_FRAME                 120000
 #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          140
-#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
-#define DEFAULT_MAX_MODEMBROWNOUTS          2
-#define DEFAULT_BEACON_INTERVAL_SECONDS     10
+#define DEFAULT_BEACON_INTERVAL_MS          3000
+#define DEFAULT_BEACON_INTERVAL_FAST_MS     100
 #define DEFAULT_BEACON_POWER                4 //(accepted values are -40, -30, -20, -16, -12, -8, -4, 0, and 4 dBm)
+#define DEFAULT_SETTINGSSCANTIME_MS         10000
 
 //CONSTS
 #define ONEDAYINSECONDS                     86400
@@ -51,11 +40,14 @@
 #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
+//DEFAULT EVENT TIMES IN SECONDS
+#define DEFAULT_INTERVAL_MOTIONCLEAR        120
+#define DEFAULT_INTERVAL_BUTTONCLEAR        20
+#define DEFAULT_INTERVAL_BATTERY            ONEDAYINSECONDS
+#define DEFAULT_INTERVAL_TEMPERATURE        60
+#define DEFAULT_INTERVAL_HUMIDITY           120
+#define DEFAULT_INTERVAL_SETTINGSSCAN       60
+
 
 //DEFINES
 #define ACTIVITY_BUFFERSIZE                 100
@@ -67,15 +59,12 @@
 #include "mbed.h"
 //#include "nrf_soc.h"
 #include "board.h"
-#if BLE_ENABLED 
-    #include "ble/BLE.h" 
-#endif
+#include "ble/BLE.h" 
+
 //------------------------------------------------------------------------------
 //peripheral Libraries
 //------------------------------------------------------------------------------
 #include "WatchdogTimer.h"
-#include "LIS3DH.h"
-#include "SI7060.h"
 #include "acd_nrf52_saadc.h"
 
 //------------------------------------------------------------------------------
@@ -84,16 +73,11 @@
 #include "NRFuart.h"
 #include "app_data.h"
 #include "states.h"
-#include "common.h"
-#include "sensors.h"
-#include "modem.h"
+#include "LED.h"
 
 //BLE SERVICE IDS
-#define BLE_SERVICEID_GPSPLUS               0xfb10
-#define BLE_SERVICEID_PFDETECTOR1           0x4e96
-#define BLE_SERVICEID_PFBEACON1             0xfe9a //ESTIMOTE
-#define BLE_SERVICEID_BT04                  0xcbff //TZBT04 Temp/humid
-#define BLE_SERVICEID_PFBEACON2             0xfb20
+#define BLE_SERVICEID_PFDETECTOR2           0xfb40
+#define BLE_SERVICEID_UWBBEACON             0xfb50
 
 //------------------------------------------------------------------------------
 //Global macros
@@ -110,16 +94,9 @@
 extern bool GLOBAL_motionFlagTriggered;
 extern bool GLOBAL_debugLED;
 extern bool GLOBAL_needToConfigureLis3dh;
-extern bool GLOBAL_registeredOnNetwork;
-extern bool GLOBAL_modemOn;
 extern bool GLOBAL_LEDSequenceinProgress;
 extern time_t GLOBAL_RTCunixtime;
-extern time_t GLOBAL_wakeTime;
 extern char GLOBAL_debug_buffer[DEBUG_BUFFERSIZE];
-extern char GLOBAL_GPSlocString_prev[70];
-extern bool GLOBAL_have_GPSlocString_prev;
-extern char GLOBAL_exceptionStringRetainedUntilSuccess[10];
 //FUNCS
 extern void watchdogKick();
-extern void addToExceptionString(char* value);
 #endif
\ No newline at end of file