mirror of
https://github.com/meshcore-dev/MeshCore.git
synced 2026-04-20 22:13:47 +00:00
xiao_s3: use environment sensor manager and add sensor role
This commit is contained in:
parent
8dbb0f5f23
commit
3dd6dc02ea
3 changed files with 27 additions and 3 deletions
|
|
@ -4,7 +4,9 @@ board = seeed_xiao_esp32s3
|
||||||
board_check = true
|
board_check = true
|
||||||
board_build.mcu = esp32s3
|
board_build.mcu = esp32s3
|
||||||
build_flags = ${esp32_base.build_flags}
|
build_flags = ${esp32_base.build_flags}
|
||||||
|
${sensor_base.build_flags}
|
||||||
-I variants/xiao_s3_wio
|
-I variants/xiao_s3_wio
|
||||||
|
-UENV_INCLUDE_GPS
|
||||||
-D SEEED_XIAO_S3
|
-D SEEED_XIAO_S3
|
||||||
-D P_LORA_DIO_1=39
|
-D P_LORA_DIO_1=39
|
||||||
-D P_LORA_NSS=41
|
-D P_LORA_NSS=41
|
||||||
|
|
@ -15,6 +17,8 @@ build_flags = ${esp32_base.build_flags}
|
||||||
-D P_LORA_MOSI=9
|
-D P_LORA_MOSI=9
|
||||||
-D PIN_USER_BTN=21
|
-D PIN_USER_BTN=21
|
||||||
-D PIN_STATUS_LED=48
|
-D PIN_STATUS_LED=48
|
||||||
|
-D PIN_BOARD_SDA=D4
|
||||||
|
-D PIN_BOARD_SCL=D5
|
||||||
-D SX126X_RXEN=38
|
-D SX126X_RXEN=38
|
||||||
-D SX126X_TXEN=RADIOLIB_NC
|
-D SX126X_TXEN=RADIOLIB_NC
|
||||||
-D SX126X_DIO2_AS_RF_SWITCH=true
|
-D SX126X_DIO2_AS_RF_SWITCH=true
|
||||||
|
|
@ -26,6 +30,10 @@ build_flags = ${esp32_base.build_flags}
|
||||||
-D SX126X_RX_BOOSTED_GAIN=1
|
-D SX126X_RX_BOOSTED_GAIN=1
|
||||||
build_src_filter = ${esp32_base.build_src_filter}
|
build_src_filter = ${esp32_base.build_src_filter}
|
||||||
+<../variants/xiao_s3_wio>
|
+<../variants/xiao_s3_wio>
|
||||||
|
+<helpers/sensors>
|
||||||
|
lib_deps =
|
||||||
|
${esp32_base.lib_deps}
|
||||||
|
${sensor_base.lib_deps}
|
||||||
|
|
||||||
[env:Xiao_S3_WIO_repeater]
|
[env:Xiao_S3_WIO_repeater]
|
||||||
extends = Xiao_S3_WIO
|
extends = Xiao_S3_WIO
|
||||||
|
|
@ -185,3 +193,19 @@ lib_deps =
|
||||||
${Xiao_S3_WIO.lib_deps}
|
${Xiao_S3_WIO.lib_deps}
|
||||||
densaugeo/base64 @ ~1.4.0
|
densaugeo/base64 @ ~1.4.0
|
||||||
adafruit/Adafruit SSD1306 @ ^2.5.13
|
adafruit/Adafruit SSD1306 @ ^2.5.13
|
||||||
|
|
||||||
|
[env:Xiao_S3_WIO_sensor]
|
||||||
|
extends = Xiao_S3_WIO
|
||||||
|
build_src_filter = ${Xiao_S3_WIO.build_src_filter}
|
||||||
|
+<../examples/simple_sensor>
|
||||||
|
build_flags =
|
||||||
|
${Xiao_S3_WIO.build_flags}
|
||||||
|
-D ADVERT_NAME='"XiaoS3 sensor"'
|
||||||
|
-D ADVERT_LAT=0.0
|
||||||
|
-D ADVERT_LON=0.0
|
||||||
|
-D ADMIN_PASSWORD='"password"'
|
||||||
|
; -D MESH_PACKET_LOGGING=1
|
||||||
|
; -D MESH_DEBUG=1
|
||||||
|
lib_deps =
|
||||||
|
${Xiao_S3_WIO.lib_deps}
|
||||||
|
${esp32_ota.lib_deps}
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ WRAPPER_CLASS radio_driver(radio, board);
|
||||||
|
|
||||||
ESP32RTCClock fallback_clock;
|
ESP32RTCClock fallback_clock;
|
||||||
AutoDiscoverRTCClock rtc_clock(fallback_clock);
|
AutoDiscoverRTCClock rtc_clock(fallback_clock);
|
||||||
SensorManager sensors;
|
EnvironmentSensorManager sensors;
|
||||||
|
|
||||||
#ifdef DISPLAY_CLASS
|
#ifdef DISPLAY_CLASS
|
||||||
DISPLAY_CLASS display;
|
DISPLAY_CLASS display;
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
#include <helpers/ESP32Board.h>
|
#include <helpers/ESP32Board.h>
|
||||||
#include <helpers/radiolib/CustomSX1262Wrapper.h>
|
#include <helpers/radiolib/CustomSX1262Wrapper.h>
|
||||||
#include <helpers/AutoDiscoverRTCClock.h>
|
#include <helpers/AutoDiscoverRTCClock.h>
|
||||||
#include <helpers/SensorManager.h>
|
#include <helpers/sensors/EnvironmentSensorManager.h>
|
||||||
#ifdef DISPLAY_CLASS
|
#ifdef DISPLAY_CLASS
|
||||||
#include <helpers/ui/SSD1306Display.h>
|
#include <helpers/ui/SSD1306Display.h>
|
||||||
#include <helpers/ui/MomentaryButton.h>
|
#include <helpers/ui/MomentaryButton.h>
|
||||||
|
|
@ -16,7 +16,7 @@
|
||||||
extern XiaoS3WIOBoard board;
|
extern XiaoS3WIOBoard board;
|
||||||
extern WRAPPER_CLASS radio_driver;
|
extern WRAPPER_CLASS radio_driver;
|
||||||
extern AutoDiscoverRTCClock rtc_clock;
|
extern AutoDiscoverRTCClock rtc_clock;
|
||||||
extern SensorManager sensors;
|
extern EnvironmentSensorManager sensors;
|
||||||
|
|
||||||
#ifdef DISPLAY_CLASS
|
#ifdef DISPLAY_CLASS
|
||||||
extern DISPLAY_CLASS display;
|
extern DISPLAY_CLASS display;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue