* minor tidy ups
This commit is contained in:
@@ -25,14 +25,14 @@ RAK4631SensorManager sensors;
|
|||||||
#endif
|
#endif
|
||||||
#include <bsec2.h>
|
#include <bsec2.h>
|
||||||
static Bsec2 BME680;
|
static Bsec2 BME680;
|
||||||
float rawPressure = 0;
|
static float rawPressure = 0;
|
||||||
float rawTemperature = 0;
|
static float rawTemperature = 0;
|
||||||
float compTemperature = 0;
|
static float compTemperature = 0;
|
||||||
float rawHumidity = 0;
|
static float rawHumidity = 0;
|
||||||
float compHumidity = 0;
|
static float compHumidity = 0;
|
||||||
float readIAQ = 0;
|
static float readIAQ = 0;
|
||||||
float readStaticIAQ = 0;
|
static float readStaticIAQ = 0;
|
||||||
float readCO2 = 0;
|
static float readCO2 = 0;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef DISPLAY_CLASS
|
#ifdef DISPLAY_CLASS
|
||||||
@@ -41,7 +41,7 @@ float readCO2 = 0;
|
|||||||
|
|
||||||
#ifdef MESH_DEBUG
|
#ifdef MESH_DEBUG
|
||||||
uint32_t deviceOnline = 0x00;
|
uint32_t deviceOnline = 0x00;
|
||||||
void scanDevices(TwoWire *w)
|
static void scanDevices(TwoWire *w)
|
||||||
{
|
{
|
||||||
uint8_t err, addr;
|
uint8_t err, addr;
|
||||||
int nDevices = 0;
|
int nDevices = 0;
|
||||||
@@ -168,8 +168,7 @@ bool RAK4631SensorManager::gpsIsAwake(uint32_t ioPin){
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if ENV_INCLUDE_BME680
|
#if ENV_INCLUDE_BME680
|
||||||
void checkBMEStatus(Bsec2 bsec)
|
static void checkBMEStatus(Bsec2 bsec) {
|
||||||
{
|
|
||||||
if (bsec.status < BSEC_OK)
|
if (bsec.status < BSEC_OK)
|
||||||
{
|
{
|
||||||
MESH_DEBUG_PRINTLN("BSEC error code : %f", float(bsec.status));
|
MESH_DEBUG_PRINTLN("BSEC error code : %f", float(bsec.status));
|
||||||
@@ -188,17 +187,15 @@ void checkBMEStatus(Bsec2 bsec)
|
|||||||
MESH_DEBUG_PRINTLN("BME68X warning code : %f", bsec.sensor.status);
|
MESH_DEBUG_PRINTLN("BME68X warning code : %f", bsec.sensor.status);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
void newDataCallback(const bme68xData data, const bsecOutputs outputs, Bsec2 bsec)
|
|
||||||
{
|
static void newDataCallback(const bme68xData data, const bsecOutputs outputs, Bsec2 bsec) {
|
||||||
if (!outputs.nOutputs)
|
if (!outputs.nOutputs) {
|
||||||
{
|
|
||||||
MESH_DEBUG_PRINTLN("No new data to report out");
|
MESH_DEBUG_PRINTLN("No new data to report out");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
MESH_DEBUG_PRINTLN("BSEC outputs:\n\tTime stamp = %f", (int) (outputs.output[0].time_stamp / INT64_C(1000000)));
|
MESH_DEBUG_PRINTLN("BSEC outputs:\n\tTime stamp = %f", (int) (outputs.output[0].time_stamp / INT64_C(1000000)));
|
||||||
for (uint8_t i = 0; i < outputs.nOutputs; i++)
|
for (uint8_t i = 0; i < outputs.nOutputs; i++) {
|
||||||
{
|
|
||||||
const bsecData output = outputs.output[i];
|
const bsecData output = outputs.output[i];
|
||||||
switch (output.sensor_id)
|
switch (output.sensor_id)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -11,9 +11,6 @@
|
|||||||
#include <helpers/sensors/LocationProvider.h>
|
#include <helpers/sensors/LocationProvider.h>
|
||||||
#include <SparkFun_u-blox_GNSS_Arduino_Library.h>
|
#include <SparkFun_u-blox_GNSS_Arduino_Library.h>
|
||||||
#endif
|
#endif
|
||||||
#if ENV_INCLUDE_BME680
|
|
||||||
#include "bsec2.h"
|
|
||||||
#endif
|
|
||||||
#ifdef DISPLAY_CLASS
|
#ifdef DISPLAY_CLASS
|
||||||
#include <helpers/ui/SSD1306Display.h>
|
#include <helpers/ui/SSD1306Display.h>
|
||||||
#endif
|
#endif
|
||||||
@@ -84,11 +81,6 @@ enum {
|
|||||||
RAK12500_ONLINE = _BV(14),
|
RAK12500_ONLINE = _BV(14),
|
||||||
};
|
};
|
||||||
|
|
||||||
#if ENV_INCLUDE_BME680
|
|
||||||
void newDataCallback(const bme68xData data, const bsecOutputs outputs, Bsec2 bsec);
|
|
||||||
void checkBMEStatus(Bsec2 bsec);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
bool radio_init();
|
bool radio_init();
|
||||||
uint32_t radio_get_rng_seed();
|
uint32_t radio_get_rng_seed();
|
||||||
void radio_set_params(float freq, float bw, uint8_t sf, uint8_t cr);
|
void radio_set_params(float freq, float bw, uint8_t sf, uint8_t cr);
|
||||||
|
|||||||
Reference in New Issue
Block a user