diff --git a/.gitignore b/.gitignore index 371c8d7..518c361 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,7 @@ [Bb]in/ #Visual Studio code -.vscode/ \ No newline at end of file +.vscode/ + +#Unversionned sensitive data configuration file +/src/config/Sensitive.h diff --git a/src/config/Alerts.h b/src/config/Alerts.h index 9baf6fc..7790153 100644 --- a/src/config/Alerts.h +++ b/src/config/Alerts.h @@ -1,5 +1,7 @@ #pragma once +#include "User.h" + /** * Configure the values used for alerts triggering. * Note that the battery level percentage are quite high, @@ -16,7 +18,6 @@ #define CONFIG_BATTERY_ALERT_LEVEL2 38 ///< Battery percentage at which to trigger the final low battery alert. #define CONFIG_BATTERY_ALERT_CLEAR 60 ///< Battery percentage at which to clear all battery alerts. #define CONFIG_ACTIVE_ALERTS 0 ///< Default active alerts -#define CONFIG_CONTACT_PHONE "+642568452" ///< Default phone number to send the alert SMS to. #define ALERT_SUSPICIOUS_RTC_TEMPERATURE 0 ///< Temperature at which to consider the RTC module as failling. diff --git a/src/config/BackupNetwork.h b/src/config/BackupNetwork.h index afc3855..03575b4 100644 --- a/src/config/BackupNetwork.h +++ b/src/config/BackupNetwork.h @@ -4,9 +4,10 @@ #pragma once +#include "User.h" + #define POSITIONS_CONFIG_NET_SAVE_THRESHOLD 30 ///< Determines how many positions will be saved before a network backup is needed (only when not moving though). #define POSITIONS_CONFIG_NET_APN "Vodafone" ///< APN used for GPRS context -#define POSITIONS_CONFIG_NET_URL "http://yourserver.com/endpoint" ///< URL to which positions data will be send through an HTTP POST request #define POSITIONS_CONFIG_NET_EXPECTED_RESPONSE 201 ///< Expected response code from the server that indicates that the positions has been successfully backuped. #define POSITIONS_CONFIG_NET_UNAVAILABLE_NETWORK_POSTPONE_THRESHOLD 5 ///< Determines how many times to deal with an unreliable network before postponing the backup. ///< In an area where cell reception isn't good, this avoid to try to backup the positions diff --git a/src/config/User.h b/src/config/User.h new file mode 100644 index 0000000..38dfb4c --- /dev/null +++ b/src/config/User.h @@ -0,0 +1,17 @@ +#pragma once + +/** + * Holds all the sensitive data. Provided values are example only. + * Changes values according to your setup. This file changes are untracked so data + * will never go further than your local working copy. + */ + +#include "Sensitive.h" + +/** + * Copy and uncomment the following lines to a new User.h file. Edit the values according to your setup + */ +// #pragma once + +// #define POSITIONS_CONFIG_NET_URL "http://yourserver.com/endpoint" ///< URL to which positions data will be send through an HTTP POST request. +// #define CONFIG_CONTACT_PHONE "+642568452" ///< Phone number to send the alert SMS to.