todo: smarter online change of CAN settings, kill isCanEnabled with fire

This commit is contained in:
rusefillc 2021-11-06 22:22:54 -04:00
parent 7df704907c
commit 25e0678ac1
1 changed files with 8 additions and 0 deletions

View File

@ -210,11 +210,19 @@ void startCanPins(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
// Validate pins
if (!isValidCanTxPin(CONFIG(canTxPin))) {
if (CONFIG(canTxPin) == GPIO_UNASSIGNED) {
// todo: smarter online change of settings, kill isCanEnabled with fire
return;
}
firmwareError(CUSTOM_OBD_70, "invalid CAN TX %s", hwPortname(CONFIG(canTxPin)));
return;
}
if (!isValidCanRxPin(CONFIG(canRxPin))) {
if (CONFIG(canRxPin) == GPIO_UNASSIGNED) {
// todo: smarter online change of settings, kill isCanEnabled with fire
return;
}
firmwareError(CUSTOM_OBD_70, "invalid CAN RX %s", hwPortname(CONFIG(canRxPin)));
return;
}