mirror of
https://github.com/meshtastic/firmware.git
synced 2025-04-25 17:42:48 +00:00
Merge branch 'master' into master
This commit is contained in:
commit
275e393115
@ -1,7 +1,7 @@
|
|||||||
#include "InputBroker.h"
|
#include "InputBroker.h"
|
||||||
#include "PowerFSM.h" // needed for event trigger
|
#include "PowerFSM.h" // needed for event trigger
|
||||||
|
|
||||||
InputBroker *inputBroker;
|
InputBroker *inputBroker = nullptr;
|
||||||
|
|
||||||
InputBroker::InputBroker(){};
|
InputBroker::InputBroker(){};
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
#include "cardKbI2cImpl.h"
|
#include "cardKbI2cImpl.h"
|
||||||
#include "InputBroker.h"
|
#include "InputBroker.h"
|
||||||
#include "detect/ScanI2C.h"
|
#include "main.h"
|
||||||
#include "detect/ScanI2CTwoWire.h"
|
#include "detect/ScanI2CTwoWire.h"
|
||||||
|
|
||||||
CardKbI2cImpl *cardKbI2cImpl;
|
CardKbI2cImpl *cardKbI2cImpl;
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
#include "kbI2cBase.h"
|
#include "kbI2cBase.h"
|
||||||
#include "main.h"
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief The idea behind this class to have static methods for the event handlers.
|
* @brief The idea behind this class to have static methods for the event handlers.
|
||||||
|
13
src/main.cpp
13
src/main.cpp
@ -41,13 +41,14 @@
|
|||||||
#endif
|
#endif
|
||||||
#if !MESHTASTIC_EXCLUDE_BLUETOOTH
|
#if !MESHTASTIC_EXCLUDE_BLUETOOTH
|
||||||
#include "nimble/NimbleBluetooth.h"
|
#include "nimble/NimbleBluetooth.h"
|
||||||
NimbleBluetooth *nimbleBluetooth;
|
NimbleBluetooth *nimbleBluetooth = nullptr;
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef ARCH_NRF52
|
#ifdef ARCH_NRF52
|
||||||
#include "NRF52Bluetooth.h"
|
#include "NRF52Bluetooth.h"
|
||||||
NRF52Bluetooth *nrf52Bluetooth;
|
NRF52Bluetooth *nrf52Bluetooth = nullptr;
|
||||||
|
;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if HAS_WIFI
|
#if HAS_WIFI
|
||||||
@ -94,23 +95,23 @@ NRF52Bluetooth *nrf52Bluetooth;
|
|||||||
#include "ButtonThread.h"
|
#include "ButtonThread.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include "AmbientLightingThread.h"
|
||||||
#include "PowerFSMThread.h"
|
#include "PowerFSMThread.h"
|
||||||
|
|
||||||
#if !defined(ARCH_PORTDUINO) && !defined(ARCH_STM32WL) && !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR
|
#if !defined(ARCH_PORTDUINO) && !defined(ARCH_STM32WL) && !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR
|
||||||
#include "AccelerometerThread.h"
|
#include "AccelerometerThread.h"
|
||||||
#include "AmbientLightingThread.h"
|
AccelerometerThread *accelerometerThread = nullptr;
|
||||||
AccelerometerThread *accelerometerThread;
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAS_I2S
|
#ifdef HAS_I2S
|
||||||
#include "AudioThread.h"
|
#include "AudioThread.h"
|
||||||
AudioThread *audioThread;
|
AudioThread *audioThread = nullptr;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
using namespace concurrency;
|
using namespace concurrency;
|
||||||
|
|
||||||
// We always create a screen object, but we only init it if we find the hardware
|
// We always create a screen object, but we only init it if we find the hardware
|
||||||
graphics::Screen *screen;
|
graphics::Screen *screen = nullptr;
|
||||||
|
|
||||||
// Global power status
|
// Global power status
|
||||||
meshtastic::PowerStatus *powerStatus = new meshtastic::PowerStatus();
|
meshtastic::PowerStatus *powerStatus = new meshtastic::PowerStatus();
|
||||||
|
@ -42,6 +42,7 @@
|
|||||||
#include "modules/Telemetry/DeviceTelemetry.h"
|
#include "modules/Telemetry/DeviceTelemetry.h"
|
||||||
#endif
|
#endif
|
||||||
#if HAS_SENSOR && !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR
|
#if HAS_SENSOR && !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR
|
||||||
|
#include "main.h"
|
||||||
#include "modules/Telemetry/AirQualityTelemetry.h"
|
#include "modules/Telemetry/AirQualityTelemetry.h"
|
||||||
#include "modules/Telemetry/EnvironmentTelemetry.h"
|
#include "modules/Telemetry/EnvironmentTelemetry.h"
|
||||||
#endif
|
#endif
|
||||||
|
@ -1,7 +1,10 @@
|
|||||||
#include "OPT3001Sensor.h"
|
|
||||||
#include "../mesh/generated/meshtastic/telemetry.pb.h"
|
|
||||||
#include "TelemetrySensor.h"
|
|
||||||
#include "configuration.h"
|
#include "configuration.h"
|
||||||
|
|
||||||
|
#if !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR
|
||||||
|
|
||||||
|
#include "../mesh/generated/meshtastic/telemetry.pb.h"
|
||||||
|
#include "OPT3001Sensor.h"
|
||||||
|
#include "TelemetrySensor.h"
|
||||||
#include <ClosedCube_OPT3001.h>
|
#include <ClosedCube_OPT3001.h>
|
||||||
|
|
||||||
OPT3001Sensor::OPT3001Sensor() : TelemetrySensor(meshtastic_TelemetrySensorType_OPT3001, "OPT3001") {}
|
OPT3001Sensor::OPT3001Sensor() : TelemetrySensor(meshtastic_TelemetrySensorType_OPT3001, "OPT3001") {}
|
||||||
@ -41,4 +44,6 @@ bool OPT3001Sensor::getMetrics(meshtastic_Telemetry *measurement)
|
|||||||
LOG_INFO("Lux: %f\n", measurement->variant.environment_metrics.lux);
|
LOG_INFO("Lux: %f\n", measurement->variant.environment_metrics.lux);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
@ -1,3 +1,8 @@
|
|||||||
|
#pragma once
|
||||||
|
#include "configuration.h"
|
||||||
|
|
||||||
|
#if !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR
|
||||||
|
|
||||||
#include "../mesh/generated/meshtastic/telemetry.pb.h"
|
#include "../mesh/generated/meshtastic/telemetry.pb.h"
|
||||||
#include "TelemetrySensor.h"
|
#include "TelemetrySensor.h"
|
||||||
#include <ClosedCube_OPT3001.h>
|
#include <ClosedCube_OPT3001.h>
|
||||||
@ -14,4 +19,6 @@ class OPT3001Sensor : public TelemetrySensor
|
|||||||
OPT3001Sensor();
|
OPT3001Sensor();
|
||||||
virtual int32_t runOnce() override;
|
virtual int32_t runOnce() override;
|
||||||
virtual bool getMetrics(meshtastic_Telemetry *measurement) override;
|
virtual bool getMetrics(meshtastic_Telemetry *measurement) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#endif
|
Loading…
Reference in New Issue
Block a user