Phase 1c: prune remaining dead functions, unused imports, quarantine Genesis
- uc480_camera: drop never-called _capture_paused/get_framerate (the hardware question _capture_paused encoded is now in KNOWN_ISSUES.md) - t3r_protocol: drop read_reg/write_reg/decode_reg/Reg (commands never wired into the driver) - bbd20x: drop _update0x0212 (never dispatched) and 8 of 9 unused trigger convenience wrappers; apt_constants: drop TriggerBitsStepper (servo-only rig) - ruff --fix: 35 unused imports across all apps; drop unused T3R_BAUD - genesis_core.py: quarantine warning header; docs/genesis_verification.md bench checklist for the 7 divergences vs tools/genesis_laser_gui.py Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -193,14 +193,6 @@ def set_position(ch: int, position: int) -> bytes:
|
||||
return build_frame(CMD_SET_POSITION, struct.pack("<Bi", ch, position))
|
||||
|
||||
|
||||
def read_reg(ch: int, reg: int) -> bytes:
|
||||
return build_frame(CMD_READ_REG, struct.pack("<BB", ch, reg))
|
||||
|
||||
|
||||
def write_reg(ch: int, reg: int, value: int) -> bytes:
|
||||
return build_frame(CMD_WRITE_REG, struct.pack("<BBI", ch, reg, value))
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Response / event decoders. Each returns a dataclass (or None on bad length).
|
||||
# ---------------------------------------------------------------------------
|
||||
@@ -261,13 +253,6 @@ class Position:
|
||||
position: int
|
||||
|
||||
|
||||
@dataclass
|
||||
class Reg:
|
||||
ch: int
|
||||
reg: int
|
||||
value: int
|
||||
|
||||
|
||||
def decode_pong(p: bytes):
|
||||
if len(p) < 4:
|
||||
return None
|
||||
@@ -304,13 +289,6 @@ def decode_position(p: bytes):
|
||||
return Position(ch, pos)
|
||||
|
||||
|
||||
def decode_reg(p: bytes):
|
||||
if len(p) < 6:
|
||||
return None
|
||||
ch, reg, value = struct.unpack_from("<BBI", p, 0)
|
||||
return Reg(ch, reg, value)
|
||||
|
||||
|
||||
def decode_event_position(p: bytes):
|
||||
"""MOTION_DONE / STOPPED share the (ch, position) layout."""
|
||||
return decode_position(p)
|
||||
|
||||
Reference in New Issue
Block a user