Scale default intervals based for *online* mesh size past 40 nodes (#4277)

* Add congestion scaling coefficient

* Added active mesh sized based interval scaling

* Moved back to bottom

* Format

* Add observers and use correct number of online nodes
This commit is contained in:
Ben Meadors
2024-07-13 05:59:19 -05:00
committed by GitHub
parent 0fa9974518
commit c5d747cd3e
17 changed files with 100 additions and 26 deletions

View File

@@ -7,6 +7,9 @@
class DeviceTelemetryModule : private concurrency::OSThread, public ProtobufModule<meshtastic_Telemetry>
{
CallbackObserver<DeviceTelemetryModule, const meshtastic::Status *> nodeStatusObserver =
CallbackObserver<DeviceTelemetryModule, const meshtastic::Status *>(this, &DeviceTelemetryModule::handleStatusUpdate);
public:
DeviceTelemetryModule()
: concurrency::OSThread("DeviceTelemetryModule"),
@@ -14,6 +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
}
virtual bool wantUIFrame() { return false; }