From 47ba22ecdd912d5c1e8132b72dfea3ef96f73b98 Mon Sep 17 00:00:00 2001 From: rusefillc Date: Tue, 19 Nov 2024 12:52:32 -0500 Subject: [PATCH] ALS no switch available fix #7083 only:uaefi121 --- .../hellen/uaefi121/connectors/uaefi121.yaml | 17 +++++++++++------ .../java/com/rusefi/pinout/PinoutLogic.java | 2 +- .../src/main/java/com/rusefi/PinType.java | 4 +++- 3 files changed, 15 insertions(+), 8 deletions(-) diff --git a/firmware/config/boards/hellen/uaefi121/connectors/uaefi121.yaml b/firmware/config/boards/hellen/uaefi121/connectors/uaefi121.yaml index acaefb1bbf..ccee8ec8dc 100644 --- a/firmware/config/boards/hellen/uaefi121/connectors/uaefi121.yaml +++ b/firmware/config/boards/hellen/uaefi121/connectors/uaefi121.yaml @@ -209,13 +209,12 @@ pins: function: Coil 1 type: ign - - pin: 33a - class: digital_inputs + meta: MM100_MEGA_UAEFI_IN_AUX3 + class: switch_inputs ts_name: DIN function: Digital input signal - - pin: 34a function: CAM Sensor Exhaust meta: MM100_IN_D3 @@ -503,12 +502,16 @@ pins: type: can - pin: 84a - class: digital_inputs + meta: MM100_IN_CRANK + class: switch_inputs + color: yellow ts_name: BUTTON1 function: BUTTON1 sensor - pin: 85a - class: digital_inputs + meta: MM100_IN_CAM + class: switch_inputs + color: green ts_name: BUTTON2 function: BUTTON2 sensor @@ -534,7 +537,9 @@ pins: type: ls - pin: 89a - class: digital_inputs + meta: MM100_IN_D4 + class: switch_inputs + color: grey ts_name: BUTTON3 function: BUTTON3 input diff --git a/java_tools/configuration_definition/src/main/java/com/rusefi/pinout/PinoutLogic.java b/java_tools/configuration_definition/src/main/java/com/rusefi/pinout/PinoutLogic.java index 5971f3c1a7..67d839d4e8 100644 --- a/java_tools/configuration_definition/src/main/java/com/rusefi/pinout/PinoutLogic.java +++ b/java_tools/configuration_definition/src/main/java/com/rusefi/pinout/PinoutLogic.java @@ -214,7 +214,7 @@ public class PinoutLogic { } } else if (pinId instanceof String) { String pinIdString = (String) pinId; - if (pinIdString.length() == 0) { + if (pinIdString.isEmpty()) { throw new IllegalStateException("Unexpected empty ID field"); } // array type is allowed even for pins with non-array class diff --git a/java_tools/configuration_definition_base/src/main/java/com/rusefi/PinType.java b/java_tools/configuration_definition_base/src/main/java/com/rusefi/PinType.java index 10983a5c0f..45cb3946c3 100644 --- a/java_tools/configuration_definition_base/src/main/java/com/rusefi/PinType.java +++ b/java_tools/configuration_definition_base/src/main/java/com/rusefi/PinType.java @@ -1,5 +1,7 @@ package com.rusefi; +import java.util.Arrays; + public enum PinType { OUTPUTS("output_pin_e", "Gpio", "Unassigned"), ANALOG_INPUTS("adc_channel_e", "adc_channel_e", "EFI_ADC_NONE"), @@ -36,6 +38,6 @@ public enum PinType { return pinType; } } - throw new IllegalArgumentException(key + " not expected, possible keys are " + values()); + throw new IllegalArgumentException(key + " not expected, possible keys are " + Arrays.toString(values())); } }