Update for error refactor, uart#921
Open
brentru wants to merge 24 commits into
Open
Conversation
Mechanical rename pass across 8 source files to align with the regenerated i2c.pb.h naming conventions. No logic changes. Types: DeviceAddOrReplace->Add, DeviceAddedOrReplaced->Added, DeviceRemove->Remove, DeviceRemoved->Removed, DeviceEvent->Event, DeviceStatus->Status. Enum values: DS_*->S_*. B2D/D2B tags and payload fields simplified. Struct fields: device_name->name, device_period->period, device_description->descriptor, etc. Deferred work (Scan->Probe, map entries, Descriptor split) tracked in src/components/i2c/DEFERRED_PB_CHANGES.md. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Update all C++ code to use the new ws_i2c_Descriptor type which nests ws_i2c_AddressSpace for bus/mux info. Field accesses now go through .address_space for pin_scl, pin_sda, mux_address, mux_channel and .address replaces the old .device_address. Scan/Probe code left unchanged (deferred). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
DeviceAddOrReplace->Add, DeviceRemove->Remove. B2D tags and payload fields simplified to match new gps.pb.h naming. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Field renames: device_type->type, device_id->id, sensor_types->types on DeviceConfig, Descriptor, GenericInputConfig, and PM25AQIConfig. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Field renames: sensor_types->types, sensor_types_count->types_count, sensor_events->events, sensor_events_count->events_count. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Driver stores ws_i2c_Add_TypesEntry (key + sensor type) instead of bare ws_sensor_Type. Events carry the broker key through the full read cycle so the broker can correlate readings to sensor slots. Also renames controller methods: Handle_Add, Handle_Probe, Handle_Remove and updates checkin callback to match ws_i2c_Add. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replaces the old brute-force bus scan with a targeted probe system. The broker sends AddressSpaces (bus or mux channel) and a list of specific addresses to probe. Hardware handles mux selection internally. - hardware: ScanBus/ScanMux replaced by ProbeAddresses which takes an AddressSpace, probes listed addresses (or all 112 if empty), and populates an AddressSpaceResult - model: owns all Probe decode/encode via nanopb callbacks, buffers decoded address spaces and addresses, stores Probed results with per-result found-address contexts for encode callbacks - controller: Handle_Probe reads from model, iterates address spaces, delegates to hardware, publishes via model Compiles clean on huzzah8266. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Member
Author
|
@tyeth @lorennorman this is a large PR. I do not expect you to review the entire thing, but I do need a second set of eyes to quickly look. |
tyeth
reviewed
May 20, 2026
tyeth
reviewed
May 20, 2026
tyeth
approved these changes
May 20, 2026
Member
Author
|
@tyeth Check it out! ☝️ |
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.
Updated WipperSnapper's codebase to match the inclusion/refactor of the error module (and removal of
Addedmessages) via adafruit/Wippersnapper_Protobuf#196 and updated UART protobufs via adafruit/Wippersnapper_Protobuf#199.Other changes:
_DS18X20_pinsfrom a vector ofstd::unique_ptrto a vector of raw pointers, and added explicit deletion of sensor hardware objects in the destructor and removal methods to prevent memory leaks. [1] [2] [3]Ds18x20Addedmessage from the DS18X20 model, simplifying the message API. [1] [2] [3] [4] [5]