adafruit / adafruit/Adafruit_Wippersnapper_Arduino
Refactor to use API v2 Protocol Buffer Messages
- Dominant language
- C++
- Stars
- 54
- Forks
- 56
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 11
Description
Replace existing protocol buffer message decoding and encoding implementations with an implementation compatible with `api-v2` throughout the library. Also, update the function signatures and logic for encoding/decoding as needed.
The list of tasks below is subject to change during this process.
**Documentation Tasks**
I need to mentally untangle the codebase and map it out before I'm ready to refactor.
- [x] Document the location of each pb_encode/pb_decode call, what it specifically does, and where it is located.
- [x] Identify which PBs from `api-v2` are _not_ presenting any breaking changes
- [x] Identify which PBs from `api-v2` will present breaking changes
- [x] Organize components with breaking changes from least impact to greatest
- [x] Identify which components we won't be touching or changing - things that don't have anything to do with the PBs.
**Non-breaking, refactor Tasks**
- [x] #616
- [x] #618
**Refactor for "Top-Level Decoding" Logic**
The new API switches us from listening to a unique mqtt topic per component to two "high-level mqtt topics" and a top-level pb message
- [x] #619
- [x] Replace old decoding logic with a new, top-level decoder. Similar to the "router" we used in WipperSnapper Python
- [x] Test w/protomq that the new top-level decoder properly sends messages to each of the component types
- [x] May require WITL (Wokwi in the Loop) testing to ensure each component type is successfully decoded
**Refactor for "Top Level _Encoding_" Logic**
Similar task to above, but in reverse for encoding
- [x] Replace old encoding logic with a new, top-level encoder.
- [x] Test w/protomq that the new top-level encoder properly sends messages to the broker
- [x] May require WITL (Wokwi in the Loop) testing to ensure each component type is successfully encoded
**Update each component**
Each component's decoder/encoder will need to be refactored to match the new top-level encoding/decoding logic, new MQTT topics, and refactored PB message structs
- [x] #619
- [x] #624
- [x] #637
- [x] #638
- [x] #639
- [x] #640
- [x] #641
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.