-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.h
86 lines (72 loc) · 2.34 KB
/
config.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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
/**
* This file is part of Wio Helium Monitor.
*
* Wio Helium Monitor is free software created by Paul Pinault aka disk91.
* You can redistribute it and/or modify it under the terms of the
* GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* any later version.
*
* Wio Helium Monitor is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Wio LoRaWan Field Tester. If not, see <https://www.gnu.org/licenses/>.
*
* Author : Paul Pinault (disk91.com)
*/
#ifndef __CONFIG_H
#define __CONFIG_H
// 1 - select if you want some debug
//#define DEBUG
//#define DEBUGLORA
//#define DEBUGDATA
#define RFM95 0 // Make sure the board ROLE is MASTER
#define LORAE5 1 // Make sure the board ROLE is SLAVE
// 2 - select the target board, original one based on RFM95 or Seed LoRa E5 version
#define HWTARGET LORAE5
#if HWTARGET == LORAE5
#define CFG_anyZone
#define WITH_GPS
#define SERIALE5 Serial1
#endif
#if HWTARGET == RFM95
#define RFM95_NSS_PIN 0
#define RFM95_RST_PIN 1
#define RFM95_DIO_0 3
#define RFM95_DIO_1 2
#endif
// 4 - Active on of the possible Splash screen ( or none or both )
#define WITH_SPLASH 1
#define WITH_SPLASH_HELIUM 1
//#define JUSTCLEAN
#define VERSION "1.0"
#ifdef DEBUG
#define LOGLN(x) Serial.println x
#define LOG(x) Serial.print x
#define LOGF(x) Serial.printf x
#else
#define LOGLN(x)
#define LOG(x)
#define LOGF(x)
#endif
#ifdef DEBUGLORA
#define LOGLORALN(x) Serial.println x
#define LOGLORA(x) Serial.print x
#define LOGLORAF(x) Serial.printf x
#else
#define LOGLORALN(x)
#define LOGLORA(x)
#define LOGLORAF(x)
#endif
#define SERIALCONFIG Serial
#define NONDCZONE_DUTYCYCLE_MS 25000 // Fair use and preserve DCs in MS
#define MAXNONMOVEMENT_DURATION_MS ( 30 * 60 * 1000 ) // Fair use - downgrade period when the position of the device is unchanged
bool readConfig();
void storeConfig();
bool storeConfigToBackup();
bool readConfigFromBackup();
void clearBackup();
#endif // __CONFIG_H