소스 검색

Reformatted config header files comments

tags/v1.4.2^2
Bertrand Lemasle 6 년 전
부모
커밋
6bcbf34cd7
6개의 변경된 파일28개의 추가작업 그리고 71개의 파일을 삭제
  1. +6
    -15
      src/config/Alerts.h
  2. +6
    -10
      src/config/BackupNetwork.h
  3. +4
    -9
      src/config/Gps.h
  4. +2
    -2
      src/config/Hardware.h
  5. +6
    -14
      src/config/Main.h
  6. +4
    -21
      src/config/System.h

+ 6
- 15
src/config/Alerts.h 파일 보기

@@ -10,24 +10,15 @@
* between readings. Setting a clearance level much higher avoid
* clearing the levels and retriggering them the next time.
*/
#define ALERTS_ON_SERIAL _DEBUG ///< Display alerts on serial when connected rather than sending an SMS.
#define CONFIG_DEFAULT_BATTERY_ALERT_LEVEL1 45 ///< Battery percentage at which to trigger the first low battery alert.
#define CONFIG_DEFAULT_BATTERY_ALERT_LEVEL2 38 ///< Battery percentage at which to trigger the final low battery alert.
#define CONFIG_DEFAULT_BATTERY_ALERT_CLEAR 60 ///< Battery percentage at which to clear all battery alerts.
#define CONFIG_DEFAULT_ACTIVE_ALERTS 0 ///< Default active alerts
#define CONFIG_DEFAULT_CONTACT_PHONE "+642568452" ///< Default phone number to send the alert SMS to.
#define CONFIG_DEFAULT_CONTACT_PHONE "+642568452" ///< Default phone number to send the alert SMS to.
/**
\def ALERTS_ON_SERIAL
Display alerts on serial when connected rather than sending an SMS.
Useful for debugging purpose and avoid costs related to SMS sending.
*/
#define ALERTS_ON_SERIAL _DEBUG
/**
\def ALERT_SUSPICIOUS_RTC_TEMPERATURE
Temperature at which to consider the RTC module as failling.
When the backup battery is dead or nearly dead, the reading
of the temperature fails and returns 0.
*/
#define ALERT_SUSPICIOUS_RTC_TEMPERATURE 0
#define ALERT_SUSPICIOUS_RTC_TEMPERATURE 0 ///< Temperature at which to consider the RTC module as failling.
///< When the backup battery is dead or nearly dead, the reading
///< of the temperature fails and returns 0.

+ 6
- 10
src/config/BackupNetwork.h 파일 보기

