Leonardo Francisco
|
244f923441
|
validity: Iteration 4 — Sensor identification and HAL tables
Add post-TLS sensor identification infrastructure:
TLS command mechanism (vcsfw_tls_cmd_send):
- Reusable 2-state subsm for sending VCSFW commands inside TLS channel
- Uses 0x44 prefix + TLS app_data wrapping for sends
- Decrypts TLS response and extracts VCSFW status + payload
Sensor identification (cmd 0x75):
- validity_sensor_parse_identify() parses hw_major/hw_version
- DeviceInfo table (26 entries): maps (major, version) to device name
and sensor type, with exact and fuzzy matching
- SensorTypeInfo table (14 entries): maps sensor_type to geometry
parameters (bytes_per_line, line_width, calibration blob, etc.)
Factory bits retrieval (cmd 0x6f):
- validity_sensor_build_factory_bits_cmd() builds 9-byte command
- Response stored in sensor state for calibration (Iteration 5)
Open sequence integration:
- 4 new SSM states: OPEN_SENSOR_IDENTIFY, OPEN_SENSOR_IDENTIFY_RECV,
OPEN_SENSOR_FACTORY_BITS, OPEN_SENSOR_FACTORY_BITS_RECV
- Sensor state init/clear wired into dev_open/dev_close
New files: validity_sensor.h, validity_sensor.c
Tests: 14 unit tests in test-validity-sensor.c (all passing)
Full suite: 6/6 OK, 0 failures
|
2026-04-10 22:18:43 +00:00 |
|