-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.cpp
67 lines (56 loc) · 1.7 KB
/
config.cpp
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
#include "config.h"
#define _STR(x) #x
#define STR(x) _STR(x)
/* TODO Config options */
#ifdef NODENAME
char node_name[9] = STR(NODENAME);
#else
char node_name[9] = "OSTEST"; // null-terminated string, max 8 bytes, A-z0-9
#endif
uint8_t node_name_len = strlen(node_name);
char hops = '9'; // '0'-'9'
uint16_t broadcast_interval = 120;
rfm69_config_t rfm69_cfg = {
true, // enabled
true, // listen
10, // txpower
1, // txpower_low
869.5f, // frequency
0.068f, // frequency_trim
};
float latitude = NAN;
float longitude = NAN;
float altitude = NAN;
double vsense_offset = 0.74; // Seems like it depends on current usage. Jumps to 0.76V
double vsense_mult = 15.227;
bool vbat_enabled = false;
int vbat_pin = 0; // Analog pin A0
double vbat_offset = 0.023;
double vbat_mult = 11.0;
bool vpanel_enabled = false;
int vpanel_pin = 1; // Analog pin A1
double vpanel_offset = 0.330;
double vpanel_mult = 11.1;
bool powersave = true; // Allways assume powersave on boot.
double powersave_treshold = 3.0; // Treshold voltage in volts.
bme280_config_t bme280_cfg = {
false, // enabled
{true, 5, 2}, // temperature( enabled, oversampling, decimals )
{true, 5, 0}, // pressure( enabled, oversampling, decimals )
{true, 5, 0}, // humidity( enabled, oversampling, decimals )
};
dht_config_t dht_cfg = {
false, // enabled
{true, 1}, // temperature( enabled, decimals )
{true, 0}, // humidity( enabled, decimals )
};
onewire_config_t onewire_cfg = {
true, // enabled
7, // pin = PB7
false, // initial search performed
0, // decimal precission
{
{true}, // ds[0] enabled
{true}, // ds[1] enabled
}
};