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

@@ -13,6 +13,7 @@ template <class T> class ProtobufModule : protected SinglePortModule
const pb_msgdesc_t *fields;
public:
uint8_t numOnlineNodes = 0;
/** Constructor
* name is for debugging output
*/
@@ -61,6 +62,14 @@ template <class T> class ProtobufModule : protected SinglePortModule
return sender;
}
int handleStatusUpdate(const meshtastic::Status *arg)
{
if (arg->getStatusType() == STATUS_TYPE_NODE) {
numOnlineNodes = nodeStatus->getNumOnline();
}
return 0;
}
private:
/** Called to handle a particular incoming message