commaai / commaai/panda

Test important GPIO initialization in CI (libpanda)

Open
#2,203 4 comments 1 reaction 0 assignees View on GitHub
enhancement good first issue tests
Dominant language
C
Stars
1.7k
Forks
981
Avg merge
13m
Merged PRs (30d)
18

Description

A good test for PRs that refactor / change parts of the panda initialization ([such as this](https://github.com/commaai/panda/pull/2094)) would be a CI job that asserts GPIO like these are initialized correctly and in a safe order:
- the SBU line driving / readout
- the CAN transciever lines (enable + RX/TX alternative functions)
- SOM reset / bootkick
- LED
- ...

This should be quite easy to do without HITL, by writing a "simulated" GPIO hardware block in [fake_stm.h](https://github.com/commaai/panda/blob/471a455789b88a0bf1098e87c49d564da266e890/board/fake_stm.h) and using [libpanda](https://github.com/commaai/panda/tree/471a455789b88a0bf1098e87c49d564da266e890/tests/libpanda).

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.