mirror of
https://github.com/meshcore-dev/MeshCore.git
synced 2026-04-20 22:13:47 +00:00
Serial bridge implementation
This commit is contained in:
parent
ba34cff4d4
commit
4b70ee863d
8 changed files with 422 additions and 5 deletions
|
|
@ -72,6 +72,11 @@
|
|||
static UITask ui_task(display);
|
||||
#endif
|
||||
|
||||
#ifdef BRIDGE_OVER_SERIAL
|
||||
#include "bridge/serial/SerialBridge.h"
|
||||
bridge::SerialBridge *bridge_interface;
|
||||
#endif
|
||||
|
||||
#define FIRMWARE_ROLE "repeater"
|
||||
|
||||
#define PACKET_LOG_FILE "/packet_log"
|
||||
|
|
@ -752,7 +757,14 @@ void setup() {
|
|||
}
|
||||
#endif
|
||||
|
||||
if (!radio_init()) { halt(); }
|
||||
#ifdef BRIDGE_OVER_SERIAL
|
||||
bridge_interface = new bridge::SerialBridge();
|
||||
bridge_interface->setup();
|
||||
#endif
|
||||
|
||||
if (!radio_init()) {
|
||||
halt();
|
||||
}
|
||||
|
||||
fast_rng.begin(radio_get_rng_seed());
|
||||
|
||||
|
|
@ -825,6 +837,10 @@ void loop() {
|
|||
command[0] = 0; // reset command buffer
|
||||
}
|
||||
|
||||
#ifdef BRIDGE_OVER_SERIAL
|
||||
bridge_interface->loop();
|
||||
#endif
|
||||
|
||||
the_mesh.loop();
|
||||
sensors.loop();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue