Add next_hop and relayed_by in PacketHistory for setting next-hop and handle flooding fallback

This commit is contained in:
GUVWAF
2024-11-01 09:16:51 +01:00
parent 2e303a33be
commit 6fe42ed4c5
21 changed files with 130 additions and 159 deletions

View File

@@ -186,7 +186,7 @@ bool AdminModule::handleReceivedProtobuf(const meshtastic_MeshPacket &mp, meshta
break;
}
case meshtastic_AdminMessage_factory_reset_config_tag: {
LOG_INFO("Initiating factory config reset\n");
LOG_INFO("Initiating factory reset\n");
nodeDB->factoryReset();
reboot(DEFAULT_REBOOT_SECONDS);
break;
@@ -1028,4 +1028,4 @@ bool AdminModule::messageIsRequest(meshtastic_AdminMessage *r)
return true;
else
return false;
}
}

View File

@@ -148,18 +148,8 @@ void setupModules()
delete upDownInterruptImpl1;
upDownInterruptImpl1 = nullptr;
}
#if HAS_SCREEN
// In order to have the user button dismiss the canned message frame, this class lightly interacts with the Screen class
scanAndSelectInput = new ScanAndSelectInput();
if (!scanAndSelectInput->init()) {
delete scanAndSelectInput;
scanAndSelectInput = nullptr;
}
#endif
cardKbI2cImpl = new CardKbI2cImpl();
cardKbI2cImpl->init();
// cardKbI2cImpl = new CardKbI2cImpl();
// cardKbI2cImpl->init();
#ifdef INPUTBROKER_MATRIX_TYPE
kbMatrixImpl = new KbMatrixImpl();
kbMatrixImpl->init();

View File

@@ -91,7 +91,7 @@ NodeInfoModule::NodeInfoModule()
: ProtobufModule("nodeinfo", meshtastic_PortNum_NODEINFO_APP, &meshtastic_User_msg), concurrency::OSThread("NodeInfoModule")
{
isPromiscuous = true; // We always want to update our nodedb, even if we are sniffing on others
setIntervalFromNow(30 *
setIntervalFromNow(20 *
1000); // Send our initial owner announcement 30 seconds after we start (to give network time to setup)
}

View File

@@ -17,8 +17,7 @@ class DeviceTelemetryModule : private concurrency::OSThread, public ProtobufModu
{
uptimeWrapCount = 0;
uptimeLastMs = millis();
nodeStatusObserver.observe(&nodeStatus->onNewStatus);
setIntervalFromNow(45 * 1000); // Wait until NodeInfo is sent
setIntervalFromNow(450000 * 1000); // Wait until NodeInfo is sent
}
virtual bool wantUIFrame() { return false; }
@@ -60,4 +59,4 @@ class DeviceTelemetryModule : private concurrency::OSThread, public ProtobufModu
uint32_t uptimeWrapCount;
uint32_t uptimeLastMs;
};
};