diff --git a/GpsTracker/Config.cpp b/GpsTracker/Config.cpp index 4948580..b130603 100644 --- a/GpsTracker/Config.cpp +++ b/GpsTracker/Config.cpp @@ -29,6 +29,11 @@ namespace config { // POSITIONS_CONFIG_NET_DEFAULT_URL, //}; //value.network = c; + + value.alertBatteryLevel1 = CONFIG_DEFAULT_BATTERY_ALERT_LEVEL1; + value.alertBatteryLevel2 = CONFIG_DEFAULT_BATTERY_ALERT_LEVEL2; + value.alertBatteryLevelClear = CONFIG_DEFAULT_BATTERY_ALERT_CLEAR; + strcpy(value.contactPhone, CONFIG_DEFAULT_CONTACT_PHONE); #endif } @@ -45,7 +50,7 @@ namespace config { void setup() { details::read(); - //details::write(); + details::write(); } void save() { @@ -67,6 +72,10 @@ namespace config { POSITIONS_CONFIG_NET_DEFAULT_APN, POSITIONS_CONFIG_NET_DEFAULT_URL, }, + CONFIG_DEFAULT_BATTERY_ALERT_LEVEL1, + CONFIG_DEFAULT_BATTERY_ALERT_LEVEL2, + CONFIG_DEFAULT_BATTERY_ALERT_CLEAR, + CONFIG_DEFAULT_CONTACT_PHONE #endif }; diff --git a/GpsTracker/Config.h b/GpsTracker/Config.h index d5935e4..061ea7d 100644 --- a/GpsTracker/Config.h +++ b/GpsTracker/Config.h @@ -15,6 +15,10 @@ #define CONFIG_RESERVED_SIZE 128 #define CONFIG_SEED 13 #define VERSION "1.00" +#define CONFIG_DEFAULT_BATTERY_ALERT_LEVEL1 45 +#define CONFIG_DEFAULT_BATTERY_ALERT_LEVEL2 38 +#define CONFIG_DEFAULT_BATTERY_ALERT_CLEAR 60 +#define CONFIG_DEFAULT_CONTACT_PHONE "+642568452" #define SLEEP_TIMING_TIME(hours, minutes) hours * 60 + minutes