id array length should match class array length

This commit is contained in:
rusefillc 2022-02-16 12:47:54 -05:00
parent 2f488bfe46
commit d71e203b27
3 changed files with 3 additions and 3 deletions

View File

@ -187,7 +187,7 @@ pins:
- pin: C7
# H144_IN_CAM
id: [GPIOA_6, EFI_ADC_6]
id: [GPIOA_6, GPIOA_6, EFI_ADC_6]
class: [event_inputs, switch_inputs, analog_inputs]
function: Camshaft HALL Sensor or Generic Digital Input
type: hall

Binary file not shown.

View File

@ -112,8 +112,8 @@ public class PinoutLogic {
if (!(pinClass instanceof ArrayList))
throw new IllegalStateException("Expected multiple classes for " + pinIds);
ArrayList<String> pinClassArray = (ArrayList<String>) pinClass;
if (pinIds.size()!=pinClassArray.size())
throw new IllegalStateException(pinName + ": id array length should match class array length");
if (pinIds.size() != pinClassArray.size())
throw new IllegalStateException(pinName + ": id array length should match class array length: " + pinId + " vs " + pinClassArray);
for (int i = 0; i < pinIds.size(); i++) {
String id = pinIds.get(i);
addPinToList(id, pinTsName, pinClassArray.get(i));