Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR refactors inter-device messaging by removing the old MessageType/SensorData structure and introducing new I²C command/response messages alongside a simple beep command.
- Removed legacy
MessageTypeenum andSensorDatamessage - Added
I2CCommandandI2CResponsemessages - Introduced
beepfield inInterdeviceMessageand configured its size in options
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| meshtastic/interdevice.proto | Removed MessageType/SensorData, added I2CCommand, I2CResponse, and beep field |
| meshtastic/interdevice.options | Set beep field size to 16-bit |
Comments suppressed due to low confidence (6)
meshtastic/interdevice.proto:11
- Since the old MessageType enum was removed, reserve its previous tag numbers (e.g., 160–181) at the top of the .proto to prevent future reuse and maintain compatibility.
message I2CCommand {
meshtastic/interdevice.proto:11
- Add a comment above
I2CCommandand inline comments for its fields (op,addr,data,ack) to clarify their roles and units.
message I2CCommand {
meshtastic/interdevice.proto:12
- Introduce a default
UNSPECIFIED = 0enum value so that the zero value doesn’t unintentionally map toSTARTwhen unset.
enum Operation {
meshtastic/interdevice.proto:21
- [nitpick] The field name
ackis ambiguous; consider renaming it toack_requiredorexpect_ackto clarify its meaning.
bool ack = 4;
meshtastic/interdevice.proto:41
- [nitpick] Rename
beepto something more descriptive likebeep_duration_msor add a comment explaining its unit and purpose.
uint32 beep = 4;
meshtastic/interdevice.proto:11
- Add unit tests for
I2CCommandandI2CResponseencoding/decoding to validate interoperability and catch future regressions.
message I2CCommand {
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
crafting a data structure for inter device link