mirror of
https://github.com/meshtastic/firmware.git
synced 2025-04-24 01:16:55 +00:00
Added NRF/RAK support for env plugin (#1133)
* Added NRF/RAK support for env plugin * Added Environmental mixin to platform io
This commit is contained in:
parent
6830f9861a
commit
e706aae41d
@ -101,6 +101,15 @@ build_flags = ${env.build_flags} -Os
|
||||
|
||||
src_filter = ${env.src_filter} -<portduino/>
|
||||
|
||||
; Common libs for environmental measurements (not included in native / portduino)
|
||||
[environmental]
|
||||
lib_deps =
|
||||
adafruit/DHT sensor library@^1.4.1
|
||||
adafruit/Adafruit Unified Sensor@^1.1.4
|
||||
paulstoffregen/OneWire@^2.3.5
|
||||
robtillaart/DS18B20@^0.1.11
|
||||
adafruit/Adafruit BME280 Library@^2.2.2
|
||||
|
||||
; Common settings for ESP targes, mixin with extends = esp32_base
|
||||
[esp32_base]
|
||||
extends = arduino_base
|
||||
@ -119,15 +128,11 @@ build_flags =
|
||||
-DAXP_DEBUG_PORT=Serial
|
||||
lib_deps =
|
||||
${arduino_base.lib_deps}
|
||||
${environmental.lib_deps}
|
||||
https://github.com/meshtastic/esp32_https_server.git
|
||||
adafruit/DHT sensor library@^1.4.1
|
||||
adafruit/Adafruit Unified Sensor@^1.1.4
|
||||
paulstoffregen/OneWire@^2.3.5
|
||||
robtillaart/DS18B20@^0.1.11
|
||||
h2zero/NimBLE-Arduino@1.3.4
|
||||
tobozo/ESP32-targz@^1.1.4
|
||||
arduino-libraries/NTPClient#531eff39d9fbc831f3d03f706a161739203fbe2a
|
||||
adafruit/Adafruit BME280 Library@^2.2.2
|
||||
|
||||
# Hmm - this doesn't work yet
|
||||
# board_build.ldscript = linker/esp32.extram.bss.ld
|
||||
@ -298,6 +303,7 @@ extends = nrf52_base
|
||||
build_flags = ${nrf52_base.build_flags}
|
||||
lib_deps =
|
||||
${arduino_base.lib_deps}
|
||||
${environmental.lib_deps}
|
||||
Adafruit nRFCrypto
|
||||
# Adafruit TinyUSB Arduino
|
||||
# add Adafruit nRFCrypto platform IO automated scan is broken
|
||||
@ -477,6 +483,7 @@ src_filter =
|
||||
-<nrf52/>
|
||||
-<mesh/http/>
|
||||
-<plugins/esp32>
|
||||
-<plugins/EnvironmentalMeasurementPlugin.cpp*>
|
||||
+<../variants/portduino>
|
||||
build_flags = ${arduino_base.build_flags} -O0 -I variants/portduino
|
||||
framework = arduino
|
||||
@ -495,6 +502,7 @@ src_filter =
|
||||
-<nrf52/>
|
||||
-<mesh/http/>
|
||||
-<plugins/esp32>
|
||||
-<plugins/EnvironmentalMeasurementPlugin.cpp*>
|
||||
+<../variants/portduino>
|
||||
build_flags = ${arduino_base.build_flags} -O0 -lgpiod -I variants/portduino
|
||||
framework = arduino
|
||||
|
@ -39,8 +39,7 @@
|
||||
|
||||
int32_t EnvironmentalMeasurementPlugin::runOnce()
|
||||
{
|
||||
#ifndef NO_ESP32 // this only works on ESP32 devices
|
||||
|
||||
#ifndef PORTDUINO
|
||||
/*
|
||||
Uncomment the preferences below if you want to use the plugin
|
||||
without having to configure it from the PythonAPI or WebUI.
|
@ -11,9 +11,11 @@
|
||||
#include "plugins/RoutingPlugin.h"
|
||||
#include "plugins/AdminPlugin.h"
|
||||
#include "plugins/CannedMessagePlugin.h"
|
||||
#ifndef PORTDUINO
|
||||
#include "plugins/EnvironmentalMeasurementPlugin.h"
|
||||
#endif
|
||||
#ifndef NO_ESP32
|
||||
#include "plugins/esp32/SerialPlugin.h"
|
||||
#include "plugins/esp32/EnvironmentalMeasurementPlugin.h"
|
||||
#include "plugins/esp32/RangeTestPlugin.h"
|
||||
#include "plugins/esp32/StoreForwardPlugin.h"
|
||||
#endif
|
||||
@ -38,7 +40,9 @@ void setupPlugins()
|
||||
new RotaryEncoderInterruptImpl1();
|
||||
rotaryEncoderInterruptImpl1->init();
|
||||
cannedMessagePlugin = new CannedMessagePlugin();
|
||||
|
||||
#ifndef PORTDUINO
|
||||
new EnvironmentalMeasurementPlugin();
|
||||
#endif
|
||||
#ifndef NO_ESP32
|
||||
// Only run on an esp32 based device.
|
||||
|
||||
@ -53,7 +57,6 @@ void setupPlugins()
|
||||
|
||||
new RangeTestPlugin();
|
||||
// new StoreForwardPlugin();
|
||||
new EnvironmentalMeasurementPlugin();
|
||||
#endif
|
||||
|
||||
// NOTE! This plugin must be added LAST because it likes to check for replies from other plugins and avoid sending extra acks
|
||||
|
Loading…
Reference in New Issue
Block a user