Skip to content

feat(ccp): generic CCP 2.1 calibration-protocol master - #2

Open
kipp-ing wants to merge 3 commits into
mainfrom
feat/ccp-master
Open

kipp-ing wants to merge 3 commits into
mainfrom
feat/ccp-master

Conversation

@kipp-ing

Copy link
Copy Markdown
Owner

Summary

New ESPHome external component ccp: a CAN Calibration Protocol master on
can_gateway (single-frame CRO/DTO, no ISO-TP). Full command set + high-level
read_memory/write_memory helpers, ESPHome actions, on_connected/on_response/
on_error/on_daq triggers, and a pure host-testable ccp_proto.h codec.

  • Every field (command/response CAN ids, station address, byte order,
    timeout) is configurable; the schema defaults and every test/example
    address are generic placeholders, not tied to any one ECU.
  • Observe-first safety: no auto-connect, allow_write gates every write
    command; emits USE_CAN_GATEWAY_OBSERVE.

Recreated as a fresh PR in this new repository (see the project handover
notes for why); the original PR #18 on the prior repo covered the same
work. (Supersedes #1, which was opened against the wrong head branch and
pulled in unrelated work.)

Test plan

  • script/check.sh — 14 ccp schema tests, both build fixtures,
    clang-format, esphome config, all green.
  • make -C tests/host — 5 ccp_proto cases incl. little-endian SET_MTA
    and 12->5/5/2 read chunking, all green.
  • script/check_no_private_data.py — clean.

New ESPHome external component `ccp`: a CAN Calibration Protocol master on
can_gateway (single-frame CRO/DTO, no ISO-TP). Full command set + high-level
read_memory/write_memory helpers, ESPHome actions, on_connected/on_response/
on_error/on_daq triggers, and a pure host-testable ccp_proto.h codec.

Every field (command/response CAN ids, station address, byte order, timeout)
is configurable; the schema defaults and every test/example address are
generic placeholders, not tied to any one ECU. Observe-first safety: no
auto-connect, allow_write gates every write command; emits
USE_CAN_GATEWAY_OBSERVE.

Gates green: script/check.sh (14 ccp schema tests, both build fixtures,
clang-format, esphome config); make -C tests/host (5 ccp_proto cases incl.
little-endian SET_MTA and 12->5/5/2 read chunking).
Both ccp build fixtures (default read-only, allow_write:true) now compile in
CI alongside the rest of the matrix, so a ccp change is gated the same as
every other component before it can reach main.

Claude-Session: https://claude.ai/code/session_01JpmPzXhUDovTMWBiNMzb89
Branch protection on main will require this one context rather than every
individual compile-matrix leg by name, so renaming or adding a build fixture
never requires touching the ruleset.

Claude-Session: https://claude.ai/code/session_01JpmPzXhUDovTMWBiNMzb89
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant