diff --git a/src/modules/NodeInfoModule.cpp b/src/modules/NodeInfoModule.cpp index 412075948..7db8b66cc 100644 --- a/src/modules/NodeInfoModule.cpp +++ b/src/modules/NodeInfoModule.cpp @@ -9,9 +9,13 @@ #include #include +#ifndef USERPREFS_NODEINFO_REPLY_SUPPRESS_SECS +#define USERPREFS_NODEINFO_REPLY_SUPPRESS_SECS (12 * 60 * 60) +#endif + NodeInfoModule *nodeInfoModule; -static constexpr uint32_t NodeInfoReplySuppressSeconds = 12 * 60 * 60; // 12 hours +static constexpr uint32_t NodeInfoReplySuppressSeconds = USERPREFS_NODEINFO_REPLY_SUPPRESS_SECS; bool NodeInfoModule::handleReceivedProtobuf(const meshtastic_MeshPacket &mp, meshtastic_User *pptr) { @@ -94,11 +98,6 @@ void NodeInfoModule::sendOurNodeInfo(NodeNum dest, bool wantReplies, uint8_t cha config.device.role != meshtastic_Config_DeviceConfig_Role_SENSOR) && wantReplies; - if (requestWantResponse && lastSentToMesh == 0 && nodeDB && nodeDB->numMeshNodes >= 10) { - LOG_DEBUG("Stripping want_response because we have 10 or nodes in our NodeDB"); - requestWantResponse = false; - } - p->decoded.want_response = requestWantResponse; if (_shorterTimeout) p->priority = meshtastic_MeshPacket_Priority_DEFAULT; diff --git a/userPrefs.jsonc b/userPrefs.jsonc index 0c92eabcf..9e916aae2 100644 --- a/userPrefs.jsonc +++ b/userPrefs.jsonc @@ -55,6 +55,7 @@ // "USERPREFS_MQTT_TLS_ENABLED": "false", // "USERPREFS_MQTT_ROOT_TOPIC": "event/REPLACEME", // "USERPREFS_RINGTONE_NAG_SECS": "60", + // "USERPREFS_NODEINFO_REPLY_SUPPRESS_SECS": "43200", "USERPREFS_RINGTONE_RTTTL": "24:d=32,o=5,b=565:f6,p,f6,4p,p,f6,p,f6,2p,p,b6,p,b6,p,b6,p,b6,p,b,p,b,p,b,p,b,p,b,p,b,p,b,p,b,1p.,2p.,p", // "USERPREFS_NETWORK_IPV6_ENABLED": "1", "USERPREFS_TZ_STRING": "tzplaceholder "