only:HW QC verbose errors

This commit is contained in:
rusefillc 2023-12-25 00:09:42 -05:00
parent 0965fbab14
commit 5b94ab14bd
1 changed files with 6 additions and 2 deletions

View File

@ -46,9 +46,13 @@ static void qcSetEtbState(uint8_t dcIndex, uint8_t direction) {
static void setPin(const CANRxFrame& frame, int value) {
int outputIndex = frame.data8[2];
if (outputIndex >= getBoardMetaOutputsCount())
if (outputIndex >= getBoardMetaOutputsCount()) {
criticalError("QC pin index %d", outputIndex);
return;
Gpio pin = getBoardMetaOutputs()[outputIndex];
}
Gpio* boardOutputs = getBoardMetaOutputs();
criticalAssertVoid(boardOutputs != nullptr, "outputs not defined");
Gpio pin = boardOutputs[outputIndex];
#if EFI_GPIO_HARDWARE && EFI_PROD_CODE
int hwIndex = brainPin_to_index(pin);