only: any event input is a switch input

This commit is contained in:
rusefi 2024-09-03 22:20:41 -04:00
parent 4780484307
commit fcdbc04102
2 changed files with 6 additions and 4 deletions

View File

@ -65,8 +65,10 @@ public class PinoutLogic {
if (classList == null) {
throw new IllegalStateException(boardName + ": Class not found: " + className + " for " + id);
}
String pinType = PinType.find(className).getPinType();
addToPinType(boardName, enumsReader, listPin, pinType, id, className, classList);
PinType pinType = PinType.find(className);
addToPinType(boardName, enumsReader, listPin, pinType.getPinType(), id, className, classList);
if (pinType == PinType.EVENT_INPUTS)
addToPinType(boardName, enumsReader, listPin, PinType.SWITCH_INPUTS.getPinType(), id, className, classList);
}
for (Map.Entry<String, ArrayList<String>> kv : names.entrySet()) {
PinType namePinType = PinType.find(kv.getKey());

View File

@ -36,8 +36,8 @@ public class PinoutLogicIntegratedTest {
public void testWholeThing() throws IOException {
runPinoutTest("pins:\n" +
" - pin: 1\n" +
" id: [E11, E11]\n" +
" class: [event_inputs, switch_inputs]\n" +
" id: E11\n" +
" class: event_inputs\n" +
" function: Digital trigger/switch input for instance Hall type CAM\n" +
" ts_name: Digital 2\n" +
" type: din",