diff --git a/src/mesh/MeshService.cpp b/src/mesh/MeshService.cpp index b19a0f0bd..eba927bd6 100644 --- a/src/mesh/MeshService.cpp +++ b/src/mesh/MeshService.cpp @@ -87,7 +87,8 @@ int MeshService::handleFromRadio(const meshtastic_MeshPacket *mp) LOG_DEBUG("Received telemetry response. Skip sending our NodeInfo"); // because this potentially a Repeater which will // ignore our request for its NodeInfo } else if (mp->which_payload_variant == meshtastic_MeshPacket_decoded_tag && !nodeDB->getMeshNode(mp->from)->has_user && - nodeInfoModule && !isPreferredRebroadcaster && !nodeDB->isFull() && !(config.network.routingAlgorithm == meshtastic_Config_RoutingConfig_FishEyeState)) { + nodeInfoModule && !isPreferredRebroadcaster && !nodeDB->isFull() && !(moduleConfig.fish_eye_state_routing.enabled) && + !(config.network.routingAlgorithm == meshtastic_Config_RoutingConfig_FishEyeState)) { if (airTime->isTxAllowedChannelUtil(true)) { // Hops used by the request. If somebody in between running modified firmware modified it, ignore it auto hopStart = mp->hop_start; diff --git a/src/mesh/NodeDB.cpp b/src/mesh/NodeDB.cpp index 8c0f60dbf..99199ad85 100644 --- a/src/mesh/NodeDB.cpp +++ b/src/mesh/NodeDB.cpp @@ -728,10 +728,10 @@ void NodeDB::installDefaultModuleConfig() moduleConfig.mqtt.encryption_enabled = true; moduleConfig.has_neighbor_info = true; - moduleConfig.neighbor_info.enabled = true; + moduleConfig.neighbor_info.enabled = false; moduleConfig.has_fish_eye_state_routing = true; - moduleConfig.fish_eye_state_routing.enabled = true; + moduleConfig.fish_eye_state_routing.enabled = false; // Works only in Combination with Neighbor info Module config.network.routingAlgorithm = meshtastic_Config_RoutingConfig_FishEyeState; moduleConfig.has_detection_sensor = true; diff --git a/src/mesh/Router.cpp b/src/mesh/Router.cpp index d7dbb7c15..60f2c4c64 100644 --- a/src/mesh/Router.cpp +++ b/src/mesh/Router.cpp @@ -653,7 +653,7 @@ void Router::handleReceived(meshtastic_MeshPacket *p, RxSource src) if (!skipHandle) { MeshModule::callModules(*p, src); - if(config.network.routingAlgorithm == meshtastic_Config_RoutingConfig_FishEyeState && moduleConfig.fish_eye_state_routing.enabled == true && (isToUs(p) && (p->decoded.dest != nodeDB->getNodeNum()) && (p->decoded.dest != 0) && (p->decoded.dest != NODENUM_BROADCAST))){ + if(config.network.routingAlgorithm == meshtastic_Config_RoutingConfig_FishEyeState && moduleConfig.fish_eye_state_routing.enabled && (isToUs(p) && (p->decoded.dest != nodeDB->getNodeNum()) && (p->decoded.dest != 0) && (p->decoded.dest != NODENUM_BROADCAST))){ meshtastic_MeshPacket *copy = allocForSending(); copy->decoded = p->decoded; copy->to = fishEyeStateRoutingModule->getNextHopForID(copy->decoded.dest); @@ -677,8 +677,6 @@ void Router::handleReceived(meshtastic_MeshPacket *p, RxSource src) #endif } - - packetPool.release(p_encrypted); // Release the encrypted packet } diff --git a/src/mesh/generated/meshtastic/portnums.pb.h b/src/mesh/generated/meshtastic/portnums.pb.h index 61d1a8473..423f38cd5 100644 --- a/src/mesh/generated/meshtastic/portnums.pb.h +++ b/src/mesh/generated/meshtastic/portnums.pb.h @@ -129,16 +129,12 @@ typedef enum _meshtastic_PortNum { meshtastic_PortNum_MAP_REPORT_APP = 73, /* PowerStress based monitoring support (for automated power consumption testing) */ meshtastic_PortNum_POWERSTRESS_APP = 74, -<<<<<<< HEAD + /* FishEyeStateRouting-Module */ + meshtastic_PortNum_FISHEYESTATEROUTING_APP = 75, /* Reticulum Network Stack Tunnel App ENCODING: Fragmented RNS Packet. Handled by Meshtastic RNS interface */ meshtastic_PortNum_RETICULUM_TUNNEL_APP = 76, -||||||| parent of b49c93ed (SetUp for FishEyeStateRoutingModule ready, Implementation still missing) -======= - /* FishEyeStateRouting-Module */ - meshtastic_PortNum_FISHEYESTATEROUTING_APP = 75, ->>>>>>> b49c93ed (SetUp for FishEyeStateRoutingModule ready, Implementation still missing) /* Private applications should use portnums >= 256. To simplify initial development and testing you can use "PRIVATE_APP" in your code without needing to rebuild protobuf files (via [regen-protos.sh](https://github.com/meshtastic/firmware/blob/master/bin/regen-protos.sh)) */ diff --git a/src/modules/NeighborInfoModule.cpp b/src/modules/NeighborInfoModule.cpp index 2fd0de91a..e906974fb 100644 --- a/src/modules/NeighborInfoModule.cpp +++ b/src/modules/NeighborInfoModule.cpp @@ -78,7 +78,7 @@ uint32_t NeighborInfoModule::collectNeighborInfo(meshtastic_NeighborInfo *neighb } } printNodeDBNeighbors(); - if(config.network.routingAlgorithm == meshtastic_Config_RoutingConfig_FishEyeState && moduleConfig.fish_eye_state_routing.enabled == true){ + if(config.network.routingAlgorithm == meshtastic_Config_RoutingConfig_FishEyeState && moduleConfig.fish_eye_state_routing.enabled){ fishEyeStateRoutingModule->setOwnNeighborhood(*neighborInfo); } return neighborInfo->neighbors_count; @@ -150,7 +150,7 @@ bool NeighborInfoModule::handleReceivedProtobuf(const meshtastic_MeshPacket &mp, getOrCreateNeighbor(mp.from, mp.from, 0, mp.rx_snr); // Set the broadcast interval to 0, as we don't know it } // Allow others to handle this packet - return true; + return false; } /* diff --git a/src/modules/NeighborInfoModule.h b/src/modules/NeighborInfoModule.h index 0ce961ac0..aa76a2187 100644 --- a/src/modules/NeighborInfoModule.h +++ b/src/modules/NeighborInfoModule.h @@ -11,6 +11,7 @@ class NeighborInfoModule : public ProtobufModule, priva CallbackObserver(this, &NeighborInfoModule::handleStatusUpdate); std::vector neighbors; + public: /* * Expose the constructor