last minor Fixes

This commit is contained in:
J.Schröder 2025-03-18 00:43:56 +01:00 committed by Thomas Göttgens
parent 2d87b7edb4
commit 3cf0fbb2e1
6 changed files with 10 additions and 14 deletions

View File

@ -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;

View File

@ -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;

View File

@ -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
}

View File

@ -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)) */

View File

@ -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;
}
/*

View File

@ -11,6 +11,7 @@ class NeighborInfoModule : public ProtobufModule<meshtastic_NeighborInfo>, priva
CallbackObserver<NeighborInfoModule, const meshtastic::Status *>(this, &NeighborInfoModule::handleStatusUpdate);
std::vector<meshtastic_Neighbor> neighbors;
public:
/*
* Expose the constructor