mirror of
https://github.com/meshtastic/firmware.git
synced 2025-12-20 17:52:35 +00:00
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:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user