Skip to content

Commit

Permalink
use priority background for low priority messages
Browse files Browse the repository at this point in the history
  • Loading branch information
thoherr committed Mar 11, 2024
1 parent 5f47ca1 commit 44e09d9
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/modules/Telemetry/AirQualityTelemetry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ bool AirQualityTelemetryModule::sendTelemetry(NodeNum dest, bool phoneOnly)
if (config.device.role == meshtastic_Config_DeviceConfig_Role_SENSOR)
p->priority = meshtastic_MeshPacket_Priority_RELIABLE;
else
p->priority = meshtastic_MeshPacket_Priority_MIN;
p->priority = meshtastic_MeshPacket_Priority_BACKGROUND;

// release previous packet before occupying a new spot
if (lastMeasurementPacket != nullptr)
Expand Down
2 changes: 1 addition & 1 deletion src/modules/Telemetry/DeviceTelemetry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ bool DeviceTelemetryModule::sendTelemetry(NodeNum dest, bool phoneOnly)
meshtastic_MeshPacket *p = allocDataProtobuf(telemetry);
p->to = dest;
p->decoded.want_response = false;
p->priority = meshtastic_MeshPacket_Priority_MIN;
p->priority = meshtastic_MeshPacket_Priority_BACKGROUND;

nodeDB.updateTelemetry(nodeDB.getNodeNum(), telemetry, RX_SRC_LOCAL);
if (phoneOnly) {
Expand Down
2 changes: 1 addition & 1 deletion src/modules/Telemetry/EnvironmentTelemetry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ bool EnvironmentTelemetryModule::sendTelemetry(NodeNum dest, bool phoneOnly)
if (config.device.role == meshtastic_Config_DeviceConfig_Role_SENSOR)
p->priority = meshtastic_MeshPacket_Priority_RELIABLE;
else
p->priority = meshtastic_MeshPacket_Priority_MIN;
p->priority = meshtastic_MeshPacket_Priority_BACKGROUND;
// release previous packet before occupying a new spot
if (lastMeasurementPacket != nullptr)
packetPool.release(lastMeasurementPacket);
Expand Down
2 changes: 1 addition & 1 deletion src/modules/Telemetry/PowerTelemetry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ bool PowerTelemetryModule::sendTelemetry(NodeNum dest, bool phoneOnly)
if (config.device.role == meshtastic_Config_DeviceConfig_Role_SENSOR)
p->priority = meshtastic_MeshPacket_Priority_RELIABLE;
else
p->priority = meshtastic_MeshPacket_Priority_MIN;
p->priority = meshtastic_MeshPacket_Priority_BACKGROUND;
// release previous packet before occupying a new spot
if (lastMeasurementPacket != nullptr)
packetPool.release(lastMeasurementPacket);
Expand Down
2 changes: 1 addition & 1 deletion src/modules/esp32/PaxcounterModule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ bool PaxcounterModule::sendInfo(NodeNum dest)
meshtastic_MeshPacket *p = allocDataProtobuf(pl);
p->to = dest;
p->decoded.want_response = false;
p->priority = meshtastic_MeshPacket_Priority_MIN;
p->priority = meshtastic_MeshPacket_Priority_BACKGROUND;

service.sendToMesh(p, RX_SRC_LOCAL, true);

Expand Down
4 changes: 2 additions & 2 deletions src/modules/esp32/StoreForwardModule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ void StoreForwardModule::sendMessage(NodeNum dest, const meshtastic_StoreAndForw

p->to = dest;

p->priority = meshtastic_MeshPacket_Priority_MIN;
p->priority = meshtastic_MeshPacket_Priority_BACKGROUND;

// FIXME - Determine if the delayed packet is broadcast or delayed. For now, assume
// everything is broadcast.
Expand Down Expand Up @@ -334,7 +334,7 @@ ProcessMessage StoreForwardModule::handleReceived(const meshtastic_MeshPacket &m
LOG_INFO("*** S&F - Busy. Try again shortly.\n");
meshtastic_MeshPacket *pr = allocReply();
pr->to = getFrom(&mp);
pr->priority = meshtastic_MeshPacket_Priority_MIN;
pr->priority = meshtastic_MeshPacket_Priority_BACKGROUND;
pr->want_ack = false;
pr->decoded.want_response = false;
pr->decoded.portnum = meshtastic_PortNum_TEXT_MESSAGE_APP;
Expand Down

0 comments on commit 44e09d9

Please sign in to comment.