Compare commits

...

5 Commits

Author SHA1 Message Date
J.Schröder
46d8804664 another one 2025-03-22 16:14:08 +01:00
J.Schröder
a9a90fe794 another oneg 2025-03-22 16:04:32 +01:00
J.Schröder
519190b5e6 another one 2025-03-22 15:55:56 +01:00
J.Schröder
ea87fcc2b5 fixed small Errors originated from the pipeline 2025-03-22 15:39:21 +01:00
J.Schröder
abce20f1c8 return-Fix 2025-03-22 15:15:43 +01:00
3 changed files with 9 additions and 6 deletions

View File

@ -67,7 +67,7 @@ void FloodingRouter::perhapsRebroadcast(const meshtastic_MeshPacket *p)
{
if (!isToUs(p) && (p->hop_limit > 0) && !isFromUs(p)) {
if((moduleConfig.has_fish_eye_state_routing && moduleConfig.fish_eye_state_routing.enabled && (config.network.routingAlgorithm == meshtastic_Config_RoutingConfig_FishEyeState)) && (p->decoded.portnum == meshtastic_PortNum_FISHEYESTATEROUTING_APP)){
return false; // Don't want to rebroadcast LSP-Packages beyond 0-Hop-Neighborhood
return; // Don't want to rebroadcast LSP-Packages beyond 0-Hop-Neighborhood
}
if (p->id != 0) {
if (isRebroadcaster()) {

View File

@ -658,7 +658,7 @@ void Router::handleReceived(meshtastic_MeshPacket *p, RxSource src)
copy->decoded = p->decoded;
copy->to = fishEyeStateRoutingModule->getNextHopForID(copy->decoded.dest);
copy->from = nodeDB->getNodeNum();
char * logout;
char * logout = "";
sprintf(logout, "Forwarding Package to Node %u to Next-Hop %u",p->decoded.dest,copy->to);
LOG_DEBUG(logout);
service->sendToMesh(copy);

View File

@ -92,7 +92,7 @@ bool FishEyeStateRoutingModule::handleReceivedProtobuf(const meshtastic_MeshPack
LSPDB.insert(std::make_pair(entry.LSP.node_id,entry));
if(moduleConfig.fish_eye_state_routing.enabled){calcNextHop();}
}
char * logout;
char * logout = "";
sprintf(logout, "Received LSP-Pckg of Node %u: ",lsp->node_id);
for(int i = 0; i< lsp->neighbors_count; i++){
sprintf(logout,"%u, ", lsp->neighbors[i].node_id);
@ -113,6 +113,9 @@ void FishEyeStateRoutingModule::sendInitialLSP(){
LSPInfo.neighbors_count = neighborhood.size();
for(int i = 0; i < neighborhood.size(); i++){
meshtastic_Neighbor entry;
entry.last_rx_time = 0;
entry.node_broadcast_interval_secs = 0;
entry.snr = 0;
entry.node_id = neighborhood[i].node_id;
LSPInfo.neighbors[i] = entry;
}
@ -135,9 +138,9 @@ void FishEyeStateRoutingModule::printLSPDB(){
for(int i = 0; i< etr.second.LSP.neighbors_count;i++){
printf("%u, ", etr.second.LSP.neighbors[i].node_id -16);
}
printf(" Timeout: %u, forwarded: %u\n",((int64_t) etr.second.timeout) - ((int64_t) getTime()),etr.second.forwarded);
printf(" Timeout: %u, forwarded: %d\n",(uint32_t) (((int64_t) etr.second.timeout) - ((int64_t) getTime())),etr.second.forwarded);
}
printf("Total: %i\n",LSPDB.size());
printf("Total: %lu\n",LSPDB.size());
}
/*
@ -161,7 +164,7 @@ int32_t FishEyeStateRoutingModule::runOnce(){
p->decoded.portnum = meshtastic_PortNum_FISHEYESTATEROUTING_APP;
service->sendToMesh(p,RX_SRC_LOCAL,true);
it->second.forwarded = true;
char * logout;
char * logout = "";
sprintf(logout,"Forwarded LSP-Package of Node %u", it->second.LSP.node_id);
LOG_DEBUG(logout);