Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ws85 updates : set want_ack, high_priority, add temperature. #5052

Merged
merged 8 commits into from
Oct 15, 2024

Conversation

tavdog
Copy link
Contributor

@tavdog tavdog commented Oct 13, 2024

For more reliable data transmission, set want_ack and priority_max in the packet. Wind data only gets sent every 5 minutes and any node with ws85 enabled will most likely be a remote weather node with no other purpose than to send out the wind telemetry.

Also add parse temperature from the WS85 and add it to the telemetry packet.

tavdog and others added 3 commits October 13, 2024 13:45
add temperature
add wantack
add high_priority

set lull to 0 if never set.

add the has_FIELD_NAME lines to ws85
@@ -252,7 +252,8 @@ void SerialModule::sendTelemetry(meshtastic_Telemetry m)
pb_encode_to_bytes(p->decoded.payload.bytes, sizeof(p->decoded.payload.bytes), &meshtastic_Telemetry_msg, &m);
p->to = NODENUM_BROADCAST;
p->decoded.want_response = false;
p->priority = meshtastic_MeshPacket_Priority_RELIABLE;
p->want_ack = true;
p->priority = meshtastic_MeshPacket_Priority_MAX;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please don't set it higher than ACK, because those need to get priority always to avoid excessive retransmissions and flooding. You could use meshtastic_MeshPacket_Priority_HIGH.

Copy link
Member

@caveman99 caveman99 Oct 14, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also what about framing this change with device.role.sensor? because that would be the appropriate role for this kind of packets.

E.G. use 'reliable' and no want_ack from all other roles...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I changed to high from max. The sensor role could work but the ws85 sensor node can't go to sleep or it'll miss the serial wind data that comes in every 2 seconds. Sensor role could muck that up i think.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sensor role should only sleep if you have power.is_power_saving enabled

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also what about framing this change with device.role.sensor? because that would be the appropriate role for this kind of packets.

E.G. use 'reliable' and no want_ack from all other roles...

are you proposing that I check for sensor_role here and only set want_ack and high priority if sensor_role is set ?

@tavdog tavdog changed the title Ws85 updates : set want_ack, max_priority, add temperature. Ws85 updates : set want_ack, high_priority, add temperature. Oct 14, 2024
@thebentern thebentern merged commit 696bcc6 into meshtastic:master Oct 15, 2024
47 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants