Repository navigation
Chunk 3.3: extract UV-5R driver into radios/baofeng_uv5r - #7
Merged
Merged
Conversation
Mechanical extraction of the Baofeng UV-5R clone protocol out of commands/program.rs into radios/baofeng_uv5r/: serial handshake, block read/write, download, channel encode/decode, patch, and verify move verbatim; program_settings.rs moves in as the driver's settings module. commands/program.rs is now the thin Tauri command layer (DB lookups, backup naming, result DTOs) with unchanged command signatures, so lib.rs and the frontend need no changes. The driver implements RadioDriver + ImageProgrammer and is the first entry in the registry; DriverCapabilities now derive from a real impl. ImageProgrammer::build_image/program_codeplug take &[SlotChannel] (slot-resolved channels are what both image-clone radios consume). RadioModel derives Default for driver unit tests. 147 lib tests pass (2 new: capability derivation, hardware-free build_image); clippy warning count unchanged. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
Summary
commands/program.rsintosrc-tauri/src/radios/baofeng_uv5r/(serial handshake, block read/write, download, channel encode/decode, patch, verify — moved verbatim);commands/program_settings.rsmoves in as the driver'ssettings.rs(100% rename).BaofengUv5rimplementsRadioDriver+ImageProgrammerand is the first entry in the driver registry;DriverCapabilitiesnow derive from a real impl.commands/program.rsis now the thin Tauri command layer (DB lookups, backup naming, result DTOs). Command signatures are unchanged, solib.rsand the frontend need no changes (that rewiring is 3.6/3.7).ImageProgrammer::build_image/program_codeplugtake&[SlotChannel]— slot-resolved channels are what image-clone radios consume.RadioModelderivesDefaultfor hardware-free driver tests.Test plan
build_image)UV5R_ORIG), download (6472-byte image, exact expected size), program 8-channel test codeplug →verified ✓read-back including per-channel tones (off / Tone / TSQL)🤖 Generated with Claude Code