mirror of
https://github.com/meshcore-dev/MeshCore.git
synced 2026-04-20 22:13:47 +00:00
Merge pull request #321 from oltaco/sensor-class-with-gps
GPS support added to EnvironmentSensorClass
This commit is contained in:
commit
3b41d863c8
4 changed files with 223 additions and 45 deletions
|
|
@ -13,6 +13,14 @@ build_flags = ${nrf52840_base.build_flags}
|
|||
-D PIN_BOARD_SDA=8
|
||||
-D PIN_OLED_RESET=-1
|
||||
-D PIN_USER_BTN=6
|
||||
-D PIN_GPS_RX=3
|
||||
-D PIN_GPS_TX=4
|
||||
-D PIN_GPS_EN=5
|
||||
-D ENV_INCLUDE_GPS=1
|
||||
-D ENV_INCLUDE_AHTX0=1
|
||||
-D ENV_INCLUDE_BME280=1
|
||||
-D ENV_INCLUDE_INA3221=1
|
||||
-D ENV_INCLUDE_INA219=1
|
||||
build_src_filter = ${nrf52840_base.build_src_filter}
|
||||
+<helpers/nrf52/PromicroBoard.cpp>
|
||||
+<helpers/sensors>
|
||||
|
|
@ -23,7 +31,8 @@ lib_deps= ${nrf52840_base.lib_deps}
|
|||
adafruit/Adafruit INA219 @ ^1.2.3
|
||||
adafruit/Adafruit AHTX0 @ ^2.0.5
|
||||
adafruit/Adafruit BME280 Library @ ^2.3.0
|
||||
|
||||
stevemarple/MicroNMEA @ ^2.0.6
|
||||
|
||||
[env:Faketec_Repeater]
|
||||
extends = Faketec
|
||||
build_src_filter = ${Faketec.build_src_filter}
|
||||
|
|
@ -99,7 +108,7 @@ build_flags = ${Faketec.build_flags}
|
|||
-D OFFLINE_QUEUE_SIZE=256
|
||||
-D DISPLAY_CLASS=SSD1306Display
|
||||
; -D MESH_PACKET_LOGGING=1
|
||||
; -D MESH_DEBUG=1
|
||||
-D MESH_DEBUG=1
|
||||
build_src_filter = ${Faketec.build_src_filter}
|
||||
+<helpers/nrf52/SerialBLEInterface.cpp>
|
||||
+<../examples/companion_radio>
|
||||
|
|
|
|||
|
|
@ -2,6 +2,9 @@
|
|||
#include "target.h"
|
||||
#include <helpers/ArduinoHelpers.h>
|
||||
|
||||
#if ENV_INCLUDE_GPS
|
||||
#endif
|
||||
|
||||
PromicroBoard board;
|
||||
|
||||
RADIO_CLASS radio = new Module(P_LORA_NSS, P_LORA_DIO_1, P_LORA_RESET, P_LORA_BUSY, SPI);
|
||||
|
|
@ -10,7 +13,13 @@ WRAPPER_CLASS radio_driver(radio, board);
|
|||
|
||||
VolatileRTCClock fallback_clock;
|
||||
AutoDiscoverRTCClock rtc_clock(fallback_clock);
|
||||
EnvironmentSensorManager sensors;
|
||||
#if ENV_INCLUDE_GPS
|
||||
#include <helpers/sensors/MicroNMEALocationProvider.h>
|
||||
MicroNMEALocationProvider nmea = MicroNMEALocationProvider(Serial1);
|
||||
EnvironmentSensorManager sensors = EnvironmentSensorManager(nmea);
|
||||
#else
|
||||
EnvironmentSensorManager sensors;
|
||||
#endif
|
||||
|
||||
#ifdef DISPLAY_CLASS
|
||||
DISPLAY_CLASS display;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue