payloadmask
This commit is contained in:
1 parent
bf62d448ac
commit
26082740af
11 files changed
+104
-58
No files matched your search
@@ -1,5 +1,5 @@
|
||||
#ifndef _HAS_BME
|
||||
#define _HAS_BME
|
||||
#ifndef _BME680_H
|
||||
#define _BME680_H
|
||||
|
||||
#include "globals.h"
|
||||
#include <Wire.h>
|
||||
+25
-5
@@ -9,6 +9,26 @@
|
||||
#include <array>
|
||||
#include <algorithm>
|
||||
|
||||
// bits in payloadmask for filtering payload data
|
||||
#define GPS_DATA (0x01)
|
||||
#define ALARM_DATA (0x02)
|
||||
#define MEMS_DATA (0x04)
|
||||
#define COUNT_DATA (0x08)
|
||||
#define SENSOR1_DATA (0x10)
|
||||
#define SENSOR2_DATA (0x20)
|
||||
#define SENSOR3_DATA (0x40)
|
||||
#define SENSOR4_DATA (0x80)
|
||||
|
||||
// bits in configmask for device runmode control
|
||||
#define GPS_MODE (0x01)
|
||||
#define ALARM_MODE (0x02)
|
||||
#define BEACON_MODE (0x04)
|
||||
#define UPDATE_MODE (0x08)
|
||||
#define FILTER_MODE (0x10)
|
||||
#define ANTENNA_MODE (0x20)
|
||||
#define BLE_MODE (0x40)
|
||||
#define SCREEN_MODE (0x80)
|
||||
|
||||
// Struct holding devices's runtime configuration
|
||||
typedef struct {
|
||||
uint8_t lorasf; // 7-12, lora spreadfactor
|
||||
@@ -25,9 +45,9 @@ typedef struct {
|
||||
uint8_t wifiant; // 0=internal, 1=external (for LoPy/LoPy4)
|
||||
uint8_t vendorfilter; // 0=disabled, 1=enabled
|
||||
uint8_t rgblum; // RGB Led luminosity (0..100%)
|
||||
uint8_t gpsmode; // 0=disabled, 1=enabled
|
||||
uint8_t monitormode; // 0=disabled, 1=enabled
|
||||
uint8_t runmode; // 0=normal, 1=update
|
||||
uint8_t payloadmask; // bitswitches for payload data
|
||||
char version[10]; // Firmware version
|
||||
} configData_t;
|
||||
|
||||
@@ -47,9 +67,9 @@ typedef struct {
|
||||
} gpsStatus_t;
|
||||
|
||||
typedef struct {
|
||||
float temperature; // Temperature in degrees Centigrade
|
||||
uint16_t pressure; // Barometic pressure in hecto pascals
|
||||
float humidity; // Relative humidity in percent
|
||||
float temperature; // Temperature in degrees Centigrade
|
||||
uint16_t pressure; // Barometic pressure in hecto pascals
|
||||
float humidity; // Relative humidity in percent
|
||||
uint16_t gas_resistance; // Resistance in MOhms
|
||||
} bmeStatus_t;
|
||||
|
||||
@@ -75,7 +95,7 @@ extern TaskHandle_t irqHandlerTask, wifiSwitchTask;
|
||||
#endif
|
||||
|
||||
#ifdef HAS_BME
|
||||
#include "bme680read.h"
|
||||
#include "bme680.h"
|
||||
#endif
|
||||
|
||||
#ifdef HAS_LORA
|
||||
|
||||
Reference in new issue
Block a user