mirror of
https://github.com/meshtastic/firmware.git
synced 2026-03-30 04:54:14 -04:00
Align telemetry broadcast want_response behavior with traceroute (#9717)
* Align telemetry broadcast want_response behavior with traceroute * Fixes * Reduce side-effects by making the telemetry modules handle the ignorerequest * Remove unnecessary ignoreRequest flag * Try inheriting from MeshModule * Add exclusion for sensor/router roles and add base telem module
This commit is contained in:
@@ -19,8 +19,7 @@
|
||||
int32_t DeviceTelemetryModule::runOnce()
|
||||
{
|
||||
refreshUptime();
|
||||
bool isImpoliteRole =
|
||||
IS_ONE_OF(config.device.role, meshtastic_Config_DeviceConfig_Role_SENSOR, meshtastic_Config_DeviceConfig_Role_ROUTER);
|
||||
bool isImpoliteRole = isSensorOrRouterRole();
|
||||
if (((lastSentToMesh == 0) ||
|
||||
((uptimeLastMs - lastSentToMesh) >=
|
||||
Default::getConfiguredOrDefaultMsScaled(moduleConfig.telemetry.device_update_interval,
|
||||
@@ -60,6 +59,10 @@ bool DeviceTelemetryModule::handleReceivedProtobuf(const meshtastic_MeshPacket &
|
||||
meshtastic_MeshPacket *DeviceTelemetryModule::allocReply()
|
||||
{
|
||||
if (currentRequest) {
|
||||
if (isMultiHopBroadcastRequest() && !isSensorOrRouterRole()) {
|
||||
ignoreRequest = true;
|
||||
return NULL;
|
||||
}
|
||||
auto req = *currentRequest;
|
||||
const auto &p = req.decoded;
|
||||
meshtastic_Telemetry scratch;
|
||||
|
||||
Reference in New Issue
Block a user