@@ -4,17 +4,13 @@
#pragma once
#define POSITIONS_CONFIG_NET_DEFAULT_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_DEFAULT_APN "Vodafone" ///< APN used for GPRS context
#define POSITIONS_CONFIG_NET_DEFAULT_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_DEFAULT_APN "Vodafone" ///< APN used for GPRS context
#define POSITIONS_CONFIG_NET_DEFAULT_URL "http://yourserver.com/endpoint" ///< URL to which positions data will be send through an HTTP POST request
#define POSITIONS_CONFIG_NET_DEFAULT_EXPECTED_RESPONSE 201 ///< Expected response code from the server that indicates that the positions has been successfully backuped.
/**
\def POSITIONS_CONFIG_NET_DEFAULT_UNAVAILABLE_NETWORK_POSTPONE_THRESHOLD
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
every single time, which would rapidly consumes all the batty.
*/
#define POSITIONS_CONFIG_NET_DEFAULT_UNAVAILABLE_NETWORK_POSTPONE_THRESHOLD 5
#define POSITIONS_CONFIG_NET_DEFAULT_EXPECTED_RESPONSE 201 ///< Expected response code from the server that indicates that the positions has been successfully backuped.
#define POSITIONS_CONFIG_NET_DEFAULT_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
///< every single time, which would rapidly consumes all the battery.
struct networkConfig_t {
uint8_t saveThreshold; //sizeof = 1


+ 4
- 9
src/config/Gps.h 파일 보기

@@ -6,12 +6,7 @@
#define GPS_DEFAULT_INTERMEDIATE_TIMEOUT_MS 10000L ///< Time to sleeps between each GPS signal assessment.
#define GPS_DEFAULT_TOTAL_TIMEOUT_MS 80000L ///< Timeout after which to stop trying to get a GPS signal.
/**
\def GPS_DEFAULT_MISSED_POSITION_GAP_KM
Gap between the current and previous position above which to consider
that the tracker has moved. Even if stopped, this will trigger a whole
new "cycle" of positions acquisition, and will avoid missing positions
because while moving, the tracker woke up while stopped at a light traffic for instance.
*/
#define GPS_DEFAULT_MISSED_POSITION_GAP_KM 2
#define GPS_DEFAULT_MISSED_POSITION_GAP_KM 2 ///< Gap between the current and previous position above which to consider
///< that the tracker has moved. Even if stopped, this will trigger a whole
///< new "cycle" of positions acquisition, and will avoid missing positions
///< because while moving, the tracker woke up while stopped at a light traffic for instance.

+ 2
- 2
src/config/Hardware.h 파일 보기

@@ -5,8 +5,8 @@
#include <E24.h>
#include <SoftwareSerial.h>
#define E24_ADDRESS E24_DEFAULT_ADDR ///< I2C address of the 24xxx chip
#define E24_SIZE E24Size_t::E24_512K ///< 24xxx chip size
#define E24_ADDRESS E24_DEFAULT_ADDR ///< I2C address of the 24xxx chip
#define E24_SIZE E24Size_t::E24_512K ///< 24xxx chip size
#define SIM808_BAUDRATE 4800 ///< Control the baudrate use to communicate with the SIM808 module
#define SIM_SERIAL_TYPE SoftwareSerial ///< Type of variable that holds the Serial communication with SIM808

+ 6
- 14
src/config/Main.h 파일 보기

@@ -7,23 +7,15 @@
#include "Sleeps.h"
#include "Alerts.h"
/**
\def BACKUP_ENABLE_SDCARD
Enable (1) or disable (0) the backup of positions using an sd card.
Note: This code has never been finished properly because of the lack of space
on the ATMega
*/
#define BACKUP_ENABLE_SDCARD 0
/**
\def BACKUP_ENABLE_NETWORK
Enable (1) or disable (0) the backup of positions using the network.
*/
#define BACKUP_ENABLE_NETWORK 1
#define BACKUP_ENABLE_SDCARD 0 ///< Enable (1) or disable (0) the backup of positions using an sd card.
///< Note: This code has never been finished properly because of the lack of space
///< on the ATMega
#define BACKUP_ENABLE_NETWORK 1 ///< Enable (1) or disable (0) the backup of positions using the network.
#if BACKUP_ENABLE_SDCARD
#include "BackupSd.h"
#include "BackupSd.h"
#endif
#if BACKUP_ENABLE_NETWORK
#include "BackupNetwork.h"
#include "BackupNetwork.h"
#endif

+ 4
- 21
src/config/System.h 파일 보기

@@ -1,26 +1,9 @@
#pragma once
/**
\def CONFIG_ADDR
Address of the config block in the I2C EEPROM chip.
*/
#define CONFIG_ADDR 0
/**
\def CONFIG_RESERVED_SIZE
Reserved size for the config block in the I2C EEPROM chip.
*/
#define CONFIG_RESERVED_SIZE 128
/**
\def CONFIG_SEED
Seed use to detect invalid or outdate configuration data.
Changing this value will reset the configuration block.
*/
#define CONFIG_SEED 14
/**
\def VERSION
Version string, only used for indicative purpose
*/
#define VERSION "1.41"
#define CONFIG_ADDR 0 ///< Address of the config block in the I2C EEPROM chip.
#define CONFIG_RESERVED_SIZE 128 ///< Reserved size for the config block in the I2C EEPROM chip.
#define CONFIG_SEED 14 ///< Seed use to detect invalid or outdate configuration data.
#define VERSION "1.41" /// Version string, only used for indicative purpose.
/**


불러오는 중...
취소
저장