mirror of
https://github.com/meshtastic/firmware.git
synced 2025-09-07 03:59:37 +00:00
Compare commits
3 Commits
110b6ebd59
...
30e5c59e80
Author | SHA1 | Date | |
---|---|---|---|
![]() |
30e5c59e80 | ||
![]() |
893efe4f11 | ||
![]() |
2c2213ef9b |
@ -19,7 +19,7 @@
|
|||||||
#define default_node_info_broadcast_secs 3 * 60 * 60
|
#define default_node_info_broadcast_secs 3 * 60 * 60
|
||||||
#define default_neighbor_info_broadcast_secs 6 * 60 * 60
|
#define default_neighbor_info_broadcast_secs 6 * 60 * 60
|
||||||
#define min_node_info_broadcast_secs 60 * 60 // No regular broadcasts of more than once an hour
|
#define min_node_info_broadcast_secs 60 * 60 // No regular broadcasts of more than once an hour
|
||||||
#define min_neighbor_info_broadcast_secs 2 * 60 * 60
|
#define min_neighbor_info_broadcast_secs 4 * 60 * 60
|
||||||
|
|
||||||
#define default_mqtt_address "mqtt.meshtastic.org"
|
#define default_mqtt_address "mqtt.meshtastic.org"
|
||||||
#define default_mqtt_username "meshdev"
|
#define default_mqtt_username "meshdev"
|
||||||
|
@ -187,9 +187,10 @@ ErrorCode Router::sendLocal(meshtastic_MeshPacket *p, RxSource src)
|
|||||||
handleReceived(p, src);
|
handleReceived(p, src);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!p->channel && !p->pki_encrypted) { // don't override if a channel was requested
|
// don't override if a channel was requested and no need to set it when PKI is enforced
|
||||||
|
if (!p->channel && !p->pki_encrypted) {
|
||||||
meshtastic_NodeInfoLite *node = nodeDB->getMeshNode(p->to);
|
meshtastic_NodeInfoLite *node = nodeDB->getMeshNode(p->to);
|
||||||
if (node && node->user.public_key.size == 0) {
|
if (node) {
|
||||||
p->channel = node->channel;
|
p->channel = node->channel;
|
||||||
LOG_DEBUG("localSend to channel %d", p->channel);
|
LOG_DEBUG("localSend to channel %d", p->channel);
|
||||||
}
|
}
|
||||||
|
@ -121,7 +121,12 @@ Will be used for broadcast.
|
|||||||
*/
|
*/
|
||||||
int32_t NeighborInfoModule::runOnce()
|
int32_t NeighborInfoModule::runOnce()
|
||||||
{
|
{
|
||||||
sendNeighborInfo(NODENUM_BROADCAST_NO_LORA, false);
|
if (moduleConfig.neighbor_info.transmit_over_lora && !channels.isDefaultChannel(channels.getPrimaryIndex()) &&
|
||||||
|
airTime->isTxAllowedChannelUtil(true) && airTime->isTxAllowedAirUtil()) {
|
||||||
|
sendNeighborInfo(NODENUM_BROADCAST, false);
|
||||||
|
} else {
|
||||||
|
sendNeighborInfo(NODENUM_BROADCAST_NO_LORA, false);
|
||||||
|
}
|
||||||
return Default::getConfiguredOrDefaultMs(moduleConfig.neighbor_info.update_interval, default_neighbor_info_broadcast_secs);
|
return Default::getConfiguredOrDefaultMs(moduleConfig.neighbor_info.update_interval, default_neighbor_info_broadcast_secs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user