From ebbee46998c9a2ddd4250d84e88ce373168a6eb7 Mon Sep 17 00:00:00 2001 From: Andrey Gusakov Date: Sat, 20 Apr 2024 13:47:47 +0300 Subject: [PATCH] types and settings for MS IO-Box --- firmware/controllers/algo/rusefi_enums.h | 14 ++++++++++++++ firmware/integration/rusefi_config.txt | 15 ++++++++++++++- 2 files changed, 28 insertions(+), 1 deletion(-) diff --git a/firmware/controllers/algo/rusefi_enums.h b/firmware/controllers/algo/rusefi_enums.h index 1688897c36..2463ab829e 100644 --- a/firmware/controllers/algo/rusefi_enums.h +++ b/firmware/controllers/algo/rusefi_enums.h @@ -197,6 +197,20 @@ enum class CanGpioType : uint8_t { MS = 2, }; +enum class MsIoBoxId : uint8_t { + OFF = 0, + ID200 = 1, + ID220 = 2, + ID240 = 3 +}; + +enum class MsIoBoxVss : uint8_t { + OFF = 0, + VR12 = 1, + HALL34 = 2, + ALL1234 = 3 +}; + enum class UiMode : uint8_t { FULL = 0, INSTALLATION = 1, diff --git a/firmware/integration/rusefi_config.txt b/firmware/integration/rusefi_config.txt index 321bcdd58b..3cf5721a49 100644 --- a/firmware/integration/rusefi_config.txt +++ b/firmware/integration/rusefi_config.txt @@ -283,6 +283,17 @@ custom SentEtbType 1 bits, S08, @OFFSET@, [0:1], @@SentEtbType_enum@@ #define CanGpioType_enum "None", "DRT protocol", "MS protocol" custom CanGpioType 1 bits, S08, @OFFSET@, [0:1], @@CanGpioType_enum@@ +#define MsIoBoxId_enum "Off", "ID1 (0x200)", "ID2 (0x220)", "ID3 (0x240)" +custom MsIoBoxId 1 bits, U08, @OFFSET@, [0:1], @@MsIoBoxId_enum@@ + +#define MsIoBoxVss_enum "Off", "VR speed in (1, 2)", "Hall speed in (3, 4)", "All (1, 2, 3, 4)" +custom MsIoBoxVss 1 bits, U08, @OFFSET@, [0:1], @@MsIoBoxVss_enum@@ + +struct MsIoBox_config_s + MsIoBoxId id + MsIoBoxVss vss +end_struct + #define UiMode_enum "Full", "Installation", "Tuning" custom UiMode 1 bits, S08, @OFFSET@, [0:1], @@UiMode_enum@@ @@ -1650,7 +1661,9 @@ int anotherCiTest adc_channel_e[RANGE_INPUT_COUNT iterate] tcu_rangeAnalogInput; float tcu_rangeSensorBiasResistor;;"Ohm", 1, 0, 0, 200000, 1 -uint8_t[204] unusedOftenChangesDuringFirmwareUpdate;;"units", 1, 0, 0, 1, 0 + MsIoBox_config_s msIoBox0 + +uint8_t[200] unusedOftenChangesDuringFirmwareUpdate;;"units", 1, 0, 0, 1, 0 ! end of engine_configuration_s end_struct