Wombat Environmental Node 1.0
An environmental node for SDI-12 and digital sensors.
Loading...
Searching...
No Matches
globals.h
Go to the documentation of this file.
1#ifndef WOMBAT_GLOBALS_H
2#define WOMBAT_GLOBALS_H
3
4#include "SparkFun_u-blox_SARA-R5_Arduino_Library.h"
5#include "CAT_M1.h"
6#include <str_utils.h>
7
8#ifdef ALLOCATE_GLOBALS
9#define EXTERN
10#else
11#define EXTERN extern
12
13extern const char* commit_id;
14extern const char* repo_status;
15extern const char* repo_branch;
16extern uint16_t ver_major;
17extern uint16_t ver_minor;
18extern uint16_t ver_update;
19
20extern bool spiffs_ok;
21#endif
22
26#define IO_TO_ARDUINO(p) (0x80 + (p))
27
29#define ARDUINO_TO_IO(p) ((p) & 0x7F)
30
33#define SD_CARD_ENABLE 0x85
34
36#define MAX_NUMERIC_STR_SZ 32
37
39#define MAX_G_BUFFER 65536
40
47
49
50constexpr char sd_card_datafile_name[] = "/data.json";
51constexpr char sd_card_logfile_name[] = "/log.txt";
52constexpr char send_fw_version_name[] = "/send_fw_version";
53constexpr char ftp_file_upload_dir[] = "/uploads";
54
57constexpr const char sdi12defn_spiffs[] = "/sdi12defn.json";
58constexpr const char* sdi12defn_no_slash = &sdi12defn_spiffs[1];
59
60void shutdown(void);
61
62
66EXTERN volatile bool timeout_active;
67
75EXTERN volatile bool timeout_restart;
76
77
78#ifdef ALLOCATE_GLOBALS
80SARA_R5 r5(LTE_PWR_ON, -1);
81#else
82extern SARA_R5 r5;
83#endif
84
85extern char* script;
86
87#endif //WOMBAT_GLOBALS_H
#define LTE_PWR_ON
Definition: CAT_M1.h:8
const char * repo_branch
bool spiffs_ok
Definition: main.cpp:47
constexpr char sd_card_datafile_name[]
Definition: globals.h:50
uint16_t ver_minor
void shutdown(void)
Definition: main.cpp:402
char * script
Definition: mqtt_stack.cpp:15
constexpr char ftp_file_upload_dir[]
Definition: globals.h:53
#define MAX_G_BUFFER
The maximum safe size for g_buffer.
Definition: globals.h:39
constexpr const char * sdi12defn_no_slash
Definition: globals.h:58
EXTERN char g_buffer[MAX_G_BUFFER+1]
Definition: globals.h:46
constexpr char send_fw_version_name[]
Definition: globals.h:52
EXTERN volatile bool timeout_restart
Definition: globals.h:75
#define EXTERN
Definition: globals.h:11
SARA_R5 r5
constexpr char sd_card_logfile_name[]
Definition: globals.h:51
EXTERN volatile bool timeout_active
Definition: globals.h:66
constexpr const char sdi12defn_spiffs[]
Definition: globals.h:57
uint16_t ver_update
const char * repo_status
uint16_t ver_major
const char * commit_id
EXTERN bool r5_ok
Definition: globals.h:48