mirror of
https://github.com/meshtastic/firmware.git
synced 2025-09-05 19:19:18 +00:00
Compare commits
6 Commits
1e69a20934
...
9d15af70ac
Author | SHA1 | Date | |
---|---|---|---|
![]() |
9d15af70ac | ||
![]() |
e906c39171 | ||
![]() |
834c3c5cc2 | ||
![]() |
0a5263a4aa | ||
![]() |
439534f1fb | ||
![]() |
05b34449d9 |
@ -105,15 +105,16 @@ void NeighborInfoModule::sendNeighborInfo(NodeNum dest, bool wantReplies)
|
|||||||
{
|
{
|
||||||
meshtastic_NeighborInfo neighborInfo = meshtastic_NeighborInfo_init_zero;
|
meshtastic_NeighborInfo neighborInfo = meshtastic_NeighborInfo_init_zero;
|
||||||
collectNeighborInfo(&neighborInfo);
|
collectNeighborInfo(&neighborInfo);
|
||||||
|
// only send neighbours if we have some to send
|
||||||
|
if (neighborInfo.neighbors_count > 0) {
|
||||||
meshtastic_MeshPacket *p = allocDataProtobuf(neighborInfo);
|
meshtastic_MeshPacket *p = allocDataProtobuf(neighborInfo);
|
||||||
// send regardless of whether or not we have neighbors in our DB,
|
|
||||||
// because we want to get neighbors for the next cycle
|
|
||||||
p->to = dest;
|
p->to = dest;
|
||||||
p->decoded.want_response = wantReplies;
|
p->decoded.want_response = wantReplies;
|
||||||
p->priority = meshtastic_MeshPacket_Priority_BACKGROUND;
|
p->priority = meshtastic_MeshPacket_Priority_BACKGROUND;
|
||||||
printNeighborInfo("SENDING", &neighborInfo);
|
printNeighborInfo("SENDING", &neighborInfo);
|
||||||
service->sendToMesh(p, RX_SRC_LOCAL, true);
|
service->sendToMesh(p, RX_SRC_LOCAL, true);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Encompasses the full construction and sending packet to mesh
|
Encompasses the full construction and sending packet to mesh
|
||||||
|
@ -63,9 +63,8 @@
|
|||||||
SerialModule *serialModule;
|
SerialModule *serialModule;
|
||||||
SerialModuleRadio *serialModuleRadio;
|
SerialModuleRadio *serialModuleRadio;
|
||||||
|
|
||||||
|
|
||||||
#if defined(TTGO_T_ECHO) || defined(CANARYONE) || defined(MESHLINK) || defined(ELECROW_ThinkNode_M1) || \
|
#if defined(TTGO_T_ECHO) || defined(CANARYONE) || defined(MESHLINK) || defined(ELECROW_ThinkNode_M1) || \
|
||||||
defined(ELECROW_ThinkNode_M5) || defined(HELTEC_MESH_SOLAR)
|
defined(ELECROW_ThinkNode_M5) || defined(HELTEC_MESH_SOLAR) || defined(T_ECHO_LITE)
|
||||||
SerialModule::SerialModule() : StreamAPI(&Serial), concurrency::OSThread("Serial") {}
|
SerialModule::SerialModule() : StreamAPI(&Serial), concurrency::OSThread("Serial") {}
|
||||||
static Print *serialPrint = &Serial;
|
static Print *serialPrint = &Serial;
|
||||||
#elif defined(CONFIG_IDF_TARGET_ESP32C6)
|
#elif defined(CONFIG_IDF_TARGET_ESP32C6)
|
||||||
|
Loading…
Reference in New Issue
Block a user