sensor: telemetrie z Chytré budky po drátě (BudkaLinkSensorManager)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
d934161a77
commit
560bf24fc2
5 files changed
+200
No files matched your search
@@ -98,6 +98,19 @@ build_flags =
|
||||
build_src_filter = ${Xiao_nrf52.build_src_filter}
|
||||
+<../examples/simple_repeater/*.cpp>
|
||||
|
||||
[env:Xiao_nrf52_sensor]
|
||||
extends = Xiao_nrf52
|
||||
build_flags =
|
||||
${Xiao_nrf52.build_flags}
|
||||
-D ADVERT_NAME='"Xiao_nrf52 Sensor"'
|
||||
-D ADVERT_LAT=0.0
|
||||
-D ADVERT_LON=0.0
|
||||
-D ADMIN_PASSWORD='"password"'
|
||||
; -D BUDKA_LINK_RX_PIN=0 ; telemetry line from a Chytra Budka on D0
|
||||
; -D MESH_DEBUG=1
|
||||
build_src_filter = ${Xiao_nrf52.build_src_filter}
|
||||
+<../examples/simple_sensor>
|
||||
|
||||
[env:Xiao_nrf52_room_server]
|
||||
extends = Xiao_nrf52
|
||||
build_flags =
|
||||
|
||||
@@ -16,7 +16,11 @@ WRAPPER_CLASS radio_driver(radio, board);
|
||||
VolatileRTCClock fallback_clock;
|
||||
AutoDiscoverRTCClock rtc_clock(fallback_clock);
|
||||
|
||||
#ifdef BUDKA_LINK_RX_PIN
|
||||
BudkaLinkSensorManager sensors; // on-board sensors + a Chytra Budka on Serial1
|
||||
#else
|
||||
EnvironmentSensorManager sensors;
|
||||
#endif
|
||||
|
||||
bool radio_init() {
|
||||
rtc_clock.begin(Wire);
|
||||
|
||||
@@ -8,6 +8,9 @@
|
||||
#include <helpers/AutoDiscoverRTCClock.h>
|
||||
#include <helpers/ArduinoHelpers.h>
|
||||
#include <helpers/sensors/EnvironmentSensorManager.h>
|
||||
#ifdef BUDKA_LINK_RX_PIN
|
||||
#include <helpers/sensors/BudkaLinkSensorManager.h>
|
||||
#endif
|
||||
|
||||
#ifdef DISPLAY_CLASS
|
||||
#include <helpers/ui/NullDisplayDriver.h>
|
||||
@@ -19,7 +22,11 @@
|
||||
extern XiaoNrf52Board board;
|
||||
extern WRAPPER_CLASS radio_driver;
|
||||
extern AutoDiscoverRTCClock rtc_clock;
|
||||
#ifdef BUDKA_LINK_RX_PIN
|
||||
extern BudkaLinkSensorManager sensors;
|
||||
#else
|
||||
extern EnvironmentSensorManager sensors;
|
||||
#endif
|
||||
|
||||
bool radio_init();
|
||||
mesh::LocalIdentity radio_new_identity();
|
||||
|
||||
Reference in new issue
Block a user