-
Notifications
You must be signed in to change notification settings - Fork 964
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
Adds the ok_to_mqtt bit #4643
Adds the ok_to_mqtt bit #4643
Conversation
Principle is ok, CI carnage needs to be addressed :-) |
9f849a6
to
d966658
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Besides my comment, isn't there a better way to set this at only one place? E.g. in MeshService::sendToMesh()
?
I think this would then also account for MQTT proxy.
Edit: I now see MQTT proxy is already accounted for with this, but anything that goes over the PhoneAPI is not, so e.g. if someone is doing a serial to MQTT bridge it can't honor the setting.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As discussed, can we introduce a bitflag field instead?
I love the idea, but I forgot how ridiculous Protobufs is. There is no uint8 type. The official recommendation is to use uint32 and hope it only takes only one or two bytes. sigh Edit: Ric pointed out that I can add the int_size:8 option in mesh.options. Doing a bool costs us 2 bytes, and a single byte bitfield costs 3. |
d966658
to
16c0b06
Compare
This adds the ok_to_mqtt bit on outgoing messages, as set by the device config. It also checks for the bit on incoming messages before uploading to an MQTT server with a known key.
Depends on meshtastic/protobufs#573