Skip to content

Add CvS Failure heatmap view to per-cell display #577

@bracyw

Description

@bracyw

Description

The BMS per-cell heatmap currently supports three views via dropdown: Voltage, Temperature, and Balancing. Add a fourth "CvS Failure" view that subscribes to the BMS/PerCell/{chip}/{segment}/CvS/{cell} MQTT topic path. Unlike Balancing (blue/yellow), this view uses red for true (failure) and green for false (no failure), giving the team quick visibility into cell-vs-sense failures on the heatmap.

Acceptance Criteria

  • A "CvS Failure" option appears in both the per-segment and all-segments view selector dropdowns
  • Selecting CvS Failure displays YES/NO per cell on the hex tile heatmap
  • True (failure) renders red, false (no failure) renders green
  • CvS data is sourced from BMS/PerCell/Alpha/{segment}/CvS/{cell} and BMS/PerCell/Beta/{segment}/CvS/{cell} topics
  • CvS failure state is visible in the cell-view detail dialog when a cell is clicked

Proposed Solution

Follow the existing Balancing implementation end-to-end, with a different color scheme:

  1. Add alphaCvs/betaCvs topic functions in src/utils/topic.utils.ts, following the alphaBurning/betaBurning pattern
  2. Add CvS cell count arrays (allAlphaCvsValues, allBetaCvsValues) — likely same counts as burn
  3. Add CvsFailure to the HeatMapView enum in src/services/heat-map.service.ts
  4. Extend CellReading in src/services/cell.service.ts with a cvs boolean field, subscribe to the new topics
  5. Handle HeatMapView.CvsFailure in segment-heatmap.component.ts getCellValue, getCellBoolValue, and getColor — use red for true, green for false
  6. Add CvsFailure entries to VIEW_CLASS_MAP and VIEW_UNIT_MAP in hex-tile.component.ts, add view-cvs-failure CSS class
  7. Add the CvS Failure dropdown option in segment-row.component.ts, bms-segment-view.component.ts, and bms-debug-page.component.ts
  8. Add CvS Failure row to the cell-view detail dialog

Test by running ng test and verifying the heatmap renders correctly with the new dropdown option.

Metadata

Metadata

Assignees

Labels

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions