mirror of
https://github.com/timmbogner/Farm-Data-Relay-System
synced 2024-11-10 07:10:42 +00:00
Refactored DEBUG and DBG to FDRS_DEBUG and FDRS_DBG
Changed those values to be prevent compiling issues with PlatformIO and also as it is good practice not to use names which easily could collide with other libs. Also removed a duplicate line from keywords.txt
This commit is contained in:
parent
9b9c6a8e64
commit
9e57a8f299
@ -16,7 +16,7 @@ In this example, the gateway is set to take any ESP-NOW packet it receives and s
|
||||
## Options
|
||||
### ```#define UNIT_MAC (0xNN)```
|
||||
The UNIT_MAC is the ESP-NOW and LoRa address of the gateway. This is the address that nodes or other gateways will use to pass data to this device.
|
||||
### ```#define DEBUG```
|
||||
### ```#define FDRS_DEBUG```
|
||||
This definition enables debug messages to be sent over the serial port. If disabled, the USB serial port is still used to echo data being sent via the sendSerial() command.
|
||||
### ```#define RXD2 (pin)``` and ```TXD2 (pin)```
|
||||
These are the pins for inter-device serial communication. The single ESP8266 serial interface is not configurable, and thus these options only apply to ESP32 boards.
|
||||
|
@ -3,7 +3,7 @@
|
||||
// GATEWAY 2.000 Configuration
|
||||
|
||||
//#include <fdrs_globals.h> //Uncomment if you install the globals file
|
||||
#define DEBUG //Enable USB-Serial debugging
|
||||
#define FDRS_DEBUG //Enable USB-Serial debugging
|
||||
|
||||
#define UNIT_MAC 0x01 // The address of this gateway
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
// This is the 'meat and potatoes' of FDRS, and should not be fooled with unless improving/adding features.
|
||||
// Developed by Timm Bogner (timmbogner@gmail.com)
|
||||
|
||||
#ifdef DEBUG
|
||||
#ifdef FDRS_DEBUG
|
||||
#define DBG(a) (Serial.println(a))
|
||||
#else
|
||||
#define DBG(a)
|
||||
|
@ -18,7 +18,7 @@ If available and enabled, the device enters deep-sleep. If ```#DEEP_SLEEP``` is
|
||||
The identifier of this individual device. Should be a 16-bit integer (0-65535).
|
||||
### ```#define GTWY_MAC 0xnn```
|
||||
The UNIT_MAC of the gateway that this device will send its data to.
|
||||
### ```#define DEBUG```
|
||||
### ```#define FDRS_DEBUG```
|
||||
This definition enables debug messages to be sent over the serial port. If disabled, no serial interface will be initialized.
|
||||
### ```#define USE_ESPNOW```
|
||||
Enables/disables ESP-NOW.
|
||||
|
@ -13,7 +13,7 @@
|
||||
//#define USE_LORA
|
||||
#define DEEP_SLEEP
|
||||
//#define POWER_CTRL 14
|
||||
#define DEBUG
|
||||
#define FDRS_DEBUG
|
||||
|
||||
//SPI Configuration -- Needed only on Boards with multiple SPI interfaces like the ESP32
|
||||
#define SPI_SCK 5
|
||||
|
@ -13,7 +13,7 @@
|
||||
//#define USE_LORA
|
||||
#define DEEP_SLEEP
|
||||
//#define POWER_CTRL 14
|
||||
//#define DEBUG
|
||||
//#define FDRS_DEBUG
|
||||
|
||||
//SPI Configuration -- Needed only on Boards with multiple SPI interfaces like the ESP32
|
||||
#define SPI_SCK 5
|
||||
|
@ -13,7 +13,7 @@
|
||||
#define USE_LORA
|
||||
#define DEEP_SLEEP
|
||||
//#define POWER_CTRL 14
|
||||
#define DEBUG
|
||||
#define FDRS_DEBUG
|
||||
|
||||
//SPI Configuration -- Needed only on Boards with multiple SPI interfaces like the ESP32
|
||||
#define SPI_SCK 5
|
||||
|
@ -13,7 +13,7 @@
|
||||
//#define USE_LORA
|
||||
#define DEEP_SLEEP
|
||||
//#define POWER_CTRL 14
|
||||
#define DEBUG
|
||||
#define FDRS_DEBUG
|
||||
|
||||
//SPI Configuration -- Needed only on Boards with multiple SPI interfaces like the ESP32
|
||||
#define SPI_SCK 5
|
||||
|
@ -3,7 +3,7 @@
|
||||
// GATEWAY 2.000 Configuration
|
||||
|
||||
#include <fdrs_globals.h> // Comment if you want to set specific values for this individually
|
||||
#define DEBUG
|
||||
#define FDRS_DEBUG
|
||||
|
||||
#define UNIT_MAC 0x03 // The address of this gateway
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
// GATEWAY 2.000 Configuration
|
||||
|
||||
#include <fdrs_globals.h> // Comment if you want to set specific values for this individually
|
||||
#define DEBUG
|
||||
#define FDRS_DEBUG
|
||||
|
||||
#define UNIT_MAC 0x04 // The address of this gateway
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
// GATEWAY 2.000 Configuration
|
||||
|
||||
#include <fdrs_globals.h> // Comment if you want to set specific values for this individually
|
||||
#define DEBUG //Enable debugging information over serial
|
||||
#define FDRS_DEBUG //Enable debugging information over serial
|
||||
|
||||
#define UNIT_MAC 0x05 // The address of this gateway
|
||||
|
||||
|
@ -13,7 +13,7 @@
|
||||
//#define USE_LORA
|
||||
#define DEEP_SLEEP
|
||||
//#define POWER_CTRL 14
|
||||
#define DEBUG
|
||||
#define FDRS_DEBUG
|
||||
|
||||
//SPI Configuration -- Needed only on Boards with multiple SPI interfaces like the ESP32
|
||||
#define SPI_SCK 5
|
||||
|
@ -13,7 +13,7 @@
|
||||
//#define USE_LORA
|
||||
#define DEEP_SLEEP
|
||||
//#define POWER_CTRL 14
|
||||
#define DEBUG
|
||||
#define FDRS_DEBUG
|
||||
|
||||
//SPI Configuration -- Needed only on Boards with multiple SPI interfaces like the ESP32
|
||||
#define SPI_SCK 5
|
||||
|
@ -13,7 +13,7 @@
|
||||
//#define USE_LORA
|
||||
#define DEEP_SLEEP
|
||||
//#define POWER_CTRL 14
|
||||
#define DEBUG
|
||||
#define FDRS_DEBUG
|
||||
|
||||
//SPI Configuration -- Needed only on Boards with multiple SPI interfaces like the ESP32
|
||||
#define SPI_SCK 5
|
||||
|
@ -13,7 +13,7 @@
|
||||
//#define USE_LORA
|
||||
//#define DEEP_SLEEP
|
||||
//#define POWER_CTRL 14
|
||||
#define DEBUG
|
||||
#define FDRS_DEBUG
|
||||
|
||||
//SPI Configuration -- Needed only on Boards with multiple SPI interfaces like the ESP32
|
||||
#define SPI_SCK 5
|
||||
|
@ -13,7 +13,7 @@
|
||||
//#define USE_LORA
|
||||
#define DEEP_SLEEP
|
||||
//#define POWER_CTRL 14
|
||||
#define DEBUG
|
||||
#define FDRS_DEBUG
|
||||
|
||||
//SPI Configuration -- Needed only on Boards with multiple SPI interfaces like the ESP32
|
||||
#define SPI_SCK 5
|
||||
|
@ -13,7 +13,7 @@
|
||||
#define USE_LORA
|
||||
#define DEEP_SLEEP
|
||||
//#define POWER_CTRL 14
|
||||
#define DEBUG
|
||||
#define FDRS_DEBUG
|
||||
|
||||
//SPI Configuration -- Needed only on Boards with multiple SPI interfaces like the ESP32
|
||||
#define SPI_SCK 5
|
||||
|
@ -13,7 +13,7 @@
|
||||
//#define USE_LORA
|
||||
#define DEEP_SLEEP
|
||||
//#define POWER_CTRL 14
|
||||
#define DEBUG
|
||||
#define FDRS_DEBUG
|
||||
|
||||
//SPI Configuration -- Needed only on Boards with multiple SPI interfaces like the ESP32
|
||||
#define SPI_SCK 5
|
||||
|
@ -13,7 +13,7 @@
|
||||
//#define USE_LORA
|
||||
#define DEEP_SLEEP
|
||||
//#define POWER_CTRL 14
|
||||
#define DEBUG
|
||||
#define FDRS_DEBUG
|
||||
|
||||
//SPI Configuration -- Needed only on Boards with multiple SPI interfaces like the ESP32
|
||||
#define SPI_SCK 5
|
||||
|
@ -13,7 +13,7 @@
|
||||
//#define USE_LORA
|
||||
//#define DEEP_SLEEP
|
||||
//#define POWER_CTRL 14
|
||||
#define DEBUG
|
||||
#define FDRS_DEBUG
|
||||
|
||||
//SPI Configuration -- Needed only on Boards with multiple SPI interfaces like the ESP32
|
||||
#define SPI_SCK 5
|
||||
|
@ -3,7 +3,7 @@
|
||||
// GATEWAY 2.000 Configuration
|
||||
|
||||
#include <fdrs_globals.h> // uncomment if you want to set specific values for this sensor in sensor_setup.h
|
||||
#define DEBUG
|
||||
#define FDRS_DEBUG
|
||||
|
||||
#define MAC_PREFIX 0xAA, 0xBB, 0xCC, 0xDD, 0xEE // Should only be changed if implementing multiple FDRS systems.
|
||||
|
||||
|
@ -25,9 +25,9 @@
|
||||
|
||||
#define USE_LORA
|
||||
|
||||
#define DEBUG
|
||||
#define FDRS_DEBUG
|
||||
|
||||
#ifdef DEBUG
|
||||
#ifdef FDRS_DEBUG
|
||||
#define DBG(a) (Serial.println(a))
|
||||
#else
|
||||
#define DBG(a)
|
||||
|
@ -22,7 +22,7 @@ FDRSBase::~FDRSBase(){
|
||||
}
|
||||
|
||||
void FDRSBase::begin() {
|
||||
#ifdef DEBUG
|
||||
#ifdef FDRS_DEBUG
|
||||
Serial.begin(115200);
|
||||
#endif
|
||||
DBG("FDRS Sensor ID " + String(_reading_id) + " initializing...");
|
||||
|
@ -16,8 +16,8 @@
|
||||
#define ENABLE_DEBUG 1
|
||||
|
||||
#if ENABLE_DEBUG == 1
|
||||
#ifndef DEBUG
|
||||
#define DEBUG
|
||||
#ifndef FDRS_DEBUG
|
||||
#define FDRS_DEBUG
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@ -44,7 +44,7 @@
|
||||
#define FDRS_SF LORA_SF
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG
|
||||
#ifdef FDRS_DEBUG
|
||||
#define DBG(a) (Serial.println(a))
|
||||
#else
|
||||
#define DBG(a)
|
||||
|
@ -11,7 +11,7 @@
|
||||
|
||||
#define DEEP_SLEEP
|
||||
//#define POWER_CTRL 14
|
||||
#define DEBUG
|
||||
#define FDRS_DEBUG
|
||||
|
||||
//SPI Configuration -- Needed only on Boards with multiple SPI interfaces like the ESP32
|
||||
#define SPI_SCK 5
|
||||
|
@ -4,7 +4,7 @@
|
||||
// This is the 'meat and potatoes' of FDRS, and should not be fooled with unless improving/adding features.
|
||||
// Developed by Timm Bogner (timmbogner@gmail.com)
|
||||
|
||||
#ifdef DEBUG
|
||||
#ifdef FDRS_DEBUG
|
||||
#define DBG(a) (Serial.println(a))
|
||||
#else
|
||||
#define DBG(a)
|
||||
|
@ -25,7 +25,7 @@
|
||||
#define FDRS_SF LORA_SF
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG
|
||||
#ifdef FDRS_DEBUG
|
||||
#define DBG(a) (Serial.println(a))
|
||||
#else
|
||||
#define DBG(a)
|
||||
@ -50,7 +50,7 @@ DataReading fdrsData[espnow_size];
|
||||
uint8_t data_count = 0;
|
||||
|
||||
void beginFDRS() {
|
||||
#ifdef DEBUG
|
||||
#ifdef FDRS_DEBUG
|
||||
Serial.begin(115200);
|
||||
#endif
|
||||
DBG("FDRS Sensor ID " + String(READING_ID) + " initializing...");
|
||||
|
@ -11,7 +11,7 @@ DataReading KEYWORD1
|
||||
##########################################################
|
||||
# Methods and Functions (KEYWORD2)
|
||||
##########################################################
|
||||
DBG KEYWORD2
|
||||
FDRS_DBG KEYWORD2
|
||||
beginFDRS KEYWORD2
|
||||
bufferESPNOW KEYWORD2
|
||||
bufferLoRa KEYWORD2
|
||||
@ -31,8 +31,7 @@ transmitLoRa KEYWORD2
|
||||
##########################################################
|
||||
# Literals (LITERAL1)
|
||||
##########################################################
|
||||
DEBUG LITERAL1
|
||||
DEBUG LITERAL1
|
||||
FDRS_DEBUG LITERAL1
|
||||
DEEP_SLEEP LITERAL1
|
||||
FDRS_BAND LITERAL1
|
||||
FDRS_GLOBALS LITERAL1
|
||||
|
Loading…
Reference in New Issue
Block a user