forked from RP6conrad/ESP-GPS-Logger
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDefinitions.h
61 lines (59 loc) · 3.16 KB
/
Definitions.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#ifndef RTOS5_H
#define RTOS5_H
//#define STATIC_DEBUG //indien gps test zonder snelheid en met wifi actief
//#define DLS //set date on march 26 1:55, to test daylightsaving
#define T5_E_PAPER //for compiling without display funtions....
#define GPIO12_ACTIF //if GPIO12 is used as wake up, standard GPIO12 function is not activated !!
#define TIME_DELAY_FIRST_FIX 10 //10 navpvt messages alvorens start loggen
#define TIME_DELAY_NEW_RUN 10 //int time_delay_new_run
#define EPOCH_2022 1640995200 //start of the year 2022 1640995200
#define UBLOX_TYPE_UNKNOWN 0
#define M8_9600BD 1
#define M10_9600BD 2
#define M8_38400BD 3
#define M10_38400BD 4
#define M9_9600BD 5
#define M9_38400BD 6
#define AUTO_DETECT 0xFF
/*Pin definitions**************************************************************************/
#define SPI_MOSI 23
#define SPI_MISO -1//standaard is MISO GPIO 19 !!!!
#define SPI_CLK 18
#define SDCARD_SS 13
#define SDCARD_CLK 14
#define SDCARD_MOSI 15
#define SDCARD_MISO 2
#define WAKE_UP_GPIO 39 //default 39
#define GPIO_NUM_xx GPIO_NUM_39 //default GPIO_NUM_39 type is no int
#define RXD2 32 //yellow is Tx Ublox, Beitian white is Tx
#define TXD2 33 //green is Rx Ublox, Beitian green is Rx
#define PIN_BAT 35 //adc for bat voltage
#define UBLOX_POWER1 25
#define UBLOX_RTC_GPIO1 GPIO_NUM_25
#define UBLOX_POWER2 26
#define UBLOX_RTC_GPIO2 GPIO_NUM_26
#define UBLOX_POWER3 27
#define UBLOX_GPIO3 GPIO_NUM_27
/*Other definitions...**********************************************************************/
#define CALIBRATION_BAT_V 1.7 //voor proto 1
#define VOLTAGE_100 4.15 //reading 100% bat, after end charging voltage drops to 4.15 V
#define VOLTAGE_0 3.4 //reading 0% bat
#define VOLTAGE_LOW 25 //reading 25% bat
#define MINIMUM_VOLTAGE 3.1 // if lower then minimum_voltage, back to sleep.....
#define MINIMUM_VOLTAGE_CHANGE 0.01 //refresh screen if change > 0.01
#define STARTVALUE_HIGHEST_READ 2300 //12 bit ADC, 4.2 V over voltagedivider
#define MAXVALUE_HIGHEST_READ 2700
#define FULLY_CHARGED_LIPO_VOLTAGE 4200.0 // to calculate calibration factor : 4200.0/ADC value bij highest reading while charging
#define uS_TO_S_FACTOR 1000000UL /* Conversion factor for micro seconds to seconds */
#define TIME_TO_SLEEP 1800UL //1800UL /* Time ESP32 will go to sleep (no for 30min, only refresh screen if delta bat > 0.05 V) */
#define WDT_TIMEOUT 120 //120 seconds WDT, opgelet zoeken naar ssid time-out<dan 10s !!!
#define MAX_COUNT_WDT_TASK0 10 // 600 seconds max downloadtime for files !!!
#define MIN_numSV_FIRST_FIX 5 //alvorens start loggen, changed from 4 to 5 7.1/2023
#define MAX_Sacc_FIRST_FIX 2 //alvorens start loggen
#define MIN_numSV_GPS_SPEED_OK 4 //min aantal satellieten voor berekenen snelheid, anders
#define MAX_Sacc_GPS_SPEED_OK 1 //max waarde Sacc voor berekenen snelheid, anders 0
#define MAX_GPS_SPEED_OK 40 //max snelheid in m/s voor berekenen snelheid, anders 0
#define EEPROM_SIZE 32 //use 8 bytes in eeprom for saving type of ublox
#define TIME_OUT_NAV_PVT 10000 //10s time out ubx nav-pvt msg before screen "TROUBLE"
#define FORMAT_LITTLEFS_IF_FAILED true
#endif