diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md new file mode 100644 index 0000000000..2a457edccc --- /dev/null +++ b/.github/ISSUE_TEMPLATE.md @@ -0,0 +1,4 @@ +Thank you for taking the time to report an issue! + +To make our work easier, please provide as many details as you can: +* [ ] What hardware did you use while experiencing the issue? \ No newline at end of file diff --git a/.gitignore b/.gitignore index 7acf84c3d8..99204f521e 100644 --- a/.gitignore +++ b/.gitignore @@ -17,3 +17,5 @@ java_console_binary .vscode *.cmp *.net +err.txt +log.txt \ No newline at end of file diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000000..843e28df74 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,28 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "name": "(gdb) Launch", + "type": "cppdbg", + "request": "launch", + "program": "${workspaceFolder}/unit_tests/build/rusefi_test", + // uncomment args below to only debug a particular test + //"args": ["--gtest_filter=etb.testTargetTpsIsFloatBug945"], + "stopAtEntry": false, + "cwd": "${workspaceFolder}/unit_tests/build/", + "environment": [], + "externalConsole": false, + "MIMode": "gdb", + "setupCommands": [ + { + "description": "Enable pretty-printing for gdb", + "text": "-enable-pretty-printing", + "ignoreFailures": true + } + ] + } + ] +} \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000000..829c4790da --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,32 @@ +{ + "files.associations": { + "xstring": "cpp", + "ios": "cpp", + "xlocale": "cpp", + "xtr1common": "cpp", + "xiosbase": "cpp", + "deque": "cpp", + "forward_list": "cpp", + "list": "cpp", + "system_error": "cpp", + "vector": "cpp", + "xhash": "cpp", + "xtree": "cpp" + }, + "editor.detectIndentation": false, + "editor.insertSpaces": false, + "files.exclude": { + "**/.dep": true, + "**/build/lst": true, + "**/build/obj": true, + "hardware/": true, + "misc/": true, + }, + "search.exclude": { + "**/.dep": true, + "**/build/lst": true, + "**/build/obj": true, + "hardware/": true, + "misc/": true, + }, +} diff --git a/README.md b/README.md index 4c62977d3c..ae9f8ed399 100644 --- a/README.md +++ b/README.md @@ -44,6 +44,10 @@ See https://rusefi.com/forum/viewtopic.php?f=5&t=9 | Release date | Revision | Details | | ------------ | --------- | ------- | +| 04/18/2020 | r22231 | Renix 44-2-2 trigger support added | +| 04/02/2020 | | Start button feature | +| 03/28/2020 | | Critical error text is now displayed in TunerStudio | +| 03/26/2020 | | Multi-spark feature | | 09/05/2019 | r19849 | Electronic Throttle Body including idle control seems to work | | 07/28/2019 | r19612 | improvement #809: software jump to DFU | | 04/25/2019 | r17317 | bugfix #775: electrical noise reboot during settings change causes with full tune loss | diff --git a/firmware/.vscode/settings.json b/firmware/.vscode/settings.json deleted file mode 100644 index 557b3f32c6..0000000000 --- a/firmware/.vscode/settings.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "editor.detectIndentation": false, - "editor.insertSpaces": false, - "files.exclude": { - ".dep": true, - "build/lst": true, - "build/obj": true, - }, - "search.exclude": { - ".dep": true, - "build/lst": true, - "build/obj": true, - }, -} diff --git a/firmware/ChibiOS b/firmware/ChibiOS index 85cf4582a9..1a2c5967dc 160000 --- a/firmware/ChibiOS +++ b/firmware/ChibiOS @@ -1 +1 @@ -Subproject commit 85cf4582a9f6a57cc49759c606af5fda2f52d106 +Subproject commit 1a2c5967dc813bdbf1cc7eabfea8377340c8a29e diff --git a/firmware/Makefile b/firmware/Makefile index 0787bafd72..c006b30b6e 100644 --- a/firmware/Makefile +++ b/firmware/Makefile @@ -80,12 +80,6 @@ ifeq ($(USE_VERBOSE_COMPILE),) USE_VERBOSE_COMPILE = no endif -# If enabled, this option makes the build process faster by not compiling -# modules not used in the current configuration. -ifeq ($(USE_SMART_BUILD),) - USE_SMART_BUILD = no -endif - ifeq ($(USE_BOOTLOADER),) USE_BOOTLOADER = no endif @@ -133,6 +127,20 @@ MAKEFLAGS += ${NUMJOBS} # Project, sources and paths # +BOARDS_DIR = $(PROJECT_DIR)/config/boards + +include $(PROJECT_DIR)/config/boards/$(PROJECT_BOARD)/board.mk + +# If enabled, this option makes the build process faster by not compiling +# modules not used in the current configuration. +# without USE_SMART_BUILD all ChibiOS (including all drivers) are builded. And all drivers includes get included. +ifeq ($(USE_SMART_BUILD),) + USE_SMART_BUILD = yes +endif +ifeq ($(CONFDIR),) + CONFDIR = $(PROJECT_DIR)/config/stm32f4ems +endif + # Startup files. include $(CPU_STARTUP_DIR) # HAL-OSAL files (optional). @@ -153,9 +161,6 @@ ifeq ($(USE_FATFS),yes) include $(PROJECT_DIR)/ext/fatfs.mk endif -BOARDS_DIR = $(PROJECT_DIR)/config/boards - -include $(PROJECT_DIR)/config/boards/$(PROJECT_BOARD)/board.mk include $(PROJECT_DIR)/config/engines/engines.mk include $(PROJECT_DIR)/console/console.mk include $(PROJECT_DIR)/controllers/controllers.mk @@ -172,7 +177,6 @@ ifeq ($(BOOTLOADERINC),) BOOTLOADERINC= $(PROJECT_DIR)/bootloader/ endif - ifeq ($(USE_BOOTLOADER),yes) include $(PROJECT_DIR)/bootloader/bootloader.mk endif @@ -189,7 +193,9 @@ CSRC = $(STARTUPSRC) \ $(PORTSRC) \ $(OSALSRC) \ $(HALSRC) \ + $(HALSRC_CONTRIB) \ $(PLATFORMSRC) \ + $(PLATFORMSRC_CONTRIB) \ $(BOARDSRC) \ $(BOOTLOADERSRC) \ $(CHIBIOS)/os/ex/ST/lis302dl.c \ @@ -275,6 +281,7 @@ INCDIR = $(CHIBIOS)/os/license \ $(HALINC) \ $(HALINC_CONTRIB) \ $(PLATFORMINC) \ + $(PLATFORMINC_CONTRIB) \ $(BOARDINC) \ $(BOOTLOADERINC) \ $(CHCPPINC) \ diff --git a/firmware/bootloader/bootloader.h b/firmware/bootloader/bootloader.h index db6b7b25c1..33c2b54e6d 100644 --- a/firmware/bootloader/bootloader.h +++ b/firmware/bootloader/bootloader.h @@ -1,5 +1,4 @@ -#ifndef BOOTLOADER_H_ -#define BOOTLOADER_H_ +#pragma once #ifdef __cplusplus extern "C" { @@ -13,5 +12,3 @@ int initBootloader(void); #ifdef __cplusplus } #endif - -#endif /* BOOTLOADER_H_ */ diff --git a/firmware/bootloader/src/Makefile b/firmware/bootloader/src/Makefile index 500411fc8e..0144b7bc53 100644 --- a/firmware/bootloader/src/Makefile +++ b/firmware/bootloader/src/Makefile @@ -12,8 +12,14 @@ ifeq ($(DEBUG_LEVEL_OPT),) DDEFS += -DEFI_ENABLE_ASSERTS=FALSE -DCH_DBG_ENABLE_ASSERTS=FALSE -DCH_DBG_ENABLE_STACK_CHECK=FALSE -DCH_DBG_FILL_THREADS=FALSE -DCH_DBG_THREADS_PROFILING=FALSE endif +ifeq ($(CONFDIR),) + CONFDIR = $(PROJECT_DIR)/config/stm32f4ems +endif + # disable some modules to shrink bootloader binary DDEFS += -DHAL_USE_ADC=FALSE -DHAL_USE_CAN=FALSE -DHAL_USE_EXT=FALSE -DHAL_USE_GPT=FALSE -DHAL_USE_I2C=FALSE -DHAL_USE_ICU=FALSE -DHAL_USE_PWM=FALSE -DHAL_USE_RTC=FALSE -DHAL_USE_I2C=FALSE +#disable ChibiOS flsah driver and prevent header from include +DDEFS += -DHAL_USE_FLASH=FALSE # disable USB (The bootloader has currently UART support only) DDEFS += -DEFI_USB_SERIAL=FALSE -DHAL_USE_SERIAL_USB=FALSE -DHAL_USE_USB=FALSE -DHAL_USE_USB_MSD=FALSE @@ -71,7 +77,7 @@ endif # If enabled, this option makes the build process faster by not compiling # modules not used in the current configuration. ifeq ($(USE_SMART_BUILD),) - USE_SMART_BUILD = no + USE_SMART_BUILD = yes endif # diff --git a/firmware/bootloader/src/dfu.cpp b/firmware/bootloader/src/dfu.cpp index 80af6da466..8b412b1959 100644 --- a/firmware/bootloader/src/dfu.cpp +++ b/firmware/bootloader/src/dfu.cpp @@ -2,7 +2,7 @@ #include "hardware.h" #include "efi_gpio.h" -#include "flash.h" +#include "flash_int.h" #include "dfu.h" @@ -165,7 +165,7 @@ static void dfuHandleRead(void) { if (isInVirtualPageBuffer(addr)) memcpy(buffer, (uint8_t *)addr, numBytes); else - flashRead(addr, (char *)buffer, numBytes); + intFlashRead(addr, (char *)buffer, numBytes); // transmit data sr5WriteData(&blTsChannel, (uint8_t *)buffer, numBytes); @@ -197,7 +197,7 @@ static void dfuHandleWrite(void) { if (isInVirtualPageBuffer(addr)) memcpy((uint8_t *)addr, (buffer + 1), numBytes); else - flashWrite(addr, (const char *)(buffer + 1), numBytes); + intFlashWrite(addr, (const char *)(buffer + 1), numBytes); // we're done! sendByte(DFU_ACK_BYTE); @@ -233,7 +233,7 @@ static void dfuHandleErase(void) { continue; } // erase sector - flashSectorErase(sectorIdx); + intFlashSectorErase(sectorIdx); } sendByte(DFU_ACK_BYTE); diff --git a/firmware/bootloader/src/dfu.h b/firmware/bootloader/src/dfu.h index 05642df657..bb5dfc6a59 100644 --- a/firmware/bootloader/src/dfu.h +++ b/firmware/bootloader/src/dfu.h @@ -1,5 +1,4 @@ -#ifndef DFU_H_ -#define DFU_H_ +#pragma once #include "tunerstudio_io.h" @@ -51,5 +50,3 @@ void dfuJumpToApp(uint32_t addr); ts_channel_s *getTsChannel(); - -#endif /* DFU_H_ */ diff --git a/firmware/bootloader/src/rusefi_stubs.cpp b/firmware/bootloader/src/rusefi_stubs.cpp index 5c455eacea..fa3e79bfe1 100644 --- a/firmware/bootloader/src/rusefi_stubs.cpp +++ b/firmware/bootloader/src/rusefi_stubs.cpp @@ -9,8 +9,6 @@ * The whole idea of bootloader is to make it as small as possible. And reasonably independent. */ -int maxNesting = 0; - void chDbgPanic3(const char */*msg*/, const char * /*file*/, int /*line*/) { } diff --git a/firmware/config/boards/clean_env_variables.bat b/firmware/config/boards/clean_env_variables.bat index 7148b891c1..9bb0de5b55 100644 --- a/firmware/config/boards/clean_env_variables.bat +++ b/firmware/config/boards/clean_env_variables.bat @@ -10,4 +10,4 @@ set EFI_FATAL_ERROR_PIN= set BUILDDIR= set DEBUG_LEVEL_OPT= set USE_FATFS= - +set USE_SMART_BUILD= diff --git a/firmware/config/boards/kinetis/!compile-kinetis.bat b/firmware/config/boards/kinetis/!compile-kinetis.bat index 5ff5d0d973..9667c783be 100644 --- a/firmware/config/boards/kinetis/!compile-kinetis.bat +++ b/firmware/config/boards/kinetis/!compile-kinetis.bat @@ -7,6 +7,7 @@ set EXTRA_PARAMS=-DDUMMY -DCPU_MKE16F512VLH16 -DCPU_MKE16F512VLH16_cm4 -D__USE_C rem set BUILDDIR=build_kinetis set BUILDDIR=build set PROJECT_BOARD=kinetis +set USE_SMART_BUILD=yes set PROJECT_CPU=kinetis set DEBUG_LEVEL_OPT="-O2" set USE_FATFS=no diff --git a/firmware/config/boards/kinetis/OS/os/hal/ports/KINETIS/LLD/PITv2/hal_gpt_lld.h b/firmware/config/boards/kinetis/OS/os/hal/ports/KINETIS/LLD/PITv2/hal_gpt_lld.h index 7c56a42704..9412410094 100644 --- a/firmware/config/boards/kinetis/OS/os/hal/ports/KINETIS/LLD/PITv2/hal_gpt_lld.h +++ b/firmware/config/boards/kinetis/OS/os/hal/ports/KINETIS/LLD/PITv2/hal_gpt_lld.h @@ -55,7 +55,7 @@ * @note The default is @p TRUE. */ #if !defined(KINETIS_GPT_USE_PIT1) || defined(__DOXYGEN__) -#define KINETIS_GPT_USE_PIT1 FALSE +#define KINETIS_GPT_USE_PIT1 TRUE #endif /** diff --git a/firmware/config/boards/kinetis/board.mk b/firmware/config/boards/kinetis/board.mk index 3819b9f90e..1de607243b 100644 --- a/firmware/config/boards/kinetis/board.mk +++ b/firmware/config/boards/kinetis/board.mk @@ -14,10 +14,4 @@ BOARDSRC_CPP += $(CONTROLLERS_ALGO_AUTO_GENERATED_ENUMS) # Define linker script file here LDSCRIPT= $(STARTUPLD)/MKE1xF512.ld -PLATFORMSRC += $(PLATFORMSRC_CONTRIB) -PLATFORMINC += $(PLATFORMINC_CONTRIB) - -# Using external ChibiOS-Contrib code for Comparator HAL -HALSRC += $(CHIBIOS_CONTRIB)/os/hal/src/hal_comp.c - - +CONFDIR = $(BOARD_DIR) diff --git a/firmware/config/boards/kinetis/chconf.h b/firmware/config/boards/kinetis/chconf.h index aa88a5f858..613766ee55 100644 --- a/firmware/config/boards/kinetis/chconf.h +++ b/firmware/config/boards/kinetis/chconf.h @@ -807,9 +807,9 @@ void chDbgPanic3(const char *msg, const char * file, int line); * so that it would not crash the error handler in case of stack issues */ #if CH_DBG_SYSTEM_STATE_CHECK -#define hasFatalError() (ch.dbg.panic_msg != NULL) +#define hasOsPanicError() (ch.dbg.panic_msg != NULL) #else -#define hasFatalError() (FALSE) +#define hasOsPanicError() (FALSE) #endif diff --git a/firmware/config/boards/kinetis/config/!gen_config.bat b/firmware/config/boards/kinetis/config/!gen_config.bat index b0f6b90c8f..c15b5d6509 100644 --- a/firmware/config/boards/kinetis/config/!gen_config.bat +++ b/firmware/config/boards/kinetis/config/!gen_config.bat @@ -25,6 +25,7 @@ java ^ -jar ../java_tools/ConfigDefinition.jar ^ -definition integration/rusefi_config.txt ^ -ts_destination tunerstudio ^ + -tool kineris_gen_config.bat ^ -with_c_defines false ^ -initialize_to_zero false ^ -ts_output_name rusefi_kinetis.ini ^ diff --git a/firmware/config/boards/kinetis/config/controllers/algo/auto_generated_enums.cpp b/firmware/config/boards/kinetis/config/controllers/algo/auto_generated_enums.cpp index c2e6f9e4b3..370bf0b799 100644 --- a/firmware/config/boards/kinetis/config/controllers/algo/auto_generated_enums.cpp +++ b/firmware/config/boards/kinetis/config/controllers/algo/auto_generated_enums.cpp @@ -341,21 +341,11 @@ case TLE6240_PIN_9: } return NULL; } -const char *getCan_device_mode_e(can_device_mode_e value){ -switch(value) { -case CD_OFF: - return "CD_OFF"; -case CD_USE_CAN1: - return "CD_USE_CAN1"; -case CD_USE_CAN2: - return "CD_USE_CAN2"; -case Internal_ForceMyEnumIntSize_can_device_mode: - return "Internal_ForceMyEnumIntSize_can_device_mode"; - } - return NULL; -} + const char *getCan_nbc_e(can_nbc_e value){ switch(value) { +case CAN_BUS_NBC_NONE: + return "CAN_BUS_NBC_NONE"; case CAN_BUS_MAZDA_RX8: return "CAN_BUS_MAZDA_RX8"; case CAN_BUS_NBC_BMW: @@ -364,6 +354,8 @@ case CAN_BUS_NBC_FIAT: return "CAN_BUS_NBC_FIAT"; case CAN_BUS_NBC_VAG: return "CAN_BUS_NBC_VAG"; +case CAN_BUS_W202_C180: + return "CAN_BUS_W202_C180"; case Internal_ForceMyEnumIntSize_can_nbc: return "Internal_ForceMyEnumIntSize_can_nbc"; } @@ -399,8 +391,14 @@ case DBG_2: return "DBG_2"; case DBG_BOOST: return "DBG_BOOST"; -case DBG_37: - return "DBG_37"; +case DBG_START_STOP: + return "DBG_START_STOP"; +case DBG_LAUNCH: + return "DBG_LAUNCH"; +case DBG_ETB_AUTOTUNE: + return "DBG_ETB_AUTOTUNE"; +case DBG_40: + return "DBG_40"; case DBG_ALTERNATOR_PID: return "DBG_ALTERNATOR_PID"; case DBG_ANALOG_INPUTS: @@ -409,8 +407,8 @@ case DBG_ANALOG_INPUTS2: return "DBG_ANALOG_INPUTS2"; case DBG_AUX_PID_1: return "DBG_AUX_PID_1"; -case DBG_AUX_TEMPERATURE: - return "DBG_AUX_TEMPERATURE"; +case DBG_34: + return "DBG_34"; case DBG_AUX_VALVES: return "DBG_AUX_VALVES"; case DBG_BENCH_TEST: @@ -465,8 +463,8 @@ case DBG_TPS_ACCEL: return "DBG_TPS_ACCEL"; case DBG_TRIGGER_COUNTERS: return "DBG_TRIGGER_COUNTERS"; -case DBG_TRIGGER_SYNC: - return "DBG_TRIGGER_SYNC"; +case DBG_16: + return "DBG_16"; case DBG_VEHICLE_SPEED_SENSOR: return "DBG_VEHICLE_SPEED_SENSOR"; case DBG_VVT: @@ -611,6 +609,8 @@ case BMW_M73_PROTEUS: return "BMW_M73_P"; case BMW_M73_MRE: return "BMW_M73_MRE"; +case BMW_M73_MRE_SLAVE: + return "BMW_M73_MRE_SLAVE"; case MIATA_1996: return "MIATA_1996"; case MIATA_NA6_MAP: @@ -815,6 +815,8 @@ case FOUR_STROKE_CAM_SENSOR: return "FOUR_STROKE_CAM_SENSOR"; case FOUR_STROKE_CRANK_SENSOR: return "FOUR_STROKE_CRANK_SENSOR"; +case FOUR_STROKE_THREE_TIMES_CRANK_SENSOR: + return "FOUR_STROKE_THREE_TIMES_CRANK_SENSOR"; case FOUR_STROKE_SYMMETRICAL_CRANK_SENSOR: return "FOUR_STROKE_SYMMETRICAL_CRANK_SENSOR"; case Force_4_bytes_size_operation_mode_e: @@ -1011,6 +1013,14 @@ case TT_MAZDA_MIATA_VVT_TEST: return "TT_MAZDA_MIATA_VVT_TEST"; case TT_MAZDA_SOHC_4: return "TT_MAZDA_SOHC_4"; +case TT_RENIX_66_2_2_2: + return "TT_RENIX_66_2_2_2"; +case TT_BOSCH_QUICK_START: + return "TT_BOSCH_QUICK_START"; +case TT_HONDA_K_12_1: + return "TT_HONDA_K_12_1"; +case TT_RENIX_44_2_2: + return "TT_RENIX_44_2_2"; case TT_MIATA_NB2_VVT_CAM: return "TT_MIATA_NB2_VVT_CAM"; case TT_MAZDA_Z5: diff --git a/firmware/config/boards/kinetis/config/controllers/algo/auto_generated_enums.h b/firmware/config/boards/kinetis/config/controllers/algo/auto_generated_enums.h index f3162bf8fd..6665afb20b 100644 --- a/firmware/config/boards/kinetis/config/controllers/algo/auto_generated_enums.h +++ b/firmware/config/boards/kinetis/config/controllers/algo/auto_generated_enums.h @@ -16,7 +16,6 @@ const char *getAdc_channel_e(adc_channel_e value); const char *getAdc_channel_mode_e(adc_channel_mode_e value); const char *getAir_pressure_sensor_type_e(air_pressure_sensor_type_e value); const char *getBrain_pin_e(brain_pin_e value); -const char *getCan_device_mode_e(can_device_mode_e value); const char *getCan_nbc_e(can_nbc_e value); const char *getChamber_style_e(chamber_style_e value); const char *getCranking_ignition_mode_e(cranking_ignition_mode_e value); diff --git a/firmware/config/boards/kinetis/config/controllers/algo/engine_configuration_generated_structures.h b/firmware/config/boards/kinetis/config/controllers/algo/engine_configuration_generated_structures.h index 2aabd0c635..d3e3f8593d 100644 --- a/firmware/config/boards/kinetis/config/controllers/algo/engine_configuration_generated_structures.h +++ b/firmware/config/boards/kinetis/config/controllers/algo/engine_configuration_generated_structures.h @@ -1,9 +1,79 @@ -// this section was generated automatically by rusEfi tool ConfigDefinition.jar based on integration/rusefi_config.txt Fri Mar 20 19:55:09 EDT 2020 +// this section was generated automatically by rusEfi tool ConfigDefinition.jar based on kineris_gen_config.bat integration/rusefi_config.txt Sun Apr 26 14:18:05 EDT 2020 // by class com.rusefi.output.CHeaderConsumer // begin #ifndef CONFIG_BOARDS_KINETIS_CONFIG_CONTROLLERS_ALGO_ENGINE_CONFIGURATION_GENERATED_STRUCTURES_H #define CONFIG_BOARDS_KINETIS_CONFIG_CONTROLLERS_ALGO_ENGINE_CONFIGURATION_GENERATED_STRUCTURES_H #include "rusefi_types.h" +// start of stft_cell_cfg_s +struct stft_cell_cfg_s { + /** + * offset 0 + */ + int8_t maxAdd; + /** + * offset 1 + */ + int8_t maxRemove; + /** + * offset 2 + */ + uint16_t timeConstant; + /** total size 4*/ +}; + +typedef struct stft_cell_cfg_s stft_cell_cfg_s; + +// start of stft_s +struct stft_s { + /** + * Below this RPM, the idle region is active + * offset 0 + */ + uint8_t maxIdleRegionRpm; + /** + * Below this engine load, the overrun region is active + * offset 1 + */ + uint8_t maxOverrunLoad; + /** + * Above this engine load, the power region is active + * offset 2 + */ + uint8_t minPowerLoad; + /** + * When close to correct AFR, pause correction. This can improve stability by not changing the adjustment if the error is extremely small, but is not required. + * offset 3 + */ + uint8_t deadband; + /** + * Below this temperature, correction is disabled. + * offset 4 + */ + int8_t minClt; + /** + * Below this AFR, correction is paused + * offset 5 + */ + uint8_t minAfr; + /** + * Above this AFR, correction is paused + * offset 6 + */ + uint8_t maxAfr; + /** + * Delay after starting the engine before beginning closed loop correction. + * offset 7 + */ + uint8_t startupDelay; + /** + * offset 8 + */ + stft_cell_cfg_s cellCfgs[STFT_CELL_COUNT]; + /** total size 24*/ +}; + +typedef struct stft_s stft_s; + // start of pid_s struct pid_s { /** @@ -90,6 +160,61 @@ struct spi_pins { typedef struct spi_pins spi_pins; +// start of gppwm_channel +struct gppwm_channel { + /** + * Select a pin to use for PWM or on-off output. + * offset 0 + */ + output_pin_e pin; + /** + * If an error (with a sensor, etc) is detected, this value is used instead of reading from the table. + * This should be a safe value for whatever hardware is connected to prevent damage. + * offset 1 + */ + uint8_t dutyIfError; + /** + * Select a frequency to run PWM at. + * Set this to 0hz to enable on-off mode. + * offset 2 + */ + uint16_t pwmFrequency; + /** + * In on-off mode, turn the output on when the table value is above this duty. + * offset 4 + */ + uint8_t onAboveDuty; + /** + * In on-off mode, turn the output off when the table value is below this duty. + * offset 5 + */ + uint8_t offBelowDuty; + /** + * Selects the load axis to use for the table. + * offset 6 + */ + gppwm_channel_e loadAxis; + /** + * offset 7 + */ + uint8_t pad; + /** + * offset 8 + */ + uint8_t loadBins[GPPWM_LOAD_COUNT]; + /** + * offset 16 + */ + uint8_t rpmBins[GPPWM_RPM_COUNT]; + /** + * offset 24 + */ + gppwm_table_t table; + /** total size 88*/ +}; + +typedef struct gppwm_channel gppwm_channel; + // start of air_pressure_sensor_config_s struct air_pressure_sensor_config_s { /** @@ -278,33 +403,6 @@ struct injector_s { typedef struct injector_s injector_s; -// start of bi_quard_s -struct bi_quard_s { - /** - * offset 0 - */ - float a0; - /** - * offset 4 - */ - float a1; - /** - * offset 8 - */ - float a2; - /** - * offset 12 - */ - float b1; - /** - * offset 16 - */ - float b2; - /** total size 20*/ -}; - -typedef struct bi_quard_s bi_quard_s; - // start of specs_s struct specs_s { /** @@ -339,10 +437,10 @@ struct trigger_config_s { trigger_type_e type; /** offset 4 bit 0 */ - bool unusedTriggerBit0 : 1; + bool todoRemoveMeOneDay0 : 1; /** offset 4 bit 1 */ - bool unusedTriggerBit1 : 1; + bool todoRemoveMeOneDay1 : 1; /** * This option could be used if your second trigger channel is broken offset 4 bit 2 */ @@ -522,7 +620,7 @@ struct etb_io { /** * offset 3 */ - pin_output_mode_e controlPinMode; + brain_pin_e disablePin; /** total size 4*/ }; @@ -547,11 +645,8 @@ struct engine_configuration_s { */ injector_s injector; /** - * Should trigger emulator push data right into trigger handling logic, eliminating the need for physical jumper wires? - * See also triggerSimulatorPins - * PS: Funny name, right? :) offset 76 bit 0 */ - bool directSelfStimulation : 1; + bool unused76b0 : 1; /** offset 76 bit 1 */ bool activateAuxPid1 : 1; @@ -577,8 +672,9 @@ struct engine_configuration_s { offset 76 bit 8 */ bool isVerboseAuxPid4 : 1; /** + * enable cj125verbose/disable cj125verbose offset 76 bit 9 */ - bool useBiQuadAnalogFiltering : 1; + bool isCJ125Verbose : 1; /** * Is your UA CJ125 output wired to MCU via resistor divider? offset 76 bit 10 */ @@ -587,6 +683,7 @@ struct engine_configuration_s { offset 76 bit 11 */ bool cj125isLsu49 : 1; /** + * TLE7209 uses two-wire mode. TLE9201 and VNH2SP30 do NOT use two wire mode. offset 76 bit 12 */ bool etb_use_two_wires : 1; /** @@ -602,7 +699,7 @@ struct engine_configuration_s { bool cj125isUrDivided : 1; /** offset 76 bit 16 */ - bool useTLE8888_hall_mode : 1; + bool issue_294_unused : 1; /** offset 76 bit 17 */ bool useTLE8888_cranking_hack : 1; @@ -627,7 +724,7 @@ struct engine_configuration_s { bool useRunningMathForCranking : 1; /** offset 76 bit 24 */ - bool issue_294_25 : 1; + bool displayLogicLevelsInEngineSniffer : 1; /** offset 76 bit 25 */ bool issue_294_26 : 1; @@ -898,6 +995,7 @@ struct engine_configuration_s { adc_channel_e fuelLevelSensor; /** * Second throttle body position sensor, single channel so far + * set_analog_input_pin tps2 X * offset 515 */ adc_channel_e tps2_1AdcChannel; @@ -959,6 +1057,7 @@ struct engine_configuration_s { * Electronic throttle pedal position input * First channel * See also tps1_1AdcChannel + * set_analog_input_pin pps X * offset 580 */ adc_channel_e throttlePedalPositionAdcChannel; @@ -1103,10 +1202,12 @@ struct engine_configuration_s { */ pin_output_mode_e electronicThrottlePin1Mode; /** + * set_cj125_heater_pin XXX * offset 673 */ brain_pin_e wboHeaterPin; /** + * set_cj125_cs_pin XXX * offset 674 */ brain_pin_e cj125CsPin; @@ -1196,10 +1297,12 @@ struct engine_configuration_s { */ brain_pin_e sdCardCsPin; /** + * set_can_tx_pin X * offset 708 */ brain_pin_e canTxPin; /** + * set_can_rx_pin X * offset 709 */ brain_pin_e canRxPin; @@ -1210,7 +1313,7 @@ struct engine_configuration_s { /** * offset 711 */ - brain_pin_e debugTimerCallback; + uint8_t unused711; /** * offset 712 */ @@ -1234,7 +1337,7 @@ struct engine_configuration_s { /** * offset 732 */ - can_device_mode_e canDeviceMode; + int anUnused4Bytes; /** * Each rusEfi piece can provide synthetic trigger signal for external ECU. Sometimes these wires are routed back into trigger inputs of the same rusEfi board. * See also directSelfStimulation which is different. @@ -1298,6 +1401,7 @@ struct engine_configuration_s { offset 744 bit 13 */ bool verboseTLE8888 : 1; /** + * enable can_broadcast/disable can_broadcast offset 744 bit 14 */ bool enableVerboseCanTx : 1; /** @@ -1305,6 +1409,7 @@ struct engine_configuration_s { offset 744 bit 15 */ bool onOffAlternatorLogic : 1; /** + * enable cj125/disable cj125 offset 744 bit 16 */ bool isCJ125Enabled : 1; /** @@ -1386,7 +1491,11 @@ struct engine_configuration_s { /** * offset 760 */ - int unrealisticRpmThreashold; + uint8_t mc33_hvolt; + /** + * offset 761 + */ + uint8_t unusedHere[3]; /** * offset 764 */ @@ -1408,7 +1517,7 @@ struct engine_configuration_s { /** * offset 806 */ - brain_pin_e debugSetTimer; + uint8_t unused806; /** * offset 807 */ @@ -1445,15 +1554,18 @@ struct engine_configuration_s { */ int16_t stepperParkingExtraSteps; /** - * This magic property is specific to Mazda Miata NB2 * offset 820 */ - float unusedmiataNb2VVTRatioFrom; + float unusedAntilagTimeout; /** - * This magic property is specific to Mazda Miata NB2 * offset 824 */ - float unusedmiataNb2VVTRatioTo; + int16_t antiLagRpmTreshold; + /** + * Maximum time to crank starter + * offset 826 + */ + int16_t startCrankingDuration; /** * This pin is used for debugging - snap a logic analyzer on it and see if it's ever high * offset 828 @@ -1603,22 +1715,22 @@ struct engine_configuration_s { bool multisparkEnable : 1; /** offset 976 bit 4 */ - bool unusedBit_251_4 : 1; + bool enableLaunchRetard : 1; /** offset 976 bit 5 */ - bool unusedBit_251_5 : 1; + bool enableLaunchBoost : 1; /** offset 976 bit 6 */ - bool unusedBit_251_6 : 1; + bool launchDisableBySpeed : 1; /** offset 976 bit 7 */ - bool unusedBit_251_7 : 1; + bool enableCanVss : 1; /** offset 976 bit 8 */ - bool unusedBit_251_8 : 1; + bool enableInnovateLC2 : 1; /** offset 976 bit 9 */ - bool unusedBit_251_9 : 1; + bool showHumanReadableWarning : 1; /** offset 976 bit 10 */ bool unusedBit_251_10 : 1; @@ -1681,10 +1793,10 @@ struct engine_configuration_s { bool unusedBit_251_29 : 1; /** offset 976 bit 30 */ - bool unusedBit_280_30 : 1; + bool unusedBit_282_30 : 1; /** offset 976 bit 31 */ - bool unusedBit_280_31 : 1; + bool unusedBit_282_31 : 1; /** * offset 980 */ @@ -1758,7 +1870,23 @@ struct engine_configuration_s { /** * offset 1052 */ - int unusedAtOldBoardConfigurationEnd[103]; + int launchAdvanceRpmRange; + /** + * offset 1056 + */ + int launchTpsTreshold; + /** + * offset 1060 + */ + float launchActivateDelay; + /** + * offset 1064 + */ + stft_s stft; + /** + * offset 1088 + */ + int unusedAtOldBoardConfigurationEnd[94]; /** offset 1464 bit 0 */ bool vvtDisplayInverted : 1; @@ -1790,9 +1918,11 @@ struct engine_configuration_s { offset 1464 bit 7 */ bool useLinearCltSensor : 1; /** + * enable can_read/disable can_read offset 1464 bit 8 */ bool canReadEnabled : 1; /** + * enable can_write/disable can_write offset 1464 bit 9 */ bool canWriteEnabled : 1; /** @@ -2147,7 +2277,7 @@ struct engine_configuration_s { */ int16_t tps2Max; /** - * See also startStopButton + * See also startStopButtonPin * offset 1772 */ output_pin_e starterControlPin; @@ -2158,7 +2288,7 @@ struct engine_configuration_s { /** * offset 1774 */ - uint8_t unusedFormerWarmupAfrPid; + brain_pin_e mc33816_flag0; /** * offset 1775 */ @@ -2291,17 +2421,19 @@ struct engine_configuration_s { */ int16_t iacByTpsTaper; /** + * set_aux_tx_pin X * offset 2040 */ - brain_pin_e unusedErrorPin; + brain_pin_e auxSerialTxPin; /** * offset 2041 */ brain_pin_e warningLedPin; /** + * set_aux_rx_pin X * offset 2042 */ - brain_pin_e unused1234234; + brain_pin_e auxSerialRxPin; /** * offset 2043 */ @@ -2369,7 +2501,11 @@ struct engine_configuration_s { /** * offset 2096 */ - uint32_t unused_former_warmup_target_afr[9]; + uint32_t auxSerialSpeed; + /** + * offset 2100 + */ + uint32_t unused_former_warmup_target_afr[8]; /** * kPa value at which we need to cut fuel and spark, 0 if not enabled * offset 2132 @@ -2479,7 +2615,7 @@ struct engine_configuration_s { /** * offset 2332 */ - bi_quard_s biQuad; + uint8_t unusedOldBiquad[20]; /** * CLT-based timing correction * offset 2352 @@ -2492,7 +2628,11 @@ struct engine_configuration_s { /** * offset 2416 */ - int nbVvtIndex; + tle8888_mode_e tle8888mode; + /** + * offset 2417 + */ + uint8_t unusedSomethingWasHere[3]; /** * offset 2420 */ @@ -2508,7 +2648,7 @@ struct engine_configuration_s { /** * offset 2432 */ - float postCrankingTargetClt; + float unused2432; /** * Fuel multiplier taper, see also postCrankingDurationSec * offset 2436 @@ -2957,10 +3097,19 @@ struct engine_configuration_s { */ uint8_t iacPidMultRpmBins[IAC_PID_MULT_SIZE]; /** + * set can_vss X * offset 4140 */ - int mainUnusedEnd[527]; - /** total size 6248*/ + can_vss_nbc_e canVssNbcType; + /** + * offset 4144 + */ + gppwm_channel gppwm[4]; + /** + * offset 4496 + */ + int mainUnusedEnd[376]; + /** total size 6000*/ }; typedef struct engine_configuration_s engine_configuration_s; @@ -2971,6 +3120,26 @@ struct persistent_config_s { * offset 0 */ engine_configuration_s engineConfiguration; + /** + * offset 6000 + */ + error_message_t warning_message; + /** + * offset 6120 + */ + float afterstartCoolantBins[AFTERSTART_HOLD_CURVE_SIZE]; + /** + * offset 6152 + */ + float afterstartHoldTime[AFTERSTART_HOLD_CURVE_SIZE]; + /** + * offset 6184 + */ + float afterstartEnrich[AFTERSTART_ENRICH_CURVE_SIZE]; + /** + * offset 6216 + */ + float afterstartDecayTime[AFTERSTART_DECAY_CURVE_SIZE]; /** * offset 6248 */ @@ -3242,4 +3411,4 @@ typedef struct persistent_config_s persistent_config_s; #endif // end -// this section was generated automatically by rusEfi tool ConfigDefinition.jar based on integration/rusefi_config.txt Fri Mar 20 19:55:09 EDT 2020 +// this section was generated automatically by rusEfi tool ConfigDefinition.jar based on kineris_gen_config.bat integration/rusefi_config.txt Sun Apr 26 14:18:05 EDT 2020 diff --git a/firmware/config/boards/kinetis/config/controllers/algo/rusefi_generated.h b/firmware/config/boards/kinetis/config/controllers/algo/rusefi_generated.h index 2d37113aa8..e9d460da5a 100644 --- a/firmware/config/boards/kinetis/config/controllers/algo/rusefi_generated.h +++ b/firmware/config/boards/kinetis/config/controllers/algo/rusefi_generated.h @@ -1,5 +1,5 @@ // -// was generated automatically by rusEfi tool ConfigDefinition.jar based on integration/rusefi_config.txt +// was generated automatically by rusEfi tool ConfigDefinition.jar based on kineris_gen_config.bat integration/rusefi_config.txt // #define absoluteFuelPressure_offset 76 @@ -53,6 +53,17 @@ #define afrTable_offset_hex 48a0 #define afterCrankingIACtaperDuration_offset 2036 #define afterCrankingIACtaperDuration_offset_hex 7f4 +#define AFTERSTART_DECAY_CURVE_SIZE 8 +#define AFTERSTART_ENRICH_CURVE_SIZE 8 +#define AFTERSTART_HOLD_CURVE_SIZE 8 +#define afterstartCoolantBins_offset 6120 +#define afterstartCoolantBins_offset_hex 17e8 +#define afterstartDecayTime_offset 6216 +#define afterstartDecayTime_offset_hex 1848 +#define afterstartEnrich_offset 6184 +#define afterstartEnrich_offset_hex 1828 +#define afterstartHoldTime_offset 6152 +#define afterstartHoldTime_offset_hex 1808 #define alFIn_offset 4024 #define alFIn_offset_hex fb8 #define alignEngineSnifferAtTDC_offset 744 @@ -96,6 +107,10 @@ #define antiLagActivationMode_offset_hex 400 #define antiLagEnabled_offset 76 #define antiLagEnabled_offset_hex 4c +#define antiLagRpmTreshold_offset 824 +#define antiLagRpmTreshold_offset_hex 338 +#define anUnused4Bytes_offset 732 +#define anUnused4Bytes_offset_hex 2dc #define autoTuneCltThreshold_offset 2420 #define autoTuneCltThreshold_offset_hex 974 #define autoTuneTpsQuietPeriod_offset 2428 @@ -186,6 +201,12 @@ #define auxPidPins3_offset_hex 8ae #define auxPidPins4_offset 2223 #define auxPidPins4_offset_hex 8af +#define auxSerialRxPin_offset 2042 +#define auxSerialRxPin_offset_hex 7fa +#define auxSerialSpeed_offset 2096 +#define auxSerialSpeed_offset_hex 830 +#define auxSerialTxPin_offset 2040 +#define auxSerialTxPin_offset_hex 7f8 #define auxTempSensor1_adcChannel_offset 2472 #define auxTempSensor1_adcChannel_offset_hex 9a8 #define auxTempSensor1_alignmentFill_at_29_offset 2473 @@ -257,18 +278,6 @@ #define binarySerialRxPin_offset_hex 717 #define binarySerialTxPin_offset 1814 #define binarySerialTxPin_offset_hex 716 -#define biQuad_a0_offset 2332 -#define biQuad_a0_offset_hex 91c -#define biQuad_a1_offset 2336 -#define biQuad_a1_offset_hex 920 -#define biQuad_a2_offset 2340 -#define biQuad_a2_offset_hex 924 -#define biQuad_b1_offset 2344 -#define biQuad_b1_offset_hex 928 -#define biQuad_b2_offset 2348 -#define biQuad_b2_offset_hex 92c -#define biQuad_offset 2332 -#define biQuad_offset_hex 91c #define BLOCKING_FACTOR 400 #define BOOST_LOAD_COUNT 8 #define BOOST_RPM_COUNT 8 @@ -325,9 +334,7 @@ #define camInputs3_offset_hex 22e #define camInputs4_offset 559 #define camInputs4_offset_hex 22f -#define can_device_mode_e_enum "v0", "v1" -#define canDeviceMode_offset 732 -#define canDeviceMode_offset_hex 2dc +#define CAN_DEFAULT_BASE 0x200 #define canNbcType_offset 480 #define canNbcType_offset_hex 1e0 #define canReadEnabled_offset 1464 @@ -338,6 +345,8 @@ #define canSleepPeriodMs_offset_hex 1e4 #define canTxPin_offset 708 #define canTxPin_offset_hex 2c4 +#define canVssNbcType_offset 4140 +#define canVssNbcType_offset_hex 102c #define canWriteEnabled_offset 1464 #define canWriteEnabled_offset_hex 5b8 #define cdmInputPin_offset 937 @@ -440,6 +449,9 @@ #define coastingFuelCutTps_offset_hex c50 #define communicationLedPin_offset 1812 #define communicationLedPin_offset_hex 714 +#define COMPOSITE_DATA_LENGTH 2500 +#define COMPOSITE_PACKET_COUNT 500 +#define COMPOSITE_PACKET_SIZE 5 #define CONSOLE_DATA_PROTOCOL_TAG " @" #define consoleLoopPeriodMs_offset 716 #define consoleLoopPeriodMs_offset_hex 2cc @@ -484,6 +496,7 @@ #define crankingTpsBins_offset_hex 688 #define crankingTpsCoef_offset 1640 #define crankingTpsCoef_offset_hex 668 +#define CRITICAL_PREFIX "CRITICAL" #define cutFuelOnHardLimit_offset 1464 #define cutFuelOnHardLimit_offset_hex 5b8 #define cutSparkOnHardLimit_offset 1464 @@ -492,15 +505,11 @@ #define cylinderBore_offset_hex 198 #define cylindersCount_offset 400 #define cylindersCount_offset_hex 190 -#define debug_mode_e_enum "Alternator PID", "TPS acceleration enrichment", "INVALID", "Idle Control", "Engine Load accl enrich", "Trigger Counters", "FSIO_ADC", "AUX_PID_1", "VVT input", "Cranking", "Timing", "Closed-loop fuel corr PID", "VSS", "SD card", "sr5", "Knock", "Trigger Sync", "Electronic Throttle", "Executor", "Bench Test / TS commands", "Aux Valves", "Analog inputs #1", "INSTANT_RPM", "FSIO_EXPRESSION", "Status", "CJ125", "CAN", "MAP", "Metrics", "ETB#2", "Ion Sense", "TLE8888", "Analog inputs #2", "Dwell Metric", "Aux Temperature", "ETB Logic", "Boost Control" +#define debug_mode_e_enum "Alternator PID", "TPS acceleration enrichment", "INVALID", "Idle Control", "Engine Load accl enrich", "Trigger Counters", "FSIO_ADC", "AUX_PID_1", "VVT input", "Cranking", "Timing", "Closed-loop fuel corr PID", "VSS", "SD card", "sr5", "Knock", "mode16", "Electronic Throttle", "Executor", "Bench Test / TS commands", "Aux Valves", "Analog inputs #1", "INSTANT_RPM", "FSIO_EXPRESSION", "Status", "CJ125", "CAN", "MAP", "Metrics", "ETB#2", "Ion Sense", "TLE8888", "Analog inputs #2", "Dwell Metric", "INVALID", "ETB Logic", "Boost Control", "Start/Stop", "Launch", "ETB Autotune", "Mode40" #define debugMapAveraging_offset 807 #define debugMapAveraging_offset_hex 327 #define debugMode_offset 2092 #define debugMode_offset_hex 82c -#define debugSetTimer_offset 806 -#define debugSetTimer_offset_hex 326 -#define debugTimerCallback_offset 711 -#define debugTimerCallback_offset_hex 2c7 #define debugTriggerSync_offset 676 #define debugTriggerSync_offset_hex 2a4 #define DIGIPOT_COUNT 4 @@ -514,10 +523,10 @@ #define digitalPotentiometerChipSelect4_offset_hex 29f #define digitalPotentiometerSpiDevice_offset 677 #define digitalPotentiometerSpiDevice_offset_hex 2a5 -#define directSelfStimulation_offset 76 -#define directSelfStimulation_offset_hex 4c #define displacement_offset 396 #define displacement_offset_hex 18c +#define displayLogicLevelsInEngineSniffer_offset 76 +#define displayLogicLevelsInEngineSniffer_offset_hex 4c #define displayMode_offset 492 #define displayMode_offset_hex 1ec #define dizzySparkOutputPin_offset 2226 @@ -533,8 +542,16 @@ #define electronicThrottlePin1Mode_offset_hex 2a0 #define enableAemXSeries_offset 744 #define enableAemXSeries_offset_hex 2e8 +#define enableCanVss_offset 976 +#define enableCanVss_offset_hex 3d0 #define enabledStep1Limiter_offset 744 #define enabledStep1Limiter_offset_hex 2e8 +#define enableInnovateLC2_offset 976 +#define enableInnovateLC2_offset_hex 3d0 +#define enableLaunchBoost_offset 976 +#define enableLaunchBoost_offset_hex 3d0 +#define enableLaunchRetard_offset 976 +#define enableLaunchRetard_offset_hex 3d0 #define enableVerboseCanTx_offset 744 #define enableVerboseCanTx_offset_hex 2e8 #define engine_load_mode_e_enum "MAF", "Alpha-N/TPS", "MAP", "SPEED DENSITY", "MAF Air Charge" @@ -557,6 +574,7 @@ #define engineSnifferRpmThreshold_offset_hex 4 #define engineType_offset 0 #define engineType_offset_hex 0 +#define ERROR_BUFFER_SIZE 120 #define ETB_BIAS_CURVE_LENGTH 8 #define ETB_COUNT 2 #define etb_dFactor_offset 1744 @@ -595,22 +613,22 @@ #define etbIdleThrottleRange_offset_hex fac #define etbIo1_controlPin1_offset 982 #define etbIo1_controlPin1_offset_hex 3d6 -#define etbIo1_controlPinMode_offset 983 -#define etbIo1_controlPinMode_offset_hex 3d7 #define etbIo1_directionPin1_offset 980 #define etbIo1_directionPin1_offset_hex 3d4 #define etbIo1_directionPin2_offset 981 #define etbIo1_directionPin2_offset_hex 3d5 +#define etbIo1_disablePin_offset 983 +#define etbIo1_disablePin_offset_hex 3d7 #define etbIo1_offset 980 #define etbIo1_offset_hex 3d4 #define etbIo2_controlPin1_offset 986 #define etbIo2_controlPin1_offset_hex 3da -#define etbIo2_controlPinMode_offset 987 -#define etbIo2_controlPinMode_offset_hex 3db #define etbIo2_directionPin1_offset 984 #define etbIo2_directionPin1_offset_hex 3d8 #define etbIo2_directionPin2_offset 985 #define etbIo2_directionPin2_offset_hex 3d9 +#define etbIo2_disablePin_offset 987 +#define etbIo2_disablePin_offset_hex 3db #define etbIo2_offset 984 #define etbIo2_offset_hex 3d8 #define etbNeutralPosition_offset 1471 @@ -639,6 +657,10 @@ #define FSIO_COMMAND_COUNT 16 #define FSIO_CURVE_16 16 #define FSIO_CURVE_8 8 +#define FSIO_METHOD_FSIO_ANALOG_INPUT "fsio_analog_input" +#define FSIO_METHOD_FSIO_DIGITAL_INPUT "fsio_digital_input" +#define FSIO_METHOD_FSIO_SETTING "fsio_setting" +#define FSIO_METHOD_FSIO_TABLE "fsio_table" #define fsio_setting10_offset 900 #define fsio_setting10_offset_hex 384 #define fsio_setting11_offset 904 @@ -1024,6 +1046,97 @@ #define gpioPinModes8_offset_hex 303 #define gpioPinModes9_offset 772 #define gpioPinModes9_offset_hex 304 +#define gppwm1_dutyIfError_offset 4145 +#define gppwm1_dutyIfError_offset_hex 1031 +#define gppwm1_loadAxis_offset 4150 +#define gppwm1_loadAxis_offset_hex 1036 +#define gppwm1_loadBins_offset 4152 +#define gppwm1_loadBins_offset_hex 1038 +#define gppwm1_offBelowDuty_offset 4149 +#define gppwm1_offBelowDuty_offset_hex 1035 +#define gppwm1_offset 4144 +#define gppwm1_offset_hex 1030 +#define gppwm1_onAboveDuty_offset 4148 +#define gppwm1_onAboveDuty_offset_hex 1034 +#define gppwm1_pad_offset 4151 +#define gppwm1_pad_offset_hex 1037 +#define gppwm1_pin_offset 4144 +#define gppwm1_pin_offset_hex 1030 +#define gppwm1_pwmFrequency_offset 4146 +#define gppwm1_pwmFrequency_offset_hex 1032 +#define gppwm1_rpmBins_offset 4160 +#define gppwm1_rpmBins_offset_hex 1040 +#define gppwm1_table_offset 4168 +#define gppwm1_table_offset_hex 1048 +#define gppwm2_dutyIfError_offset 4233 +#define gppwm2_dutyIfError_offset_hex 1089 +#define gppwm2_loadAxis_offset 4238 +#define gppwm2_loadAxis_offset_hex 108e +#define gppwm2_loadBins_offset 4240 +#define gppwm2_loadBins_offset_hex 1090 +#define gppwm2_offBelowDuty_offset 4237 +#define gppwm2_offBelowDuty_offset_hex 108d +#define gppwm2_offset 4232 +#define gppwm2_offset_hex 1088 +#define gppwm2_onAboveDuty_offset 4236 +#define gppwm2_onAboveDuty_offset_hex 108c +#define gppwm2_pad_offset 4239 +#define gppwm2_pad_offset_hex 108f +#define gppwm2_pin_offset 4232 +#define gppwm2_pin_offset_hex 1088 +#define gppwm2_pwmFrequency_offset 4234 +#define gppwm2_pwmFrequency_offset_hex 108a +#define gppwm2_rpmBins_offset 4248 +#define gppwm2_rpmBins_offset_hex 1098 +#define gppwm2_table_offset 4256 +#define gppwm2_table_offset_hex 10a0 +#define gppwm3_dutyIfError_offset 4321 +#define gppwm3_dutyIfError_offset_hex 10e1 +#define gppwm3_loadAxis_offset 4326 +#define gppwm3_loadAxis_offset_hex 10e6 +#define gppwm3_loadBins_offset 4328 +#define gppwm3_loadBins_offset_hex 10e8 +#define gppwm3_offBelowDuty_offset 4325 +#define gppwm3_offBelowDuty_offset_hex 10e5 +#define gppwm3_offset 4320 +#define gppwm3_offset_hex 10e0 +#define gppwm3_onAboveDuty_offset 4324 +#define gppwm3_onAboveDuty_offset_hex 10e4 +#define gppwm3_pad_offset 4327 +#define gppwm3_pad_offset_hex 10e7 +#define gppwm3_pin_offset 4320 +#define gppwm3_pin_offset_hex 10e0 +#define gppwm3_pwmFrequency_offset 4322 +#define gppwm3_pwmFrequency_offset_hex 10e2 +#define gppwm3_rpmBins_offset 4336 +#define gppwm3_rpmBins_offset_hex 10f0 +#define gppwm3_table_offset 4344 +#define gppwm3_table_offset_hex 10f8 +#define gppwm4_dutyIfError_offset 4409 +#define gppwm4_dutyIfError_offset_hex 1139 +#define gppwm4_loadAxis_offset 4414 +#define gppwm4_loadAxis_offset_hex 113e +#define gppwm4_loadBins_offset 4416 +#define gppwm4_loadBins_offset_hex 1140 +#define gppwm4_offBelowDuty_offset 4413 +#define gppwm4_offBelowDuty_offset_hex 113d +#define gppwm4_offset 4408 +#define gppwm4_offset_hex 1138 +#define gppwm4_onAboveDuty_offset 4412 +#define gppwm4_onAboveDuty_offset_hex 113c +#define gppwm4_pad_offset 4415 +#define gppwm4_pad_offset_hex 113f +#define gppwm4_pin_offset 4408 +#define gppwm4_pin_offset_hex 1138 +#define gppwm4_pwmFrequency_offset 4410 +#define gppwm4_pwmFrequency_offset_hex 113a +#define gppwm4_rpmBins_offset 4424 +#define gppwm4_rpmBins_offset_hex 1148 +#define gppwm4_table_offset 4432 +#define gppwm4_table_offset_hex 1150 +#define gppwm_channel_e_enum "TPS", "MAP", "CLT", "IAT" +#define GPPWM_LOAD_COUNT 8 +#define GPPWM_RPM_COUNT 8 #define gps_rx_pin_offset 656 #define gps_rx_pin_offset_hex 290 #define gps_tx_pin_offset 657 @@ -1337,6 +1450,8 @@ #define isBoostControlEnabled_offset_hex 5c4 #define isCJ125Enabled_offset 744 #define isCJ125Enabled_offset_hex 2e8 +#define isCJ125Verbose_offset 76 +#define isCJ125Verbose_offset_hex 4c #define isCylinderCleanupEnabled_offset 1476 #define isCylinderCleanupEnabled_offset_hex 5c4 #define isDoubleSolenoidIdle_offset 76 @@ -1361,8 +1476,6 @@ #define isMapAveragingEnabled_offset_hex 5c4 #define isSdCardEnabled_offset 744 #define isSdCardEnabled_offset_hex 2e8 -#define issue_294_25_offset 76 -#define issue_294_25_offset_hex 4c #define issue_294_26_offset 76 #define issue_294_26_offset_hex 4c #define issue_294_27_offset 76 @@ -1375,6 +1488,8 @@ #define issue_294_30_offset_hex 4c #define issue_294_31_offset 76 #define issue_294_31_offset_hex 4c +#define issue_294_unused_offset 76 +#define issue_294_unused_offset_hex 4c #define isTunerStudioEnabled_offset 1476 #define isTunerStudioEnabled_offset_hex 5c4 #define isVerboseAlternator_offset 744 @@ -1415,15 +1530,21 @@ #define knockNoiseRpmBins_offset_hex 73c #define knockVThreshold_offset 1512 #define knockVThreshold_offset_hex 5e8 +#define launchActivateDelay_offset 1060 +#define launchActivateDelay_offset_hex 424 #define launchActivatePin_offset 991 #define launchActivatePin_offset_hex 3df #define launchActivationMode_e_enum "Switch Input", "Clutch Input", "Always Active(Disabled By Speed)","INVALID" #define launchActivationMode_offset 1020 #define launchActivationMode_offset_hex 3fc +#define launchAdvanceRpmRange_offset 1052 +#define launchAdvanceRpmRange_offset_hex 41c #define launchBoostDuty_offset 1044 #define launchBoostDuty_offset_hex 414 #define launchControlEnabled_offset 76 #define launchControlEnabled_offset_hex 4c +#define launchDisableBySpeed_offset 976 +#define launchDisableBySpeed_offset_hex 3d0 #define launchFuelAdded_offset 1040 #define launchFuelAdded_offset_hex 410 #define launchFuelCutEnable_offset 1464 @@ -1442,6 +1563,8 @@ #define launchTimingRetard_offset_hex 140 #define launchTimingRpmRange_offset 1036 #define launchTimingRpmRange_offset_hex 40c +#define launchTpsTreshold_offset 1056 +#define launchTpsTreshold_offset_hex 420 #define lcdThreadPeriodMs_offset 720 #define lcdThreadPeriodMs_offset_hex 2d0 #define LDS_ALTERNATOR_PID_STATE_INDEX 9 @@ -1485,8 +1608,8 @@ #define mainRelayPin_offset_hex 2c2 #define mainRelayPinMode_offset 752 #define mainRelayPinMode_offset_hex 2f0 -#define mainUnusedEnd_offset 4140 -#define mainUnusedEnd_offset_hex 102c +#define mainUnusedEnd_offset 4496 +#define mainUnusedEnd_offset_hex 1190 #define malfunctionIndicatorPin_offset 660 #define malfunctionIndicatorPin_offset_hex 294 #define malfunctionIndicatorPinMode_offset 661 @@ -1563,6 +1686,8 @@ #define mc33816_cs_offset_hex c23 #define mc33816_driven_offset 2607 #define mc33816_driven_offset_hex a2f +#define mc33816_flag0_offset 1774 +#define mc33816_flag0_offset_hex 6ee #define mc33816_rstb_offset 2606 #define mc33816_rstb_offset_hex a2e #define mc33816spiDevice_offset 4001 @@ -1573,6 +1698,8 @@ #define mc33972_csPinMode_offset_hex 2a7 #define mc33972spiDevice_offset 4008 #define mc33972spiDevice_offset_hex fa8 +#define mc33_hvolt_offset 760 +#define mc33_hvolt_offset_hex 2f8 #define measureMapOnlyInOneCylinder_offset 744 #define measureMapOnlyInOneCylinder_offset_hex 2e8 #define MOCK_AFR_COMMAND "mock_afr_voltage" @@ -1582,7 +1709,6 @@ #define MOCK_MAP_COMMAND "mock_map_voltage" #define MOCK_PPS_POSITION_COMMAND "mock_pps_position" #define MOCK_PPS_VOLTAGE_COMMAND "mock_pps_voltage" -#define MOCK_TPS_COMMAND "mock_tps_voltage" #define multisparkDwell_offset 1786 #define multisparkDwell_offset_hex 6fa #define multisparkEnable_offset 976 @@ -1600,8 +1726,6 @@ #define narrowToWideOxygen_offset_hex 8f8 #define narrowToWideOxygenBins_offset 2264 #define narrowToWideOxygenBins_offset_hex 8d8 -#define nbVvtIndex_offset 2416 -#define nbVvtIndex_offset_hex 970 #define noAccelAfterHardLimitPeriodSecs_offset 1536 #define noAccelAfterHardLimitPeriodSecs_offset_hex 600 #define o2heaterPin_offset 742 @@ -1629,6 +1753,7 @@ #define overrideCrankingIacSetting_offset_hex 5c4 #define overrideCrankingIgnition_offset 516 #define overrideCrankingIgnition_offset_hex 204 +#define PACK_ADD_TEMPERATURE 40 #define PACK_MULT_AFR 1000 #define PACK_MULT_ANGLE 50 #define PACK_MULT_MS 300 @@ -1653,8 +1778,6 @@ #define postCrankingDurationSec_offset_hex 988 #define postCrankingFactor_offset 2436 #define postCrankingFactor_offset_hex 984 -#define postCrankingTargetClt_offset 2432 -#define postCrankingTargetClt_offset_hex 980 #define primeInjFalloffTemperature_offset 1486 #define primeInjFalloffTemperature_offset_hex 5ce #define primingSquirtDurationMs_offset 96 @@ -1720,6 +1843,8 @@ #define servoOutputPins7_offset_hex c4a #define servoOutputPins8_offset 3147 #define servoOutputPins8_offset_hex c4b +#define showHumanReadableWarning_offset 976 +#define showHumanReadableWarning_offset_hex 3d0 #define showSdCardWarning_offset 76 #define showSdCardWarning_offset_hex 4c #define silentTriggerError_offset 1464 @@ -1768,6 +1893,8 @@ #define spi3SckMode_offset_hex a2a #define spi3sckPin_offset 936 #define spi3sckPin_offset_hex 3a8 +#define startCrankingDuration_offset 826 +#define startCrankingDuration_offset_hex 33a #define starterControlPin_offset 1772 #define starterControlPin_offset_hex 6ec #define starterRelayDisableMode_offset 809 @@ -1792,6 +1919,57 @@ #define stepperForceParkingEveryRestart_offset_hex 2e8 #define stepperParkingExtraSteps_offset 818 #define stepperParkingExtraSteps_offset_hex 332 +#define STFT_CELL_COUNT 4 +#define stft_cellCfgs1_maxAdd_offset 1072 +#define stft_cellCfgs1_maxAdd_offset_hex 430 +#define stft_cellCfgs1_maxRemove_offset 1073 +#define stft_cellCfgs1_maxRemove_offset_hex 431 +#define stft_cellCfgs1_offset 1072 +#define stft_cellCfgs1_offset_hex 430 +#define stft_cellCfgs1_timeConstant_offset 1074 +#define stft_cellCfgs1_timeConstant_offset_hex 432 +#define stft_cellCfgs2_maxAdd_offset 1076 +#define stft_cellCfgs2_maxAdd_offset_hex 434 +#define stft_cellCfgs2_maxRemove_offset 1077 +#define stft_cellCfgs2_maxRemove_offset_hex 435 +#define stft_cellCfgs2_offset 1076 +#define stft_cellCfgs2_offset_hex 434 +#define stft_cellCfgs2_timeConstant_offset 1078 +#define stft_cellCfgs2_timeConstant_offset_hex 436 +#define stft_cellCfgs3_maxAdd_offset 1080 +#define stft_cellCfgs3_maxAdd_offset_hex 438 +#define stft_cellCfgs3_maxRemove_offset 1081 +#define stft_cellCfgs3_maxRemove_offset_hex 439 +#define stft_cellCfgs3_offset 1080 +#define stft_cellCfgs3_offset_hex 438 +#define stft_cellCfgs3_timeConstant_offset 1082 +#define stft_cellCfgs3_timeConstant_offset_hex 43a +#define stft_cellCfgs4_maxAdd_offset 1084 +#define stft_cellCfgs4_maxAdd_offset_hex 43c +#define stft_cellCfgs4_maxRemove_offset 1085 +#define stft_cellCfgs4_maxRemove_offset_hex 43d +#define stft_cellCfgs4_offset 1084 +#define stft_cellCfgs4_offset_hex 43c +#define stft_cellCfgs4_timeConstant_offset 1086 +#define stft_cellCfgs4_timeConstant_offset_hex 43e +#define stft_deadband_offset 1067 +#define stft_deadband_offset_hex 42b +#define stft_maxAfr_offset 1070 +#define stft_maxAfr_offset_hex 42e +#define stft_maxIdleRegionRpm_offset 1064 +#define stft_maxIdleRegionRpm_offset_hex 428 +#define stft_maxOverrunLoad_offset 1065 +#define stft_maxOverrunLoad_offset_hex 429 +#define stft_minAfr_offset 1069 +#define stft_minAfr_offset_hex 42d +#define stft_minClt_offset 1068 +#define stft_minClt_offset_hex 42c +#define stft_minPowerLoad_offset 1066 +#define stft_minPowerLoad_offset_hex 42a +#define stft_offset 1064 +#define stft_offset_hex 428 +#define stft_startupDelay_offset 1071 +#define stft_startupDelay_offset_hex 42f #define storageMode_offset 2260 #define storageMode_offset_hex 8d4 #define switch_input_pin_e_enum "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "N/A", "N/A", "PA10", "PA11", "PA12", "PA13", "N/A", "N/A", "N/A", "N/A", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "N/A", "N/A", "N/A", "N/A", "PB12", "PB13", "N/A", "N/A", "N/A", "N/A", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "N/A", "N/A", "N/A", "N/A", "PC14", "PC15", "PC16", "PC17", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "PD15", "PD16", "N/A", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6", "PE7", "PE8", "PE9", "PE10", "PE11", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A" @@ -1884,12 +2062,17 @@ #define tle8888_cs_offset_hex c21 #define tle8888_csPinMode_offset 3106 #define tle8888_csPinMode_offset_hex c22 +#define tle8888mode_offset 2416 +#define tle8888mode_offset_hex 970 #define tle8888spiDevice_offset 4000 #define tle8888spiDevice_offset_hex fa0 #define todoClutchDownPinInverted_offset 976 #define todoClutchDownPinInverted_offset_hex 3d0 #define todoClutchUpPinInverted_offset 976 #define todoClutchUpPinInverted_offset_hex 3d0 +#define TOOTH_DATA_LENGTH 2000 +#define TOOTH_PACKET_COUNT 1000 +#define TOOTH_PACKET_SIZE 2 #define TOP_DEAD_CENTER_MESSAGE "r" #define TOTAL_CONFIG_SIZE 20000 #define TOTAL_CONFIG_SIZE_hex 4e20 @@ -1941,7 +2124,13 @@ #define trigger_offset 524 #define trigger_offset_hex 20c #define TRIGGER_SIMULATOR_PIN_COUNT 3 -#define trigger_type_e_enum "custom toothed wheel", "Ford Aspire", "Dodge Neon 1995", "Miata NA", "Miata NB", "GM_7X", "Cooper R50", "Mazda SOHC 4", "60/2", "36/1", "Honda 4+24+1", "Mitsubishi", "Honda 4+24", "Honda 1+4+24", "Dodge Neon 2003", "Mazda DOHC 1+4", "1+1", "1+60/2", "Single Tooth", "Dodge Ram 1+16", "60/2 VW", "Honda 1+24", "Dodge Stratus", "36_2_2_2", "Nissan Primera", "2JZ", "Rover K", "GM LS 24", "Honda CBR 600", "2JZ_1_12", "Honda CBR 600 custom", "3/1 skipped" , "Dodge Neon 2003 crank", "Miata VVT", "trg34", "trg35", "Subaru 7+6", "Jeep 18-2-2-2", "WIP", "Dodge Neon 1995 crank only", "Jeep XJ 4 cyl", "FiatIAQ_P8", "Mazda Z5", "trg43", "trg44", "trg45", "INVALID" +#define trigger_todoRemoveMeOneDay0_offset 528 +#define trigger_todoRemoveMeOneDay0_offset_hex 210 +#define trigger_todoRemoveMeOneDay1_offset 528 +#define trigger_todoRemoveMeOneDay1_offset_hex 210 +#define TRIGGER_TYPE_36_1 9 +#define TRIGGER_TYPE_60_2 8 +#define trigger_type_e_enum "custom toothed wheel", "Ford Aspire", "Dodge Neon 1995", "Miata NA", "Miata NB", "GM_7X", "Cooper R50", "Mazda SOHC 4", "60/2", "36/1", "Honda 4+24+1", "Mitsubishi", "Honda 4+24", "Honda 1+4+24", "Dodge Neon 2003", "Mazda DOHC 1+4", "1+1", "1+60/2", "Single Tooth", "Dodge Ram 1+16", "60/2 VW", "Honda 1+24", "Dodge Stratus", "36_2_2_2", "Nissan Primera", "2JZ", "Rover K", "GM LS 24", "Honda CBR 600", "2JZ_1_12", "Honda CBR 600 custom", "3/1 skipped" , "Dodge Neon 2003 crank", "Miata VVT", "trg34", "trg35", "Subaru 7+6", "Jeep 18-2-2-2", "WIP", "Dodge Neon 1995 crank only", "Jeep XJ 4 cyl", "FiatIAQ_P8", "Mazda Z5", "trg43", "Renix 44-2-2", "Renix 66-2-2-2", "Honda K 12+1", "trg47", "trg48", "INVALID" #define trigger_type_offset 524 #define trigger_type_offset_hex 20c #define trigger_unusedBit_4_10_offset 528 @@ -2002,10 +2191,6 @@ #define trigger_unusedBit_4_8_offset_hex 210 #define trigger_unusedBit_4_9_offset 528 #define trigger_unusedBit_4_9_offset_hex 210 -#define trigger_unusedTriggerBit0_offset 528 -#define trigger_unusedTriggerBit0_offset_hex 210 -#define trigger_unusedTriggerBit1_offset 528 -#define trigger_unusedTriggerBit1_offset_hex 210 #define trigger_useOnlyFirstChannel_offset 528 #define trigger_useOnlyFirstChannel_offset_hex 210 #define triggerCompCenterVolt_offset 4036 @@ -2041,8 +2226,10 @@ #define triggerSimulatorPins3_offset 738 #define triggerSimulatorPins3_offset_hex 2e2 #define TS_FILE_VERSION 20200310 -#define TS_OUTPUT_SIZE 240 +#define TS_OUTPUT_SIZE 244 #define ts_show_analog_divider true +#define ts_show_auxserial_pins true +#define ts_show_can_pins true #define ts_show_cj125 true #define ts_show_egt true #define ts_show_etb true @@ -2052,8 +2239,11 @@ #define ts_show_hip9011 true #define ts_show_joystick true #define ts_show_lcd true +#define ts_show_sd_card true #define ts_show_spi true -#define TS_SIGNATURE "rusEFI v1.2020.3" +#define ts_show_trigger_comparator true +#define ts_show_tunerstudio_port true +#define TS_SIGNATURE "rusEFI v1.2020.4" #define tunerStudioSerialSpeed_offset 728 #define tunerStudioSerialSpeed_offset_hex 2d8 #define twoWireBatchIgnition_offset 1476 @@ -2062,12 +2252,16 @@ #define twoWireBatchInjection_offset_hex 5c4 #define uartConsoleSerialSpeed_offset 2076 #define uartConsoleSerialSpeed_offset_hex 81c -#define unrealisticRpmThreashold_offset 760 -#define unrealisticRpmThreashold_offset_hex 2f8 #define unused1059_offset 3964 #define unused1059_offset_hex f7c -#define unused1234234_offset 2042 -#define unused1234234_offset_hex 7fa +#define unused2432_offset 2432 +#define unused2432_offset_hex 980 +#define unused711_offset 711 +#define unused711_offset_hex 2c7 +#define unused76b0_offset 76 +#define unused76b0_offset_hex 4c +#define unused806_offset 806 +#define unused806_offset_hex 326 #define unused_1484_bit_24_offset 1476 #define unused_1484_bit_24_offset_hex 5c4 #define unused_1484_bit_25_offset 1476 @@ -2084,10 +2278,12 @@ #define unused_1484_bit_30_offset_hex 5c4 #define unused_1484_bit_31_offset 1476 #define unused_1484_bit_31_offset_hex 5c4 -#define unused_former_warmup_target_afr_offset 2096 -#define unused_former_warmup_target_afr_offset_hex 830 -#define unusedAtOldBoardConfigurationEnd_offset 1052 -#define unusedAtOldBoardConfigurationEnd_offset_hex 41c +#define unused_former_warmup_target_afr_offset 2100 +#define unused_former_warmup_target_afr_offset_hex 834 +#define unusedAntilagTimeout_offset 820 +#define unusedAntilagTimeout_offset_hex 334 +#define unusedAtOldBoardConfigurationEnd_offset 1088 +#define unusedAtOldBoardConfigurationEnd_offset_hex 440 #define unusedBit4_1476_offset 1476 #define unusedBit4_1476_offset_hex 5c4 #define unusedBit_251_10_offset 976 @@ -2130,34 +2326,20 @@ #define unusedBit_251_28_offset_hex 3d0 #define unusedBit_251_29_offset 976 #define unusedBit_251_29_offset_hex 3d0 -#define unusedBit_251_4_offset 976 -#define unusedBit_251_4_offset_hex 3d0 -#define unusedBit_251_5_offset 976 -#define unusedBit_251_5_offset_hex 3d0 -#define unusedBit_251_6_offset 976 -#define unusedBit_251_6_offset_hex 3d0 -#define unusedBit_251_7_offset 976 -#define unusedBit_251_7_offset_hex 3d0 -#define unusedBit_251_8_offset 976 -#define unusedBit_251_8_offset_hex 3d0 -#define unusedBit_251_9_offset 976 -#define unusedBit_251_9_offset_hex 3d0 -#define unusedBit_280_30_offset 976 -#define unusedBit_280_30_offset_hex 3d0 -#define unusedBit_280_31_offset 976 -#define unusedBit_280_31_offset_hex 3d0 +#define unusedBit_282_30_offset 976 +#define unusedBit_282_30_offset_hex 3d0 +#define unusedBit_282_31_offset 976 +#define unusedBit_282_31_offset_hex 3d0 #define unusedBit_34_31_offset 76 #define unusedBit_34_31_offset_hex 4c -#define unusedErrorPin_offset 2040 -#define unusedErrorPin_offset_hex 7f8 #define unusedFlexFuelSensor_offset 3100 #define unusedFlexFuelSensor_offset_hex c1c -#define unusedFormerWarmupAfrPid_offset 1774 -#define unusedFormerWarmupAfrPid_offset_hex 6ee -#define unusedmiataNb2VVTRatioFrom_offset 820 -#define unusedmiataNb2VVTRatioFrom_offset_hex 334 -#define unusedmiataNb2VVTRatioTo_offset 824 -#define unusedmiataNb2VVTRatioTo_offset_hex 338 +#define unusedHere_offset 761 +#define unusedHere_offset_hex 2f9 +#define unusedOldBiquad_offset 2332 +#define unusedOldBiquad_offset_hex 91c +#define unusedSomethingWasHere_offset 2417 +#define unusedSomethingWasHere_offset_hex 971 #define unusedSpiPadding4_offset 2593 #define unusedSpiPadding4_offset_hex a21 #define unusedSpiPadding5_offset 2713 @@ -2172,8 +2354,6 @@ #define unusuedvref_offset_hex fb0 #define useAdvanceCorrectionsForCranking_offset 1476 #define useAdvanceCorrectionsForCranking_offset_hex 5c4 -#define useBiQuadAnalogFiltering_offset 76 -#define useBiQuadAnalogFiltering_offset_hex 4c #define useConstantDwellDuringCranking_offset 1464 #define useConstantDwellDuringCranking_offset_hex 5b8 #define useETBforIdleControl_offset 744 @@ -2238,8 +2418,6 @@ #define useStepperIdle_offset_hex 2e8 #define useTLE8888_cranking_hack_offset 76 #define useTLE8888_cranking_hack_offset_hex 4c -#define useTLE8888_hall_mode_offset 76 -#define useTLE8888_hall_mode_offset_hex 4c #define useTpicAdvancedMode_offset 744 #define useTpicAdvancedMode_offset_hex 2e8 #define useTPSAdvanceTable_offset 1476 @@ -2279,6 +2457,8 @@ #define vvtMode_offset_hex 918 #define vvtOffset_offset 2052 #define vvtOffset_offset_hex 804 +#define warning_message_offset 6000 +#define warning_message_offset_hex 1770 #define warningLedPin_offset 2041 #define warningLedPin_offset_hex 7f9 #define warningPeriod_offset 1498 diff --git a/firmware/config/boards/kinetis/config/rusefi_config_kinetis.txt b/firmware/config/boards/kinetis/config/rusefi_config_kinetis.txt index 9f34e62b3c..459773efe0 100644 --- a/firmware/config/boards/kinetis/config/rusefi_config_kinetis.txt +++ b/firmware/config/boards/kinetis/config/rusefi_config_kinetis.txt @@ -11,3 +11,5 @@ #define switch_input_pin_e_enum "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "N/A", "N/A", "PA10", "PA11", "PA12", "PA13", "N/A", "N/A", "N/A", "N/A", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "N/A", "N/A", "N/A", "N/A", "PB12", "PB13", "N/A", "N/A", "N/A", "N/A", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "N/A", "N/A", "N/A", "N/A", "PC14", "PC15", "PC16", "PC17", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "PD15", "PD16", "N/A", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6", "PE7", "PE8", "PE9", "PE10", "PE11", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A" #define output_pin_e_enum "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "N/A", "N/A", "PA10", "PA11", "PA12", "PA13", "N/A", "N/A", "N/A", "N/A", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "N/A", "N/A", "N/A", "N/A", "PB12", "PB13", "N/A", "N/A", "N/A", "N/A", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "N/A", "N/A", "N/A", "N/A", "PC14", "PC15", "PC16", "PC17", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "PD15", "PD16", "N/A", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6", "PE7", "PE8", "PE9", "PE10", "PE11", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "TLE6240_1", "TLE6240_2", "TLE6240_3", "TLE6240_4", "TLE6240_5", "TLE6240_6", "TLE6240_7", "TLE6240_8", "TLE6240_9", "TLE6240_10", "TLE6240_11", "TLE6240_12", "TLE6240_13", "TLE6240_14", "TLE6240_15", "TLE6240_16" #define adc_channel_e_enum "PA2", "PA3", "INVALID", "PD3", "INVALID", "INVALID", "INVALID", "PB12", "PB13", "INVALID", "PE2", "INVALID", "PC14", "PC15", "PC16", "PC17", "Disabled", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" + +#define ts_show_trigger_comparator true diff --git a/firmware/config/boards/kinetis/efifeatures.h b/firmware/config/boards/kinetis/efifeatures.h index be0073d6ac..41eafe60c5 100644 --- a/firmware/config/boards/kinetis/efifeatures.h +++ b/firmware/config/boards/kinetis/efifeatures.h @@ -245,22 +245,17 @@ // todo: most of this should become configurable -// todo: switch to continues ADC conversion for slow ADC? -// https://github.com/rusefi/rusefi/issues/630 // todo: switch to continues ADC conversion for fast ADC? -#define EFI_INTERNAL_FAST_ADC_PWM &PWMD2 +#define EFI_INTERNAL_FAST_ADC_GPT &GPTD2 // todo: why 64 SPLL prescaler doesn't work? // 168000000/64/128/1025 = ~20Hz // 168000000/64/16/16 = ~10.25kHz // todo: warning! these numbers are "tricky"! need to investigate further! -//168000000/128/65535 = ~20Hz -#define PWM_FREQ_SLOW 20507 /* PWM clock frequency. */ -#define PWM_PERIOD_SLOW 65535 /* PWM period (in PWM ticks). */ //168000000/128/131 = ~10kHz -#define PWM_FREQ_FAST 20507/*164062*/ /* PWM clock frequency. */ -#define PWM_PERIOD_FAST 131 /* PWM period (in PWM ticks). */ +#define GPT_FREQ_FAST 20507/*164062*/ /* PWM clock frequency. */ +#define GPT_PERIOD_FAST 131 /* PWM period (in PWM ticks). */ #define EFI_SPI1_AF 3 @@ -343,14 +338,10 @@ //#define CONSOLE_THREAD_STACK_SIZE UTILITY_THREAD_STACK_SIZE -#define BOARD_EXT_GPIOCHIPS 1 #define BOARD_TLE6240_COUNT 1 #define BOARD_MC33972_COUNT 0 #define BOARD_TLE8888_COUNT 0 -// todo: move this outside of efifeatures.h -#define BOARD_EXT_PINREPOPINS 24 - #define TLE6240_SS_PORT GPIOB #define TLE6240_SS_PAD 0U #define TLE6240_RESET_PORT NULL diff --git a/firmware/config/boards/kinetis/halconf.h b/firmware/config/boards/kinetis/halconf.h index 107e4da12e..548e7f5243 100644 --- a/firmware/config/boards/kinetis/halconf.h +++ b/firmware/config/boards/kinetis/halconf.h @@ -111,7 +111,7 @@ * @brief Enables the PWM subsystem. */ #if !defined(HAL_USE_PWM) || defined(__DOXYGEN__) -#define HAL_USE_PWM TRUE +#define HAL_USE_PWM FALSE #endif /** @@ -171,13 +171,19 @@ #endif /** - * @brief Enables the Comparator subsystem. + * @brief Enables the community overlay. + */ +#if !defined(HAL_USE_COMMUNITY) || defined(__DOXYGEN__) +#define HAL_USE_COMMUNITY TRUE +#endif + +/** + * @brief Enables the TIMCAP subsystem. */ #if !defined(HAL_USE_COMP) || defined(__DOXYGEN__) #define HAL_USE_COMP TRUE #endif - /*===========================================================================*/ /* PAL driver related settings. */ /*===========================================================================*/ diff --git a/firmware/config/boards/kinetis/halconf_community.h b/firmware/config/boards/kinetis/halconf_community.h new file mode 100644 index 0000000000..e94e860bea --- /dev/null +++ b/firmware/config/boards/kinetis/halconf_community.h @@ -0,0 +1,28 @@ +/* + ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ +#ifndef HALCONF_COMMUNITY_H +#define HALCONF_COMMUNITY_H + +/** + * @brief Enables the TIMCAP subsystem. + */ +#if !defined(HAL_USE_COMP) || defined(__DOXYGEN__) +#define HAL_USE_COMP TRUE +#endif + +#endif /* HALCONF_COMMUNITY_H */ + +/** @} */ diff --git a/firmware/config/boards/me7_pnp/board_configuration.cpp b/firmware/config/boards/me7_pnp/board_configuration.cpp index c31eb165d8..d3be5b6e82 100644 --- a/firmware/config/boards/me7_pnp/board_configuration.cpp +++ b/firmware/config/boards/me7_pnp/board_configuration.cpp @@ -13,8 +13,7 @@ #include "engine_configuration.h" #include "smart_gpio.h" -EXTERN_ENGINE -; +EXTERN_ENGINE; static void vag_18_Turbo(DECLARE_ENGINE_PARAMETER_SIGNATURE) { } diff --git a/firmware/config/boards/microrusefi/!compile-mre-f4-slave.bat b/firmware/config/boards/microrusefi/!compile-mre-f4-slave.bat new file mode 100644 index 0000000000..a28e4e76be --- /dev/null +++ b/firmware/config/boards/microrusefi/!compile-mre-f4-slave.bat @@ -0,0 +1,11 @@ + +cd ../../.. + +set PROJECT_BOARD=microrusefi +set PROJECT_CPU=ARCH_STM32F4 +set DEFAULT_ENGINE_TYPE = -DDEFAULT_ENGINE_TYPE=BMW_M73_MRE_SLAVE +set EXTRA_PARAMS=-DDUMMY -DEFI_CANBUS_SLAVE=TRUE + +call config/boards/common_make.bat + + diff --git a/firmware/config/boards/microrusefi/board.mk b/firmware/config/boards/microrusefi/board.mk index a14b2aa229..7860166622 100644 --- a/firmware/config/boards/microrusefi/board.mk +++ b/firmware/config/boards/microrusefi/board.mk @@ -14,6 +14,7 @@ ifeq ($(PROJECT_CPU),ARCH_STM32F4) else MCU_DEFS = -DSTM32F767xx BOARDSRC = $(CHIBIOS)/os/hal/boards/ST_NUCLEO144_F767ZI/board.c + CONFDIR=config/stm32f7ems BOARDINC = $(BOARDS_DIR)/nucleo_f767 # For board.h BOARDINC += $(PROJECT_DIR)/config/stm32f7ems # efifeatures/halconf/chconf.h LDSCRIPT= $(BOARDS_DIR)/nucleo_f767/STM32F76xxI.ld diff --git a/firmware/config/boards/microrusefi/board_configuration.cpp b/firmware/config/boards/microrusefi/board_configuration.cpp index 620d3ceddd..8d4e14f1d8 100644 --- a/firmware/config/boards/microrusefi/board_configuration.cpp +++ b/firmware/config/boards/microrusefi/board_configuration.cpp @@ -4,6 +4,13 @@ * * @brief Configuration defaults for the microRusefi board * + * MICRO_RUS_EFI + * set engine_type 60 + * + * MRE_BOARD_TEST + * set engine_type 30 + * + * * See https://github.com/rusefi/rusefi_documentation/wiki/Hardware_microRusEfi_wiring * * @author Matthew Kennedy, (c) 2019 @@ -18,6 +25,15 @@ EXTERN_ENGINE; +static const ConfigOverrides configOverrides = { + .canTxPin = GPIOB_6, + .canRxPin = GPIOB_12, +}; + +const ConfigOverrides& getConfigOverrides() { + return configOverrides; +} + static void setInjectorPins() { engineConfiguration->injectionPins[0] = GPIOE_14; engineConfiguration->injectionPins[1] = GPIOE_13; @@ -65,12 +81,12 @@ static void setupVbatt() { engineConfiguration->analogInputDividerCoefficient = 2.5f / 1.5f; */ - // 6.8k high side/10k low side = 1.6667 ratio divider + // 6.8k high side/10k low side = 1.68 ratio divider engineConfiguration->analogInputDividerCoefficient = 16.8f / 10.0f; - // set vbatt_divider 8.16 - // R139=39k high side/R141=10k low side multiplied by above analogInputDividerCoefficient = 8.166666f - engineConfiguration->vbattDividerCoeff = (49.0f / 10.0f); + // set vbatt_divider 8.23 + // R139=39k high side/R141=10k low side multiplied by above analogInputDividerCoefficient = 8.232f + engineConfiguration->vbattDividerCoeff = (49.0f / 10.0f) * engineConfiguration->analogInputDividerCoefficient; engineConfiguration->vbattAdcChannel = EFI_ADC_11; engineConfiguration->adcVcc = 3.29f; @@ -103,25 +119,15 @@ static void setupEtb() { engineConfiguration->etbIo[0].controlPin1 = GPIOC_7; // DIR pin engineConfiguration->etbIo[0].directionPin1 = GPIOA_8; - - // set_fsio_output_pin 7 PC8 -#if EFI_FSIO - // set_rpn_expression 8 "1" - // disable ETB by default - setFsio(7, GPIOC_8, "1" PASS_CONFIG_PARAMETER_SUFFIX); - // enable ETB - // set_rpn_expression 8 "0" - //setFsio(7, GPIOC_8, "0" PASS_CONFIG_PARAMETER_SUFFIX); -#endif /* EFI_FSIO */ - + // Disable pin + engineConfiguration->etbIo[0].disablePin = GPIOC_8; + // Unused + engineConfiguration->etbIo[0].directionPin2 = GPIO_UNASSIGNED; // set_analog_input_pin pps PA7 // EFI_ADC_7: "31 - AN volt 3" - PA7 // engineConfiguration->throttlePedalPositionAdcChannel = EFI_ADC_7; - // Unused - engineConfiguration->etbIo[0].directionPin2 = GPIO_UNASSIGNED; - // we only have pwm/dir, no dira/dirb engineConfiguration->etb_use_two_wires = false; diff --git a/firmware/config/boards/microrusefi/mapping.yaml b/firmware/config/boards/microrusefi/mapping.yaml index cfc69e8032..def7f4e9b2 100644 --- a/firmware/config/boards/microrusefi/mapping.yaml +++ b/firmware/config/boards/microrusefi/mapping.yaml @@ -23,9 +23,9 @@ outputs: # TLE8888 high current low side: VVT2 TLE8888_IN9 / TLE8888_OUT5 GPIOE_10: "3 - Lowside 2" - # TLE8888 half bridges (pushpull, lowside, or high-low) TLE8888_IN11 / TLE8888_OUT21 + # TLE8888 half bridges (pushpull, lowside, or high-low) TLE8888_IN11 / TLE8888_OUT21#91 GPIOE_8: "35 - GP Out 1" - # TLE8888 half bridges (pushpull, lowside, or high-low) IN? / TLE8888_OUT22 + # TLE8888 half bridges (pushpull, lowside, or high-low) IN? / TLE8888_OUT22#89 # this should work but it does not GPIOE_7: "34 - GP Out 2" TLE8888_PIN_22: "34 - GP Out 2" TLE8888_PIN_23: "33 - GP Out 3" diff --git a/firmware/config/boards/microrusefi/prepend.txt b/firmware/config/boards/microrusefi/prepend.txt index 37dfd008a3..f11e020f1a 100644 --- a/firmware/config/boards/microrusefi/prepend.txt +++ b/firmware/config/boards/microrusefi/prepend.txt @@ -8,3 +8,6 @@ #define ts_show_etb_pins false #define ts_show_analog_divider false #define ts_show_spi false +#define ts_show_sd_card false +#define ts_show_can_pins false +#define ts_show_tunerstudio_port false diff --git a/firmware/config/boards/microrusefi/readme.md b/firmware/config/boards/microrusefi/readme.md new file mode 100644 index 0000000000..1f5f8711a7 --- /dev/null +++ b/firmware/config/boards/microrusefi/readme.md @@ -0,0 +1,4 @@ + +https://rusefi.com/forum/viewtopic.php?f=4&t=1538 + +https://github.com/rusefi/hw_microRusEfi \ No newline at end of file diff --git a/firmware/config/boards/nucleo_f746/!compile-stm32f746_nucleo.bat b/firmware/config/boards/nucleo_f746/!compile-stm32f746_nucleo.bat index cdc807cf5b..66cab1e0f6 100644 --- a/firmware/config/boards/nucleo_f746/!compile-stm32f746_nucleo.bat +++ b/firmware/config/boards/nucleo_f746/!compile-stm32f746_nucleo.bat @@ -15,6 +15,7 @@ set EXTRA_PARAMS=-DDUMMY -DSTM32F746xx ^ -DEFI_FATAL_ERROR_PIN=GPIOB_14 ^ -DEFI_TOOTH_LOGGER=FALSE ^ -DRAM_UNUSED_SIZE=10 ^ + -DSTATUS_LOGGING_BUFFER_SIZE=1400 ^ -DCCM_UNUSED_SIZE=10 set DEBUG_LEVEL_OPT="-O2" call config/boards/common_make.bat diff --git a/firmware/config/boards/nucleo_f746/board.mk b/firmware/config/boards/nucleo_f746/board.mk index 44474a3f3f..6ddc7b8d3e 100644 --- a/firmware/config/boards/nucleo_f746/board.mk +++ b/firmware/config/boards/nucleo_f746/board.mk @@ -4,6 +4,7 @@ BOARDSRC_CPP = $(PROJECT_DIR)/config/boards/NUCLEO_F767/board_configuration.cpp # Required include directories BOARDINC = $(PROJECT_DIR)/config/boards/NUCLEO_F746 $(PROJECT_DIR)/config/stm32f7ems +CONFDIR=config/stm32f7ems LDSCRIPT= $(PROJECT_DIR)/config/boards/NUCLEO_F746/STM32F746xG.ld diff --git a/firmware/config/boards/nucleo_f767/!compile-stm32f767_nucleo.bat b/firmware/config/boards/nucleo_f767/!compile-stm32f767_nucleo.bat index df9b87c88f..bf0e3188fa 100644 --- a/firmware/config/boards/nucleo_f767/!compile-stm32f767_nucleo.bat +++ b/firmware/config/boards/nucleo_f767/!compile-stm32f767_nucleo.bat @@ -12,6 +12,7 @@ set EXTRA_PARAMS=-DDUMMY -DSTM32F767xx ^ -DEFI_INJECTOR_PIN3=GPIO_UNASSIGNED ^ -DFIRMWARE_ID=\"nucleo767\" ^ -DEFI_COMMUNICATION_PIN=GPIOB_7 ^ + -DSTATUS_LOGGING_BUFFER_SIZE=1400 ^ -DEFI_FATAL_ERROR_PIN=GPIOB_14 ^ -DEFI_ENABLE_ASSERTS=FALSE ^ -DCH_DBG_ENABLE_CHECKS=FALSE -DCH_DBG_ENABLE_ASSERTS=FALSE -DCH_DBG_ENABLE_STACK_CHECK=FALSE -DCH_DBG_FILL_THREADS=FALSE -DCH_DBG_THREADS_PROFILING=FALSE diff --git a/firmware/config/boards/nucleo_f767/board.mk b/firmware/config/boards/nucleo_f767/board.mk index c1545539ce..497db3b864 100644 --- a/firmware/config/boards/nucleo_f767/board.mk +++ b/firmware/config/boards/nucleo_f767/board.mk @@ -4,6 +4,7 @@ BOARDSRC_CPP = $(PROJECT_DIR)/config/boards/nucleo_f767/board_configuration.cpp # Required include directories BOARDINC = $(PROJECT_DIR)/config/boards/nucleo_f767 $(PROJECT_DIR)/config/stm32f7ems +CONFDIR=config/stm32f7ems LDSCRIPT= $(PROJECT_DIR)/config/boards/nucleo_f767/STM32F76xxI.ld diff --git a/firmware/config/boards/prometheus/board_configuration.cpp b/firmware/config/boards/prometheus/board_configuration.cpp index 46a7522095..b2bd616162 100644 --- a/firmware/config/boards/prometheus/board_configuration.cpp +++ b/firmware/config/boards/prometheus/board_configuration.cpp @@ -258,7 +258,6 @@ void setBoardConfigurationOverrides(void) { //engineConfiguration->isCJ125Enabled = true; engineConfiguration->isCJ125Enabled = false; - engineConfiguration->canDeviceMode = CD_USE_CAN1; engineConfiguration->canTxPin = GPIOB_9; engineConfiguration->canRxPin = GPIOB_8; diff --git a/firmware/config/boards/prometheus/efifeatures.h b/firmware/config/boards/prometheus/efifeatures.h index ecf7eba807..d33c8ecbaa 100644 --- a/firmware/config/boards/prometheus/efifeatures.h +++ b/firmware/config/boards/prometheus/efifeatures.h @@ -9,8 +9,7 @@ #include "../../stm32f4ems/efifeatures.h" -#ifndef EFIFEATURES_PROMETHEUS_H_ -#define EFIFEATURES_PROMETHEUS_H_ +#pragma once #undef EFI_RTC #define EFI_RTC FALSE @@ -68,9 +67,6 @@ #define BOARD_TLE8888_COUNT 0 #endif -// todo: move this outside of efifeatures.h -#define BOARD_EXT_GPIOCHIPS (BOARD_TLE6240_COUNT + BOARD_MC33972_COUNT + BOARD_TLE8888_COUNT) - #undef EFI_CONSOLE_TX_PORT #define EFI_CONSOLE_TX_PORT GPIOA @@ -115,4 +111,3 @@ #define EFI_NARROW_EGO_AVERAGING TRUE -#endif /* EFIFEATURES_PROMETHEUS_H_ */ diff --git a/firmware/config/boards/prometheus/readme.md b/firmware/config/boards/prometheus/readme.md index 7f966e80d8..4807635ff4 100644 --- a/firmware/config/boards/prometheus/readme.md +++ b/firmware/config/boards/prometheus/readme.md @@ -1,4 +1,5 @@ Prometheus board. http://rusefi.com/forum/viewtopic.php?f=4&t=1215 -https://github.com/andreika-git/rusefi/ + +https://github.com/andreika-git/prometheus diff --git a/firmware/config/boards/proteus/board.mk b/firmware/config/boards/proteus/board.mk index f70064edf5..4c657cb8a7 100644 --- a/firmware/config/boards/proteus/board.mk +++ b/firmware/config/boards/proteus/board.mk @@ -17,6 +17,7 @@ else BOARDINC = $(BOARDS_DIR)/nucleo_f767 # For board.h BOARDINC += $(PROJECT_DIR)/config/stm32f7ems # efifeatures/halconf/chconf.h LDSCRIPT= $(BOARDS_DIR)/nucleo_f767/STM32F76xxI.ld + CONFDIR=config/stm32f4ems endif diff --git a/firmware/config/boards/proteus/board_configuration.cpp b/firmware/config/boards/proteus/board_configuration.cpp index fcf989bae5..bdf5618d17 100644 --- a/firmware/config/boards/proteus/board_configuration.cpp +++ b/firmware/config/boards/proteus/board_configuration.cpp @@ -43,6 +43,15 @@ static const brain_pin_e ignPins[] = { GPIOG_2, }; +static const ConfigOverrides configOverrides = { + .canTxPin = GPIOD_1, + .canRxPin = GPIOD_0, +}; + +const ConfigOverrides& getConfigOverrides() { + return configOverrides; +} + static void setInjectorPins() { copyArray(engineConfiguration->injectionPins, injPins); engineConfiguration->injectionPinMode = OM_DEFAULT; @@ -86,6 +95,8 @@ static void setupEtb() { engineConfiguration->etbIo[0].controlPin1 = GPIOD_12; // DIR pin engineConfiguration->etbIo[0].directionPin1 = GPIOD_10; + // Disable pin + engineConfiguration->etbIo[0].disablePin = GPIOD_11; // Unused engineConfiguration->etbIo[0].directionPin2 = GPIO_UNASSIGNED; @@ -94,25 +105,16 @@ static void setupEtb() { engineConfiguration->etbIo[1].controlPin1 = GPIOD_13; // DIR pin engineConfiguration->etbIo[1].directionPin1 = GPIOD_9; + // Disable pin + engineConfiguration->etbIo[1].disablePin = GPIOD_8; // Unused engineConfiguration->etbIo[1].directionPin2 = GPIO_UNASSIGNED; -#if EFI_FSIO - // disable ETB by default - setFsio(7, GPIOD_8, "1" PASS_CONFIG_PARAMETER_SUFFIX); - setFsio(8, GPIOD_11, "1" PASS_CONFIG_PARAMETER_SUFFIX); -#endif /* EFI_FSIO */ - // we only have pwm/dir, no dira/dirb engineConfiguration->etb_use_two_wires = false; engineConfiguration->etbFreq = 800; } -static void setupCanPins() { - engineConfiguration->canTxPin = GPIOD_1; - engineConfiguration->canRxPin = GPIOD_0; -} - static void setupDefaultSensorInputs() { // trigger inputs // Digital channel 1 as default - others not set @@ -164,7 +166,6 @@ void setBoardConfigurationOverrides(void) { setLedPins(); setupVbatt(); setupEtb(); - setupCanPins(); // "required" hardware is done - set some reasonable defaults setupDefaultSensorInputs(); diff --git a/firmware/config/boards/proteus/prepend.txt b/firmware/config/boards/proteus/prepend.txt index 896f9464e9..cf9b16a0f8 100644 --- a/firmware/config/boards/proteus/prepend.txt +++ b/firmware/config/boards/proteus/prepend.txt @@ -6,3 +6,7 @@ #define ts_show_egt false #define ts_show_gps false #define ts_show_analog_divider false +#define ts_show_spi false +#define ts_show_sd_card false +#define ts_show_can_pins false +#define ts_show_tunerstudio_port false diff --git a/firmware/config/boards/proteus/readme.md b/firmware/config/boards/proteus/readme.md new file mode 100644 index 0000000000..589ceb8668 --- /dev/null +++ b/firmware/config/boards/proteus/readme.md @@ -0,0 +1,4 @@ + +https://rusefi.com/forum/viewtopic.php?f=4&t=1646 + +https://github.com/mck1117/proteus \ No newline at end of file diff --git a/firmware/config/boards/readme.md b/firmware/config/boards/readme.md index 67d8bf989d..5f0b4e9f96 100644 --- a/firmware/config/boards/readme.md +++ b/firmware/config/boards/readme.md @@ -1 +1,4 @@ -See [misc/jenkins/compile_other_versions/run.bat](misc/jenkins/compile_other_versions/run.bat) which is executed by build server. \ No newline at end of file +See [misc/jenkins/compile_other_versions/run.bat](misc/jenkins/compile_other_versions/run.bat) which is executed by build server. + + +See https://rusefi.com/build_server/ \ No newline at end of file diff --git a/firmware/config/boards/skeleton/efifeatures.h b/firmware/config/boards/skeleton/efifeatures.h index 2f44af7dd0..69be0e67a2 100644 --- a/firmware/config/boards/skeleton/efifeatures.h +++ b/firmware/config/boards/skeleton/efifeatures.h @@ -86,11 +86,6 @@ #define BOARD_MC33972_COUNT 0 #define BOARD_TLE8888_COUNT 0 -// Future: move these outside of efifeatures.h -#define BOARD_EXT_GPIOCHIPS (BOARD_TLE6240_COUNT + BOARD_MC33972_COUNT + BOARD_TLE8888_COUNT) -#define BOARD_EXT_PINREPOPINS 24 - - /** * if you have a 60-2 trigger, or if you just want better performance, you * probably want EFI_ENABLE_ASSERTS to be FALSE. Also you would probably want to FALSE @@ -259,10 +254,8 @@ // todo: most of this should become configurable -// todo: switch to continuous ADC conversion for slow ADC? -// https://github.com/rusefi/rusefi/issues/630 // todo: switch to continues ADC conversion for fast ADC? -#define EFI_INTERNAL_FAST_ADC_PWM &PWMD4 +#define EFI_INTERNAL_FAST_ADC_GPT &GPTD6 #define EFI_SPI1_AF 5 diff --git a/firmware/config/boards/st_stm32f4/board.h b/firmware/config/boards/st_stm32f4/board.h index 807093ef94..1f0b31ee34 100644 --- a/firmware/config/boards/st_stm32f4/board.h +++ b/firmware/config/boards/st_stm32f4/board.h @@ -30,7 +30,6 @@ /* * Board identifier. */ -#define BOARD_ST_STM32F4_DISCOVERY #define BOARD_NAME "STM32F407 for RusEFI" #define EFI_USB_AF 10U @@ -42,11 +41,13 @@ #define BOARD_OTG_NOVBUSSENS TRUE /* - * input-floating is the default pin mode. input-output boards should provision appropriate pull-ups/pull-downs. + * Default to input mode, with internal pulldown resistor enabled. */ #define EFI_PIN_MODE_DEFAULT PIN_MODE_INPUT -#define EFI_DR_DEFAULT PIN_PUPDR_FLOATING +#define EFI_DR_DEFAULT PIN_PUPDR_PULLUP +// See https://github.com/rusefi/rusefi/issues/397 +#define DEFAULT_GPIO_SPEED PIN_OSPEED_HIGH /* * Board oscillators-related settings. @@ -79,196 +80,10 @@ /* * IO pins assignments. */ -#define GPIOA_PIN0 0 -#define GPIOA_PIN1 1 -#define GPIOA_PIN2 2 -#define GPIOA_PIN3 3 -#define GPIOA_LRCK 4 -#define GPIOA_PIN5 5 -#define GPIOA_PIN6 6 -#define GPIOA_PIN7 7 -#define GPIOA_PIN8 8 -#define GPIOA_PIN9 9 -#define GPIOA_PIN10 10 -#define GPIOA_PIN11 11 -#define GPIOA_PIN12 12 #define GPIOA_SWDIO 13 #define GPIOA_SWCLK 14 -#define GPIOA_PIN15 15 -#define GPIOB_PIN0 0 -#define GPIOB_PIN1 1 -#define GPIOB_PIN2 2 #define GPIOB_SWO 3 -#define GPIOB_PIN4 4 -#define GPIOB_PIN5 5 -#define GPIOB_PIN6 6 -#define GPIOB_PIN7 7 -#define GPIOB_PIN8 8 -#define GPIOB_PIN9 9 -#define GPIOB_PIN10 10 -#define GPIOB_PIN11 11 -#define GPIOB_PIN12 12 -#define GPIOB_PIN13 13 -#define GPIOB_PIN14 14 -#define GPIOB_PIN15 15 - -#define GPIOC_OTG_FS_POWER_ON 0 -#define GPIOC_PIN1 1 -#define GPIOC_PIN2 2 -#define GPIOC_PIN3 3 -#define GPIOC_PIN4 4 -#define GPIOC_PIN5 5 -#define GPIOC_PIN6 6 -#define GPIOC_PIN7 7 -#define GPIOC_PIN8 8 -#define GPIOC_PIN9 9 -#define GPIOC_PIN10 10 -#define GPIOC_PIN11 11 -#define GPIOC_PIN12 12 -#define GPIOC_PIN13 13 -#define GPIOC_PIN14 14 -#define GPIOC_PIN15 15 - -#define GPIOD_PIN0 0 -#define GPIOD_PIN1 1 -#define GPIOD_PIN2 2 -#define GPIOD_PIN3 3 -#define GPIOD_RESET 4 -#define GPIOD_OVER_CURRENT 5 -#define GPIOD_PIN6 6 -#define GPIOD_PIN7 7 -#define GPIOD_PIN8 8 -#define GPIOD_PIN9 9 -#define GPIOD_PIN10 10 -#define GPIOD_PIN11 11 -#define GPIOD_LED4 12 -#define GPIOD_LED3 13 -#define GPIOD_LED5 14 -#define GPIOD_LED6 15 - -#define GPIOE_PIN0 0 -#define GPIOE_PIN1 1 -#define GPIOE_PIN2 2 -#define GPIOE_PIN3 3 -#define GPIOE_PIN4 4 -#define GPIOE_PIN5 5 -#define GPIOE_PIN6 6 -#define GPIOE_PIN7 7 -#define GPIOE_PIN8 8 -#define GPIOE_PIN9 9 -#define GPIOE_PIN10 10 -#define GPIOE_PIN11 11 -#define GPIOE_PIN12 12 -#define GPIOE_PIN13 13 -#define GPIOE_PIN14 14 -#define GPIOE_PIN15 15 - -#define GPIOF_PIN0 0 -#define GPIOF_PIN1 1 -#define GPIOF_PIN2 2 -#define GPIOF_PIN3 3 -#define GPIOF_PIN4 4 -#define GPIOF_PIN5 5 -#define GPIOF_PIN6 6 -#define GPIOF_PIN7 7 -#define GPIOF_PIN8 8 -#define GPIOF_PIN9 9 -#define GPIOF_PIN10 10 -#define GPIOF_PIN11 11 -#define GPIOF_PIN12 12 -#define GPIOF_PIN13 13 -#define GPIOF_PIN14 14 -#define GPIOF_PIN15 15 - -#define GPIOG_PIN0 0 -#define GPIOG_PIN1 1 -#define GPIOG_PIN2 2 -#define GPIOG_PIN3 3 -#define GPIOG_PIN4 4 -#define GPIOG_PIN5 5 -#define GPIOG_PIN6 6 -#define GPIOG_PIN7 7 -#define GPIOG_PIN8 8 -#define GPIOG_PIN9 9 -#define GPIOG_PIN10 10 -#define GPIOG_PIN11 11 -#define GPIOG_PIN12 12 -#define GPIOG_PIN13 13 -#define GPIOG_PIN14 14 -#define GPIOG_PIN15 15 - -#define GPIOH_OSC_IN 0 -#define GPIOH_OSC_OUT 1 -#define GPIOH_PIN2 2 -#define GPIOH_PIN3 3 -#define GPIOH_PIN4 4 -#define GPIOH_PIN5 5 -#define GPIOH_PIN6 6 -#define GPIOH_PIN7 7 -#define GPIOH_PIN8 8 -#define GPIOH_PIN9 9 -#define GPIOH_PIN10 10 -#define GPIOH_PIN11 11 -#define GPIOH_PIN12 12 -#define GPIOH_PIN13 13 -#define GPIOH_PIN14 14 -#define GPIOH_PIN15 15 - -#define GPIOI_PIN0 0 -#define GPIOI_PIN1 1 -#define GPIOI_PIN2 2 -#define GPIOI_PIN3 3 -#define GPIOI_PIN4 4 -#define GPIOI_PIN5 5 -#define GPIOI_PIN6 6 -#define GPIOI_PIN7 7 -#define GPIOI_PIN8 8 -#define GPIOI_PIN9 9 -#define GPIOI_PIN10 10 -#define GPIOI_PIN11 11 -#define GPIOI_PIN12 12 -#define GPIOI_PIN13 13 -#define GPIOI_PIN14 14 -#define GPIOI_PIN15 15 - -/* - * IO lines assignments. - */ -#define LINE_LRCK PAL_LINE(GPIOA, 4U) -#define LINE_OTG_FS_ID PAL_LINE(GPIOA, 10U) -#define LINE_OTG_FS_DM PAL_LINE(GPIOA, 11U) -#define LINE_OTG_FS_DP PAL_LINE(GPIOA, 12U) -#define LINE_SWDIO PAL_LINE(GPIOA, 13U) -#define LINE_SWCLK PAL_LINE(GPIOA, 14U) - -#define LINE_SWO PAL_LINE(GPIOB, 3U) -#define LINE_SCL PAL_LINE(GPIOB, 6U) -#define LINE_SDA PAL_LINE(GPIOB, 9U) -#define LINE_CLK_IN PAL_LINE(GPIOB, 10U) - -#define LINE_OTG_FS_POWER_ON PAL_LINE(GPIOC, 0U) -#define LINE_PDM_OUT PAL_LINE(GPIOC, 3U) -#define LINE_MCLK PAL_LINE(GPIOC, 7U) -#define LINE_SCLK PAL_LINE(GPIOC, 10U) -#define LINE_SDIN PAL_LINE(GPIOC, 12U) - -#define LINE_RESET PAL_LINE(GPIOD, 4U) -#define LINE_OVER_CURRENT PAL_LINE(GPIOD, 5U) -#define LINE_LED4 PAL_LINE(GPIOD, 12U) -#define LINE_LED3 PAL_LINE(GPIOD, 13U) -#define LINE_LED5 PAL_LINE(GPIOD, 14U) -#define LINE_LED6 PAL_LINE(GPIOD, 15U) - -#define LINE_INT1 PAL_LINE(GPIOE, 0U) -#define LINE_INT2 PAL_LINE(GPIOE, 1U) -#define LINE_CS_SPI PAL_LINE(GPIOE, 3U) - - - -#define LINE_OSC_IN PAL_LINE(GPIOH, 0U) -#define LINE_OSC_OUT PAL_LINE(GPIOH, 1U) - /* * I/O ports initial setup, this configuration is established soon after reset @@ -292,1052 +107,250 @@ #define PIN_PUPDR_PULLDOWN(n) (2U << ((n) * 2U)) #define PIN_AFIO_AF(n, v) ((v) << (((n) % 8U) * 4U)) -// See https://github.com/rusefi/rusefi/issues/397 -#define DEFAULT_GPIO_SPEED PIN_OSPEED_HIGH +#define VAL_GPIO_MODER_ALL_DEFAULT (EFI_PIN_MODE_DEFAULT(0) | \ + EFI_PIN_MODE_DEFAULT(1) | \ + EFI_PIN_MODE_DEFAULT(2) | \ + EFI_PIN_MODE_DEFAULT(3) | \ + EFI_PIN_MODE_DEFAULT(4) | \ + EFI_PIN_MODE_DEFAULT(5) | \ + EFI_PIN_MODE_DEFAULT(6) | \ + EFI_PIN_MODE_DEFAULT(7) | \ + EFI_PIN_MODE_DEFAULT(8) | \ + EFI_PIN_MODE_DEFAULT(9) | \ + EFI_PIN_MODE_DEFAULT(10) | \ + EFI_PIN_MODE_DEFAULT(11) | \ + EFI_PIN_MODE_DEFAULT(12) | \ + EFI_PIN_MODE_DEFAULT(13) | \ + EFI_PIN_MODE_DEFAULT(14) | \ + EFI_PIN_MODE_DEFAULT(15)) + +#define VAL_GPIO_OTYPER_ALL_DEFAULT (PIN_OTYPE_PUSHPULL(0) | \ + PIN_OTYPE_PUSHPULL(1) | \ + PIN_OTYPE_PUSHPULL(2) | \ + PIN_OTYPE_PUSHPULL(3) | \ + PIN_OTYPE_PUSHPULL(4) | \ + PIN_OTYPE_PUSHPULL(5) | \ + PIN_OTYPE_PUSHPULL(6) | \ + PIN_OTYPE_PUSHPULL(7) | \ + PIN_OTYPE_PUSHPULL(8) | \ + PIN_OTYPE_PUSHPULL(9) | \ + PIN_OTYPE_PUSHPULL(10) | \ + PIN_OTYPE_PUSHPULL(11) | \ + PIN_OTYPE_PUSHPULL(12) | \ + PIN_OTYPE_PUSHPULL(13) | \ + PIN_OTYPE_PUSHPULL(14) | \ + PIN_OTYPE_PUSHPULL(15)) + +#define VAL_GPIO_OSPEEDR_ALL_DEFAULT (DEFAULT_GPIO_SPEED(0) | \ + DEFAULT_GPIO_SPEED(1) | \ + DEFAULT_GPIO_SPEED(2) | \ + DEFAULT_GPIO_SPEED(3) | \ + DEFAULT_GPIO_SPEED(4) | \ + DEFAULT_GPIO_SPEED(5) | \ + DEFAULT_GPIO_SPEED(6) | \ + DEFAULT_GPIO_SPEED(7) | \ + DEFAULT_GPIO_SPEED(8) | \ + DEFAULT_GPIO_SPEED(9) | \ + DEFAULT_GPIO_SPEED(10) | \ + DEFAULT_GPIO_SPEED(11) | \ + DEFAULT_GPIO_SPEED(12) | \ + DEFAULT_GPIO_SPEED(13) | \ + DEFAULT_GPIO_SPEED(14) | \ + DEFAULT_GPIO_SPEED(15)) + +#define VAL_GPIO_ODR_ALL_DEFAULT (PIN_ODR_HIGH(0) | \ + PIN_ODR_HIGH(1) | \ + PIN_ODR_HIGH(2) | \ + PIN_ODR_HIGH(3) | \ + PIN_ODR_HIGH(4) | \ + PIN_ODR_HIGH(5) | \ + PIN_ODR_HIGH(6) | \ + PIN_ODR_HIGH(7) | \ + PIN_ODR_HIGH(8) | \ + PIN_ODR_HIGH(9) | \ + PIN_ODR_HIGH(10) | \ + PIN_ODR_HIGH(11) | \ + PIN_ODR_HIGH(12) | \ + PIN_ODR_HIGH(13) | \ + PIN_ODR_HIGH(14) | \ + PIN_ODR_HIGH(15)) + +#define VAL_GPIO_PUPDR_ALL_DEFAULT (EFI_DR_DEFAULT(0) | \ + EFI_DR_DEFAULT(1) | \ + EFI_DR_DEFAULT(2) | \ + EFI_DR_DEFAULT(3) | \ + EFI_DR_DEFAULT(4) | \ + EFI_DR_DEFAULT(5) | \ + EFI_DR_DEFAULT(6) | \ + EFI_DR_DEFAULT(7) | \ + EFI_DR_DEFAULT(8) | \ + EFI_DR_DEFAULT(9) | \ + EFI_DR_DEFAULT(10) | \ + EFI_DR_DEFAULT(11) | \ + EFI_DR_DEFAULT(12) | \ + EFI_DR_DEFAULT(13) | \ + EFI_DR_DEFAULT(14) | \ + EFI_DR_DEFAULT(15)) + +#define VAL_GPIO_AF_ALL_DEFAULT (PIN_AFIO_AF(0, 0U) | \ + PIN_AFIO_AF(1, 0U) | \ + PIN_AFIO_AF(2, 0U) | \ + PIN_AFIO_AF(3, 0U) | \ + PIN_AFIO_AF(4, 0U) | \ + PIN_AFIO_AF(5, 0U) | \ + PIN_AFIO_AF(6, 0U) | \ + PIN_AFIO_AF(7, 0U)) + /* * GPIOA setup: * - * PA9 - VBUS_FS (input floating). - * PA10 - OTG_FS_ID (alternate 10). * PA11 - OTG_FS_DM (alternate 10). * PA12 - OTG_FS_DP (alternate 10). * PA13 - SWDIO (alternate 0). * PA14 - SWCLK (alternate 0). */ -#define VAL_GPIOA_MODER (EFI_PIN_MODE_DEFAULT(GPIOA_PIN0) | \ - EFI_PIN_MODE_DEFAULT(GPIOA_PIN1) | \ - EFI_PIN_MODE_DEFAULT(GPIOA_PIN2) | \ - EFI_PIN_MODE_DEFAULT(GPIOA_PIN3) | \ - EFI_PIN_MODE_DEFAULT(GPIOA_LRCK) | \ - EFI_PIN_MODE_DEFAULT(GPIOA_PIN5) | \ - EFI_PIN_MODE_DEFAULT(GPIOA_PIN6) | \ - EFI_PIN_MODE_DEFAULT(GPIOA_PIN7) | \ - EFI_PIN_MODE_DEFAULT(GPIOA_PIN8) | \ - EFI_PIN_MODE_DEFAULT(GPIOA_PIN9) | \ - PIN_MODE_ALTERNATE(GPIOA_PIN10) | \ - PIN_MODE_ALTERNATE(GPIOA_PIN11) | \ - PIN_MODE_ALTERNATE(GPIOA_PIN12) | \ +#define VAL_GPIOA_MODER (EFI_PIN_MODE_DEFAULT(0) | \ + EFI_PIN_MODE_DEFAULT(1) | \ + EFI_PIN_MODE_DEFAULT(2) | \ + EFI_PIN_MODE_DEFAULT(3) | \ + EFI_PIN_MODE_DEFAULT(4) | \ + EFI_PIN_MODE_DEFAULT(5) | \ + EFI_PIN_MODE_DEFAULT(6) | \ + EFI_PIN_MODE_DEFAULT(7) | \ + EFI_PIN_MODE_DEFAULT(8) | \ + EFI_PIN_MODE_DEFAULT(9) | \ + EFI_PIN_MODE_DEFAULT(10) | \ + PIN_MODE_ALTERNATE(11) | \ + PIN_MODE_ALTERNATE(12) | \ PIN_MODE_ALTERNATE(GPIOA_SWDIO) | \ PIN_MODE_ALTERNATE(GPIOA_SWCLK) | \ - EFI_PIN_MODE_DEFAULT(GPIOA_PIN15)) -#define VAL_GPIOA_OTYPER (PIN_OTYPE_PUSHPULL(GPIOA_PIN0) | \ - PIN_OTYPE_PUSHPULL(GPIOA_PIN1) | \ - PIN_OTYPE_PUSHPULL(GPIOA_PIN2) | \ - PIN_OTYPE_PUSHPULL(GPIOA_PIN3) | \ - PIN_OTYPE_PUSHPULL(GPIOA_LRCK) | \ - PIN_OTYPE_PUSHPULL(GPIOA_PIN5) | \ - PIN_OTYPE_PUSHPULL(GPIOA_PIN6) | \ - PIN_OTYPE_PUSHPULL(GPIOA_PIN7) | \ - PIN_OTYPE_PUSHPULL(GPIOA_PIN8) | \ - PIN_OTYPE_PUSHPULL(GPIOA_PIN9) | \ - PIN_OTYPE_PUSHPULL(GPIOA_PIN10) | \ - PIN_OTYPE_PUSHPULL(GPIOA_PIN11) | \ - PIN_OTYPE_PUSHPULL(GPIOA_PIN12) | \ - PIN_OTYPE_PUSHPULL(GPIOA_SWDIO) | \ - PIN_OTYPE_PUSHPULL(GPIOA_SWCLK) | \ - PIN_OTYPE_PUSHPULL(GPIOA_PIN15)) -#define VAL_GPIOA_OSPEEDR (DEFAULT_GPIO_SPEED(GPIOA_PIN0) | \ - DEFAULT_GPIO_SPEED(GPIOA_PIN1) | \ - DEFAULT_GPIO_SPEED(GPIOA_PIN2) | \ - DEFAULT_GPIO_SPEED(GPIOA_PIN3) | \ - DEFAULT_GPIO_SPEED(GPIOA_LRCK) | \ - DEFAULT_GPIO_SPEED(GPIOA_PIN5) | \ - DEFAULT_GPIO_SPEED(GPIOA_PIN6) | \ - DEFAULT_GPIO_SPEED(GPIOA_PIN7) | \ - DEFAULT_GPIO_SPEED(GPIOA_PIN8) | \ - DEFAULT_GPIO_SPEED(GPIOA_PIN9) | \ - DEFAULT_GPIO_SPEED(GPIOA_PIN10) | \ - DEFAULT_GPIO_SPEED(GPIOA_PIN11) | \ - DEFAULT_GPIO_SPEED(GPIOA_PIN12) | \ - DEFAULT_GPIO_SPEED(GPIOA_SWDIO) | \ - DEFAULT_GPIO_SPEED(GPIOA_SWCLK) | \ - DEFAULT_GPIO_SPEED(GPIOA_PIN15)) -#define VAL_GPIOA_PUPDR (EFI_DR_DEFAULT(GPIOA_PIN0) | \ - EFI_DR_DEFAULT(GPIOA_PIN1) | \ - EFI_DR_DEFAULT(GPIOA_PIN2) | \ - EFI_DR_DEFAULT(GPIOA_PIN3) | \ - EFI_DR_DEFAULT(GPIOA_LRCK) | \ - EFI_DR_DEFAULT(GPIOA_PIN5) | \ - EFI_DR_DEFAULT(GPIOA_PIN6) | \ - EFI_DR_DEFAULT(GPIOA_PIN7) | \ - EFI_DR_DEFAULT(GPIOA_PIN8) | \ - EFI_DR_DEFAULT(GPIOA_PIN9) | \ - EFI_DR_DEFAULT(GPIOA_PIN10) | \ - EFI_DR_DEFAULT(GPIOA_PIN11) | \ - EFI_DR_DEFAULT(GPIOA_PIN12) | \ - EFI_DR_DEFAULT(GPIOA_SWDIO) | \ - EFI_DR_DEFAULT(GPIOA_SWCLK) | \ - PIN_PUPDR_PULLUP(GPIOA_PIN15)) -#define VAL_GPIOA_ODR (PIN_ODR_HIGH(GPIOA_PIN0) | \ - PIN_ODR_HIGH(GPIOA_PIN1) | \ - PIN_ODR_HIGH(GPIOA_PIN2) | \ - PIN_ODR_HIGH(GPIOA_PIN3) | \ - PIN_ODR_HIGH(GPIOA_LRCK) | \ - PIN_ODR_HIGH(GPIOA_PIN5) | \ - PIN_ODR_HIGH(GPIOA_PIN6) | \ - PIN_ODR_HIGH(GPIOA_PIN7) | \ - PIN_ODR_HIGH(GPIOA_PIN8) | \ - PIN_ODR_HIGH(GPIOA_PIN9) | \ - PIN_ODR_HIGH(GPIOA_PIN10) | \ - PIN_ODR_HIGH(GPIOA_PIN11) | \ - PIN_ODR_HIGH(GPIOA_PIN12) | \ - PIN_ODR_HIGH(GPIOA_SWDIO) | \ - PIN_ODR_HIGH(GPIOA_SWCLK) | \ - PIN_ODR_HIGH(GPIOA_PIN15)) -#define VAL_GPIOA_AFRL (PIN_AFIO_AF(GPIOA_PIN0, 0U) | \ - PIN_AFIO_AF(GPIOA_PIN1, 0U) | \ - PIN_AFIO_AF(GPIOA_PIN2, 0U) | \ - PIN_AFIO_AF(GPIOA_PIN3, 0U) | \ - PIN_AFIO_AF(GPIOA_LRCK, 6U) | \ - PIN_AFIO_AF(GPIOA_PIN5, 5U) | \ - PIN_AFIO_AF(GPIOA_PIN6, 5U) | \ - PIN_AFIO_AF(GPIOA_PIN7, 5U)) -#define VAL_GPIOA_AFRH (PIN_AFIO_AF(GPIOA_PIN8, 0U) | \ - PIN_AFIO_AF(GPIOA_PIN9, 0U) | \ - PIN_AFIO_AF(GPIOA_PIN10, 0U) | \ - PIN_AFIO_AF(GPIOA_PIN11, 0U) | \ - PIN_AFIO_AF(GPIOA_PIN12, 0U) | \ - PIN_AFIO_AF(GPIOA_SWDIO, 0U) | \ - PIN_AFIO_AF(GPIOA_SWCLK, 0U) | \ - PIN_AFIO_AF(GPIOA_PIN15, 0U)) + EFI_PIN_MODE_DEFAULT(15)) +#define VAL_GPIOA_OTYPER VAL_GPIO_OTYPER_ALL_DEFAULT +#define VAL_GPIOA_OSPEEDR VAL_GPIO_OSPEEDR_ALL_DEFAULT +#define VAL_GPIOA_PUPDR VAL_GPIO_PUPDR_ALL_DEFAULT +#define VAL_GPIOA_ODR VAL_GPIO_ODR_ALL_DEFAULT +#define VAL_GPIOA_AFRL (PIN_AFIO_AF(0, 0U) | \ + PIN_AFIO_AF(1, 0U) | \ + PIN_AFIO_AF(2, 0U) | \ + PIN_AFIO_AF(3, 0U) | \ + PIN_AFIO_AF(4, 6U) | \ + PIN_AFIO_AF(5, 5U) | \ + PIN_AFIO_AF(6, 5U) | \ + PIN_AFIO_AF(7, 5U)) +#define VAL_GPIOA_AFRH VAL_GPIO_AF_ALL_DEFAULT /* * GPIOB setup: - * - * PB0 - PIN0 (input pullup). - * PB1 - PIN1 (input pullup). - * PB2 - PIN2 (input pullup). - * PB3 - SWO (alternate 0). - * PB4 - PIN4 (input pullup). - * PB5 - PIN5 (input pullup). - * PB6 - SCL (alternate 4). - * PB7 - PIN7 (input pullup). - * PB8 - PIN8 (input pullup). - * PB9 - SDA (alternate 4). - * PB10 - PIN10 (input pullup). - * PB11 - PIN11 (input pullup). - * PB12 - PIN12 (input pullup). - * PB13 - PIN13 (input pullup). - * PB14 - PIN14 (input pullup). - * PB15 - PIN15 (input pullup). + * + * Default except SWO configured on PB3 + * */ -#define VAL_GPIOB_MODER (EFI_PIN_MODE_DEFAULT(GPIOB_PIN0) | \ - EFI_PIN_MODE_DEFAULT(GPIOB_PIN1) | \ - EFI_PIN_MODE_DEFAULT(GPIOB_PIN2) | \ +#define VAL_GPIOB_MODER (EFI_PIN_MODE_DEFAULT(0) | \ + EFI_PIN_MODE_DEFAULT(1) | \ + EFI_PIN_MODE_DEFAULT(2) | \ PIN_MODE_ALTERNATE(GPIOB_SWO) | \ - EFI_PIN_MODE_DEFAULT(GPIOB_PIN4) | \ - EFI_PIN_MODE_DEFAULT(GPIOB_PIN5) | \ - PIN_MODE_ALTERNATE(GPIOB_PIN6) | \ - EFI_PIN_MODE_DEFAULT(GPIOB_PIN7) | \ - EFI_PIN_MODE_DEFAULT(GPIOB_PIN8) | \ - EFI_PIN_MODE_DEFAULT(GPIOB_PIN9) | \ - EFI_PIN_MODE_DEFAULT(GPIOB_PIN10) | \ - EFI_PIN_MODE_DEFAULT(GPIOB_PIN11) | \ - EFI_PIN_MODE_DEFAULT(GPIOB_PIN12) | \ - EFI_PIN_MODE_DEFAULT(GPIOB_PIN13) | \ - EFI_PIN_MODE_DEFAULT(GPIOB_PIN14) | \ - EFI_PIN_MODE_DEFAULT(GPIOB_PIN15)) -#define VAL_GPIOB_OTYPER (PIN_OTYPE_PUSHPULL(GPIOB_PIN0) | \ - PIN_OTYPE_PUSHPULL(GPIOB_PIN1) | \ - PIN_OTYPE_PUSHPULL(GPIOB_PIN2) | \ - PIN_OTYPE_PUSHPULL(GPIOB_SWO) | \ - PIN_OTYPE_PUSHPULL(GPIOB_PIN4) | \ - PIN_OTYPE_PUSHPULL(GPIOB_PIN5) | \ - PIN_OTYPE_OPENDRAIN(GPIOB_PIN6) | \ - PIN_OTYPE_PUSHPULL(GPIOB_PIN7) | \ - PIN_OTYPE_PUSHPULL(GPIOB_PIN8) | \ - PIN_OTYPE_PUSHPULL(GPIOB_PIN9) | \ - PIN_OTYPE_PUSHPULL(GPIOB_PIN10) | \ - PIN_OTYPE_PUSHPULL(GPIOB_PIN11) | \ - PIN_OTYPE_PUSHPULL(GPIOB_PIN12) | \ - PIN_OTYPE_PUSHPULL(GPIOB_PIN13) | \ - PIN_OTYPE_PUSHPULL(GPIOB_PIN14) | \ - PIN_OTYPE_PUSHPULL(GPIOB_PIN15)) -#define VAL_GPIOB_OSPEEDR (DEFAULT_GPIO_SPEED(GPIOB_PIN0) | \ - DEFAULT_GPIO_SPEED(GPIOB_PIN1) | \ - DEFAULT_GPIO_SPEED(GPIOB_PIN2) | \ - DEFAULT_GPIO_SPEED(GPIOB_SWO) | \ - DEFAULT_GPIO_SPEED(GPIOB_PIN4) | \ - DEFAULT_GPIO_SPEED(GPIOB_PIN5) | \ - DEFAULT_GPIO_SPEED(GPIOB_PIN6) | \ - DEFAULT_GPIO_SPEED(GPIOB_PIN7) | \ - DEFAULT_GPIO_SPEED(GPIOB_PIN8) | \ - DEFAULT_GPIO_SPEED(GPIOB_PIN9) | \ - DEFAULT_GPIO_SPEED(GPIOB_PIN10) | \ - DEFAULT_GPIO_SPEED(GPIOB_PIN11) | \ - DEFAULT_GPIO_SPEED(GPIOB_PIN12) | \ - DEFAULT_GPIO_SPEED(GPIOB_PIN13) | \ - DEFAULT_GPIO_SPEED(GPIOB_PIN14) | \ - DEFAULT_GPIO_SPEED(GPIOB_PIN15)) -#define VAL_GPIOB_PUPDR (PIN_PUPDR_PULLUP(GPIOB_PIN0) | \ - PIN_PUPDR_PULLUP(GPIOB_PIN1) | \ - PIN_PUPDR_PULLUP(GPIOB_PIN2) | \ - EFI_DR_DEFAULT(GPIOB_SWO) | \ - PIN_PUPDR_PULLUP(GPIOB_PIN4) | \ - PIN_PUPDR_PULLUP(GPIOB_PIN5) | \ - EFI_DR_DEFAULT(GPIOB_PIN6) | \ - PIN_PUPDR_PULLDOWN(GPIOB_PIN7) | \ - PIN_PUPDR_PULLDOWN(GPIOB_PIN8) | \ - PIN_PUPDR_PULLDOWN(GPIOB_PIN9) | \ - PIN_PUPDR_PULLDOWN(GPIOB_PIN10) | \ - PIN_PUPDR_PULLDOWN(GPIOB_PIN11) | \ - PIN_PUPDR_PULLDOWN(GPIOB_PIN12) | \ - PIN_PUPDR_PULLDOWN(GPIOB_PIN13) | \ - PIN_PUPDR_PULLDOWN(GPIOB_PIN14) | \ - PIN_PUPDR_PULLDOWN(GPIOB_PIN15)) -#define VAL_GPIOB_ODR (PIN_ODR_HIGH(GPIOB_PIN0) | \ - PIN_ODR_HIGH(GPIOB_PIN1) | \ - PIN_ODR_HIGH(GPIOB_PIN2) | \ - PIN_ODR_HIGH(GPIOB_SWO) | \ - PIN_ODR_HIGH(GPIOB_PIN4) | \ - PIN_ODR_HIGH(GPIOB_PIN5) | \ - PIN_ODR_HIGH(GPIOB_PIN6) | \ - PIN_ODR_HIGH(GPIOB_PIN7) | \ - PIN_ODR_HIGH(GPIOB_PIN8) | \ - PIN_ODR_HIGH(GPIOB_PIN9) | \ - PIN_ODR_HIGH(GPIOB_PIN10) | \ - PIN_ODR_HIGH(GPIOB_PIN11) | \ - PIN_ODR_HIGH(GPIOB_PIN12) | \ - PIN_ODR_HIGH(GPIOB_PIN13) | \ - PIN_ODR_HIGH(GPIOB_PIN14) | \ - PIN_ODR_HIGH(GPIOB_PIN15)) -#define VAL_GPIOB_AFRL (PIN_AFIO_AF(GPIOB_PIN0, 0U) | \ - PIN_AFIO_AF(GPIOB_PIN1, 0U) | \ - PIN_AFIO_AF(GPIOB_PIN2, 0U) | \ + EFI_PIN_MODE_DEFAULT(4) | \ + EFI_PIN_MODE_DEFAULT(5) | \ + EFI_PIN_MODE_DEFAULT(6) | \ + EFI_PIN_MODE_DEFAULT(7) | \ + EFI_PIN_MODE_DEFAULT(8) | \ + EFI_PIN_MODE_DEFAULT(9) | \ + EFI_PIN_MODE_DEFAULT(10) | \ + EFI_PIN_MODE_DEFAULT(11) | \ + EFI_PIN_MODE_DEFAULT(12) | \ + EFI_PIN_MODE_DEFAULT(13) | \ + EFI_PIN_MODE_DEFAULT(14) | \ + EFI_PIN_MODE_DEFAULT(15)) +#define VAL_GPIOB_OTYPER VAL_GPIO_OTYPER_ALL_DEFAULT +#define VAL_GPIOB_OSPEEDR VAL_GPIO_OSPEEDR_ALL_DEFAULT +#define VAL_GPIOB_PUPDR VAL_GPIO_PUPDR_ALL_DEFAULT +#define VAL_GPIOB_ODR VAL_GPIO_ODR_ALL_DEFAULT +#define VAL_GPIOB_AFRL (PIN_AFIO_AF(0, 0U) | \ + PIN_AFIO_AF(1, 0U) | \ + PIN_AFIO_AF(2, 0U) | \ PIN_AFIO_AF(GPIOB_SWO, 0U) | \ - PIN_AFIO_AF(GPIOB_PIN4, 0U) | \ - PIN_AFIO_AF(GPIOB_PIN5, 0U) | \ - PIN_AFIO_AF(GPIOB_PIN6, 4U) | \ - PIN_AFIO_AF(GPIOB_PIN7, 0U)) -#define VAL_GPIOB_AFRH (PIN_AFIO_AF(GPIOB_PIN8, 0U) | \ - PIN_AFIO_AF(GPIOB_PIN9, 0U) | \ - PIN_AFIO_AF(GPIOB_PIN10, 0U) | \ - PIN_AFIO_AF(GPIOB_PIN11, 0U) | \ - PIN_AFIO_AF(GPIOB_PIN12, 0U) | \ - PIN_AFIO_AF(GPIOB_PIN13, 0U) | \ - PIN_AFIO_AF(GPIOB_PIN14, 0U) | \ - PIN_AFIO_AF(GPIOB_PIN15, 0U)) + PIN_AFIO_AF(4, 0U) | \ + PIN_AFIO_AF(5, 0U) | \ + PIN_AFIO_AF(6, 0U) | \ + PIN_AFIO_AF(7, 0U)) +#define VAL_GPIOB_AFRH VAL_GPIO_AF_ALL_DEFAULT /* * GPIOC setup: - * - * PC0 - OTG_FS_POWER_ON (output pushpull maximum). - * PC1 - PIN1 (input pullup). - * PC2 - PIN2 (input pullup). - * PC3 - PDM_OUT (input pullup). - * PC4 - PIN4 (input pullup). - * PC5 - PIN5 (input pullup). - * PC6 - PIN6 (input pullup). - * PC7 - MCLK (alternate 6). - * PC8 - PIN8 (input pullup). - * PC9 - PIN9 (input pullup). - * PC10 - SCLK (alternate 6). - * PC11 - PIN11 (input pullup). - * PC12 - SDIN (alternate 6). - * PC13 - PIN13 (input pullup). - * PC14 - PIN14 (input pullup). - * PC15 - PIN15 (input pullup). */ -#define VAL_GPIOC_MODER (PIN_MODE_OUTPUT(GPIOC_OTG_FS_POWER_ON) |\ - EFI_PIN_MODE_DEFAULT(GPIOC_PIN1) | \ - EFI_PIN_MODE_DEFAULT(GPIOC_PIN2) | \ - EFI_PIN_MODE_DEFAULT(GPIOC_PIN3) | \ - EFI_PIN_MODE_DEFAULT(GPIOC_PIN4) | \ - EFI_PIN_MODE_DEFAULT(GPIOC_PIN5) | \ - EFI_PIN_MODE_DEFAULT(GPIOC_PIN6) | \ - EFI_PIN_MODE_DEFAULT(GPIOC_PIN7) | \ - EFI_PIN_MODE_DEFAULT(GPIOC_PIN8) | \ - EFI_PIN_MODE_DEFAULT(GPIOC_PIN9) | \ - EFI_PIN_MODE_DEFAULT(GPIOC_PIN10) | \ - EFI_PIN_MODE_DEFAULT(GPIOC_PIN11) | \ - EFI_PIN_MODE_DEFAULT(GPIOC_PIN12) | \ - EFI_PIN_MODE_DEFAULT(GPIOC_PIN13) | \ - EFI_PIN_MODE_DEFAULT(GPIOC_PIN14) | \ - EFI_PIN_MODE_DEFAULT(GPIOC_PIN15)) -#define VAL_GPIOC_OTYPER (PIN_OTYPE_PUSHPULL(GPIOC_OTG_FS_POWER_ON) |\ - PIN_OTYPE_PUSHPULL(GPIOC_PIN1) | \ - PIN_OTYPE_PUSHPULL(GPIOC_PIN2) | \ - PIN_OTYPE_PUSHPULL(GPIOC_PIN3) | \ - PIN_OTYPE_PUSHPULL(GPIOC_PIN4) | \ - PIN_OTYPE_PUSHPULL(GPIOC_PIN5) | \ - PIN_OTYPE_PUSHPULL(GPIOC_PIN6) | \ - PIN_OTYPE_PUSHPULL(GPIOC_PIN7) | \ - PIN_OTYPE_PUSHPULL(GPIOC_PIN8) | \ - PIN_OTYPE_PUSHPULL(GPIOC_PIN9) | \ - PIN_OTYPE_PUSHPULL(GPIOC_PIN10) | \ - PIN_OTYPE_PUSHPULL(GPIOC_PIN11) | \ - PIN_OTYPE_PUSHPULL(GPIOC_PIN10) | \ - PIN_OTYPE_PUSHPULL(GPIOC_PIN13) | \ - PIN_OTYPE_PUSHPULL(GPIOC_PIN14) | \ - PIN_OTYPE_PUSHPULL(GPIOC_PIN15)) -#define VAL_GPIOC_OSPEEDR (DEFAULT_GPIO_SPEED(GPIOC_OTG_FS_POWER_ON) |\ - DEFAULT_GPIO_SPEED(GPIOC_PIN1) | \ - DEFAULT_GPIO_SPEED(GPIOC_PIN2) | \ - DEFAULT_GPIO_SPEED(GPIOC_PIN3) | \ - DEFAULT_GPIO_SPEED(GPIOC_PIN4) | \ - DEFAULT_GPIO_SPEED(GPIOC_PIN5) | \ - DEFAULT_GPIO_SPEED(GPIOC_PIN6) | \ - DEFAULT_GPIO_SPEED(GPIOC_PIN7) | \ - DEFAULT_GPIO_SPEED(GPIOC_PIN8) | \ - DEFAULT_GPIO_SPEED(GPIOC_PIN9) | \ - DEFAULT_GPIO_SPEED(GPIOC_PIN10) | \ - DEFAULT_GPIO_SPEED(GPIOC_PIN11) | \ - DEFAULT_GPIO_SPEED(GPIOC_PIN12) | \ - DEFAULT_GPIO_SPEED(GPIOC_PIN13) | \ - DEFAULT_GPIO_SPEED(GPIOC_PIN14) | \ - DEFAULT_GPIO_SPEED(GPIOC_PIN15)) -#define VAL_GPIOC_PUPDR (EFI_DR_DEFAULT(GPIOC_OTG_FS_POWER_ON) |\ - PIN_PUPDR_PULLDOWN(GPIOC_PIN1) | \ - PIN_PUPDR_PULLDOWN(GPIOC_PIN2) | \ - PIN_PUPDR_PULLDOWN(GPIOC_PIN3) | \ - PIN_PUPDR_PULLDOWN(GPIOC_PIN4) | \ - PIN_PUPDR_PULLDOWN(GPIOC_PIN5) | \ - PIN_PUPDR_PULLDOWN(GPIOC_PIN6) | \ - PIN_PUPDR_PULLDOWN(GPIOC_PIN7) | \ - PIN_PUPDR_PULLDOWN(GPIOC_PIN8) | \ - PIN_PUPDR_PULLDOWN(GPIOC_PIN9) | \ - PIN_PUPDR_PULLDOWN(GPIOC_PIN10) | \ - PIN_PUPDR_PULLDOWN(GPIOC_PIN11) | \ - PIN_PUPDR_PULLDOWN(GPIOC_PIN12) | \ - PIN_PUPDR_PULLDOWN(GPIOC_PIN13) | \ - PIN_PUPDR_PULLDOWN(GPIOC_PIN14) | \ - PIN_PUPDR_PULLDOWN(GPIOC_PIN15)) -#define VAL_GPIOC_ODR (PIN_ODR_HIGH(GPIOC_OTG_FS_POWER_ON) | \ - PIN_ODR_HIGH(GPIOC_PIN1) | \ - PIN_ODR_HIGH(GPIOC_PIN2) | \ - PIN_ODR_HIGH(GPIOC_PIN3) | \ - PIN_ODR_HIGH(GPIOC_PIN4) | \ - PIN_ODR_HIGH(GPIOC_PIN5) | \ - PIN_ODR_HIGH(GPIOC_PIN6) | \ - PIN_ODR_HIGH(GPIOC_PIN7) | \ - PIN_ODR_HIGH(GPIOC_PIN8) | \ - PIN_ODR_HIGH(GPIOC_PIN9) | \ - PIN_ODR_HIGH(GPIOC_PIN10) | \ - PIN_ODR_HIGH(GPIOC_PIN11) | \ - PIN_ODR_HIGH(GPIOC_PIN12) | \ - PIN_ODR_HIGH(GPIOC_PIN13) | \ - PIN_ODR_HIGH(GPIOC_PIN14) | \ - PIN_ODR_HIGH(GPIOC_PIN15)) -#define VAL_GPIOC_AFRL (PIN_AFIO_AF(GPIOC_OTG_FS_POWER_ON, 0U) |\ - PIN_AFIO_AF(GPIOC_PIN1, 0U) | \ - PIN_AFIO_AF(GPIOC_PIN2, 0U) | \ - PIN_AFIO_AF(GPIOC_PIN3, 0U) | \ - PIN_AFIO_AF(GPIOC_PIN4, 0U) | \ - PIN_AFIO_AF(GPIOC_PIN5, 0U) | \ - PIN_AFIO_AF(GPIOC_PIN6, 0U) | \ - PIN_AFIO_AF(GPIOC_PIN7, 0U)) -#define VAL_GPIOC_AFRH (PIN_AFIO_AF(GPIOC_PIN8, 0U) | \ - PIN_AFIO_AF(GPIOC_PIN9, 0U) | \ - PIN_AFIO_AF(GPIOC_PIN10, 0U) | \ - PIN_AFIO_AF(GPIOC_PIN11, 0U) | \ - PIN_AFIO_AF(GPIOC_PIN12, 0U) | \ - PIN_AFIO_AF(GPIOC_PIN13, 0U) | \ - PIN_AFIO_AF(GPIOC_PIN14, 0U) | \ - PIN_AFIO_AF(GPIOC_PIN15, 0U)) +#define VAL_GPIOC_MODER VAL_GPIO_MODER_ALL_DEFAULT +#define VAL_GPIOC_OTYPER VAL_GPIO_OTYPER_ALL_DEFAULT +#define VAL_GPIOC_OSPEEDR VAL_GPIO_OSPEEDR_ALL_DEFAULT +#define VAL_GPIOC_PUPDR VAL_GPIO_PUPDR_ALL_DEFAULT +#define VAL_GPIOC_ODR VAL_GPIO_ODR_ALL_DEFAULT +#define VAL_GPIOC_AFRL VAL_GPIO_AF_ALL_DEFAULT +#define VAL_GPIOC_AFRH VAL_GPIO_AF_ALL_DEFAULT /* * GPIOD setup: - * - * PD0 - PIN0 (input pullup). - * PD1 - PIN1 (input pullup). - * PD2 - PIN2 (input pullup). - * PD3 - PIN3 (input pullup). - * PD4 - RESET (output pushpull maximum). - * PD5 - OVER_CURRENT (input floating). - * PD6 - PIN6 (input pullup). - * PD7 - PIN7 (input pullup). - * PD8 - PIN8 (input pullup). - * PD9 - PIN9 (input pullup). - * PD10 - PIN10 (input pullup). - * PD11 - PIN11 (input pullup). - * PD12 - LED4 (output pushpull maximum). - * PD13 - LED3 (output pushpull maximum). - * PD14 - LED5 (output pushpull maximum). - * PD15 - LED6 (output pushpull maximum). */ -#define VAL_GPIOD_MODER (EFI_PIN_MODE_DEFAULT(GPIOD_PIN0) | \ - EFI_PIN_MODE_DEFAULT(GPIOD_PIN1) | \ - EFI_PIN_MODE_DEFAULT(GPIOD_PIN2) | \ - EFI_PIN_MODE_DEFAULT(GPIOD_PIN3) | \ - PIN_MODE_OUTPUT(GPIOD_RESET) | \ - EFI_PIN_MODE_DEFAULT(GPIOD_OVER_CURRENT) | \ - EFI_PIN_MODE_DEFAULT(GPIOD_PIN6) | \ - EFI_PIN_MODE_DEFAULT(GPIOD_PIN7) | \ - EFI_PIN_MODE_DEFAULT(GPIOD_PIN8) | \ - EFI_PIN_MODE_DEFAULT(GPIOD_PIN9) | \ - EFI_PIN_MODE_DEFAULT(GPIOD_PIN10) | \ - EFI_PIN_MODE_DEFAULT(GPIOD_PIN11) | \ - PIN_MODE_OUTPUT(GPIOD_LED4) | \ - PIN_MODE_OUTPUT(GPIOD_LED3) | \ - PIN_MODE_OUTPUT(GPIOD_LED5) | \ - PIN_MODE_OUTPUT(GPIOD_LED6)) -#define VAL_GPIOD_OTYPER (PIN_OTYPE_PUSHPULL(GPIOD_PIN0) | \ - PIN_OTYPE_PUSHPULL(GPIOD_PIN1) | \ - PIN_OTYPE_PUSHPULL(GPIOD_PIN2) | \ - PIN_OTYPE_PUSHPULL(GPIOD_PIN3) | \ - PIN_OTYPE_PUSHPULL(GPIOD_RESET) | \ - PIN_OTYPE_PUSHPULL(GPIOD_OVER_CURRENT) |\ - PIN_OTYPE_PUSHPULL(GPIOD_PIN6) | \ - PIN_OTYPE_PUSHPULL(GPIOD_PIN7) | \ - PIN_OTYPE_PUSHPULL(GPIOD_PIN8) | \ - PIN_OTYPE_PUSHPULL(GPIOD_PIN9) | \ - PIN_OTYPE_PUSHPULL(GPIOD_PIN10) | \ - PIN_OTYPE_PUSHPULL(GPIOD_PIN11) | \ - PIN_OTYPE_PUSHPULL(GPIOD_LED4) | \ - PIN_OTYPE_PUSHPULL(GPIOD_LED3) | \ - PIN_OTYPE_PUSHPULL(GPIOD_LED5) | \ - PIN_OTYPE_PUSHPULL(GPIOD_LED6)) -#define VAL_GPIOD_OSPEEDR (DEFAULT_GPIO_SPEED(GPIOD_PIN0) | \ - DEFAULT_GPIO_SPEED(GPIOD_PIN1) | \ - DEFAULT_GPIO_SPEED(GPIOD_PIN2) | \ - DEFAULT_GPIO_SPEED(GPIOD_PIN3) | \ - DEFAULT_GPIO_SPEED(GPIOD_RESET) | \ - DEFAULT_GPIO_SPEED(GPIOD_OVER_CURRENT) | \ - DEFAULT_GPIO_SPEED(GPIOD_PIN6) | \ - DEFAULT_GPIO_SPEED(GPIOD_PIN7) | \ - DEFAULT_GPIO_SPEED(GPIOD_PIN8) | \ - DEFAULT_GPIO_SPEED(GPIOD_PIN9) | \ - DEFAULT_GPIO_SPEED(GPIOD_PIN10) | \ - DEFAULT_GPIO_SPEED(GPIOD_PIN11) | \ - DEFAULT_GPIO_SPEED(GPIOD_LED4) | \ - DEFAULT_GPIO_SPEED(GPIOD_LED3) | \ - DEFAULT_GPIO_SPEED(GPIOD_LED5) | \ - DEFAULT_GPIO_SPEED(GPIOD_LED6)) -#define VAL_GPIOD_PUPDR (PIN_PUPDR_PULLUP(GPIOD_PIN0) | \ - PIN_PUPDR_PULLUP(GPIOD_PIN1) | \ - PIN_PUPDR_PULLUP(GPIOD_PIN2) | \ - PIN_PUPDR_PULLUP(GPIOD_PIN3) | \ - EFI_DR_DEFAULT(GPIOD_RESET) | \ - EFI_DR_DEFAULT(GPIOD_OVER_CURRENT) |\ - PIN_PUPDR_PULLUP(GPIOD_PIN6) | \ - PIN_PUPDR_PULLUP(GPIOD_PIN7) | \ - PIN_PUPDR_PULLUP(GPIOD_PIN8) | \ - PIN_PUPDR_PULLUP(GPIOD_PIN9) | \ - PIN_PUPDR_PULLUP(GPIOD_PIN10) | \ - PIN_PUPDR_PULLUP(GPIOD_PIN11) | \ - EFI_DR_DEFAULT(GPIOD_LED4) | \ - EFI_DR_DEFAULT(GPIOD_LED3) | \ - EFI_DR_DEFAULT(GPIOD_LED5) | \ - EFI_DR_DEFAULT(GPIOD_LED6)) -#define VAL_GPIOD_ODR (PIN_ODR_HIGH(GPIOD_PIN0) | \ - PIN_ODR_HIGH(GPIOD_PIN1) | \ - PIN_ODR_HIGH(GPIOD_PIN2) | \ - PIN_ODR_HIGH(GPIOD_PIN3) | \ - PIN_ODR_HIGH(GPIOD_RESET) | \ - PIN_ODR_HIGH(GPIOD_OVER_CURRENT) | \ - PIN_ODR_HIGH(GPIOD_PIN6) | \ - PIN_ODR_HIGH(GPIOD_PIN7) | \ - PIN_ODR_HIGH(GPIOD_PIN8) | \ - PIN_ODR_HIGH(GPIOD_PIN9) | \ - PIN_ODR_HIGH(GPIOD_PIN10) | \ - PIN_ODR_HIGH(GPIOD_PIN11) | \ - PIN_ODR_LOW(GPIOD_LED4) | \ - PIN_ODR_LOW(GPIOD_LED3) | \ - PIN_ODR_LOW(GPIOD_LED5) | \ - PIN_ODR_LOW(GPIOD_LED6)) -#define VAL_GPIOD_AFRL (PIN_AFIO_AF(GPIOD_PIN0, 0U) | \ - PIN_AFIO_AF(GPIOD_PIN1, 0U) | \ - PIN_AFIO_AF(GPIOD_PIN2, 0U) | \ - PIN_AFIO_AF(GPIOD_PIN3, 0U) | \ - PIN_AFIO_AF(GPIOD_RESET, 0U) | \ - PIN_AFIO_AF(GPIOD_OVER_CURRENT, 0U) | \ - PIN_AFIO_AF(GPIOD_PIN6, 0U) | \ - PIN_AFIO_AF(GPIOD_PIN7, 0U)) -#define VAL_GPIOD_AFRH (PIN_AFIO_AF(GPIOD_PIN8, 0U) | \ - PIN_AFIO_AF(GPIOD_PIN9, 0U) | \ - PIN_AFIO_AF(GPIOD_PIN10, 0U) | \ - PIN_AFIO_AF(GPIOD_PIN11, 0U) | \ - PIN_AFIO_AF(GPIOD_LED4, 0U) | \ - PIN_AFIO_AF(GPIOD_LED3, 0U) | \ - PIN_AFIO_AF(GPIOD_LED5, 0U) | \ - PIN_AFIO_AF(GPIOD_LED6, 0U)) +#define VAL_GPIOD_MODER VAL_GPIO_MODER_ALL_DEFAULT +#define VAL_GPIOD_OTYPER VAL_GPIO_OTYPER_ALL_DEFAULT +#define VAL_GPIOD_OSPEEDR VAL_GPIO_OSPEEDR_ALL_DEFAULT +#define VAL_GPIOD_PUPDR VAL_GPIO_PUPDR_ALL_DEFAULT +#define VAL_GPIOD_ODR VAL_GPIO_ODR_ALL_DEFAULT +#define VAL_GPIOD_AFRL VAL_GPIO_AF_ALL_DEFAULT +#define VAL_GPIOD_AFRH VAL_GPIO_AF_ALL_DEFAULT /* * GPIOE setup: - * - * PE0 - INT1 (input floating). - * PE1 - INT2 (input floating). - * PE2 - PIN2 (input floating). - * PE3 - PIN3 (input floating). - * PE4 - PIN4 (input floating). - * PE5 - PIN5 (input floating). - * PE6 - PIN6 (input floating). - * PE7 - PIN7 (input floating). - * PE8 - PIN8 (input floating). - * PE9 - PIN9 (input floating). - * PE10 - PIN10 (input floating). - * PE11 - PIN11 (input floating). - * PE12 - PIN12 (input floating). - * PE13 - PIN13 (input floating). - * PE14 - PIN14 (input floating). - * PE15 - PIN15 (input floating). */ -#define VAL_GPIOE_MODER (EFI_PIN_MODE_DEFAULT(GPIOE_PIN0) | \ - EFI_PIN_MODE_DEFAULT(GPIOE_PIN1) | \ - EFI_PIN_MODE_DEFAULT(GPIOE_PIN2) | \ - EFI_PIN_MODE_DEFAULT(GPIOE_PIN3) | \ - EFI_PIN_MODE_DEFAULT(GPIOE_PIN4) | \ - EFI_PIN_MODE_DEFAULT(GPIOE_PIN5) | \ - EFI_PIN_MODE_DEFAULT(GPIOE_PIN6) | \ - EFI_PIN_MODE_DEFAULT(GPIOE_PIN7) | \ - EFI_PIN_MODE_DEFAULT(GPIOE_PIN8) | \ - EFI_PIN_MODE_DEFAULT(GPIOE_PIN9) | \ - EFI_PIN_MODE_DEFAULT(GPIOE_PIN10) | \ - EFI_PIN_MODE_DEFAULT(GPIOE_PIN11) | \ - EFI_PIN_MODE_DEFAULT(GPIOE_PIN12) | \ - EFI_PIN_MODE_DEFAULT(GPIOE_PIN13) | \ - EFI_PIN_MODE_DEFAULT(GPIOE_PIN14) | \ - EFI_PIN_MODE_DEFAULT(GPIOE_PIN15)) -#define VAL_GPIOE_OTYPER (PIN_OTYPE_PUSHPULL(GPIOE_PIN0) | \ - PIN_OTYPE_PUSHPULL(GPIOE_PIN1) | \ - PIN_OTYPE_PUSHPULL(GPIOE_PIN2) | \ - PIN_OTYPE_PUSHPULL(GPIOE_PIN3) | \ - PIN_OTYPE_PUSHPULL(GPIOE_PIN4) | \ - PIN_OTYPE_PUSHPULL(GPIOE_PIN5) | \ - PIN_OTYPE_PUSHPULL(GPIOE_PIN6) | \ - PIN_OTYPE_PUSHPULL(GPIOE_PIN7) | \ - PIN_OTYPE_PUSHPULL(GPIOE_PIN8) | \ - PIN_OTYPE_PUSHPULL(GPIOE_PIN9) | \ - PIN_OTYPE_PUSHPULL(GPIOE_PIN10) | \ - PIN_OTYPE_PUSHPULL(GPIOE_PIN11) | \ - PIN_OTYPE_PUSHPULL(GPIOE_PIN12) | \ - PIN_OTYPE_PUSHPULL(GPIOE_PIN13) | \ - PIN_OTYPE_PUSHPULL(GPIOE_PIN14) | \ - PIN_OTYPE_PUSHPULL(GPIOE_PIN15)) -#define VAL_GPIOE_OSPEEDR (DEFAULT_GPIO_SPEED(GPIOE_PIN0) | \ - DEFAULT_GPIO_SPEED(GPIOE_PIN1) | \ - DEFAULT_GPIO_SPEED(GPIOE_PIN2) | \ - DEFAULT_GPIO_SPEED(GPIOE_PIN3) | \ - DEFAULT_GPIO_SPEED(GPIOE_PIN4) | \ - DEFAULT_GPIO_SPEED(GPIOE_PIN5) | \ - DEFAULT_GPIO_SPEED(GPIOE_PIN6) | \ - DEFAULT_GPIO_SPEED(GPIOE_PIN7) | \ - DEFAULT_GPIO_SPEED(GPIOE_PIN8) | \ - DEFAULT_GPIO_SPEED(GPIOE_PIN9) | \ - DEFAULT_GPIO_SPEED(GPIOE_PIN10) | \ - DEFAULT_GPIO_SPEED(GPIOE_PIN11) | \ - DEFAULT_GPIO_SPEED(GPIOE_PIN12) | \ - DEFAULT_GPIO_SPEED(GPIOE_PIN13) | \ - DEFAULT_GPIO_SPEED(GPIOE_PIN14) | \ - DEFAULT_GPIO_SPEED(GPIOE_PIN15)) -#define VAL_GPIOE_PUPDR (EFI_DR_DEFAULT(GPIOE_PIN0) | \ - EFI_DR_DEFAULT(GPIOE_PIN1) | \ - EFI_DR_DEFAULT(GPIOE_PIN2) | \ - EFI_DR_DEFAULT(GPIOE_PIN3) | \ - EFI_DR_DEFAULT(GPIOE_PIN4) | \ - EFI_DR_DEFAULT(GPIOE_PIN5) | \ - EFI_DR_DEFAULT(GPIOE_PIN6) | \ - EFI_DR_DEFAULT(GPIOE_PIN7) | \ - EFI_DR_DEFAULT(GPIOE_PIN8) | \ - EFI_DR_DEFAULT(GPIOE_PIN9) | \ - EFI_DR_DEFAULT(GPIOE_PIN10) | \ - EFI_DR_DEFAULT(GPIOE_PIN11) | \ - EFI_DR_DEFAULT(GPIOE_PIN12) | \ - EFI_DR_DEFAULT(GPIOE_PIN13) | \ - EFI_DR_DEFAULT(GPIOE_PIN14) | \ - EFI_DR_DEFAULT(GPIOE_PIN15)) -#define VAL_GPIOE_ODR (PIN_ODR_HIGH(GPIOE_PIN0) | \ - PIN_ODR_HIGH(GPIOE_PIN1) | \ - PIN_ODR_HIGH(GPIOE_PIN2) | \ - PIN_ODR_HIGH(GPIOE_PIN3) | \ - PIN_ODR_HIGH(GPIOE_PIN4) | \ - PIN_ODR_HIGH(GPIOE_PIN5) | \ - PIN_ODR_HIGH(GPIOE_PIN6) | \ - PIN_ODR_HIGH(GPIOE_PIN7) | \ - PIN_ODR_HIGH(GPIOE_PIN8) | \ - PIN_ODR_HIGH(GPIOE_PIN9) | \ - PIN_ODR_HIGH(GPIOE_PIN10) | \ - PIN_ODR_HIGH(GPIOE_PIN11) | \ - PIN_ODR_HIGH(GPIOE_PIN12) | \ - PIN_ODR_HIGH(GPIOE_PIN13) | \ - PIN_ODR_HIGH(GPIOE_PIN14) | \ - PIN_ODR_HIGH(GPIOE_PIN15)) -#define VAL_GPIOE_AFRL (PIN_AFIO_AF(GPIOE_PIN0, 0U) | \ - PIN_AFIO_AF(GPIOE_PIN1, 0U) | \ - PIN_AFIO_AF(GPIOE_PIN2, 0U) | \ - PIN_AFIO_AF(GPIOE_PIN3, 0U) | \ - PIN_AFIO_AF(GPIOE_PIN4, 0U) | \ - PIN_AFIO_AF(GPIOE_PIN5, 0U) | \ - PIN_AFIO_AF(GPIOE_PIN6, 0U) | \ - PIN_AFIO_AF(GPIOE_PIN7, 0U)) -#define VAL_GPIOE_AFRH (PIN_AFIO_AF(GPIOE_PIN8, 0U) | \ - PIN_AFIO_AF(GPIOE_PIN9, 0U) | \ - PIN_AFIO_AF(GPIOE_PIN10, 0U) | \ - PIN_AFIO_AF(GPIOE_PIN11, 0U) | \ - PIN_AFIO_AF(GPIOE_PIN12, 0U) | \ - PIN_AFIO_AF(GPIOE_PIN13, 0U) | \ - PIN_AFIO_AF(GPIOE_PIN14, 0U) | \ - PIN_AFIO_AF(GPIOE_PIN15, 0U)) +#define VAL_GPIOE_MODER VAL_GPIO_MODER_ALL_DEFAULT +#define VAL_GPIOE_OTYPER VAL_GPIO_OTYPER_ALL_DEFAULT +#define VAL_GPIOE_OSPEEDR VAL_GPIO_OSPEEDR_ALL_DEFAULT +#define VAL_GPIOE_PUPDR VAL_GPIO_PUPDR_ALL_DEFAULT +#define VAL_GPIOE_ODR VAL_GPIO_ODR_ALL_DEFAULT +#define VAL_GPIOE_AFRL VAL_GPIO_AF_ALL_DEFAULT +#define VAL_GPIOE_AFRH VAL_GPIO_AF_ALL_DEFAULT /* * GPIOF setup: - * - * PF0 - PIN0 (input floating). - * PF1 - PIN1 (input floating). - * PF2 - PIN2 (input floating). - * PF3 - PIN3 (input floating). - * PF4 - PIN4 (input floating). - * PF5 - PIN5 (input floating). - * PF6 - PIN6 (input floating). - * PF7 - PIN7 (input floating). - * PF8 - PIN8 (input floating). - * PF9 - PIN9 (input floating). - * PF10 - PIN10 (input floating). - * PF11 - PIN11 (input floating). - * PF12 - PIN12 (input floating). - * PF13 - PIN13 (input floating). - * PF14 - PIN14 (input floating). - * PF15 - PIN15 (input floating). */ -#define VAL_GPIOF_MODER (EFI_PIN_MODE_DEFAULT(GPIOF_PIN0) | \ - EFI_PIN_MODE_DEFAULT(GPIOF_PIN1) | \ - EFI_PIN_MODE_DEFAULT(GPIOF_PIN2) | \ - EFI_PIN_MODE_DEFAULT(GPIOF_PIN3) | \ - EFI_PIN_MODE_DEFAULT(GPIOF_PIN4) | \ - EFI_PIN_MODE_DEFAULT(GPIOF_PIN5) | \ - EFI_PIN_MODE_DEFAULT(GPIOF_PIN6) | \ - EFI_PIN_MODE_DEFAULT(GPIOF_PIN7) | \ - EFI_PIN_MODE_DEFAULT(GPIOF_PIN8) | \ - EFI_PIN_MODE_DEFAULT(GPIOF_PIN9) | \ - EFI_PIN_MODE_DEFAULT(GPIOF_PIN10) | \ - EFI_PIN_MODE_DEFAULT(GPIOF_PIN11) | \ - EFI_PIN_MODE_DEFAULT(GPIOF_PIN12) | \ - EFI_PIN_MODE_DEFAULT(GPIOF_PIN13) | \ - EFI_PIN_MODE_DEFAULT(GPIOF_PIN14) | \ - EFI_PIN_MODE_DEFAULT(GPIOF_PIN15)) -#define VAL_GPIOF_OTYPER (PIN_OTYPE_PUSHPULL(GPIOF_PIN0) | \ - PIN_OTYPE_PUSHPULL(GPIOF_PIN1) | \ - PIN_OTYPE_PUSHPULL(GPIOF_PIN2) | \ - PIN_OTYPE_PUSHPULL(GPIOF_PIN3) | \ - PIN_OTYPE_PUSHPULL(GPIOF_PIN4) | \ - PIN_OTYPE_PUSHPULL(GPIOF_PIN5) | \ - PIN_OTYPE_PUSHPULL(GPIOF_PIN6) | \ - PIN_OTYPE_PUSHPULL(GPIOF_PIN7) | \ - PIN_OTYPE_PUSHPULL(GPIOF_PIN8) | \ - PIN_OTYPE_PUSHPULL(GPIOF_PIN9) | \ - PIN_OTYPE_PUSHPULL(GPIOF_PIN10) | \ - PIN_OTYPE_PUSHPULL(GPIOF_PIN11) | \ - PIN_OTYPE_PUSHPULL(GPIOF_PIN12) | \ - PIN_OTYPE_PUSHPULL(GPIOF_PIN13) | \ - PIN_OTYPE_PUSHPULL(GPIOF_PIN14) | \ - PIN_OTYPE_PUSHPULL(GPIOF_PIN15)) -#define VAL_GPIOF_OSPEEDR (DEFAULT_GPIO_SPEED(GPIOF_PIN0) | \ - DEFAULT_GPIO_SPEED(GPIOF_PIN1) | \ - DEFAULT_GPIO_SPEED(GPIOF_PIN2) | \ - DEFAULT_GPIO_SPEED(GPIOF_PIN3) | \ - DEFAULT_GPIO_SPEED(GPIOF_PIN4) | \ - DEFAULT_GPIO_SPEED(GPIOF_PIN5) | \ - DEFAULT_GPIO_SPEED(GPIOF_PIN6) | \ - DEFAULT_GPIO_SPEED(GPIOF_PIN7) | \ - DEFAULT_GPIO_SPEED(GPIOF_PIN8) | \ - DEFAULT_GPIO_SPEED(GPIOF_PIN9) | \ - DEFAULT_GPIO_SPEED(GPIOF_PIN10) | \ - DEFAULT_GPIO_SPEED(GPIOF_PIN11) | \ - DEFAULT_GPIO_SPEED(GPIOF_PIN12) | \ - DEFAULT_GPIO_SPEED(GPIOF_PIN13) | \ - DEFAULT_GPIO_SPEED(GPIOF_PIN14) | \ - DEFAULT_GPIO_SPEED(GPIOF_PIN15)) -#define VAL_GPIOF_PUPDR (EFI_DR_DEFAULT(GPIOF_PIN0) | \ - EFI_DR_DEFAULT(GPIOF_PIN1) | \ - EFI_DR_DEFAULT(GPIOF_PIN2) | \ - EFI_DR_DEFAULT(GPIOF_PIN3) | \ - EFI_DR_DEFAULT(GPIOF_PIN4) | \ - EFI_DR_DEFAULT(GPIOF_PIN5) | \ - EFI_DR_DEFAULT(GPIOF_PIN6) | \ - EFI_DR_DEFAULT(GPIOF_PIN7) | \ - EFI_DR_DEFAULT(GPIOF_PIN8) | \ - EFI_DR_DEFAULT(GPIOF_PIN9) | \ - EFI_DR_DEFAULT(GPIOF_PIN10) | \ - EFI_DR_DEFAULT(GPIOF_PIN11) | \ - EFI_DR_DEFAULT(GPIOF_PIN12) | \ - EFI_DR_DEFAULT(GPIOF_PIN13) | \ - EFI_DR_DEFAULT(GPIOF_PIN14) | \ - EFI_DR_DEFAULT(GPIOF_PIN15)) -#define VAL_GPIOF_ODR (PIN_ODR_HIGH(GPIOF_PIN0) | \ - PIN_ODR_HIGH(GPIOF_PIN1) | \ - PIN_ODR_HIGH(GPIOF_PIN2) | \ - PIN_ODR_HIGH(GPIOF_PIN3) | \ - PIN_ODR_HIGH(GPIOF_PIN4) | \ - PIN_ODR_HIGH(GPIOF_PIN5) | \ - PIN_ODR_HIGH(GPIOF_PIN6) | \ - PIN_ODR_HIGH(GPIOF_PIN7) | \ - PIN_ODR_HIGH(GPIOF_PIN8) | \ - PIN_ODR_HIGH(GPIOF_PIN9) | \ - PIN_ODR_HIGH(GPIOF_PIN10) | \ - PIN_ODR_HIGH(GPIOF_PIN11) | \ - PIN_ODR_HIGH(GPIOF_PIN12) | \ - PIN_ODR_HIGH(GPIOF_PIN13) | \ - PIN_ODR_HIGH(GPIOF_PIN14) | \ - PIN_ODR_HIGH(GPIOF_PIN15)) -#define VAL_GPIOF_AFRL (PIN_AFIO_AF(GPIOF_PIN0, 0U) | \ - PIN_AFIO_AF(GPIOF_PIN1, 0U) | \ - PIN_AFIO_AF(GPIOF_PIN2, 0U) | \ - PIN_AFIO_AF(GPIOF_PIN3, 0U) | \ - PIN_AFIO_AF(GPIOF_PIN4, 0U) | \ - PIN_AFIO_AF(GPIOF_PIN5, 0U) | \ - PIN_AFIO_AF(GPIOF_PIN6, 0U) | \ - PIN_AFIO_AF(GPIOF_PIN7, 0U)) -#define VAL_GPIOF_AFRH (PIN_AFIO_AF(GPIOF_PIN8, 0U) | \ - PIN_AFIO_AF(GPIOF_PIN9, 0U) | \ - PIN_AFIO_AF(GPIOF_PIN10, 0U) | \ - PIN_AFIO_AF(GPIOF_PIN11, 0U) | \ - PIN_AFIO_AF(GPIOF_PIN12, 0U) | \ - PIN_AFIO_AF(GPIOF_PIN13, 0U) | \ - PIN_AFIO_AF(GPIOF_PIN14, 0U) | \ - PIN_AFIO_AF(GPIOF_PIN15, 0U)) +#define VAL_GPIOF_MODER VAL_GPIO_MODER_ALL_DEFAULT +#define VAL_GPIOF_OTYPER VAL_GPIO_OTYPER_ALL_DEFAULT +#define VAL_GPIOF_OSPEEDR VAL_GPIO_OSPEEDR_ALL_DEFAULT +#define VAL_GPIOF_PUPDR VAL_GPIO_PUPDR_ALL_DEFAULT +#define VAL_GPIOF_ODR VAL_GPIO_ODR_ALL_DEFAULT +#define VAL_GPIOF_AFRL VAL_GPIO_AF_ALL_DEFAULT +#define VAL_GPIOF_AFRH VAL_GPIO_AF_ALL_DEFAULT /* * GPIOG setup: - * - * PG0 - PIN0 (input floating). - * PG1 - PIN1 (input floating). - * PG2 - PIN2 (input floating). - * PG3 - PIN3 (input floating). - * PG4 - PIN4 (input floating). - * PG5 - PIN5 (input floating). - * PG6 - PIN6 (input floating). - * PG7 - PIN7 (input floating). - * PG8 - PIN8 (input floating). - * PG9 - PIN9 (input floating). - * PG10 - PIN10 (input floating). - * PG11 - PIN11 (input floating). - * PG12 - PIN12 (input floating). - * PG13 - PIN13 (input floating). - * PG14 - PIN14 (input floating). - * PG15 - PIN15 (input floating). */ -#define VAL_GPIOG_MODER (EFI_PIN_MODE_DEFAULT(GPIOG_PIN0) | \ - EFI_PIN_MODE_DEFAULT(GPIOG_PIN1) | \ - EFI_PIN_MODE_DEFAULT(GPIOG_PIN2) | \ - EFI_PIN_MODE_DEFAULT(GPIOG_PIN3) | \ - EFI_PIN_MODE_DEFAULT(GPIOG_PIN4) | \ - EFI_PIN_MODE_DEFAULT(GPIOG_PIN5) | \ - EFI_PIN_MODE_DEFAULT(GPIOG_PIN6) | \ - EFI_PIN_MODE_DEFAULT(GPIOG_PIN7) | \ - EFI_PIN_MODE_DEFAULT(GPIOG_PIN8) | \ - EFI_PIN_MODE_DEFAULT(GPIOG_PIN9) | \ - EFI_PIN_MODE_DEFAULT(GPIOG_PIN10) | \ - EFI_PIN_MODE_DEFAULT(GPIOG_PIN11) | \ - EFI_PIN_MODE_DEFAULT(GPIOG_PIN12) | \ - EFI_PIN_MODE_DEFAULT(GPIOG_PIN13) | \ - EFI_PIN_MODE_DEFAULT(GPIOG_PIN14) | \ - EFI_PIN_MODE_DEFAULT(GPIOG_PIN15)) -#define VAL_GPIOG_OTYPER (PIN_OTYPE_PUSHPULL(GPIOG_PIN0) | \ - PIN_OTYPE_PUSHPULL(GPIOG_PIN1) | \ - PIN_OTYPE_PUSHPULL(GPIOG_PIN2) | \ - PIN_OTYPE_PUSHPULL(GPIOG_PIN3) | \ - PIN_OTYPE_PUSHPULL(GPIOG_PIN4) | \ - PIN_OTYPE_PUSHPULL(GPIOG_PIN5) | \ - PIN_OTYPE_PUSHPULL(GPIOG_PIN6) | \ - PIN_OTYPE_PUSHPULL(GPIOG_PIN7) | \ - PIN_OTYPE_PUSHPULL(GPIOG_PIN8) | \ - PIN_OTYPE_PUSHPULL(GPIOG_PIN9) | \ - PIN_OTYPE_PUSHPULL(GPIOG_PIN10) | \ - PIN_OTYPE_PUSHPULL(GPIOG_PIN11) | \ - PIN_OTYPE_PUSHPULL(GPIOG_PIN12) | \ - PIN_OTYPE_PUSHPULL(GPIOG_PIN13) | \ - PIN_OTYPE_PUSHPULL(GPIOG_PIN14) | \ - PIN_OTYPE_PUSHPULL(GPIOG_PIN15)) -#define VAL_GPIOG_OSPEEDR (DEFAULT_GPIO_SPEED(GPIOG_PIN0) | \ - DEFAULT_GPIO_SPEED(GPIOG_PIN1) | \ - DEFAULT_GPIO_SPEED(GPIOG_PIN2) | \ - DEFAULT_GPIO_SPEED(GPIOG_PIN3) | \ - DEFAULT_GPIO_SPEED(GPIOG_PIN4) | \ - DEFAULT_GPIO_SPEED(GPIOG_PIN5) | \ - DEFAULT_GPIO_SPEED(GPIOG_PIN6) | \ - DEFAULT_GPIO_SPEED(GPIOG_PIN7) | \ - DEFAULT_GPIO_SPEED(GPIOG_PIN8) | \ - DEFAULT_GPIO_SPEED(GPIOG_PIN9) | \ - DEFAULT_GPIO_SPEED(GPIOG_PIN10) | \ - DEFAULT_GPIO_SPEED(GPIOG_PIN11) | \ - DEFAULT_GPIO_SPEED(GPIOG_PIN12) | \ - DEFAULT_GPIO_SPEED(GPIOG_PIN13) | \ - DEFAULT_GPIO_SPEED(GPIOG_PIN14) | \ - DEFAULT_GPIO_SPEED(GPIOG_PIN15)) -#define VAL_GPIOG_PUPDR (EFI_DR_DEFAULT(GPIOG_PIN0) | \ - EFI_DR_DEFAULT(GPIOG_PIN1) | \ - EFI_DR_DEFAULT(GPIOG_PIN2) | \ - EFI_DR_DEFAULT(GPIOG_PIN3) | \ - EFI_DR_DEFAULT(GPIOG_PIN4) | \ - EFI_DR_DEFAULT(GPIOG_PIN5) | \ - EFI_DR_DEFAULT(GPIOG_PIN6) | \ - EFI_DR_DEFAULT(GPIOG_PIN7) | \ - EFI_DR_DEFAULT(GPIOG_PIN8) | \ - EFI_DR_DEFAULT(GPIOG_PIN9) | \ - EFI_DR_DEFAULT(GPIOG_PIN10) | \ - EFI_DR_DEFAULT(GPIOG_PIN11) | \ - EFI_DR_DEFAULT(GPIOG_PIN12) | \ - EFI_DR_DEFAULT(GPIOG_PIN13) | \ - EFI_DR_DEFAULT(GPIOG_PIN14) | \ - EFI_DR_DEFAULT(GPIOG_PIN15)) -#define VAL_GPIOG_ODR (PIN_ODR_HIGH(GPIOG_PIN0) | \ - PIN_ODR_HIGH(GPIOG_PIN1) | \ - PIN_ODR_HIGH(GPIOG_PIN2) | \ - PIN_ODR_HIGH(GPIOG_PIN3) | \ - PIN_ODR_HIGH(GPIOG_PIN4) | \ - PIN_ODR_HIGH(GPIOG_PIN5) | \ - PIN_ODR_HIGH(GPIOG_PIN6) | \ - PIN_ODR_HIGH(GPIOG_PIN7) | \ - PIN_ODR_HIGH(GPIOG_PIN8) | \ - PIN_ODR_HIGH(GPIOG_PIN9) | \ - PIN_ODR_HIGH(GPIOG_PIN10) | \ - PIN_ODR_HIGH(GPIOG_PIN11) | \ - PIN_ODR_HIGH(GPIOG_PIN12) | \ - PIN_ODR_HIGH(GPIOG_PIN13) | \ - PIN_ODR_HIGH(GPIOG_PIN14) | \ - PIN_ODR_HIGH(GPIOG_PIN15)) -#define VAL_GPIOG_AFRL (PIN_AFIO_AF(GPIOG_PIN0, 0U) | \ - PIN_AFIO_AF(GPIOG_PIN1, 0U) | \ - PIN_AFIO_AF(GPIOG_PIN2, 0U) | \ - PIN_AFIO_AF(GPIOG_PIN3, 0U) | \ - PIN_AFIO_AF(GPIOG_PIN4, 0U) | \ - PIN_AFIO_AF(GPIOG_PIN5, 0U) | \ - PIN_AFIO_AF(GPIOG_PIN6, 0U) | \ - PIN_AFIO_AF(GPIOG_PIN7, 0U)) -#define VAL_GPIOG_AFRH (PIN_AFIO_AF(GPIOG_PIN8, 0U) | \ - PIN_AFIO_AF(GPIOG_PIN9, 0U) | \ - PIN_AFIO_AF(GPIOG_PIN10, 0U) | \ - PIN_AFIO_AF(GPIOG_PIN11, 0U) | \ - PIN_AFIO_AF(GPIOG_PIN12, 0U) | \ - PIN_AFIO_AF(GPIOG_PIN13, 0U) | \ - PIN_AFIO_AF(GPIOG_PIN14, 0U) | \ - PIN_AFIO_AF(GPIOG_PIN15, 0U)) +#define VAL_GPIOG_MODER VAL_GPIO_MODER_ALL_DEFAULT +#define VAL_GPIOG_OTYPER VAL_GPIO_OTYPER_ALL_DEFAULT +#define VAL_GPIOG_OSPEEDR VAL_GPIO_OSPEEDR_ALL_DEFAULT +#define VAL_GPIOG_PUPDR VAL_GPIO_PUPDR_ALL_DEFAULT +#define VAL_GPIOG_ODR VAL_GPIO_ODR_ALL_DEFAULT +#define VAL_GPIOG_AFRL VAL_GPIO_AF_ALL_DEFAULT +#define VAL_GPIOG_AFRH VAL_GPIO_AF_ALL_DEFAULT /* * GPIOH setup: - * - * PH0 - OSC_IN (input floating). - * PH1 - OSC_OUT (input floating). - * PH2 - PIN2 (input floating). - * PH3 - PIN3 (input floating). - * PH4 - PIN4 (input floating). - * PH5 - PIN5 (input floating). - * PH6 - PIN6 (input floating). - * PH7 - PIN7 (input floating). - * PH8 - PIN8 (input floating). - * PH9 - PIN9 (input floating). - * PH10 - PIN10 (input floating). - * PH11 - PIN11 (input floating). - * PH12 - PIN12 (input floating). - * PH13 - PIN13 (input floating). - * PH14 - PIN14 (input floating). - * PH15 - PIN15 (input floating). */ -#define VAL_GPIOH_MODER (EFI_PIN_MODE_DEFAULT(GPIOH_OSC_IN) | \ - EFI_PIN_MODE_DEFAULT(GPIOH_OSC_OUT) | \ - EFI_PIN_MODE_DEFAULT(GPIOH_PIN2) | \ - EFI_PIN_MODE_DEFAULT(GPIOH_PIN3) | \ - EFI_PIN_MODE_DEFAULT(GPIOH_PIN4) | \ - EFI_PIN_MODE_DEFAULT(GPIOH_PIN5) | \ - EFI_PIN_MODE_DEFAULT(GPIOH_PIN6) | \ - EFI_PIN_MODE_DEFAULT(GPIOH_PIN7) | \ - EFI_PIN_MODE_DEFAULT(GPIOH_PIN8) | \ - EFI_PIN_MODE_DEFAULT(GPIOH_PIN9) | \ - EFI_PIN_MODE_DEFAULT(GPIOH_PIN10) | \ - EFI_PIN_MODE_DEFAULT(GPIOH_PIN11) | \ - EFI_PIN_MODE_DEFAULT(GPIOH_PIN12) | \ - EFI_PIN_MODE_DEFAULT(GPIOH_PIN13) | \ - EFI_PIN_MODE_DEFAULT(GPIOH_PIN14) | \ - EFI_PIN_MODE_DEFAULT(GPIOH_PIN15)) -#define VAL_GPIOH_OTYPER (PIN_OTYPE_PUSHPULL(GPIOH_OSC_IN) | \ - PIN_OTYPE_PUSHPULL(GPIOH_OSC_OUT) | \ - PIN_OTYPE_PUSHPULL(GPIOH_PIN2) | \ - PIN_OTYPE_PUSHPULL(GPIOH_PIN3) | \ - PIN_OTYPE_PUSHPULL(GPIOH_PIN4) | \ - PIN_OTYPE_PUSHPULL(GPIOH_PIN5) | \ - PIN_OTYPE_PUSHPULL(GPIOH_PIN6) | \ - PIN_OTYPE_PUSHPULL(GPIOH_PIN7) | \ - PIN_OTYPE_PUSHPULL(GPIOH_PIN8) | \ - PIN_OTYPE_PUSHPULL(GPIOH_PIN9) | \ - PIN_OTYPE_PUSHPULL(GPIOH_PIN10) | \ - PIN_OTYPE_PUSHPULL(GPIOH_PIN11) | \ - PIN_OTYPE_PUSHPULL(GPIOH_PIN12) | \ - PIN_OTYPE_PUSHPULL(GPIOH_PIN13) | \ - PIN_OTYPE_PUSHPULL(GPIOH_PIN14) | \ - PIN_OTYPE_PUSHPULL(GPIOH_PIN15)) -#define VAL_GPIOH_OSPEEDR (DEFAULT_GPIO_SPEED(GPIOH_OSC_IN) | \ - DEFAULT_GPIO_SPEED(GPIOH_OSC_OUT) | \ - DEFAULT_GPIO_SPEED(GPIOH_PIN2) | \ - DEFAULT_GPIO_SPEED(GPIOH_PIN3) | \ - DEFAULT_GPIO_SPEED(GPIOH_PIN4) | \ - DEFAULT_GPIO_SPEED(GPIOH_PIN5) | \ - DEFAULT_GPIO_SPEED(GPIOH_PIN6) | \ - DEFAULT_GPIO_SPEED(GPIOH_PIN7) | \ - DEFAULT_GPIO_SPEED(GPIOH_PIN8) | \ - DEFAULT_GPIO_SPEED(GPIOH_PIN9) | \ - DEFAULT_GPIO_SPEED(GPIOH_PIN10) | \ - DEFAULT_GPIO_SPEED(GPIOH_PIN11) | \ - DEFAULT_GPIO_SPEED(GPIOH_PIN12) | \ - DEFAULT_GPIO_SPEED(GPIOH_PIN13) | \ - DEFAULT_GPIO_SPEED(GPIOH_PIN14) | \ - DEFAULT_GPIO_SPEED(GPIOH_PIN15)) -#define VAL_GPIOH_PUPDR (EFI_DR_DEFAULT(GPIOH_OSC_IN) | \ - EFI_DR_DEFAULT(GPIOH_OSC_OUT) | \ - EFI_DR_DEFAULT(GPIOH_PIN2) | \ - EFI_DR_DEFAULT(GPIOH_PIN3) | \ - EFI_DR_DEFAULT(GPIOH_PIN4) | \ - EFI_DR_DEFAULT(GPIOH_PIN5) | \ - EFI_DR_DEFAULT(GPIOH_PIN6) | \ - EFI_DR_DEFAULT(GPIOH_PIN7) | \ - EFI_DR_DEFAULT(GPIOH_PIN8) | \ - EFI_DR_DEFAULT(GPIOH_PIN9) | \ - EFI_DR_DEFAULT(GPIOH_PIN10) | \ - EFI_DR_DEFAULT(GPIOH_PIN11) | \ - EFI_DR_DEFAULT(GPIOH_PIN12) | \ - EFI_DR_DEFAULT(GPIOH_PIN13) | \ - EFI_DR_DEFAULT(GPIOH_PIN14) | \ - EFI_DR_DEFAULT(GPIOH_PIN15)) -#define VAL_GPIOH_ODR (PIN_ODR_HIGH(GPIOH_OSC_IN) | \ - PIN_ODR_HIGH(GPIOH_OSC_OUT) | \ - PIN_ODR_HIGH(GPIOH_PIN2) | \ - PIN_ODR_HIGH(GPIOH_PIN3) | \ - PIN_ODR_HIGH(GPIOH_PIN4) | \ - PIN_ODR_HIGH(GPIOH_PIN5) | \ - PIN_ODR_HIGH(GPIOH_PIN6) | \ - PIN_ODR_HIGH(GPIOH_PIN7) | \ - PIN_ODR_HIGH(GPIOH_PIN8) | \ - PIN_ODR_HIGH(GPIOH_PIN9) | \ - PIN_ODR_HIGH(GPIOH_PIN10) | \ - PIN_ODR_HIGH(GPIOH_PIN11) | \ - PIN_ODR_HIGH(GPIOH_PIN12) | \ - PIN_ODR_HIGH(GPIOH_PIN13) | \ - PIN_ODR_HIGH(GPIOH_PIN14) | \ - PIN_ODR_HIGH(GPIOH_PIN15)) -#define VAL_GPIOH_AFRL (PIN_AFIO_AF(GPIOH_OSC_IN, 0U) | \ - PIN_AFIO_AF(GPIOH_OSC_OUT, 0U) | \ - PIN_AFIO_AF(GPIOH_PIN2, 0U) | \ - PIN_AFIO_AF(GPIOH_PIN3, 0U) | \ - PIN_AFIO_AF(GPIOH_PIN4, 0U) | \ - PIN_AFIO_AF(GPIOH_PIN5, 0U) | \ - PIN_AFIO_AF(GPIOH_PIN6, 0U) | \ - PIN_AFIO_AF(GPIOH_PIN7, 0U)) -#define VAL_GPIOH_AFRH (PIN_AFIO_AF(GPIOH_PIN8, 0U) | \ - PIN_AFIO_AF(GPIOH_PIN9, 0U) | \ - PIN_AFIO_AF(GPIOH_PIN10, 0U) | \ - PIN_AFIO_AF(GPIOH_PIN11, 0U) | \ - PIN_AFIO_AF(GPIOH_PIN12, 0U) | \ - PIN_AFIO_AF(GPIOH_PIN13, 0U) | \ - PIN_AFIO_AF(GPIOH_PIN14, 0U) | \ - PIN_AFIO_AF(GPIOH_PIN15, 0U)) +#define VAL_GPIOH_MODER VAL_GPIO_MODER_ALL_DEFAULT +#define VAL_GPIOH_OTYPER VAL_GPIO_OTYPER_ALL_DEFAULT +#define VAL_GPIOH_OSPEEDR VAL_GPIO_OSPEEDR_ALL_DEFAULT +#define VAL_GPIOH_PUPDR VAL_GPIO_PUPDR_ALL_DEFAULT +#define VAL_GPIOH_ODR VAL_GPIO_ODR_ALL_DEFAULT +#define VAL_GPIOH_AFRL VAL_GPIO_AF_ALL_DEFAULT +#define VAL_GPIOH_AFRH VAL_GPIO_AF_ALL_DEFAULT /* * GPIOI setup: - * - * PI0 - PIN0 (input floating). - * PI1 - PIN1 (input floating). - * PI2 - PIN2 (input floating). - * PI3 - PIN3 (input floating). - * PI4 - PIN4 (input floating). - * PI5 - PIN5 (input floating). - * PI6 - PIN6 (input floating). - * PI7 - PIN7 (input floating). - * PI8 - PIN8 (input floating). - * PI9 - PIN9 (input floating). - * PI10 - PIN10 (input floating). - * PI11 - PIN11 (input floating). - * PI12 - PIN12 (input floating). - * PI13 - PIN13 (input floating). - * PI14 - PIN14 (input floating). - * PI15 - PIN15 (input floating). */ -#define VAL_GPIOI_MODER (EFI_PIN_MODE_DEFAULT(GPIOI_PIN0) | \ - EFI_PIN_MODE_DEFAULT(GPIOI_PIN1) | \ - EFI_PIN_MODE_DEFAULT(GPIOI_PIN2) | \ - EFI_PIN_MODE_DEFAULT(GPIOI_PIN3) | \ - EFI_PIN_MODE_DEFAULT(GPIOI_PIN4) | \ - EFI_PIN_MODE_DEFAULT(GPIOI_PIN5) | \ - EFI_PIN_MODE_DEFAULT(GPIOI_PIN6) | \ - EFI_PIN_MODE_DEFAULT(GPIOI_PIN7) | \ - EFI_PIN_MODE_DEFAULT(GPIOI_PIN8) | \ - EFI_PIN_MODE_DEFAULT(GPIOI_PIN9) | \ - EFI_PIN_MODE_DEFAULT(GPIOI_PIN10) | \ - EFI_PIN_MODE_DEFAULT(GPIOI_PIN11) | \ - EFI_PIN_MODE_DEFAULT(GPIOI_PIN12) | \ - EFI_PIN_MODE_DEFAULT(GPIOI_PIN13) | \ - EFI_PIN_MODE_DEFAULT(GPIOI_PIN14) | \ - EFI_PIN_MODE_DEFAULT(GPIOI_PIN15)) -#define VAL_GPIOI_OTYPER (PIN_OTYPE_PUSHPULL(GPIOI_PIN0) | \ - PIN_OTYPE_PUSHPULL(GPIOI_PIN1) | \ - PIN_OTYPE_PUSHPULL(GPIOI_PIN2) | \ - PIN_OTYPE_PUSHPULL(GPIOI_PIN3) | \ - PIN_OTYPE_PUSHPULL(GPIOI_PIN4) | \ - PIN_OTYPE_PUSHPULL(GPIOI_PIN5) | \ - PIN_OTYPE_PUSHPULL(GPIOI_PIN6) | \ - PIN_OTYPE_PUSHPULL(GPIOI_PIN7) | \ - PIN_OTYPE_PUSHPULL(GPIOI_PIN8) | \ - PIN_OTYPE_PUSHPULL(GPIOI_PIN9) | \ - PIN_OTYPE_PUSHPULL(GPIOI_PIN10) | \ - PIN_OTYPE_PUSHPULL(GPIOI_PIN11) | \ - PIN_OTYPE_PUSHPULL(GPIOI_PIN12) | \ - PIN_OTYPE_PUSHPULL(GPIOI_PIN13) | \ - PIN_OTYPE_PUSHPULL(GPIOI_PIN14) | \ - PIN_OTYPE_PUSHPULL(GPIOI_PIN15)) -#define VAL_GPIOI_OSPEEDR (DEFAULT_GPIO_SPEED(GPIOI_PIN0) | \ - DEFAULT_GPIO_SPEED(GPIOI_PIN1) | \ - DEFAULT_GPIO_SPEED(GPIOI_PIN2) | \ - DEFAULT_GPIO_SPEED(GPIOI_PIN3) | \ - DEFAULT_GPIO_SPEED(GPIOI_PIN4) | \ - DEFAULT_GPIO_SPEED(GPIOI_PIN5) | \ - DEFAULT_GPIO_SPEED(GPIOI_PIN6) | \ - DEFAULT_GPIO_SPEED(GPIOI_PIN7) | \ - DEFAULT_GPIO_SPEED(GPIOI_PIN8) | \ - DEFAULT_GPIO_SPEED(GPIOI_PIN9) | \ - DEFAULT_GPIO_SPEED(GPIOI_PIN10) | \ - DEFAULT_GPIO_SPEED(GPIOI_PIN11) | \ - DEFAULT_GPIO_SPEED(GPIOI_PIN12) | \ - DEFAULT_GPIO_SPEED(GPIOI_PIN13) | \ - DEFAULT_GPIO_SPEED(GPIOI_PIN14) | \ - DEFAULT_GPIO_SPEED(GPIOI_PIN15)) -#define VAL_GPIOI_PUPDR (EFI_DR_DEFAULT(GPIOI_PIN0) | \ - EFI_DR_DEFAULT(GPIOI_PIN1) | \ - EFI_DR_DEFAULT(GPIOI_PIN2) | \ - EFI_DR_DEFAULT(GPIOI_PIN3) | \ - EFI_DR_DEFAULT(GPIOI_PIN4) | \ - EFI_DR_DEFAULT(GPIOI_PIN5) | \ - EFI_DR_DEFAULT(GPIOI_PIN6) | \ - EFI_DR_DEFAULT(GPIOI_PIN7) | \ - EFI_DR_DEFAULT(GPIOI_PIN8) | \ - EFI_DR_DEFAULT(GPIOI_PIN9) | \ - EFI_DR_DEFAULT(GPIOI_PIN10) | \ - EFI_DR_DEFAULT(GPIOI_PIN11) | \ - EFI_DR_DEFAULT(GPIOI_PIN12) | \ - EFI_DR_DEFAULT(GPIOI_PIN13) | \ - EFI_DR_DEFAULT(GPIOI_PIN14) | \ - EFI_DR_DEFAULT(GPIOI_PIN15)) -#define VAL_GPIOI_ODR (PIN_ODR_HIGH(GPIOI_PIN0) | \ - PIN_ODR_HIGH(GPIOI_PIN1) | \ - PIN_ODR_HIGH(GPIOI_PIN2) | \ - PIN_ODR_HIGH(GPIOI_PIN3) | \ - PIN_ODR_HIGH(GPIOI_PIN4) | \ - PIN_ODR_HIGH(GPIOI_PIN5) | \ - PIN_ODR_HIGH(GPIOI_PIN6) | \ - PIN_ODR_HIGH(GPIOI_PIN7) | \ - PIN_ODR_HIGH(GPIOI_PIN8) | \ - PIN_ODR_HIGH(GPIOI_PIN9) | \ - PIN_ODR_HIGH(GPIOI_PIN10) | \ - PIN_ODR_HIGH(GPIOI_PIN11) | \ - PIN_ODR_HIGH(GPIOI_PIN12) | \ - PIN_ODR_HIGH(GPIOI_PIN13) | \ - PIN_ODR_HIGH(GPIOI_PIN14) | \ - PIN_ODR_HIGH(GPIOI_PIN15)) -#define VAL_GPIOI_AFRL (PIN_AFIO_AF(GPIOI_PIN0, 0U) | \ - PIN_AFIO_AF(GPIOI_PIN1, 0U) | \ - PIN_AFIO_AF(GPIOI_PIN2, 0U) | \ - PIN_AFIO_AF(GPIOI_PIN3, 0U) | \ - PIN_AFIO_AF(GPIOI_PIN4, 0U) | \ - PIN_AFIO_AF(GPIOI_PIN5, 0U) | \ - PIN_AFIO_AF(GPIOI_PIN6, 0U) | \ - PIN_AFIO_AF(GPIOI_PIN7, 0U)) -#define VAL_GPIOI_AFRH (PIN_AFIO_AF(GPIOI_PIN8, 0U) | \ - PIN_AFIO_AF(GPIOI_PIN9, 0U) | \ - PIN_AFIO_AF(GPIOI_PIN10, 0U) | \ - PIN_AFIO_AF(GPIOI_PIN11, 0U) | \ - PIN_AFIO_AF(GPIOI_PIN12, 0U) | \ - PIN_AFIO_AF(GPIOI_PIN13, 0U) | \ - PIN_AFIO_AF(GPIOI_PIN14, 0U) | \ - PIN_AFIO_AF(GPIOI_PIN15, 0U)) - - +#define VAL_GPIOI_MODER VAL_GPIO_MODER_ALL_DEFAULT +#define VAL_GPIOI_OTYPER VAL_GPIO_OTYPER_ALL_DEFAULT +#define VAL_GPIOI_OSPEEDR VAL_GPIO_OSPEEDR_ALL_DEFAULT +#define VAL_GPIOI_PUPDR VAL_GPIO_PUPDR_ALL_DEFAULT +#define VAL_GPIOI_ODR VAL_GPIO_ODR_ALL_DEFAULT +#define VAL_GPIOI_AFRL VAL_GPIO_AF_ALL_DEFAULT +#define VAL_GPIOI_AFRH VAL_GPIO_AF_ALL_DEFAULT #endif /* BOARD_H */ diff --git a/firmware/config/boards/subaru-ej20gn/board.h b/firmware/config/boards/subaru-ej20gn/board.h index 077460348c..75715169b1 100644 --- a/firmware/config/boards/subaru-ej20gn/board.h +++ b/firmware/config/boards/subaru-ej20gn/board.h @@ -34,9 +34,6 @@ #undef BOARD_TLE8888_COUNT #define BOARD_TLE8888_COUNT 0 -#undef BOARD_EXT_GPIOCHIPS -#define BOARD_EXT_GPIOCHIPS (BOARD_TLE6240_COUNT + BOARD_MC33972_COUNT + BOARD_TLE8888_COUNT) - /* * Board oscillators-related settings. * NOTE: LSE not fitted. diff --git a/firmware/config/boards/subaru-ej20gn/board_configuration.cpp b/firmware/config/boards/subaru-ej20gn/board_configuration.cpp index 6b57cb0457..7790ae45bb 100644 --- a/firmware/config/boards/subaru-ej20gn/board_configuration.cpp +++ b/firmware/config/boards/subaru-ej20gn/board_configuration.cpp @@ -221,7 +221,6 @@ void setBoardConfigurationOverrides(void) { #endif engineConfiguration->isCJ125Enabled = false; - engineConfiguration->canDeviceMode = CD_USE_CAN1; engineConfiguration->canTxPin = GPIOD_0; engineConfiguration->canRxPin = GPIOD_1; diff --git a/firmware/config/boards/subaru-ej20gn/efifeatures.h b/firmware/config/boards/subaru-ej20gn/efifeatures.h index 93e09ab7cc..5a9ebc6ef2 100644 --- a/firmware/config/boards/subaru-ej20gn/efifeatures.h +++ b/firmware/config/boards/subaru-ej20gn/efifeatures.h @@ -9,8 +9,7 @@ #include "../../stm32f7ems/efifeatures.h" -#ifndef EFIFEATURES_SUBARUEJ20G_H_ -#define EFIFEATURES_SUBARUEJ20G_H_ +#pragma once /* debug console */ #undef EFI_USE_UART_FOR_CONSOLE @@ -25,10 +24,6 @@ /* do not use serial device for console */ #undef TS_SERIAL_DEVICE -/* additional space for pins on gpioext */ -#undef BOARD_EXT_PINREPOPINS -#define BOARD_EXT_PINREPOPINS (16 + 22) - #undef EFI_RTC #define EFI_RTC FALSE @@ -113,4 +108,3 @@ #define EFI_NARROW_EGO_AVERAGING TRUE -#endif /* EFIFEATURES_SUBARUEJ20G_H_ */ diff --git a/firmware/config/engines/bmw_m73.cpp b/firmware/config/engines/bmw_m73.cpp index 1d081ba7b0..69dc1bec2e 100644 --- a/firmware/config/engines/bmw_m73.cpp +++ b/firmware/config/engines/bmw_m73.cpp @@ -30,8 +30,8 @@ * ECU pin 6: GND ECU * ECU pin 15: OUT BLK injector #2 * ECU pin 20: IN WHT hall effect camshaft sensor signal - * ECU pin 21: GND BRN BLK CLT sensor - * ECU pin 22: IN RED/BRN GRN CLT sensor + * ECU pin 21: GND BRN BLK CLT sensor (only on first ECU) + * ECU pin 22: IN RED/BRN GRN CLT sensor (only on first ECU) * ECU pin 27: OUT ORG injector #6 * ECU pin 28: OUT RED injector #5 * ECU pin 32: IN ORG VR positive crankshaft sensor - only 2x 5k per channel, R111 not installed, W1002 not installed @@ -39,7 +39,7 @@ * ECU pin 41: OUT BRN/WHT BLU injector #1 * ECU pin 45: GND crankshaft shield * ECU pin 46: IN BLK BLU VR negative crankshaft sensor - * + * ECU pin 47: IN IAT sensor (only on second ECU) * * Plug #4 40 pin * ECU pin 6: IN start signal from ignition key @@ -79,6 +79,7 @@ void m73engine(DECLARE_CONFIG_PARAMETER_SIGNATURE) { engineConfiguration->specs.cylindersCount = 12; engineConfiguration->specs.displacement = 5.4; engineConfiguration->specs.firingOrder = FO_1_7_5_11_3_9_6_12_2_8_4_10; + CONFIG(isFasterEngineSpinUpEnabled) = true; engineConfiguration->vvtMode = VVT_FIRST_HALF; @@ -252,7 +253,7 @@ GPIOA_6 * * white#9 : orange : +5v * white#17: green : PPS - * white#18: red + * white#18: red : TPS#2 * white#23: black : Sensor Ground * white#24: red : TPS#1 * @@ -261,7 +262,7 @@ void setEngineBMW_M73_Proteus(DECLARE_CONFIG_PARAMETER_SIGNATURE) { m73engine(PASS_CONFIG_PARAMETER_SIGNATURE); // 12 injectors defined in boards/proteus/board_configuration.cpp - + // set_analog_input_pin pps pa4 engineConfiguration->throttlePedalPositionAdcChannel = EFI_ADC_4; // set vbatt_divider 8.16 @@ -270,7 +271,8 @@ void setEngineBMW_M73_Proteus(DECLARE_CONFIG_PARAMETER_SIGNATURE) { engineConfiguration->vbattDividerCoeff = 7.6; // TPS#2 = Analog volt -// engineConfiguration->tps2_1AdcChannel = EFI_ADC_; + // set_analog_input_pin tps2 pa6 + engineConfiguration->tps2_1AdcChannel = EFI_ADC_6; } diff --git a/firmware/config/engines/bmw_m73.h b/firmware/config/engines/bmw_m73.h index 5d4c68f206..cf4381f802 100644 --- a/firmware/config/engines/bmw_m73.h +++ b/firmware/config/engines/bmw_m73.h @@ -12,7 +12,9 @@ void m73engine(DECLARE_CONFIG_PARAMETER_SIGNATURE); void setEngineBMW_M73_Frankenso(DECLARE_CONFIG_PARAMETER_SIGNATURE); +// set engine_type 24 void setEngineBMW_M73_Manhattan(DECLARE_CONFIG_PARAMETER_SIGNATURE); +// set engine_type 63 void setEngineBMW_M73_Proteus(DECLARE_CONFIG_PARAMETER_SIGNATURE); void setEngineBMW_M73_microRusEfi(DECLARE_CONFIG_PARAMETER_SIGNATURE); diff --git a/firmware/config/engines/bmw_m73_mre.cpp b/firmware/config/engines/bmw_m73_mre.cpp index e5fb9d3a6b..15e911fa1e 100644 --- a/firmware/config/engines/bmw_m73_mre.cpp +++ b/firmware/config/engines/bmw_m73_mre.cpp @@ -30,12 +30,16 @@ * ECU pin 2: OUT ORG injector #4 * ECU pin 6: GND ECU * ECU pin 15: OUT ORG injector #2 + * ECU pin 21: GND BRN BLK CLT sensor (only on first ECU) + * ECU pin 22: IN RED/BRN BLU CLT sensor (only on first ECU) * ECU pin 27: OUT GRN injector #6 * ECU pin 28: OUT BLU injector #5 * ECU pin 32: IN WHT VR positive crankshaft sensor + * ECU pin 34: IN IAT sensor (only on second ECU) * ECU pin 40: OUT BRN/BLK GRN injector #3 * ECU pin 41: OUT BRN/WHT BLU injector #1 * ECU pin 46: IN BLK BLU VR negative crankshaft sensor + * ECU pin 47: GND BRN IAT sensor (only on second ECU) * * Plug #4 40 pin * ECU pin 6: IN ORG start signal from ignition key. Custom wiring: pulled-up thermistor wire on MRE @@ -46,9 +50,13 @@ * Plug #5 9 pin * ECU pin 3: OUT BLK ORG coil signal * ECU pin 5: GND BRN ground + * ECU pin 6: OUT BLK ORG coil signal + * ECU pin 9: OUT BLK ORG coil signal * * BMW_M73_MRE * set engine_type 104 + * BMW_M73_MRE_SLAVE + * set engine_type 105 * */ @@ -61,7 +69,9 @@ void setEngineBMW_M73_microRusEfi(DECLARE_CONFIG_PARAMETER_SIGNATURE) { // 13641435991 injector engineConfiguration->injector.flow = 180; // cc/min, who knows if this number is real - no good source of info + CONFIG(isFasterEngineSpinUpEnabled) = true; + engineConfiguration->globalTriggerAngleOffset = 90; engineConfiguration->specs.cylindersCount = 6; engineConfiguration->specs.displacement = 5.4 / 2; engineConfiguration->specs.firingOrder = FO_1_5_3_6_2_4; @@ -70,10 +80,6 @@ void setEngineBMW_M73_microRusEfi(DECLARE_CONFIG_PARAMETER_SIGNATURE) { engineConfiguration->injectionMode = IM_BATCH; - // set_analog_input_pin pps PA7 - // EFI_ADC_7: "31 - AN volt 3" - PA7 - CONFIG(throttlePedalPositionAdcChannel) = EFI_ADC_7; - // enable ETB // set_rpn_expression 8 "0" setFsio(7, GPIOC_8, "0" PASS_CONFIG_PARAMETER_SUFFIX); @@ -83,7 +89,8 @@ void setEngineBMW_M73_microRusEfi(DECLARE_CONFIG_PARAMETER_SIGNATURE) { engineConfiguration->etb.pFactor = 2.00; engineConfiguration->etb.iFactor = 0.35; - // AN Temp 4, orange wire + // set debug_mode 37 + // 22 - AN Temp 4, orange wire CONFIG(startStopButtonPin) = GPIOA_3; #if (BOARD_TLE8888_COUNT > 0) @@ -92,6 +99,35 @@ void setEngineBMW_M73_microRusEfi(DECLARE_CONFIG_PARAMETER_SIGNATURE) { #endif /* BOARD_TLE8888_COUNT */ + engineConfiguration->canNbcType = CAN_BUS_NBC_NONE; +#if EFI_CANBUS_SLAVE + engineConfiguration->canReadEnabled = true; + engineConfiguration->canWriteEnabled = false; +#else /* EFI_CANBUS_SLAVE */ + // set_analog_input_pin pps PA7 + // EFI_ADC_7: "31 - AN volt 3" - PA7 + CONFIG(throttlePedalPositionAdcChannel) = EFI_ADC_7; + + engineConfiguration->canReadEnabled = false; + engineConfiguration->canWriteEnabled = true; + CONFIG(enableVerboseCanTx) = true; +#endif /* EFI_CANBUS_SLAVE */ + + + // do I have VR wires flipped? + engineConfiguration->trigger.type = TT_60_2_VW; + + // this large engine seems to crank at around only 150 RPM? And happily idle at 400RPM? + engineConfiguration->cranking.rpm = 280; + + CONFIG(crankingTimingAngle) = 15; + + // I am too lazy to add MAP sensor + engineConfiguration->fuelAlgorithm = LM_ALPHA_N; + + // set cranking_fuel 15 + engineConfiguration->cranking.baseFuel = 15; + //set tps_min 891 CONFIG(tpsMin) = 891; //set tps_max 177 diff --git a/firmware/config/engines/custom_engine.cpp b/firmware/config/engines/custom_engine.cpp index 346da06eea..c7445efb17 100644 --- a/firmware/config/engines/custom_engine.cpp +++ b/firmware/config/engines/custom_engine.cpp @@ -196,8 +196,6 @@ void setFrankensoConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE) { void setFrankensoBoardTestConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE) { setFrankensoConfiguration(PASS_CONFIG_PARAMETER_SIGNATURE); - engineConfiguration->directSelfStimulation = true; // this engine type is used for board validation - engineConfiguration->triggerSimulatorFrequency = 300; engineConfiguration->cranking.rpm = 100; @@ -313,8 +311,6 @@ void setTle8888TestConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE) { engineConfiguration->ignitionMode = IM_INDIVIDUAL_COILS; engineConfiguration->crankingInjectionMode = IM_SEQUENTIAL; - engineConfiguration->directSelfStimulation = true; - #if defined(STM32_HAS_GPIOG) && STM32_HAS_GPIOG engineConfiguration->ignitionPins[0] = GPIOG_3; engineConfiguration->ignitionPins[1] = GPIOG_4; @@ -349,11 +345,11 @@ void setTle8888TestConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE) { // SF PF11 #if defined(STM32_HAS_GPIOF) && STM32_HAS_GPIOF #if EFI_FSIO - setFsio(12, GPIOF_12, "0" PASS_CONFIG_PARAMETER_SUFFIX); setFsio(14, GPIOF_13, "1" PASS_CONFIG_PARAMETER_SUFFIX); #endif /* EFI_FSIO */ CONFIG(etbIo[0].directionPin1) = GPIOF_15; CONFIG(etbIo[0].directionPin2) = GPIOF_14; + CONFIG(etbIo[0].disablePin) = GPIOF_12; #endif /* STM32_HAS_GPIOF */ CONFIG(etb_use_two_wires) = true; engineConfiguration->isHip9011Enabled = false; @@ -365,11 +361,11 @@ void setTle8888TestConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE) { // IN2 PE4 // SF PE3 #if EFI_FSIO - setFsio(13, GPIOE_5, "0" PASS_CONFIG_PARAMETER_SUFFIX); setFsio(15, GPIOE_6, "1" PASS_CONFIG_PARAMETER_SUFFIX); #endif CONFIG(etbIo[0].directionPin1) = GPIOE_2; CONFIG(etbIo[0].directionPin2) = GPIOE_4; + CONFIG(etbIo[0].disablePin) = GPIOE_5; engineConfiguration->tps1_1AdcChannel = EFI_ADC_3; // PA3 @@ -403,8 +399,6 @@ void setTle8888TestConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE) { */ void mreBoardTest(DECLARE_CONFIG_PARAMETER_SIGNATURE) { #if (BOARD_TLE8888_COUNT > 0) - engineConfiguration->directSelfStimulation = true; // this engine type is used for board validation - engineConfiguration->debugMode = DBG_TLE8888; engineConfiguration->triggerSimulatorFrequency = 60; @@ -528,13 +522,25 @@ void setTest33816EngineConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE) { // default spi3sckPin PB3 + CONFIG(triggerSimulatorPins[0]) = GPIO_UNASSIGNED; + CONFIG(triggerSimulatorPins[1]) = GPIO_UNASSIGNED; + CONFIG(triggerSimulatorPins[2]) = GPIO_UNASSIGNED; + + engineConfiguration->injectionPins[0] = GPIOB_9; // #1 + engineConfiguration->injectionPins[1] = GPIOE_2; // #2 + engineConfiguration->injectionPins[2] = GPIOB_8; // #3 + engineConfiguration->injectionPins[3] = GPIOB_7; // #4 + + // blue CONFIG(mc33816_cs) = GPIOD_7; // green - CONFIG(mc33816_rstb) = GPIOD_5; + CONFIG(mc33816_rstb) = GPIOD_4; // yellow CONFIG(mc33816_driven) = GPIOD_6; + CONFIG(mc33816_flag0) = GPIOD_3; + // enable_spi 3 CONFIG(is_enabled_spi_3) = true; // Wire up spi3 @@ -544,5 +550,7 @@ void setTest33816EngineConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE) { CONFIG(isSdCardEnabled) = false; + CONFIG(mc33_hvolt) = 63; + CONFIG(mc33816spiDevice) = SPI_DEVICE_3; } diff --git a/firmware/config/engines/dodge_neon.cpp b/firmware/config/engines/dodge_neon.cpp index c2b441c480..4398a29b6f 100644 --- a/firmware/config/engines/dodge_neon.cpp +++ b/firmware/config/engines/dodge_neon.cpp @@ -265,12 +265,6 @@ void setDodgeNeonNGCEngineConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE) { engineConfiguration->specs.displacement = 1.996; engineConfiguration->specs.cylindersCount = 4; - engineConfiguration->biQuad.a0 = 0.0000024635293743901; - engineConfiguration->biQuad.a1 = 0.00000492705874878021; - engineConfiguration->biQuad.a2 = 0.0000024635293743901; - engineConfiguration->biQuad.b1 = -1.9968534854; - engineConfiguration->biQuad.b2 = 0.9968633396; - /** * 77C * 1200 rpm diff --git a/firmware/config/engines/mazda_miata_1_6.h b/firmware/config/engines/mazda_miata_1_6.h index 9c61d7754a..f040ce25fc 100644 --- a/firmware/config/engines/mazda_miata_1_6.h +++ b/firmware/config/engines/mazda_miata_1_6.h @@ -5,15 +5,19 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ -#ifndef CONFIG_ENGINES_MAZDA_MIATA_1_6_H_ -#define CONFIG_ENGINES_MAZDA_MIATA_1_6_H_ +#pragma once #include "engine_configuration.h" +/** + * set engine_type 57 + */ void setMiataNA6_VAF_Frankenso(DECLARE_CONFIG_PARAMETER_SIGNATURE); +/** + * set engine_type 41 + */ void setMiataNA6_MAP_Frankenso(DECLARE_CONFIG_PARAMETER_SIGNATURE); void miataNAcommon(DECLARE_CONFIG_PARAMETER_SIGNATURE); void setMiataNA6_VAF_MRE(DECLARE_CONFIG_PARAMETER_SIGNATURE); -#endif /* CONFIG_ENGINES_MAZDA_MIATA_1_6_H_ */ diff --git a/firmware/config/engines/mazda_miata_vvt.cpp b/firmware/config/engines/mazda_miata_vvt.cpp index 4819ccf96e..8309ad6100 100644 --- a/firmware/config/engines/mazda_miata_vvt.cpp +++ b/firmware/config/engines/mazda_miata_vvt.cpp @@ -195,8 +195,6 @@ static void setMazdaMiataEngineNB2Defaults(DECLARE_CONFIG_PARAMETER_SIGNATURE) { setCommonNTCSensor(&engineConfiguration->clt, 2700); setCommonNTCSensor(&engineConfiguration->iat, 2700); - engineConfiguration->nbVvtIndex = 0; - engineConfiguration->auxPidFrequency[0] = 300; // VVT solenoid control // set idle_position 35 @@ -273,7 +271,11 @@ static void setMazdaMiataEngineNB2Defaults(DECLARE_CONFIG_PARAMETER_SIGNATURE) { // set_whole_ve_map 80 setMazdaMiataNbInjectorLag(PASS_CONFIG_PARAMETER_SIGNATURE); - engineConfiguration->debugMode = DBG_IDLE_CONTROL; + CONFIG(debugTriggerSync) = GPIOD_3; + +// engineConfiguration->debugMode = DBG_IDLE_CONTROL; + engineConfiguration->debugMode = DBG_TRIGGER_COUNTERS; + //set idle_offset 30 engineConfiguration->idleRpmPid.offset = 30; engineConfiguration->idleRpmPid.pFactor = 0.07; @@ -396,7 +398,10 @@ void setMazdaMiata2003EngineConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE) { // see setDefaultIdleParameters engineConfiguration->adcVcc = 3.3f; - engineConfiguration->vbattDividerCoeff = 9.70f; + engineConfiguration->vbattDividerCoeff = 8.80f; + + engineConfiguration->displayLogicLevelsInEngineSniffer = true; + engineConfiguration->useOnlyRisingEdgeForTrigger = true; // by the way NB2 MAF internal diameter is about 2.5 inches / 63mm // 1K pull-down to read current from this MAF @@ -420,7 +425,6 @@ void setMazdaMiata2003EngineConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE) { engineConfiguration->tps1_1AdcChannel = EFI_ADC_13; // PC3 blue engineConfiguration->idleMode = IM_AUTO; - CONFIG(useETBforIdleControl) = true; // set_analog_input_pin pps PA2 /* a step back - Frankenso does not use ETB engineConfiguration->throttlePedalPositionAdcChannel = EFI_ADC_2; @@ -461,8 +465,7 @@ void setMazdaMiata2003EngineConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE) { config->crankingFuelCoef[7] = 10; config->crankingFuelBins[7] = 90; -// engineConfiguration->crankingIACposition = 65; - + engineConfiguration->crankingIACposition = 90; } /** @@ -500,7 +503,11 @@ static void setMiataNB2_MRE_common(DECLARE_CONFIG_PARAMETER_SIGNATURE) { engineConfiguration->camInputs[0] = GPIOA_5; engineConfiguration->useOnlyRisingEdgeForTrigger = false; - engineConfiguration->useTLE8888_hall_mode = true; + /** + * By default "auto detection mode for VR sensor signals" is used + * We know that for short & strange Hall (?) signals like Miata NB2 crank sensor this does not work well above certain RPM. + */ + engineConfiguration->tle8888mode = TL_MANUAL; // GPIOD_6: "13 - GP Out 6" - selected to +12v engineConfiguration->alternatorControlPin = GPIOD_6; @@ -559,6 +566,8 @@ static void setMiataNB2_MRE_common(DECLARE_CONFIG_PARAMETER_SIGNATURE) { void setMiataNB2_MRE_ETB(DECLARE_CONFIG_PARAMETER_SIGNATURE) { setMiataNB2_MRE_common(PASS_CONFIG_PARAMETER_SIGNATURE); + CONFIG(useETBforIdleControl) = true; + #if EFI_FSIO // enable ETB // set_rpn_expression 8 "0" diff --git a/firmware/config/engines/mazda_miata_vvt.h b/firmware/config/engines/mazda_miata_vvt.h index a9462cfc02..cc72460947 100644 --- a/firmware/config/engines/mazda_miata_vvt.h +++ b/firmware/config/engines/mazda_miata_vvt.h @@ -14,9 +14,22 @@ void setMazdaMiataNbInjectorLag(DECLARE_CONFIG_PARAMETER_SIGNATURE); void setMazdaMiataNbTpsTps(DECLARE_CONFIG_PARAMETER_SIGNATURE); +/** + * Primary rusEfi test mule https://rusefi.com/forum/viewtopic.php?f=3&t=1095 + * MAZDA_MIATA_2003 + * set engine_type 47 + */ void setMazdaMiata2003EngineConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE); +/** + * race car - NA body and fuel system with NB2 engine + */ void setMazdaMiata2003EngineConfigurationNaFuelRail(DECLARE_CONFIG_PARAMETER_SIGNATURE); void setMazdaMiata2003EngineConfigurationBoardTest(DECLARE_CONFIG_PARAMETER_SIGNATURE); void setMiataNB2_MRE_ETB(DECLARE_CONFIG_PARAMETER_SIGNATURE); + +/** + * OEM mechanical throttle body + * set engine_type 11 + */ void setMiataNB2_MRE_MTB(DECLARE_CONFIG_PARAMETER_SIGNATURE); diff --git a/firmware/config/engines/me7pnp.cpp b/firmware/config/engines/me7pnp.cpp index 07bd1d93ee..4806296a98 100644 --- a/firmware/config/engines/me7pnp.cpp +++ b/firmware/config/engines/me7pnp.cpp @@ -7,18 +7,19 @@ #include "me7pnp.h" -#include "global.h" #include "engine.h" #include "engine_math.h" #include "allsensors.h" #include "fsio_impl.h" #include "engine_configuration.h" -#include "smart_gpio.h" +#include "cj125.h" -EXTERN_ENGINE -; +EXTERN_ENGINE; -void vag_18_Turbo(DECLARE_ENGINE_PARAMETER_SIGNATURE) { +/** + * set engine_type 102 + */ +void vag_18_Turbo(DECLARE_CONFIG_PARAMETER_SIGNATURE) { //Base Engine Settings @@ -56,8 +57,6 @@ void vag_18_Turbo(DECLARE_ENGINE_PARAMETER_SIGNATURE) { engineConfiguration->afr.hwChannel = EFI_ADC_NONE; engineConfiguration->vbattAdcChannel = EFI_ADC_4; engineConfiguration->vbattDividerCoeff = ((float) (10.0 + 33)) / 10 * 2; - engineConfiguration->cj125ur = EFI_ADC_11; - engineConfiguration->cj125ua = EFI_ADC_12; engineConfiguration->mafAdcChannel = EFI_ADC_8; //CAN Settings @@ -65,7 +64,7 @@ void vag_18_Turbo(DECLARE_ENGINE_PARAMETER_SIGNATURE) { engineConfiguration->canNbcType = CAN_BUS_NBC_VAG; engineConfiguration->canReadEnabled = true; engineConfiguration->canWriteEnabled = true; - engineConfiguration->canDeviceMode = CD_USE_CAN1; + engineConfiguration->canTxPin = GPIOB_6; engineConfiguration->canRxPin = GPIOB_12; @@ -93,9 +92,10 @@ void vag_18_Turbo(DECLARE_ENGINE_PARAMETER_SIGNATURE) { //SPI Settings engineConfiguration->is_enabled_spi_1 = true; - engineConfiguration->is_enabled_spi_2 = true; engineConfiguration->is_enabled_spi_3 = false; - engineConfiguration->cj125SpiDevice = SPI_DEVICE_2; + + cj125defaultPinout(PASS_CONFIG_PARAMETER_SIGNATURE); + engineConfiguration->cj125ur = EFI_ADC_11; engineConfiguration->cj125CsPin = GPIOB_11; //Digital Inputs/Outputs @@ -114,10 +114,10 @@ void vag_18_Turbo(DECLARE_ENGINE_PARAMETER_SIGNATURE) { engineConfiguration->brakePedalPin = GPIOE_10; engineConfiguration->camInputs[0] = GPIOA_2; #if defined(STM32_HAS_GPIOG) && STM32_HAS_GPIOG - engineConfiguration->triggerInputPins[0] = GPIOG_7; +// engineConfiguration->triggerInputPins[0] = GPIOG_7; #endif /* STM32_HAS_GPIOF */ #if defined(STM32_HAS_GPIOF) && STM32_HAS_GPIOF - engineConfiguration->vehicleSpeedSensorInputPin = GPIOF_14; +// engineConfiguration->vehicleSpeedSensorInputPin = GPIOF_14; #endif /* STM32_HAS_GPIOF */ @@ -134,7 +134,6 @@ void vag_18_Turbo(DECLARE_ENGINE_PARAMETER_SIGNATURE) { #if EFI_FSIO #if defined(STM32_HAS_GPIOF) && STM32_HAS_GPIOF - setFsio (12, GPIOF_12, "0" PASS_CONFIG_PARAMETER_SUFFIX); setFsio (14, GPIOF_13, "1" PASS_CONFIG_PARAMETER_SUFFIX); #endif /* STM32_HAS_GPIOF */ setFsioExt (3, GPIOE_0, "0.15 90 coolant 120 min max 90 - 30 / 0.8 * +", 25 PASS_CONFIG_PARAMETER_SUFFIX); @@ -144,15 +143,16 @@ void vag_18_Turbo(DECLARE_ENGINE_PARAMETER_SIGNATURE) { #if defined(STM32_HAS_GPIOF) && STM32_HAS_GPIOF CONFIG(etbIo[0].directionPin1) = GPIOF_15; CONFIG(etbIo[0].directionPin2) = GPIOF_14; + CONFIG(etbIo[0].disablePin) = GPIOF_12; #endif /* STM32_HAS_GPIOF */ engineConfiguration->isHip9011Enabled = false; #if EFI_FSIO - setFsio (13, GPIOE_5, "0" PASS_CONFIG_PARAMETER_SUFFIX); setFsio (15, GPIOE_6, "1" PASS_CONFIG_PARAMETER_SUFFIX); #endif CONFIG(etbIo[1].directionPin1) = GPIOE_2; CONFIG(etbIo[1].directionPin2) = GPIOE_4; + CONFIG(etbIo[1].disablePin) = GPIOE_5; engineConfiguration->etb.pFactor = 1.07; engineConfiguration->etb.iFactor = 0.18; diff --git a/firmware/config/engines/me7pnp.h b/firmware/config/engines/me7pnp.h index d0c61dcdd4..86b19d9eba 100644 --- a/firmware/config/engines/me7pnp.h +++ b/firmware/config/engines/me7pnp.h @@ -1,15 +1,13 @@ /* - * me7pnp.h + * @file me7pnp.h * * Created on: 1. mai 2019 * Author: Ola */ -#ifndef CONFIG_ENGINES_ME7PNP_H_ -#define CONFIG_ENGINES_ME7PNP_H_ +#pragma once #include "engine_configuration.h" void vag_18_Turbo(DECLARE_CONFIG_PARAMETER_SIGNATURE); -#endif /* CONFIG_ENGINES_ME7PNP_H_ */ diff --git a/firmware/config/engines/mitsubishi.h b/firmware/config/engines/mitsubishi.h index cf42c991cd..cf5b420e0c 100644 --- a/firmware/config/engines/mitsubishi.h +++ b/firmware/config/engines/mitsubishi.h @@ -4,11 +4,10 @@ * @date Aug 5, 2014 * @author Andrey Belomutskiy, (c) 2012-2020 */ -#ifndef MITSUBISHI_H_ -#define MITSUBISHI_H_ + +#pragma once #include "engine_configuration.h" void setMitsubishiConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE); -#endif /* MITSUBISHI_H_ */ diff --git a/firmware/config/engines/rover_v8.h b/firmware/config/engines/rover_v8.h index 5c7a7f6fa3..bdb67c1896 100644 --- a/firmware/config/engines/rover_v8.h +++ b/firmware/config/engines/rover_v8.h @@ -4,12 +4,9 @@ * @date Jun 27, 2014 * @author Andrey Belomutskiy, (c) 2012-2020 */ -#ifndef ROVER_V8_H_ -#define ROVER_V8_H_ +#pragma once #include "engine_configuration.h" void setFrankenstein_01_LCD(engine_configuration_s *engineConfiguration); void setRoverv8(DECLARE_CONFIG_PARAMETER_SIGNATURE); - -#endif /* ROVER_V8_H_ */ diff --git a/firmware/config/engines/sachs.h b/firmware/config/engines/sachs.h index 0a502ae2a9..d9207a75d6 100644 --- a/firmware/config/engines/sachs.h +++ b/firmware/config/engines/sachs.h @@ -4,11 +4,9 @@ * @date Jan 26, 2015 * @author Andrey Belomutskiy, (c) 2012-2020 */ -#ifndef CONFIG_ENGINES_SACHS_H_ -#define CONFIG_ENGINES_SACHS_H_ +#pragma once #include "engine_configuration.h" void setSachs(DECLARE_CONFIG_PARAMETER_SIGNATURE); -#endif /* CONFIG_ENGINES_SACHS_H_ */ diff --git a/firmware/config/engines/subaru.h b/firmware/config/engines/subaru.h index bc52e5bd36..d2a80494ed 100644 --- a/firmware/config/engines/subaru.h +++ b/firmware/config/engines/subaru.h @@ -4,12 +4,8 @@ * @date Sep 14, 2014 * @author Andrey Belomutskiy, (c) 2012-2020 */ -#ifndef SUBARU_H_ -#define SUBARU_H_ #include "engine_configuration.h" void setSubaru2003Wrx(DECLARE_CONFIG_PARAMETER_SIGNATURE); void setSubaruEJ20GDefaults(DECLARE_CONFIG_PARAMETER_SIGNATURE); - -#endif /* SUBARU_H_ */ diff --git a/firmware/config/engines/vw.cpp b/firmware/config/engines/vw.cpp index 280cee6cf8..300d223ed2 100644 --- a/firmware/config/engines/vw.cpp +++ b/firmware/config/engines/vw.cpp @@ -15,6 +15,7 @@ EXTERN_CONFIG; +// VW_ABA void setVwAba(DECLARE_CONFIG_PARAMETER_SIGNATURE) { setFrankensoConfiguration(PASS_CONFIG_PARAMETER_SIGNATURE); diff --git a/firmware/config/stm32f4ems/chconf.h b/firmware/config/stm32f4ems/chconf.h index c9a783c24a..4abac0a88f 100644 --- a/firmware/config/stm32f4ems/chconf.h +++ b/firmware/config/stm32f4ems/chconf.h @@ -762,9 +762,9 @@ void chDbgPanic3(const char *msg, const char * file, int line); * so that it would not crash the error handler in case of stack issues */ #if CH_DBG_SYSTEM_STATE_CHECK -#define hasFatalError() (ch.dbg.panic_msg != NULL) +#define hasOsPanicError() (ch.dbg.panic_msg != NULL) #else -#define hasFatalError() (FALSE) +#define hasOsPanicError() (FALSE) #endif diff --git a/firmware/config/stm32f4ems/efifeatures.h b/firmware/config/stm32f4ems/efifeatures.h index 8cdadab69d..64899d37a0 100644 --- a/firmware/config/stm32f4ems/efifeatures.h +++ b/firmware/config/stm32f4ems/efifeatures.h @@ -12,6 +12,9 @@ #define EFI_GPIO_HARDWARE TRUE #define EFI_BOOST_CONTROL TRUE + +#define EFI_LAUNCH_CONTROL FALSE + #define EFI_FSIO TRUE #ifndef EFI_CDM_INTEGRATION @@ -143,12 +146,6 @@ #define BOARD_TLE8888_COUNT 1 #endif -// todo: move this outside of efifeatures.h -#define BOARD_EXT_GPIOCHIPS (BOARD_TLE6240_COUNT + BOARD_MC33972_COUNT + BOARD_TLE8888_COUNT) - -// todo: move this outside of efifeatures.h -#define BOARD_EXT_PINREPOPINS 24 - #define EFI_ANALOG_SENSORS TRUE #ifndef EFI_MAX_31855 @@ -287,10 +284,8 @@ // todo: most of this should become configurable -// todo: switch to continues ADC conversion for slow ADC? -// https://github.com/rusefi/rusefi/issues/630 // todo: switch to continues ADC conversion for fast ADC? -#define EFI_INTERNAL_FAST_ADC_PWM &PWMD4 +#define EFI_INTERNAL_FAST_ADC_GPT &GPTD6 #define EFI_SPI1_AF 5 diff --git a/firmware/config/stm32f4ems/halconf.h b/firmware/config/stm32f4ems/halconf.h index 3063fecfae..7e3d3cd190 100644 --- a/firmware/config/stm32f4ems/halconf.h +++ b/firmware/config/stm32f4ems/halconf.h @@ -30,6 +30,20 @@ #include "mcuconf.h" +/* THIS IS HACK: to allow smooth transition to ChibiOS with ELF support we + * need to disable hal_flash.h until we move to ChibiOS EFL driver. + * hal_flash.h in ChibiOS has definitions that conflict with current RusEFI + * flash driver. + * but it is included unconditionaly from hal.h */ +#define HAL_FLASH_H + +/** + * @brief Enables the FLASH subsystem. + */ +#if !defined(HAL_USE_FLASH) || defined(__DOXYGEN__) +#define HAL_USE_FLASH FALSE +#endif + /** * @brief Enables the PAL subsystem. */ @@ -120,7 +134,7 @@ * @brief Enables the PWM subsystem. */ #if !defined(HAL_USE_PWM) || defined(__DOXYGEN__) -#define HAL_USE_PWM TRUE +#define HAL_USE_PWM FALSE #endif /** diff --git a/firmware/config/stm32f4ems/mcuconf.h b/firmware/config/stm32f4ems/mcuconf.h index dd7fcbf145..ed5cac9feb 100644 --- a/firmware/config/stm32f4ems/mcuconf.h +++ b/firmware/config/stm32f4ems/mcuconf.h @@ -180,7 +180,7 @@ #define STM32_GPT_USE_TIM3 FALSE #define STM32_GPT_USE_TIM4 FALSE #define STM32_GPT_USE_TIM5 TRUE -#define STM32_GPT_USE_TIM6 FALSE +#define STM32_GPT_USE_TIM6 TRUE #define STM32_GPT_USE_TIM7 FALSE #define STM32_GPT_USE_TIM8 FALSE #define STM32_GPT_USE_TIM9 FALSE @@ -272,9 +272,7 @@ #define STM32_PWM_USE_TIM1 FALSE #define STM32_PWM_USE_TIM2 FALSE #define STM32_PWM_USE_TIM3 FALSE -// maybe even swithc this one to software timer? -// todo: https://github.com/rusefi/rusefi/issues/630 ? -#define STM32_PWM_USE_TIM4 TRUE +#define STM32_PWM_USE_TIM4 FALSE #define STM32_PWM_USE_TIM5 FALSE #define STM32_PWM_USE_TIM8 FALSE #define STM32_PWM_USE_TIM9 FALSE diff --git a/firmware/config/stm32f7ems/chconf.h b/firmware/config/stm32f7ems/chconf.h index 35a4721ef1..d8b4e04ff2 100644 --- a/firmware/config/stm32f7ems/chconf.h +++ b/firmware/config/stm32f7ems/chconf.h @@ -764,9 +764,9 @@ void chDbgPanic3(const char *msg, const char * file, int line); * so that it would not crash the error handler in case of stack issues */ #if CH_DBG_SYSTEM_STATE_CHECK -#define hasFatalError() (ch.dbg.panic_msg != NULL) +#define hasOsPanicError() (ch.dbg.panic_msg != NULL) #else -#define hasFatalError() (FALSE) +#define hasOsPanicError() (FALSE) #endif diff --git a/firmware/config/stm32f7ems/efifeatures.h b/firmware/config/stm32f7ems/efifeatures.h index ff9956cc80..d80f34fc06 100644 --- a/firmware/config/stm32f7ems/efifeatures.h +++ b/firmware/config/stm32f7ems/efifeatures.h @@ -50,8 +50,6 @@ #define BOARD_TLE8888_COUNT 1 #endif -// todo: move this outside of efifeatures.h -#define BOARD_EXT_GPIOCHIPS (BOARD_TLE6240_COUNT + BOARD_MC33972_COUNT + BOARD_TLE8888_COUNT) #undef EFI_CAN_SUPPORT diff --git a/firmware/config/stm32f7ems/halconf.h b/firmware/config/stm32f7ems/halconf.h index 778a5340b2..7674e99d50 100644 --- a/firmware/config/stm32f7ems/halconf.h +++ b/firmware/config/stm32f7ems/halconf.h @@ -30,6 +30,20 @@ #include "mcuconf.h" +/* THIS IS HACK: to allow smooth transition to ChibiOS with ELF support we + * need to disable hal_flash.h until we move to ChibiOS EFL driver. + * hal_flash.h in ChibiOS has definitions that conflict with current RusEFI + * flash driver. + * but it is included unconditionaly from hal.h */ +#define HAL_FLASH_H + +/** + * @brief Enables the FLASH subsystem. + */ +#if !defined(HAL_USE_FLASH) || defined(__DOXYGEN__) +#define HAL_USE_FLASH FALSE +#endif + /** * @brief Enables the PAL subsystem. */ @@ -111,7 +125,7 @@ * @brief Enables the PWM subsystem. */ #if !defined(HAL_USE_PWM) || defined(__DOXYGEN__) -#define HAL_USE_PWM TRUE +#define HAL_USE_PWM FALSE #endif /** diff --git a/firmware/config/stm32f7ems/mcuconf.h b/firmware/config/stm32f7ems/mcuconf.h index 6fcb25519f..17d0f340eb 100644 --- a/firmware/config/stm32f7ems/mcuconf.h +++ b/firmware/config/stm32f7ems/mcuconf.h @@ -201,7 +201,7 @@ #define STM32_GPT_USE_TIM3 FALSE #define STM32_GPT_USE_TIM4 FALSE #define STM32_GPT_USE_TIM5 TRUE -#define STM32_GPT_USE_TIM6 FALSE +#define STM32_GPT_USE_TIM6 TRUE #define STM32_GPT_USE_TIM7 FALSE #define STM32_GPT_USE_TIM8 FALSE #define STM32_GPT_USE_TIM9 FALSE @@ -283,7 +283,7 @@ #define STM32_PWM_USE_TIM1 FALSE #define STM32_PWM_USE_TIM2 FALSE #define STM32_PWM_USE_TIM3 FALSE -#define STM32_PWM_USE_TIM4 TRUE +#define STM32_PWM_USE_TIM4 FALSE #define STM32_PWM_USE_TIM5 FALSE #define STM32_PWM_USE_TIM8 FALSE #define STM32_PWM_USE_TIM9 FALSE diff --git a/firmware/console/binary/bluetooth.cpp b/firmware/console/binary/bluetooth.cpp index 5667721f7e..e9bfa74e77 100644 --- a/firmware/console/binary/bluetooth.cpp +++ b/firmware/console/binary/bluetooth.cpp @@ -34,8 +34,7 @@ static thread_reference_t btThreadRef = nullptr; // used by thread suspend/resum static LoggingWithStorage btLogger("bluetooth"); -EXTERN_ENGINE -; +EXTERN_ENGINE; // Main communication code diff --git a/firmware/console/binary/bluetooth.h b/firmware/console/binary/bluetooth.h index 413d2b0a2a..bf9cb77f4c 100644 --- a/firmware/console/binary/bluetooth.h +++ b/firmware/console/binary/bluetooth.h @@ -5,9 +5,7 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ -#ifndef BLUETOOTH_H_ -#define BLUETOOTH_H_ - +#pragma once #include "global.h" #include "tunerstudio_io.h" @@ -44,4 +42,3 @@ void bluetoothCancel(void); */ void bluetoothSoftwareDisconnectNotify(); -#endif /* BLUETOOTH_H_ */ diff --git a/firmware/console/binary/tunerstudio.cpp b/firmware/console/binary/tunerstudio.cpp index f1404271ea..a3a514db8a 100644 --- a/firmware/console/binary/tunerstudio.cpp +++ b/firmware/console/binary/tunerstudio.cpp @@ -80,7 +80,7 @@ #include #include "engine_configuration.h" -#include "injector_central.h" +#include "bench_test.h" #include "svnversion.h" #include "loggingcentral.h" #include "status_loop.h" @@ -89,7 +89,7 @@ #if EFI_SIMULATOR #include "rusEfiFunctionalTest.h" -#endif +#endif /* EFI_SIMULATOR */ #if EFI_TUNER_STUDIO @@ -103,8 +103,7 @@ #endif /* EFI_IDLE_CONTROL */ -EXTERN_ENGINE -; +EXTERN_ENGINE; extern persistent_config_container_s persistentState; @@ -469,7 +468,8 @@ static bool isKnownCommand(char command) { || command == TS_CRC_CHECK_COMMAND || command == TS_GET_FIRMWARE_VERSION || command == TS_PERF_TRACE_BEGIN - || command == TS_PERF_TRACE_GET_BUFFER; + || command == TS_PERF_TRACE_GET_BUFFER + || command == TS_GET_CONFIG_ERROR; } // this function runs indefinitely @@ -845,6 +845,9 @@ int tunerStudioHandleCrcCommand(ts_channel_s *tsChannel, char *data, int incomin break; #endif /* ENABLE_PERF_TRACE */ + case TS_GET_CONFIG_ERROR: + sr5SendResponse(tsChannel, TS_CRC, reinterpret_cast(getFirmwareError()), strlen(getFirmwareError())); + break; default: tunerStudioError("ERROR: ignoring unexpected command"); return false; diff --git a/firmware/console/binary/tunerstudio.h b/firmware/console/binary/tunerstudio.h index 43a66d01a2..68de8966fb 100644 --- a/firmware/console/binary/tunerstudio.h +++ b/firmware/console/binary/tunerstudio.h @@ -5,9 +5,7 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ -#ifndef TUNERSTUDIO_H_ -#define TUNERSTUDIO_H_ - +#pragma once #include "global.h" #include "tunerstudio_io.h" @@ -106,5 +104,3 @@ typedef pre_packed struct } TunerStudioWriteValueRequest; #endif /* EFI_TUNER_STUDIO */ - -#endif /* TUNERSTUDIO_H_ */ diff --git a/firmware/console/binary/tunerstudio_configuration.h b/firmware/console/binary/tunerstudio_configuration.h index 829bd7be5b..2bde4a2b29 100644 --- a/firmware/console/binary/tunerstudio_configuration.h +++ b/firmware/console/binary/tunerstudio_configuration.h @@ -18,6 +18,16 @@ typedef struct { uint16_t values[EGT_CHANNEL_COUNT]; } egt_values_s; + +enum class TsCalMode : uint8_t { + None = 0, + Tps1Max = 1, + Tps1Min = 2, + EtbKp = 3, + EtbKi = 4, + EtbKd = 5, +}; + /** * At the moment rusEfi does NOT have any code generation around TS output channels, three locations have to be changed manually * 1) this TunerStudioOutputChannels firmware version of the structure @@ -57,10 +67,11 @@ typedef struct { unsigned int isIatError : 1; // bit 21 unsigned int isAcSwitchEngaged : 1; // bit 22 unsigned int isTriggerError : 1; // bit 23 - unsigned int hasFatalError : 1; // bit 24 + unsigned int hasCriticalError : 1; // bit 24 unsigned int isWarnNow : 1; // bit 25 - unsigned int unused80b8 : 1; // bit 26 + unsigned int isPedalError : 1; // bit 26 unsigned int isKnockChipOk : 1; // bit 27 + unsigned int launchTriggered : 1; // bit 28 // RPM, vss scaled_channel rpm; // 4 @@ -151,15 +162,29 @@ typedef struct { uint32_t firmwareVersion; // 120 uint32_t tsConfigVersion; // 124 + // These two fields indicate to TS that we'd like to set a particular field to a particular value + // We use a maintainConstantValue in TS for each field we'd like to set, like this: + // maintainConstantValue = tpsMax, { (calibrationMode == 1 ) ? calibrationValue : tpsMax } + // maintainConstantValue = tpsMin, { (calibrationMode == 2 ) ? calibrationValue : tpsMin } + // When the mode is set to a particular value, TS will copy the calibrationValue in to the specified field. + // + // With this simple construct, the ECU can send any number of internally computed configuration fields + // back to TunerStudio, getting around the problem of setting values on the controller without TS's knowledge. + // The ECU simply has to sequentially set a mode/value, wait briefly, then repeat until all the values + // it wants to send have been sent. + float calibrationValue; // 128 + TsCalMode calibrationMode; // 132 + uint8_t padding[3]; // 133-135 + // Errors - int totalTriggerErrorCounter; // 128 - int orderingErrorCounter; // 132 - int16_t warningCounter; // 136 - int16_t lastErrorCode; // 138 - int16_t recentErrorCodes[8]; // 140 + int totalTriggerErrorCounter; // 136 + int orderingErrorCounter; // 140 + int16_t warningCounter; // 144 + int16_t lastErrorCode; // 146 + int16_t recentErrorCodes[8]; // 148-162 // Debug - float debugFloatField1; // 156 + float debugFloatField1; // 164 float debugFloatField2; float debugFloatField3; float debugFloatField4; @@ -170,17 +195,24 @@ typedef struct { int debugIntField2; int debugIntField3; int16_t debugIntField4; - int16_t debugIntField5; // 198 + int16_t debugIntField5; // 206 // accelerometer - int16_t accelerationX; // 200 - int16_t accelerationY; // 202 + int16_t accelerationX; // 208 + int16_t accelerationY; // 210 // EGT - egt_values_s egtValues; // 204 - scaled_percent throttle2Position; // 220 + egt_values_s egtValues; // 212 - uint8_t unusedAtTheEnd[18]; // we have some unused bytes to allow compatible TS changes + scaled_percent throttle2Position; // 228 + + scaled_voltage rawTps1Primary; // 230 + scaled_voltage rawPpsPrimary; // 232 + scaled_voltage rawClt; // 234 + scaled_voltage rawIat; // 236 + scaled_voltage rawOilPressure; // 238 + + uint8_t unusedAtTheEnd[4]; // we have some unused bytes to allow compatible TS changes // Temporary - will remove soon TsDebugChannels* getDebugChannels() { diff --git a/firmware/console/binary/tunerstudio_io.cpp b/firmware/console/binary/tunerstudio_io.cpp index 1c2c44a54f..43d86c1503 100644 --- a/firmware/console/binary/tunerstudio_io.cpp +++ b/firmware/console/binary/tunerstudio_io.cpp @@ -5,11 +5,10 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ -#include "global.h" +#include "engine.h" #include "os_access.h" #include "tunerstudio_io.h" #include "console_io.h" -#include "engine.h" #if EFI_SIMULATOR #include "rusEfiFunctionalTest.h" #endif diff --git a/firmware/console/binary/tunerstudio_io.h b/firmware/console/binary/tunerstudio_io.h index 058fb8dd64..fe386373e7 100644 --- a/firmware/console/binary/tunerstudio_io.h +++ b/firmware/console/binary/tunerstudio_io.h @@ -4,9 +4,8 @@ * @date Mar 8, 2015 * @author Andrey Belomutskiy, (c) 2012-2020 */ -#ifndef CONSOLE_TUNERSTUDIO_TUNERSTUDIO_IO_H_ -#define CONSOLE_TUNERSTUDIO_TUNERSTUDIO_IO_H_ +#pragma once #include "global.h" #if EFI_PROD_CODE @@ -68,6 +67,7 @@ typedef struct { #define TS_PAGE_COMMAND 'P' // 0x50 #define TS_COMMAND_F 'F' // 0x46 #define TS_GET_FIRMWARE_VERSION 'V' // versionInfo +#define TS_GET_CONFIG_ERROR 'e' // returns getFirmwareError() // High speed logger commands #define TS_SET_LOGGER_MODE 'l' @@ -108,4 +108,3 @@ int sr5ReadData(ts_channel_s *tsChannel, uint8_t * buffer, int size); int sr5ReadDataTimeout(ts_channel_s *tsChannel, uint8_t * buffer, int size, int timeout); bool sr5IsReady(ts_channel_s *tsChannel); -#endif /* CONSOLE_TUNERSTUDIO_TUNERSTUDIO_IO_H_ */ diff --git a/firmware/console/console_io.cpp b/firmware/console/console_io.cpp index bdc1a6fc73..1d9b232c95 100644 --- a/firmware/console/console_io.cpp +++ b/firmware/console/console_io.cpp @@ -18,7 +18,6 @@ * If not, see . */ -#include "global.h" #include "engine.h" #include "console_io.h" #include "os_util.h" @@ -39,9 +38,6 @@ extern SerialUSBDriver SDU1; // 10 seconds #define CONSOLE_WRITE_TIMEOUT 10000 -int lastWriteSize; -int lastWriteActual; - static bool isSerialConsoleStarted = false; static event_listener_t consoleEventListener; @@ -253,11 +249,8 @@ void consolePutChar(int x) { } void consoleOutputBuffer(const uint8_t *buf, int size) { - lastWriteSize = size; #if !EFI_UART_ECHO_TEST_MODE - lastWriteActual = chnWriteTimeout(getConsoleChannel(), buf, size, CONSOLE_WRITE_TIMEOUT); -// if (r != size) -// firmwareError(OBD_PCM_Processor_Fault, "Partial console write"); + chnWriteTimeout(getConsoleChannel(), buf, size, CONSOLE_WRITE_TIMEOUT); #endif /* EFI_UART_ECHO_TEST_MODE */ } diff --git a/firmware/console/console_io.h b/firmware/console/console_io.h index 6527f9b1cf..84581000d8 100644 --- a/firmware/console/console_io.h +++ b/firmware/console/console_io.h @@ -4,9 +4,8 @@ * @date Dec 29, 2012 * @author Andrey Belomutskiy, (c) 2012-2020 */ -#ifndef CONSOLE_IO_H_ -#define CONSOLE_IO_H_ +#pragma once #ifdef __cplusplus extern "C" { @@ -42,4 +41,3 @@ bool isCommandLineConsoleReady(void); #define isCommandLineConsoleReady() true #endif -#endif /* CONSOLE_IO_H_ */ diff --git a/firmware/console/eficonsole.cpp b/firmware/console/eficonsole.cpp index e09a57f851..298fa2db0f 100644 --- a/firmware/console/eficonsole.cpp +++ b/firmware/console/eficonsole.cpp @@ -29,7 +29,7 @@ static LoggingWithStorage logger("console"); -static void myfatal(void) { +static void testCritical(void) { chDbgCheck(0); } @@ -46,11 +46,18 @@ static void sayNothing(void) { } static void sayHello(void) { - scheduleMsg(&logger, "*** rusEFI (c) Andrey Belomutskiy 2012-2019. All rights reserved."); + scheduleMsg(&logger, "*** rusEFI LLC (c) 2012-2020. All rights reserved."); scheduleMsg(&logger, "rusEFI v%d@%s", getRusEfiVersion(), VCS_VERSION); scheduleMsg(&logger, "*** Chibios Kernel: %s", CH_KERNEL_VERSION); scheduleMsg(&logger, "*** Compiled: " __DATE__ " - " __TIME__ ""); scheduleMsg(&logger, "COMPILER=%s", __VERSION__); + +#if defined(STM32F4) || defined(STM32F7) + uint32_t *uid = ((uint32_t *)UID_BASE); + scheduleMsg(&logger, "UID=%x %x %x", uid[0], uid[1], uid[2]); +#endif + + #ifdef CH_FREQUENCY scheduleMsg(&logger, "CH_FREQUENCY=%d", CH_FREQUENCY); #endif @@ -183,7 +190,7 @@ void initializeConsole(Logging *sharedLogger) { addConsoleAction("reset", scheduleReset); #endif - addConsoleAction("fatal", myfatal); + addConsoleAction("critical", testCritical); addConsoleAction("error", myerror); addConsoleAction("threadsinfo", cmd_threads); } diff --git a/firmware/console/eficonsole.h b/firmware/console/eficonsole.h index f28f4adab3..f171a77aaa 100644 --- a/firmware/console/eficonsole.h +++ b/firmware/console/eficonsole.h @@ -6,12 +6,9 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ -#ifndef RFICONSOLE_H_ -#define RFICONSOLE_H_ - +#pragma once #include "datalogging.h" void initializeConsole(Logging *sharedLogger); void print(const char *fmt, ...); -#endif /* RFICONSOLE_H_ */ diff --git a/firmware/console/status_loop.cpp b/firmware/console/status_loop.cpp index 9eb6d8fd19..00404e1af8 100644 --- a/firmware/console/status_loop.cpp +++ b/firmware/console/status_loop.cpp @@ -102,7 +102,6 @@ extern WaveChart waveChart; int warningEnabled = true; -extern bool hasFirmwareErrorFlag; extern int maxTriggerReentraint; extern uint32_t maxLockedDuration; @@ -172,8 +171,7 @@ static void reportSensorI(Logging *log, const char *caption, const char *units, #endif /* EFI_FILE_LOGGING */ } -EXTERN_ENGINE -; +EXTERN_ENGINE; static char buf[6]; @@ -206,18 +204,7 @@ static void printSensors(Logging *log) { #endif // why do we still send data into console in text mode? - if (hasCltSensor()) { - reportSensorF(log, "CLT", "C", getCoolantTemperature(), 2); // log column #4 - } - - SensorResult tps = Sensor::get(SensorType::Tps1); - if (tps) { - reportSensorF(log, "TPS", "%", tps.Value, 2); // log column #5 - } - - if (hasIatSensor()) { - reportSensorF(log, "IAT", "C", getIntakeAirTemperature(), 2); // log column #7 - } + Sensor::showAllSensorInfo(log); if (hasVBatt(PASS_ENGINE_PARAMETER_SIGNATURE)) { reportSensorF(log, GAUGE_NAME_VBAT, "V", getVBatt(PASS_ENGINE_PARAMETER_SIGNATURE), 2); // log column #6 @@ -323,24 +310,20 @@ static void printSensors(Logging *log) { reportSensorF(log, GAUGE_NAME_TIMING_ADVANCE, "deg", engine->engineState.timingAdvance, 2); - if (hasPedalPositionSensor(PASS_ENGINE_PARAMETER_SIGNATURE)) { - // 136 - reportSensorF(log, GAUGE_NAME_THROTTLE_PEDAL, "%", getPedalPosition(PASS_ENGINE_PARAMETER_SIGNATURE), 2); - } + reportSensorF(log, GAUGE_NAME_THROTTLE_PEDAL, "%", Sensor::get(SensorType::AcceleratorPedal).value_or(0), 2); + floatms_t fuelBase = getBaseFuel(rpm PASS_ENGINE_PARAMETER_SUFFIX); + reportSensorF(log, GAUGE_NAME_FUEL_BASE, "ms", fuelBase, 2); + reportSensorF(log, GAUGE_NAME_FUEL_LAST_INJECTION, "ms", ENGINE(actualLastInjection), 2); + reportSensorF(log, GAUGE_NAME_INJECTOR_LAG, "ms", engine->engineState.running.injectorLag, 2); + reportSensorF(log, GAUGE_NAME_FUEL_RUNNING, "ms", ENGINE(engineState.running.fuel), 2); + // 268 + reportSensorF(log, GAUGE_NAME_FUEL_PID_CORR, "ms", ENGINE(engineState.running.pidCorrection), 2); - floatms_t fuelBase = getBaseFuel(rpm PASS_ENGINE_PARAMETER_SUFFIX); - reportSensorF(log, GAUGE_NAME_FUEL_BASE, "ms", fuelBase, 2); - reportSensorF(log, GAUGE_NAME_FUEL_LAST_INJECTION, "ms", ENGINE(actualLastInjection), 2); - reportSensorF(log, GAUGE_NAME_INJECTOR_LAG, "ms", engine->engineState.running.injectorLag, 2); - reportSensorF(log, GAUGE_NAME_FUEL_RUNNING, "ms", ENGINE(engineState.running.fuel), 2); - // 268 - reportSensorF(log, GAUGE_NAME_FUEL_PID_CORR, "ms", ENGINE(engineState.running.pidCorrection), 2); + reportSensorF(log, GAUGE_NAME_FUEL_WALL_AMOUNT, "v", ENGINE(wallFuel[0]).getWallFuel(), 2); + reportSensorF(log, GAUGE_NAME_FUEL_WALL_CORRECTION, "v", ENGINE(wallFuel[0]).wallFuelCorrection, 2); - reportSensorF(log, GAUGE_NAME_FUEL_WALL_AMOUNT, "v", ENGINE(wallFuel[0]).getWallFuel(), 2); - reportSensorF(log, GAUGE_NAME_FUEL_WALL_CORRECTION, "v", ENGINE(wallFuel[0]).wallFuelCorrection, 2); - - reportSensorI(log, GAUGE_NAME_VERSION, "#", getRusEfiVersion()); + reportSensorI(log, GAUGE_NAME_VERSION, "#", getRusEfiVersion()); #if EFI_VEHICLE_SPEED if (hasVehicleSpeedSensor()) { @@ -370,9 +353,6 @@ static void printSensors(Logging *log) { reportSensorF(log, GAUGE_NAME_DWELL_DUTY, "%", getCoilDutyCycle(rpm PASS_ENGINE_PARAMETER_SUFFIX), 2); - -// debugFloat(&logger, "tch", getTCharge1(tps), 2); - for (int i = 0;ifsioAdc[i] != EFI_ADC_NONE) { strcpy(buf, "adcX"); @@ -498,7 +478,7 @@ void updateDevConsoleState(void) { #if EFI_PROD_CODE // todo: unify with simulator! if (hasFirmwareError()) { - scheduleMsg(&logger, "FATAL error: %s", getFirmwareError()); + scheduleMsg(&logger, "%s error: %s", CRITICAL_PREFIX, getFirmwareError()); warningEnabled = false; scheduleLogging(&logger); return; @@ -585,14 +565,12 @@ static OutputPin *leds[] = { &enginePins.warningLedPin, &enginePins.runningLedPi static void initStatusLeds(void) { enginePins.communicationLedPin.initPin("led: comm status", engineConfiguration->communicationLedPin); // we initialize this here so that we can blink it on start-up - enginePins.checkEnginePin.initPin("MalfunctionIndicator", CONFIG(malfunctionIndicatorPin), &CONFIG(malfunctionIndicatorPinMode)); + enginePins.checkEnginePin.initPin("Check engine light", CONFIG(malfunctionIndicatorPin), &CONFIG(malfunctionIndicatorPinMode)); enginePins.warningLedPin.initPin("led: warning status", engineConfiguration->warningLedPin); enginePins.runningLedPin.initPin("led: running status", engineConfiguration->runningLedPin); enginePins.debugTriggerSync.initPin("debug: sync", CONFIG(debugTriggerSync)); - enginePins.debugTimerCallback.initPin("debug: timer callback", CONFIG(debugTimerCallback)); - enginePins.debugSetTimer.initPin("debug: set timer", CONFIG(debugSetTimer)); } #define BLINKING_PERIOD_MS 33 @@ -617,8 +595,8 @@ class CommunicationBlinkingTask : public PeriodicTimerController { } void setAllLeds(int value) { - // make sure we do not turn the fatal LED off if already have - // fatal error by now + // make sure we do not turn the critical LED off if already have + // critical error by now for (uint32_t i = 0; !hasFirmwareError() && i < sizeof(leds) / sizeof(leds[0]); i++) { leds[i]->setValue(value); } @@ -637,9 +615,9 @@ class CommunicationBlinkingTask : public PeriodicTimerController { enginePins.warningLedPin.setValue(0); } else { if (hasFirmwareError()) { - // special behavior in case of fatal error - not equal on/off time + // special behavior in case of critical error - not equal on/off time // this special behaviour helps to notice that something is not right, also - // differentiates software firmware error from fatal interrupt error with CPU halt. + // differentiates software firmware error from critical interrupt error with CPU halt. offTimeMs = 50; onTimeMs = 450; } else { @@ -709,9 +687,6 @@ void updateTunerStudioState(TunerStudioOutputChannels *tsOutputChannels DECLARE_ executorStatistics(); #endif /* EFI_PROD_CODE */ - float coolant = getCoolantTemperature(); - float intake = getIntakeAirTemperature(); - float engineLoad = getEngineLoadT(PASS_ENGINE_PARAMETER_SIGNATURE); // header @@ -719,10 +694,20 @@ void updateTunerStudioState(TunerStudioOutputChannels *tsOutputChannels DECLARE_ // offset 0 tsOutputChannels->rpm = rpm; - // offset 4 - tsOutputChannels->coolantTemperature = coolant; - // offset 8 - tsOutputChannels->intakeAirTemperature = intake; + + SensorResult clt = Sensor::get(SensorType::Clt); + tsOutputChannels->coolantTemperature = clt.Value; + tsOutputChannels->isCltError = !clt.Valid; + + SensorResult iat = Sensor::get(SensorType::Iat); + tsOutputChannels->intakeAirTemperature = iat.Value; + tsOutputChannels->isIatError = !iat.Valid; + + SensorResult auxTemp1 = Sensor::get(SensorType::AuxTemp1); + tsOutputChannels->auxTemp1 = auxTemp1.Value; + + SensorResult auxTemp2 = Sensor::get(SensorType::AuxTemp2); + tsOutputChannels->auxTemp2 = auxTemp2.Value; SensorResult tps1 = Sensor::get(SensorType::Tps1); tsOutputChannels->throttlePosition = tps1.Value; @@ -732,6 +717,17 @@ void updateTunerStudioState(TunerStudioOutputChannels *tsOutputChannels DECLARE_ SensorResult tps2 = Sensor::get(SensorType::Tps2); tsOutputChannels->throttle2Position = tps2.Value; + SensorResult pedal = Sensor::get(SensorType::AcceleratorPedal); + tsOutputChannels->pedalPosition = pedal.Value; + // Only report fail if you have one (many people don't) + tsOutputChannels->isPedalError = !pedal.Valid && Sensor::hasSensor(SensorType::AcceleratorPedal); + + // Set raw sensors + tsOutputChannels->rawTps1Primary = Sensor::getRaw(SensorType::Tps1); + tsOutputChannels->rawPpsPrimary = Sensor::getRaw(SensorType::AcceleratorPedal); + tsOutputChannels->rawClt = Sensor::getRaw(SensorType::Clt); + tsOutputChannels->rawIat = Sensor::getRaw(SensorType::Iat); + tsOutputChannels->rawOilPressure = Sensor::getRaw(SensorType::OilPressure); // offset 16 tsOutputChannels->massAirFlowVoltage = hasMafSensor() ? getMafVoltage(PASS_ENGINE_PARAMETER_SIGNATURE) : 0; @@ -742,10 +738,10 @@ void updateTunerStudioState(TunerStudioOutputChannels *tsOutputChannels DECLARE_ } // offset 24 tsOutputChannels->engineLoad = engineLoad; - if (hasVBatt(PASS_ENGINE_PARAMETER_SIGNATURE)) { - // offset 28 - tsOutputChannels->vBatt = getVBatt(PASS_ENGINE_PARAMETER_SIGNATURE); - } + + // KLUDGE? we always show VBatt because Proteus board has VBatt input sensor hardcoded + // offset 28 + tsOutputChannels->vBatt = getVBatt(PASS_ENGINE_PARAMETER_SIGNATURE); // offset 36 #if EFI_ANALOG_SENSORS @@ -771,8 +767,6 @@ void updateTunerStudioState(TunerStudioOutputChannels *tsOutputChannels DECLARE_ tsOutputChannels->orderingErrorCounter = engine->triggerCentral.triggerState.orderingErrorCounter; // 68 tsOutputChannels->baroCorrection = engine->engineState.baroCorrection; - // 136 - tsOutputChannels->pedalPosition = hasPedalPositionSensor(PASS_ENGINE_PARAMETER_SIGNATURE) ? getPedalPosition(PASS_ENGINE_PARAMETER_SIGNATURE) : 0; // 140 #if EFI_ENGINE_CONTROL tsOutputChannels->injectorDutyCycle = getInjectorDutyCycle(rpm PASS_ENGINE_PARAMETER_SUFFIX); @@ -828,13 +822,16 @@ void updateTunerStudioState(TunerStudioOutputChannels *tsOutputChannels DECLARE_ tsOutputChannels->knockCount = engine->knockCount; tsOutputChannels->knockLevel = engine->knockVolts; - tsOutputChannels->hasFatalError = hasFirmwareError(); + tsOutputChannels->hasCriticalError = hasFirmwareError(); tsOutputChannels->isWarnNow = engine->engineState.warnings.isWarningNow(timeSeconds, true); #if EFI_HIP_9011 tsOutputChannels->isKnockChipOk = (instance.invalidHip9011ResponsesCount == 0); #endif /* EFI_HIP_9011 */ +#if EFI_LAUNCH_CONTROL + tsOutputChannels->launchTriggered = engine->isLaunchCondition; +#endif tsOutputChannels->tpsAccelFuel = engine->engineState.tpsAccelEnrich; // engine load acceleration @@ -885,9 +882,6 @@ void updateTunerStudioState(TunerStudioOutputChannels *tsOutputChannels DECLARE_ #endif /* EFI_VEHICLE_SPEED */ #endif /* EFI_PROD_CODE */ - tsOutputChannels->isCltError = !hasCltSensor(); - tsOutputChannels->isIatError = !hasIatSensor(); - tsOutputChannels->fuelConsumptionPerHour = engine->engineState.fuelConsumption.perSecondConsumption; tsOutputChannels->warningCounter = engine->engineState.warnings.warningCounter; @@ -918,10 +912,8 @@ void updateTunerStudioState(TunerStudioOutputChannels *tsOutputChannels DECLARE_ #endif // EFI_ENGINE_CONTROL switch (engineConfiguration->debugMode) { - case DBG_AUX_TEMPERATURE: - // // 68 - tsOutputChannels->debugFloatField1 = engine->sensors.auxTemp1; - tsOutputChannels->debugFloatField2 = engine->sensors.auxTemp2; + case DBG_START_STOP: + tsOutputChannels->debugIntField1 = engine->startStopStateToggleCounter; break; case DBG_STATUS: tsOutputChannels->debugFloatField1 = timeSeconds; @@ -950,16 +942,21 @@ void updateTunerStudioState(TunerStudioOutputChannels *tsOutputChannels DECLARE_ case DBG_TRIGGER_COUNTERS: tsOutputChannels->debugIntField1 = engine->triggerCentral.getHwEventCounter((int)SHAFT_PRIMARY_FALLING); tsOutputChannels->debugIntField2 = engine->triggerCentral.getHwEventCounter((int)SHAFT_SECONDARY_FALLING); - tsOutputChannels->debugIntField3 = engine->triggerCentral.getHwEventCounter((int)SHAFT_3RD_FALLING); +// no one uses shaft so far tsOutputChannels->debugIntField3 = engine->triggerCentral.getHwEventCounter((int)SHAFT_3RD_FALLING); #if EFI_PROD_CODE && HAL_USE_ICU == TRUE + tsOutputChannels->debugIntField3 = icuRisingCallbackCounter + icuFallingCallbackCounter; tsOutputChannels->debugIntField4 = engine->triggerCentral.vvtEventRiseCounter; tsOutputChannels->debugIntField5 = engine->triggerCentral.vvtEventFallCounter; - tsOutputChannels->debugFloatField5 = icuRisingCallbackCounter + icuFallingCallbackCounter; #endif /* EFI_PROD_CODE */ tsOutputChannels->debugFloatField1 = engine->triggerCentral.getHwEventCounter((int)SHAFT_PRIMARY_RISING); tsOutputChannels->debugFloatField2 = engine->triggerCentral.getHwEventCounter((int)SHAFT_SECONDARY_RISING); - tsOutputChannels->debugFloatField3 = engine->triggerCentral.getHwEventCounter((int)SHAFT_3RD_RISING); + + tsOutputChannels->debugIntField4 = engine->triggerCentral.triggerState.currentCycle.eventCount[0]; + tsOutputChannels->debugIntField5 = engine->triggerCentral.triggerState.currentCycle.eventCount[1]; + + // debugFloatField6 used + // no one uses shaft so far tsOutputChannels->debugFloatField3 = engine->triggerCentral.getHwEventCounter((int)SHAFT_3RD_RISING); break; case DBG_FSIO_ADC: // todo: implement a proper loop diff --git a/firmware/console/tooth_logger.cpp b/firmware/console/tooth_logger.cpp index f8978d6a8f..e1c892c77c 100644 --- a/firmware/console/tooth_logger.cpp +++ b/firmware/console/tooth_logger.cpp @@ -11,47 +11,116 @@ #if EFI_TOOTH_LOGGER +EXTERN_ENGINE; + #include #include "efitime.h" #include "efilib.h" #include "tunerstudio_configuration.h" -static uint16_t buffer[1000] CCM_OPTIONAL; +typedef struct __attribute__ ((packed)) { + uint16_t timestamp; +} tooth_logger_s; + +typedef struct __attribute__ ((packed)) { + // the whole order of all packet bytes is reversed, not just the 'endian-swap' integers + uint32_t timestamp; + // unfortunately all these fields are required by TS... + bool priLevel : 1; + bool secLevel : 1; + bool trigger : 1; + bool sync : 1; +} composite_logger_s; + +static composite_logger_s buffer[COMPOSITE_PACKET_COUNT] CCM_OPTIONAL; static size_t NextIdx = 0; static volatile bool ToothLoggerEnabled = false; static uint32_t lastEdgeTimestamp = 0; -void SetNextEntry(uint16_t entry) { +static bool trigger1 = false; +static bool trigger2 = false; + +//char (*__kaboom)[sizeof( composite_logger_s )] = 1; +//char (*__kaboom)[sizeof( buffer )] = 1; + +//void SetNextToothEntry(uint16_t entry) { // TS uses big endian, grumble - buffer[NextIdx] = SWAP_UINT16(entry); +// buffer[NextIdx] = SWAP_UINT16(entry); + //NextIdx++; + + +static void SetNextCompositeEntry(efitick_t timestamp, bool trigger1, bool trigger2, + bool isTDC DECLARE_ENGINE_PARAMETER_SUFFIX) { + uint32_t nowUs = NT2US(timestamp); + // TS uses big endian, grumble + buffer[NextIdx].timestamp = SWAP_UINT32(nowUs); + buffer[NextIdx].priLevel = trigger1; + buffer[NextIdx].secLevel = trigger2; + buffer[NextIdx].trigger = isTDC; + buffer[NextIdx].sync = engine->triggerCentral.triggerState.shaft_is_synchronized; + // todo: + //buffer[NextIdx].sync = isSynced; + //buffer[NextIdx].trigger = wtfIsTriggerIdk; + NextIdx++; + static_assert(sizeof(composite_logger_s) == COMPOSITE_PACKET_SIZE, "composite packet size"); + // If we hit the end, loop if (NextIdx >= sizeof(buffer) / sizeof(buffer[0])) { NextIdx = 0; } } -void LogTriggerTooth(trigger_event_e tooth, efitick_t timestamp) { +void LogTriggerTooth(trigger_event_e tooth, efitick_t timestamp DECLARE_ENGINE_PARAMETER_SUFFIX) { // bail if we aren't enabled if (!ToothLoggerEnabled) { return; } - // We currently only support the primary trigger falling edge - // (this is the edge that VR sensors are accurate on) - // Since VR sensors are the most useful case here, this is okay for now. - if (tooth != SHAFT_PRIMARY_FALLING) { - return; +/* + // We currently only support the primary trigger falling edge + // (this is the edge that VR sensors are accurate on) + // Since VR sensors are the most useful case here, this is okay for now. + if (tooth != SHAFT_PRIMARY_FALLING) { + return; + } + + uint32_t nowUs = NT2US(timestamp); + // 10us per LSB - this gives plenty of accuracy, yet fits 655.35 ms in to a uint16 + uint16_t delta = static_cast((nowUs - lastEdgeTimestamp) / 10); + lastEdgeTimestamp = nowUs; + + SetNextEntry(delta); +*/ + + switch (tooth) { + case SHAFT_PRIMARY_FALLING: + trigger1 = false; + break; + case SHAFT_PRIMARY_RISING: + trigger1 = true; + break; + case SHAFT_SECONDARY_FALLING: + trigger2 = false; + break; + case SHAFT_SECONDARY_RISING: + trigger2 = true; + break; + default: + break; } - uint32_t nowUs = NT2US(timestamp); - // 10us per LSB - this gives plenty of accuracy, yet fits 655.35 ms in to a uint16 - uint16_t delta = static_cast((nowUs - lastEdgeTimestamp) / 10); - lastEdgeTimestamp = nowUs; + SetNextCompositeEntry(timestamp, trigger1, trigger2, false PASS_ENGINE_PARAMETER_SUFFIX); +} - SetNextEntry(delta); +void LogTriggerTopDeadCenter(efitick_t timestamp DECLARE_ENGINE_PARAMETER_SUFFIX) { + // bail if we aren't enabled + if (!ToothLoggerEnabled) { + return; + } + SetNextCompositeEntry(timestamp, trigger1, trigger2, true PASS_ENGINE_PARAMETER_SUFFIX); } void EnableToothLogger() { diff --git a/firmware/console/tooth_logger.h b/firmware/console/tooth_logger.h index b1cf3469bf..d88552e7be 100644 --- a/firmware/console/tooth_logger.h +++ b/firmware/console/tooth_logger.h @@ -11,6 +11,7 @@ #include #include "efitime.h" #include "rusefi_enums.h" +#include "engine.h" // Enable the tooth logger - this clears the buffer starts logging void EnableToothLogger(); @@ -19,7 +20,9 @@ void EnableToothLogger(); void DisableToothLogger(); // A new tooth has arrived! Log to the buffer if enabled. -void LogTriggerTooth(trigger_event_e tooth, efitick_t timestamp); +void LogTriggerTooth(trigger_event_e tooth, efitick_t timestamp DECLARE_ENGINE_PARAMETER_SUFFIX); + +void LogTriggerTopDeadCenter(efitick_t timestamp DECLARE_ENGINE_PARAMETER_SUFFIX); struct ToothLoggerBuffer { diff --git a/firmware/controllers/actuators/alternator_controller.cpp b/firmware/controllers/actuators/alternator_controller.cpp index a3c3452089..596fc04cd3 100644 --- a/firmware/controllers/actuators/alternator_controller.cpp +++ b/firmware/controllers/actuators/alternator_controller.cpp @@ -22,7 +22,7 @@ #include "local_version_holder.h" #include "periodic_task.h" -#include "pwm_generator.h" +#include "pwm_generator_logic.h" #include "pin_repository.h" @@ -30,14 +30,12 @@ #error "Unexpected OS ACCESS HERE" #endif /* HAS_OS_ACCESS */ -EXTERN_ENGINE -; +EXTERN_ENGINE; static Logging *logger; static SimplePwm alternatorControl("alt"); -static pid_s *altPidS = &persistentState.persistentConfiguration.engineConfiguration.alternatorControl; -static PidIndustrial alternatorPid(altPidS); +static PidIndustrial alternatorPid(&persistentState.persistentConfiguration.engineConfiguration.alternatorControl); static percent_t currentAltDuty; @@ -164,8 +162,7 @@ void initAlternatorCtrl(Logging *sharedLogger DECLARE_ENGINE_PARAMETER_SUFFIX) { return; if (CONFIG(onOffAlternatorLogic)) { - enginePins.alternatorPin.initPin("on/off alternator", CONFIG(alternatorControlPin)); - + enginePins.alternatorPin.initPin("Alternator control", CONFIG(alternatorControlPin)); } else { startSimplePwmExt(&alternatorControl, "Alternator control", diff --git a/firmware/controllers/actuators/alternator_controller.h b/firmware/controllers/actuators/alternator_controller.h index 8e3fc8d44a..42f3a00c6c 100644 --- a/firmware/controllers/actuators/alternator_controller.h +++ b/firmware/controllers/actuators/alternator_controller.h @@ -7,8 +7,8 @@ * @author Andrey Belomutskiy, (c) 2012-2020 * */ -#ifndef ALTERNATORCONTROLLER_H_ -#define ALTERNATORCONTROLLER_H_ + +#pragma once #include "engine.h" void initAlternatorCtrl(Logging *sharedLogger); @@ -19,5 +19,3 @@ void showAltInfo(void); void setDefaultAlternatorParameters(DECLARE_CONFIG_PARAMETER_SIGNATURE); void onConfigurationChangeAlternatorCallback(engine_configuration_s *previousConfiguration); - -#endif /* ALTERNATORCONTROLLER_H_ */ diff --git a/firmware/controllers/actuators/aux_pid.cpp b/firmware/controllers/actuators/aux_pid.cpp index 7bd367d806..53c4480b4f 100644 --- a/firmware/controllers/actuators/aux_pid.cpp +++ b/firmware/controllers/actuators/aux_pid.cpp @@ -12,7 +12,7 @@ #include "allsensors.h" #if EFI_AUX_PID -#include "pwm_generator.h" +#include "pwm_generator_logic.h" #include "tunerstudio_configuration.h" #include "fsio_impl.h" #include "engine_math.h" @@ -23,10 +23,9 @@ #if defined(HAS_OS_ACCESS) #error "Unexpected OS ACCESS HERE" -#endif +#endif /* HAS_OS_ACCESS */ -EXTERN_ENGINE -; +EXTERN_ENGINE; extern fsio8_Map3D_f32t fsioTable1; @@ -57,8 +56,7 @@ public: void init(int index) { this->index = index; - pid_s *auxPidS = &persistentState.persistentConfiguration.engineConfiguration.auxPid[index]; - auxPid.initPidClass(auxPidS); + auxPid.initPidClass(&persistentState.persistentConfiguration.engineConfiguration.auxPid[index]); table = getFSIOTable(index); } @@ -124,7 +122,7 @@ static void turnAuxPidOn(int index) { &engine->executor, engineConfiguration->auxPidPins[index], &instances[index].auxOutputPin, - engineConfiguration->auxPidFrequency[index], 0.1, (pwm_gen_callback*)applyPinState); + engineConfiguration->auxPidFrequency[index], 0.1); } void startAuxPins(void) { diff --git a/firmware/controllers/actuators/aux_pid.h b/firmware/controllers/actuators/aux_pid.h index 66c7705234..3745f3c476 100644 --- a/firmware/controllers/actuators/aux_pid.h +++ b/firmware/controllers/actuators/aux_pid.h @@ -5,8 +5,7 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ -#ifndef CONTROLLERS_ALGO_AUX_PID_H_ -#define CONTROLLERS_ALGO_AUX_PID_H_ +#pragma once #include "global.h" @@ -14,4 +13,3 @@ void initAuxPid(Logging *sharedLogger); void startAuxPins(void); void stopAuxPins(void); -#endif /* CONTROLLERS_ALGO_AUX_PID_H_ */ diff --git a/firmware/controllers/actuators/boost_control.cpp b/firmware/controllers/actuators/boost_control.cpp index fecd204692..1e0b5f7923 100644 --- a/firmware/controllers/actuators/boost_control.cpp +++ b/firmware/controllers/actuators/boost_control.cpp @@ -13,7 +13,7 @@ #endif /* EFI_TUNER_STUDIO */ #include "engine.h" #include "boost_control.h" -#include "tps.h" +#include "sensor.h" #include "map.h" #include "io_pins.h" #include "engine_configuration.h" @@ -22,7 +22,7 @@ #include "engine_controller.h" #include "periodic_task.h" #include "pin_repository.h" -#include "pwm_generator.h" +#include "pwm_generator_logic.h" #include "pid_auto_tune.h" #include "local_version_holder.h" #define NO_PIN_PERIOD 500 @@ -37,8 +37,7 @@ static Logging *logger; static boostOpenLoop_Map3D_t boostMapOpen("boostmapopen", 1); static boostOpenLoop_Map3D_t boostMapClosed("boostmapclosed", 1); static SimplePwm boostPwmControl("boost"); -static pid_s *boostPidS = &persistentState.persistentConfiguration.engineConfiguration.boostPid; -static Pid boostControlPid(boostPidS); +static Pid boostControlPid; static bool shouldResetPid = false; @@ -51,6 +50,8 @@ static void pidReset(void) { } class BoostControl: public PeriodicTimerController { + DECLARE_ENGINE_PTR; + int getPeriodMs() override { return GET_PERIOD_LIMITED(&engineConfiguration->boostPid); } @@ -78,10 +79,13 @@ class BoostControl: public PeriodicTimerController { percent_t duty = openLoopDuty; if (engineConfiguration->boostType == CLOSED_LOOP) { - float tps = getTPS(PASS_ENGINE_PARAMETER_SIGNATURE); - float targetBoost = boostMapClosed.getValue(rpm / RPM_1_BYTE_PACKING_MULT, tps / TPS_1_BYTE_PACKING_MULT) * LOAD_1_BYTE_PACKING_MULT; - closedLoopDuty = openLoopDuty + boostControlPid.getOutput(targetBoost, mapValue); - duty += closedLoopDuty; + auto [valid, tps] = Sensor::get(SensorType::DriverThrottleIntent); + + if (valid) { + float targetBoost = boostMapClosed.getValue(rpm / RPM_1_BYTE_PACKING_MULT, tps / TPS_1_BYTE_PACKING_MULT) * LOAD_1_BYTE_PACKING_MULT; + closedLoopDuty = openLoopDuty + boostControlPid.getOutput(targetBoost, mapValue); + duty += closedLoopDuty; + } } boostControlPid.iTermMin = -50; @@ -95,16 +99,22 @@ class BoostControl: public PeriodicTimerController { #endif /* EFI_TUNER_STUDIO */ } +#if EFI_LAUNCH_CONTROL + if (engine->setLaunchBoostDuty) { + duty = engineConfiguration->launchBoostDuty; + } +#endif /* EFI_LAUNCH_CONTROL */ + boostPwmControl.setSimplePwmDutyCycle(PERCENT_TO_DUTY(duty)); } }; static BoostControl BoostController; +#if !EFI_UNIT_TEST void setBoostPFactor(float value) { engineConfiguration->boostPid.pFactor = value; boostControlPid.reset(); - } void setBoostIFactor(float value) { @@ -116,6 +126,7 @@ void setBoostDFactor(float value) { engineConfiguration->boostPid.dFactor = value; boostControlPid.reset(); } +#endif /* EFI_UNIT_TEST */ void setDefaultBoostParameters(DECLARE_CONFIG_PARAMETER_SIGNATURE) { engineConfiguration->isBoostControlEnabled = true; @@ -146,6 +157,7 @@ void setDefaultBoostParameters(DECLARE_CONFIG_PARAMETER_SIGNATURE) { } static void turnBoostPidOn() { +#if !EFI_UNIT_TEST if (CONFIG(boostControlPin) == GPIO_UNASSIGNED){ return; } @@ -157,9 +169,9 @@ static void turnBoostPidOn() { CONFIG(boostControlPin), &enginePins.boostPin, engineConfiguration->boostPwmFrequency, - 0.5f, - (pwm_gen_callback*) applyPinState + 0.5f ); +#endif /* EFI_UNIT_TEST */ } void startBoostPin(void) { @@ -167,7 +179,9 @@ void startBoostPin(void) { } void stopBoostPin(void) { +#if !EFI_UNIT_TEST brain_pin_markUnused(activeConfiguration.boostControlPin); +#endif /* EFI_UNIT_TEST */ } void onConfigurationChangeBoostCallback(engine_configuration_s *previousConfiguration) { @@ -175,16 +189,22 @@ void onConfigurationChangeBoostCallback(engine_configuration_s *previousConfigur } void initBoostCtrl(Logging *sharedLogger DECLARE_ENGINE_PARAMETER_SUFFIX) { +#if !EFI_UNIT_TEST if (CONFIG(boostControlPin) == GPIO_UNASSIGNED){ return; } +#endif + + boostControlPid.initPidClass(&engineConfiguration->boostPid); logger = sharedLogger; boostMapOpen.init(config->boostTableOpenLoop, config->boostMapBins, config->boostRpmBins); boostMapClosed.init(config->boostTableClosedLoop, config->boostTpsBins, config->boostRpmBins); boostControlPid.reset(); +#if !EFI_UNIT_TEST startBoostPin(); BoostController.Start(); +#endif } #endif diff --git a/firmware/controllers/actuators/boost_control.h b/firmware/controllers/actuators/boost_control.h index 33407167fb..3554f35828 100644 --- a/firmware/controllers/actuators/boost_control.h +++ b/firmware/controllers/actuators/boost_control.h @@ -9,19 +9,12 @@ #include "engine.h" #include "periodic_task.h" - - - - void startBoostPin(void); void stopBoostPin(void); -void initBoostCtrl(Logging *sharedLogger); +void initBoostCtrl(Logging *sharedLogger DECLARE_ENGINE_PARAMETER_SUFFIX); void setBoostPFactor(float p); void setBoostIFactor(float i); void setBoostDFactor(float d); void setDefaultBoostParameters(DECLARE_CONFIG_PARAMETER_SIGNATURE); void showBoostInfo(void); void onConfigurationChangeBoostCallback(engine_configuration_s *previousConfiguration); - - - diff --git a/firmware/controllers/actuators/dc_motors.cpp b/firmware/controllers/actuators/dc_motors.cpp index e5edd33863..27e666b9cb 100644 --- a/firmware/controllers/actuators/dc_motors.cpp +++ b/firmware/controllers/actuators/dc_motors.cpp @@ -15,7 +15,7 @@ #include "dc_motor.h" #include "efi_gpio.h" -#include "pwm_generator.h" +#include "pwm_generator_logic.h" EXTERN_ENGINE; @@ -24,6 +24,7 @@ private: OutputPin m_pinEnable; OutputPin m_pinDir1; OutputPin m_pinDir2; + OutputPin m_disablePin; SimplePwm m_pwmEnable; SimplePwm m_pwmDir1; @@ -32,7 +33,7 @@ private: SimplePwm etbPwmUp; public: - EtbHardware() : etbPwmUp("etbUp"), dcMotor(&m_pwmEnable, &m_pwmDir1, &m_pwmDir2) {} + EtbHardware() : etbPwmUp("etbUp"), dcMotor(&m_pwmEnable, &m_pwmDir1, &m_pwmDir2, &m_disablePin) {} TwoPinDcMotor dcMotor; @@ -45,14 +46,17 @@ public: void start(bool useTwoWires, brain_pin_e pinEnable, // since we have pointer magic here we cannot simply have value parameter - const pin_output_mode_e *pinEnableMode, brain_pin_e pinDir1, brain_pin_e pinDir2, + brain_pin_e pinDisable, ExecutorInterface* executor, int frequency) { dcMotor.setType(useTwoWires ? TwoPinDcMotor::ControlType::PwmDirectionPins : TwoPinDcMotor::ControlType::PwmEnablePin); - m_pinEnable.initPin("ETB Enable", pinEnable, pinEnableMode); + // Configure the disable pin first - ensure things are in a safe state + m_disablePin.initPin("ETB Disable", pinDisable); + + m_pinEnable.initPin("ETB Enable", pinEnable); m_pinDir1.initPin("ETB Dir 1", pinDir1); m_pinDir2.initPin("ETB Dir 2", pinDir2); @@ -65,24 +69,21 @@ public: executor, &m_pinEnable, clampedFrequency, - 0, - (pwm_gen_callback*)applyPinState + 0 ); startSimplePwm(&m_pwmDir1, "ETB Dir 1", executor, &m_pinDir1, clampedFrequency, - 0, - (pwm_gen_callback*)applyPinState + 0 ); startSimplePwm(&m_pwmDir2, "ETB Dir 2", executor, &m_pinDir2, clampedFrequency, - 0, - (pwm_gen_callback*)applyPinState + 0 ); #endif /* EFI_UNIT_TEST */ } @@ -95,13 +96,12 @@ DcMotor* initDcMotor(size_t index DECLARE_ENGINE_PARAMETER_SUFFIX) const auto& io = engineConfiguration->etbIo[index]; auto& hw = etbHardware[index]; - // controlPinMode is a strange feature - it's simply because I am short on 5v I/O on Frankenso with Miata NB2 test mule hw.start( CONFIG(etb_use_two_wires), io.controlPin1, - &io.controlPinMode, io.directionPin1, io.directionPin2, + io.disablePin, &ENGINE(executor), CONFIG(etbFreq) ); @@ -126,4 +126,4 @@ void showDcMotorInfo(Logging* logger) { scheduleMsg(logger, "Motor: dir=%d DC=%f", etb->dcMotor.isOpenDirection(), etb->dcMotor.get()); } } -#endif \ No newline at end of file +#endif diff --git a/firmware/controllers/actuators/electronic_throttle.cpp b/firmware/controllers/actuators/electronic_throttle.cpp index 09384a4a14..3a15ef31ec 100644 --- a/firmware/controllers/actuators/electronic_throttle.cpp +++ b/firmware/controllers/actuators/electronic_throttle.cpp @@ -76,13 +76,7 @@ #include "electronic_throttle.h" #include "tps.h" -#include "io_pins.h" -#include "engine_configuration.h" -#include "pwm_generator_logic.h" -#include "pid.h" -#include "engine_controller.h" -#include "periodic_task.h" -#include "pin_repository.h" +#include "sensor.h" #include "dc_motor.h" #include "dc_motors.h" #include "pid_auto_tune.h" @@ -95,10 +89,6 @@ #define ETB_MAX_COUNT 2 #endif /* ETB_MAX_COUNT */ -static pid_s tuneWorkingPidSettings; -static Pid tuneWorkingPid(&tuneWorkingPidSettings); -static PID_AutoTune autoTune; - static LoggingWithStorage logger("ETB"); static pedal2tps_t pedal2tpsMap("Pedal2Tps", 1); @@ -108,19 +98,25 @@ static bool startupPositionError = false; #define STARTUP_NEUTRAL_POSITION_ERROR_THRESHOLD 5 -extern percent_t mockPedalPosition; +static SensorType indexToTpsSensor(size_t index) { + switch(index) { + case 0: return SensorType::Tps1; + default: return SensorType::Tps2; + } +} static percent_t directPwmValue = NAN; static percent_t currentEtbDuty; #define ETB_DUTY_LIMIT 0.9 // this macro clamps both positive and negative percentages from about -100% to 100% -#define ETB_PERCENT_TO_DUTY(X) (maxF(minF((X * 0.01), ETB_DUTY_LIMIT - 0.01), 0.01 - ETB_DUTY_LIMIT)) +#define ETB_PERCENT_TO_DUTY(x) (clampF(-ETB_DUTY_LIMIT, 0.01f * (x), ETB_DUTY_LIMIT)) -void EtbController::init(DcMotor *motor, int ownIndex, pid_s *pidParameters) { +void EtbController::init(DcMotor *motor, int ownIndex, pid_s *pidParameters, const ValueProvider3D* pedalMap) { m_motor = motor; m_myIndex = ownIndex; m_pid.initPidClass(pidParameters); + m_pedalMap = pedalMap; } void EtbController::reset() { @@ -141,6 +137,182 @@ int EtbController::getPeriodMs() { return GET_PERIOD_LIMITED(&engineConfiguration->etb); } +expected EtbController::observePlant() const { + return Sensor::get(indexToTpsSensor(m_myIndex)); +} + +void EtbController::setIdlePosition(percent_t pos) { + m_idlePosition = pos; +} + +expected EtbController::getSetpoint() const { + // A few extra preconditions if throttle control is invalid + if (startupPositionError) { + return unexpected; + } + + if (engineConfiguration->pauseEtbControl) { + return unexpected; + } + + // If the pedal map hasn't been set, we can't provide a setpoint. + if (!m_pedalMap) { + return unexpected; + } + + auto pedalPosition = Sensor::get(SensorType::AcceleratorPedal); + if (!pedalPosition.Valid) { + return unexpected; + } + + float sanitizedPedal = clampF(0, pedalPosition.Value, 100); + + float rpm = GET_RPM(); + float targetFromTable = m_pedalMap->getValue(rpm / RPM_1_BYTE_PACKING_MULT, sanitizedPedal); + engine->engineState.targetFromTable = targetFromTable; + + percent_t etbIdlePosition = clampF( + 0, + CONFIG(useETBforIdleControl) ? m_idlePosition : 0, + 100 + ); + percent_t etbIdleAddition = 0.01f * CONFIG(etbIdleThrottleRange) * etbIdlePosition; + + // Interpolate so that the idle adder just "compresses" the throttle's range upward. + // [0, 100] -> [idle, 100] + // 0% target from table -> idle position as target + // 100% target from table -> 100% target position + percent_t targetPosition = interpolateClamped(0, etbIdleAddition, 100, 100, targetFromTable); + +#if EFI_TUNER_STUDIO + if (m_myIndex == 0) { + tsOutputChannels.etbTarget = targetPosition; + } +#endif + + return targetPosition; +} + +expected EtbController::getOpenLoop(percent_t target) const { + float ff = interpolate2d("etbb", target, engineConfiguration->etbBiasBins, engineConfiguration->etbBiasValues); + engine->engineState.etbFeedForward = ff; + return ff; +} + +expected EtbController::getClosedLoopAutotune(percent_t actualThrottlePosition) { + // Estimate gain at 60% position - this should be well away from the spring and in the linear region + bool isPositive = actualThrottlePosition > 60.0f; + + float autotuneAmplitude = 20; + + // End of cycle - record & reset + if (!isPositive && m_lastIsPositive) { + efitick_t now = getTimeNowNt(); + + // Determine period + float tu = NT2US((float)(now - m_cycleStartTime)) / 1e6; + m_cycleStartTime = now; + + // Determine amplitude + float a = m_maxCycleTps - m_minCycleTps; + + // Filter - it's pretty noisy since the ultimate period is not very many loop periods + constexpr float alpha = 0.05; + m_a = alpha * a + (1 - alpha) * m_a; + m_tu = alpha * tu + (1 - alpha) * m_tu; + + // Reset bounds + m_minCycleTps = 100; + m_maxCycleTps = 0; + + // Math is for Åström–Hägglund (relay) auto tuning + // https://warwick.ac.uk/fac/cross_fac/iatl/reinvention/archive/volume5issue2/hornsey + + // Publish to TS state +#if EFI_TUNER_STUDIO + if (engineConfiguration->debugMode == DBG_ETB_AUTOTUNE) { + // a - amplitude of output (TPS %) + + tsOutputChannels.debugFloatField1 = m_a; + float b = 2 * autotuneAmplitude; + // b - amplitude of input (Duty cycle %) + tsOutputChannels.debugFloatField2 = b; + // Tu - oscillation period (seconds) + tsOutputChannels.debugFloatField3 = m_tu; + + // Ultimate gain per A-H relay tuning rule + // Ku + float ku = 4 * b / (3.14159f * m_a); + tsOutputChannels.debugFloatField4 = ku; + + // The multipliers below are somewhere near the "no overshoot" + // and "some overshoot" flavors of the Ziegler-Nichols method + // Kp + tsOutputChannels.debugFloatField5 = 0.35f * ku; + // Ki + tsOutputChannels.debugFloatField6 = 0.25f * ku / m_tu; + // Kd + tsOutputChannels.debugFloatField7 = 0.08f * ku * m_tu; + } +#endif + } + + m_lastIsPositive = isPositive; + + // Find the min/max of each cycle + if (actualThrottlePosition < m_minCycleTps) { + m_minCycleTps = actualThrottlePosition; + } + + if (actualThrottlePosition > m_maxCycleTps) { + m_maxCycleTps = actualThrottlePosition; + } + + // Bang-bang control the output to induce oscillation + return autotuneAmplitude * (isPositive ? -1 : 1); +} + +expected EtbController::getClosedLoop(percent_t target, percent_t actualThrottlePosition) { + if (m_shouldResetPid) { + m_pid.reset(); + m_shouldResetPid = false; + } + + // Only report the 0th throttle + if (m_myIndex == 0) { +#if EFI_TUNER_STUDIO + // Error is positive if the throttle needs to open further + tsOutputChannels.etb1Error = target - actualThrottlePosition; +#endif /* EFI_TUNER_STUDIO */ + } + + // Only allow autotune with stopped engine + if (GET_RPM() == 0 && engine->etbAutoTune) { + return getClosedLoopAutotune(actualThrottlePosition); + } else { + // Normal case - use PID to compute closed loop part + return m_pid.getOutput(target, actualThrottlePosition); + } +} + +void EtbController::setOutput(expected outputValue) { +#if EFI_TUNER_STUDIO + // Only report first-throttle stats + if (m_myIndex == 0) { + tsOutputChannels.etb1DutyCycle = outputValue.value_or(0); + } +#endif + + if (!m_motor) return; + + if (outputValue) { + m_motor->enable(); + m_motor->set(ETB_PERCENT_TO_DUTY(outputValue.Value)); + } else { + m_motor->disable(); + } +} + void EtbController::PeriodicTask() { #if EFI_TUNER_STUDIO // Only debug throttle #0 @@ -156,60 +328,11 @@ void EtbController::PeriodicTask() { } #endif /* EFI_TUNER_STUDIO */ - if (!m_motor) { - return; - } - - if (startupPositionError) { - m_motor->set(0); - return; - } - - if (m_shouldResetPid) { - m_pid.reset(); - m_shouldResetPid = false; - } - if (!cisnan(directPwmValue)) { m_motor->set(directPwmValue); return; } - if (engineConfiguration->pauseEtbControl) { - m_motor->set(0); - return; - } - - percent_t actualThrottlePosition = getTPSWithIndex(m_myIndex PASS_ENGINE_PARAMETER_SUFFIX); - - if (engine->etbAutoTune) { - autoTune.input = actualThrottlePosition; - bool result = autoTune.Runtime(&logger); - - tuneWorkingPid.updateFactors(autoTune.output, 0, 0); - - float value = tuneWorkingPid.getOutput(50, actualThrottlePosition); - scheduleMsg(&logger, "AT input=%f output=%f PID=%f", autoTune.input, - autoTune.output, - value); - scheduleMsg(&logger, "AT PID=%f", value); - m_motor->set(ETB_PERCENT_TO_DUTY(value)); - - if (result) { - scheduleMsg(&logger, "GREAT NEWS! %f/%f/%f", autoTune.GetKp(), autoTune.GetKi(), autoTune.GetKd()); - } - - return; - } - - - percent_t pedalPosition = getPedalPosition(PASS_ENGINE_PARAMETER_SIGNATURE); - - int rpm = GET_RPM(); - engine->engineState.targetFromTable = pedal2tpsMap.getValue(rpm / RPM_1_BYTE_PACKING_MULT, pedalPosition); - percent_t etbIdleAddition = CONFIG(useETBforIdleControl) ? engine->engineState.idle.etbIdleAddition : 0; - percent_t targetPosition = engine->engineState.targetFromTable + etbIdleAddition; - if (engineConfiguration->debugMode == DBG_ETB_LOGIC) { #if EFI_TUNER_STUDIO tsOutputChannels.debugFloatField1 = engine->engineState.targetFromTable; @@ -217,27 +340,16 @@ void EtbController::PeriodicTask() { #endif /* EFI_TUNER_STUDIO */ } - if (cisnan(targetPosition)) { - // this could happen while changing settings - warning(CUSTOM_ERR_ETB_TARGET, "target"); - return; - } - engine->engineState.etbFeedForward = interpolate2d("etbb", targetPosition, engineConfiguration->etbBiasBins, engineConfiguration->etbBiasValues); - m_pid.iTermMin = engineConfiguration->etb_iTermMin; m_pid.iTermMax = engineConfiguration->etb_iTermMax; - currentEtbDuty = engine->engineState.etbFeedForward + - m_pid.getOutput(targetPosition, actualThrottlePosition); - - m_motor->set(ETB_PERCENT_TO_DUTY(currentEtbDuty)); - if (engineConfiguration->isVerboseETB) { m_pid.showPidStatus(&logger, "ETB"); } + update(); + DISPLAY_STATE(Engine) -DISPLAY(DISPLAY_IF(hasEtbPedalPositionSensor)) DISPLAY_TEXT(Electronic_Throttle); DISPLAY_SENSOR(TPS) DISPLAY_TEXT(eol); @@ -276,19 +388,6 @@ DISPLAY(DISPLAY_IF(hasEtbPedalPositionSensor)) /* DISPLAY_ELSE */ DISPLAY_TEXT(No_Pedal_Sensor); /* DISPLAY_ENDIF */ - - // Only report the 0th throttle - if (m_myIndex == 0) { -#if EFI_TUNER_STUDIO - // 312 - tsOutputChannels.etbTarget = targetPosition; - // 316 - tsOutputChannels.etb1DutyCycle = currentEtbDuty; - // 320 - // Error is positive if the throttle needs to open further - tsOutputChannels.etb1Error = targetPosition - actualThrottlePosition; -#endif /* EFI_TUNER_STUDIO */ - } } // real implementation (we mock for some unit tests) @@ -296,8 +395,6 @@ EtbController etbControllers[ETB_COUNT]; static void showEthInfo(void) { #if EFI_PROD_CODE - static char pinNameBuffer[16]; - if (engine->etbActualCount == 0) { scheduleMsg(&logger, "ETB DISABLED since no PPS"); } @@ -305,13 +402,7 @@ static void showEthInfo(void) { scheduleMsg(&logger, "etbAutoTune=%d", engine->etbAutoTune); - scheduleMsg(&logger, "throttlePedal=%.2f %.2f/%.2f @%s", - getPedalPosition(PASS_ENGINE_PARAMETER_SIGNATURE), - engineConfiguration->throttlePedalUpVoltage, - engineConfiguration->throttlePedalWOTVoltage, - getPinNameByAdcChannel("tPedal", engineConfiguration->throttlePedalPositionAdcChannel, pinNameBuffer)); - - scheduleMsg(&logger, "TPS=%.2f", getTPS(PASS_ENGINE_PARAMETER_SIGNATURE)); + scheduleMsg(&logger, "TPS=%.2f", Sensor::get(SensorType::Tps1).value_or(0)); scheduleMsg(&logger, "etbControlPin1=%s duty=%.2f freq=%d", @@ -371,8 +462,6 @@ static void etbReset() { } etbPidReset(); - - mockPedalPosition = MOCK_UNDEFINED; } #endif /* EFI_PROD_CODE */ @@ -415,34 +504,19 @@ void setEtbOffset(int value) { #endif /* EFI_UNIT_TEST */ -void setBoschVNH2SP30Curve(DECLARE_CONFIG_PARAMETER_SIGNATURE) { - engineConfiguration->etbBiasBins[0] = 0; - engineConfiguration->etbBiasBins[1] = 1; - engineConfiguration->etbBiasBins[2] = 5; - /** - * This specific throttle has default position of about 7% open - */ - engineConfiguration->etbBiasBins[3] = 7; - engineConfiguration->etbBiasBins[4] = 14; - engineConfiguration->etbBiasBins[5] = 65; - engineConfiguration->etbBiasBins[6] = 66; - engineConfiguration->etbBiasBins[7] = 100; +/** + * This specific throttle has default position of about 7% open + */ +static const float boschBiasBins[] = { + 0, 1, 5, 7, 14, 65, 66, 100 +}; +static const float boschBiasValues[] = { + -15, -15, -10, 0, 19, 20, 26, 28 +}; - /** - * Some negative bias for below-default position - */ - engineConfiguration->etbBiasValues[0] = -15; - engineConfiguration->etbBiasValues[1] = -15; - engineConfiguration->etbBiasValues[2] = -10; - /** - * Zero bias for index which corresponds to default throttle position, when no current is applied - * This specific throttle has default position of about 7% open - */ - engineConfiguration->etbBiasValues[3] = 0; - engineConfiguration->etbBiasValues[4] = 19; - engineConfiguration->etbBiasValues[5] = 20; - engineConfiguration->etbBiasValues[6] = 26; - engineConfiguration->etbBiasValues[7] = 28; +void setBoschVNH2SP30Curve(DECLARE_CONFIG_PARAMETER_SIGNATURE) { + copyArray(CONFIG(etbBiasBins), boschBiasBins); + copyArray(CONFIG(etbBiasValues), boschBiasValues); } void setDefaultEtbParameters(DECLARE_CONFIG_PARAMETER_SIGNATURE) { @@ -461,17 +535,17 @@ void setDefaultEtbParameters(DECLARE_CONFIG_PARAMETER_SIGNATURE) { engineConfiguration->throttlePedalUpVoltage = 0; // that's voltage, not ADC like with TPS engineConfiguration->throttlePedalWOTVoltage = 6; // that's voltage, not ADC like with TPS - engineConfiguration->etb.pFactor = 1; - engineConfiguration->etb.iFactor = 0.05; - engineConfiguration->etb.dFactor = 0.0; - engineConfiguration->etb.periodMs = (1000 / DEFAULT_ETB_LOOP_FREQUENCY); - engineConfiguration->etbFreq = DEFAULT_ETB_PWM_FREQUENCY; + engineConfiguration->etb = { + 1, // Kp + 10, // Ki + 0.05, // Kd + 0, // offset + (1000 / DEFAULT_ETB_LOOP_FREQUENCY), + -100, 100 // min/max + }; + engineConfiguration->etb_iTermMin = -300; engineConfiguration->etb_iTermMax = 300; - - // values are above 100% since we have feedforward part of the total summation - engineConfiguration->etb.minValue = -200; - engineConfiguration->etb.maxValue = 200; } void onConfigurationChangeElectronicThrottleCallback(engine_configuration_s *previousConfiguration) { @@ -493,58 +567,24 @@ static void setAutoStep(float value) { autoTune.SetOutputStep(value); } -static void setAutoPeriod(int period) { - tuneWorkingPidSettings.periodMs = period; - autoTune.reset(); -} - -static void setAutoOffset(int offset) { - tuneWorkingPidSettings.offset = offset; - autoTune.reset(); -} #endif /* EFI_PROD_CODE */ -void setDefaultEtbBiasCurve(DECLARE_CONFIG_PARAMETER_SIGNATURE) { - engineConfiguration->etbBiasBins[0] = 0; - engineConfiguration->etbBiasBins[1] = 1; - engineConfiguration->etbBiasBins[2] = 2; - /** - * This specific throttle has default position of about 4% open - */ - engineConfiguration->etbBiasBins[3] = 4; - engineConfiguration->etbBiasBins[4] = 7; - engineConfiguration->etbBiasBins[5] = 98; - engineConfiguration->etbBiasBins[6] = 99; - engineConfiguration->etbBiasBins[7] = 100; +static const float defaultBiasBins[] = { + 0, 1, 2, 4, 7, 98, 99, 100 +}; +static const float defaultBiasValues[] = { + -20, -18, -17, 0, 20, 21, 22, 25 +}; - /** - * Some negative bias for below-default position - */ - engineConfiguration->etbBiasValues[0] = -20; - engineConfiguration->etbBiasValues[1] = -18; - engineConfiguration->etbBiasValues[2] = -17; - /** - * Zero bias for index which corresponds to default throttle position, when no current is applied - * This specific throttle has default position of about 4% open - */ - engineConfiguration->etbBiasValues[3] = 0; - engineConfiguration->etbBiasValues[4] = 20; - engineConfiguration->etbBiasValues[5] = 21; - engineConfiguration->etbBiasValues[6] = 22; - engineConfiguration->etbBiasValues[7] = 25; +void setDefaultEtbBiasCurve(DECLARE_CONFIG_PARAMETER_SIGNATURE) { + copyArray(CONFIG(etbBiasBins), defaultBiasBins); + copyArray(CONFIG(etbBiasValues), defaultBiasValues); } void unregisterEtbPins() { // todo: we probably need an implementation here?! } -void initElectronicThrottle(DECLARE_ENGINE_PARAMETER_SIGNATURE) { - for (int i = 0; i < ETB_COUNT; i++) { - engine->etbControllers[i] = &etbControllers[i]; - } - doInitElectronicThrottle(PASS_ENGINE_PARAMETER_SIGNATURE); -} - void doInitElectronicThrottle(DECLARE_ENGINE_PARAMETER_SIGNATURE) { efiAssertVoid(OBD_PCM_Processor_Fault, engine->etbControllers != NULL, "etbControllers NULL"); #if EFI_PROD_CODE @@ -553,14 +593,14 @@ void doInitElectronicThrottle(DECLARE_ENGINE_PARAMETER_SIGNATURE) { addConsoleActionI("etb_freq", setEtbFrequency); #endif /* EFI_PROD_CODE */ - engine->engineState.hasEtbPedalPositionSensor = hasPedalPositionSensor(PASS_ENGINE_PARAMETER_SIGNATURE); - if (!engine->engineState.hasEtbPedalPositionSensor) { -#if EFI_PROD_CODE - // TODO: Once switched to new sensor model for pedal, we don't need this to be test-guarded. + // If you don't have a pedal, we have no business here. + if (!Sensor::hasSensor(SensorType::AcceleratorPedal)) { return; -#endif } - engine->etbActualCount = hasSecondThrottleBody(PASS_ENGINE_PARAMETER_SIGNATURE) ? 2 : 1; + + pedal2tpsMap.init(config->pedalToTpsTable, config->pedalToTpsPedalBins, config->pedalToTpsRpmBins); + + engine->etbActualCount = Sensor::hasSensor(SensorType::Tps2) ? 2 : 1; for (int i = 0 ; i < engine->etbActualCount; i++) { auto motor = initDcMotor(i PASS_ENGINE_PARAMETER_SUFFIX); @@ -568,23 +608,16 @@ void doInitElectronicThrottle(DECLARE_ENGINE_PARAMETER_SIGNATURE) { // If this motor is actually set up, init the etb if (motor) { - engine->etbControllers[i]->init(motor, i, &engineConfiguration->etb); + engine->etbControllers[i]->init(motor, i, &engineConfiguration->etb, &pedal2tpsMap); INJECT_ENGINE_REFERENCE(engine->etbControllers[i]); } } - pedal2tpsMap.init(config->pedalToTpsTable, config->pedalToTpsPedalBins, config->pedalToTpsRpmBins); - -#if 0 - // not alive code - autoTune.SetOutputStep(0.1); -#endif - #if 0 && ! EFI_UNIT_TEST percent_t startupThrottlePosition = getTPS(PASS_ENGINE_PARAMETER_SIGNATURE); if (absF(startupThrottlePosition - engineConfiguration->etbNeutralPosition) > STARTUP_NEUTRAL_POSITION_ERROR_THRESHOLD) { /** - * Unexpected electronic throttle start-up position is worth a fatal error + * Unexpected electronic throttle start-up position is worth a critical error */ firmwareError(OBD_Throttle_Actuator_Control_Range_Performance_Bank_1, "startup ETB position %.2f not %d", startupThrottlePosition, @@ -612,24 +645,6 @@ void doInitElectronicThrottle(DECLARE_ENGINE_PARAMETER_SIGNATURE) { addConsoleActionNANF(CMD_ETB_DUTY, setThrottleDutyCycle); #endif /* EFI_PROD_CODE */ -#if EFI_PROD_CODE && 0 - tuneWorkingPidSettings.pFactor = 1; - tuneWorkingPidSettings.iFactor = 0; - tuneWorkingPidSettings.dFactor = 0; -// tuneWorkingPidSettings.offset = 10; // todo: not hard-coded value - //todo tuneWorkingPidSettings.periodMs = 10; - tuneWorkingPidSettings.minValue = 0; - tuneWorkingPidSettings.maxValue = 100; - tuneWorkingPidSettings.periodMs = 100; - - // this is useful once you do "enable etb_auto" - addConsoleActionF("set_etbat_output", setTempOutput); - addConsoleActionF("set_etbat_step", setAutoStep); - addConsoleActionI("set_etbat_period", setAutoPeriod); - addConsoleActionI("set_etbat_offset", setAutoOffset); -#endif /* EFI_PROD_CODE */ - - etbPidReset(PASS_ENGINE_PARAMETER_SIGNATURE); for (int i = 0 ; i < engine->etbActualCount; i++) { @@ -637,6 +652,26 @@ void doInitElectronicThrottle(DECLARE_ENGINE_PARAMETER_SIGNATURE) { } } +void initElectronicThrottle(DECLARE_ENGINE_PARAMETER_SIGNATURE) { + if (hasFirmwareError()) { + return; + } + + for (int i = 0; i < ETB_COUNT; i++) { + engine->etbControllers[i] = &etbControllers[i]; + } + + doInitElectronicThrottle(PASS_ENGINE_PARAMETER_SIGNATURE); +} + +void setEtbIdlePosition(percent_t pos DECLARE_ENGINE_PARAMETER_SUFFIX) { + for (int i = 0; i < ETB_COUNT; i++) { + auto etb = engine->etbControllers[i]; + + if (etb) { + etb->setIdlePosition(pos); + } + } +} #endif /* EFI_ELECTRONIC_THROTTLE_BODY */ - diff --git a/firmware/controllers/actuators/electronic_throttle.h b/firmware/controllers/actuators/electronic_throttle.h index 6957c2d297..6b4b3f681b 100644 --- a/firmware/controllers/actuators/electronic_throttle.h +++ b/firmware/controllers/actuators/electronic_throttle.h @@ -12,21 +12,25 @@ #define DEFAULT_ETB_PWM_FREQUENCY 300 #include "engine.h" +#include "closed_loop_controller.h" +#include "expected.h" #include "periodic_task.h" class DcMotor; class Logging; -class IEtbController : public PeriodicTimerController{ +class IEtbController : public PeriodicTimerController, public ClosedLoopController { public: DECLARE_ENGINE_PTR; - virtual void init(DcMotor *motor, int ownIndex, pid_s *pidParameters) = 0; + virtual void init(DcMotor *motor, int ownIndex, pid_s *pidParameters, const ValueProvider3D* pedalMap) = 0; virtual void reset() = 0; + virtual void setIdlePosition(percent_t pos) = 0; }; class EtbController final : public IEtbController { public: - void init(DcMotor *motor, int ownIndex, pid_s *pidParameters) override; + void init(DcMotor *motor, int ownIndex, pid_s *pidParameters, const ValueProvider3D* pedalMap) override; + void setIdlePosition(percent_t pos) override; // PeriodicTimerController implementation int getPeriodMs() override; @@ -40,18 +44,42 @@ public: // Print this throttle's status. void showStatus(Logging* logger); + // Helpers for individual parts of throttle control + expected observePlant() const override; + expected getSetpoint() const override; + + expected getOpenLoop(percent_t target) const override; + expected getClosedLoop(percent_t setpoint, percent_t target) override; + expected getClosedLoopAutotune(percent_t actualThrottlePosition); + + void setOutput(expected outputValue) override; + // Used to inspect the internal PID controller's state const pid_state_s* getPidState() const { return &m_pid; }; private: - int m_myIndex; - DcMotor *m_motor; + int m_myIndex = 0; + DcMotor *m_motor = nullptr; Pid m_pid; bool m_shouldResetPid = false; + + // Pedal -> target map + const ValueProvider3D* m_pedalMap = nullptr; + + float m_idlePosition = 0; + + // Autotune helpers + bool m_lastIsPositive = false; + efitick_t m_cycleStartTime = 0; + float m_minCycleTps = 0; + float m_maxCycleTps = 0; + float m_a = 0; + float m_tu = 0; }; void initElectronicThrottle(DECLARE_ENGINE_PARAMETER_SIGNATURE); void doInitElectronicThrottle(DECLARE_ENGINE_PARAMETER_SIGNATURE); +void setEtbIdlePosition(percent_t pos DECLARE_ENGINE_PARAMETER_SUFFIX); void setDefaultEtbBiasCurve(DECLARE_CONFIG_PARAMETER_SIGNATURE); void setDefaultEtbParameters(DECLARE_CONFIG_PARAMETER_SIGNATURE); diff --git a/firmware/controllers/actuators/gppwm/gppwm.cpp b/firmware/controllers/actuators/gppwm/gppwm.cpp new file mode 100644 index 0000000000..e82b4617e2 --- /dev/null +++ b/firmware/controllers/actuators/gppwm/gppwm.cpp @@ -0,0 +1,54 @@ + +#include "global.h" +#include "engine.h" + +#include "gppwm_channel.h" +#include "pwm_generator_logic.h" + +EXTERN_ENGINE; + +static GppwmChannel channels[4]; +static OutputPin pins[4]; +static SimplePwm outputs[4]; + +static gppwm_Map3D_t table1("GPPWM 1"); +static gppwm_Map3D_t table2("GPPWM 2"); +static gppwm_Map3D_t table3("GPPWM 3"); +static gppwm_Map3D_t table4("GPPWM 4"); + +static gppwm_Map3D_t* tables[] = { + &table1, + &table2, + &table3, + &table4, +}; + +void initGpPwm(DECLARE_ENGINE_PARAMETER_SIGNATURE) { + for (size_t i = 0; i < efi::size(channels); i++) { + auto& cfg = CONFIG(gppwm)[i]; + + // If no pin, don't enable this channel. + if (cfg.pin == GPIO_UNASSIGNED) continue; + + // Determine frequency and whether PWM is enabled + float freq = cfg.pwmFrequency; + bool usePwm = freq > 0; + + // Setup pin & pwm + pins[i].initPin("gp pwm", cfg.pin); + startSimplePwm(&outputs[i], "gp pwm", &engine->executor, &pins[i], freq, 0); + + // Set up this channel's lookup table + tables[i]->init(cfg.table, cfg.loadBins, cfg.rpmBins); + + // Finally configure the channel + INJECT_ENGINE_REFERENCE(&channels[i]); + channels[i].init(usePwm, &outputs[i], tables[i], &cfg); + } +} + +void updateGppwm() { + for (size_t i = 0; i < efi::size(channels); i++) { + channels[i].update(); + } +} diff --git a/firmware/controllers/actuators/gppwm/gppwm.h b/firmware/controllers/actuators/gppwm/gppwm.h new file mode 100644 index 0000000000..1326f0e8c1 --- /dev/null +++ b/firmware/controllers/actuators/gppwm/gppwm.h @@ -0,0 +1,6 @@ +#pragma once + +#include "engine.h" + +void initGpPwm(DECLARE_ENGINE_PARAMETER_SIGNATURE); +void updateGppwm(); diff --git a/firmware/controllers/actuators/gppwm/gppwm_channel.cpp b/firmware/controllers/actuators/gppwm/gppwm_channel.cpp new file mode 100644 index 0000000000..1f67a02f4b --- /dev/null +++ b/firmware/controllers/actuators/gppwm/gppwm_channel.cpp @@ -0,0 +1,89 @@ + +#include "gppwm_channel.h" + +#include "engine.h" +#include "pwm_generator_logic.h" +#include "table_helper.h" +#include "expected.h" +#include "sensor.h" +#include "map.h" + +EXTERN_ENGINE; + +expected readGppwmChannel(gppwm_channel_e channel DECLARE_ENGINE_PARAMETER_SUFFIX) { + switch (channel) { + case GPPWM_Tps: + return Sensor::get(SensorType::Tps1); + case GPPWM_Map: { + float map = getMap(PASS_ENGINE_PARAMETER_SIGNATURE); + + if (cisnan(map)) { + return unexpected; + } + + return map; + } + case GPPWM_Clt: + return Sensor::get(SensorType::Clt); + case GPPWM_Iat: + return Sensor::get(SensorType::Iat); + default: + return unexpected; + } +} + +void GppwmChannel::setOutput(float result) { + // Not init yet, nothing to do. + if (!m_pwm || !m_config) { + return; + } + + if (!m_usePwm) { + // Apply hysteresis with provided values + if (m_state && result < m_config->offBelowDuty) { + m_state = false; + } else if (!m_state && result > m_config->onAboveDuty) { + m_state = true; + } + + result = m_state ? 100 : 0; + } + + m_pwm->setSimplePwmDutyCycle(clampF(0, result / 100.0f, 1)); +} + +void GppwmChannel::init(bool usePwm, SimplePwm* pwm, const ValueProvider3D* table, const gppwm_channel* config) { + m_usePwm = usePwm; + m_pwm = pwm; + m_table = table; + m_config = config; +} + +float GppwmChannel::getOutput() const { + expected loadAxisValue = readGppwmChannel(m_config->loadAxis PASS_ENGINE_PARAMETER_SUFFIX); + + // If we couldn't get load axis value, fall back on error value + if (!loadAxisValue) { + return m_config->dutyIfError; + } + + float rpm = GET_RPM(); + + float result = m_table->getValue(rpm / RPM_1_BYTE_PACKING_MULT, loadAxisValue.Value); + + if (cisnan(result)) { + return m_config->dutyIfError; + } + + return result; +} + +void GppwmChannel::update() { + // Without a config, nothing to do. + if (!m_config) { + return; + } + + float output = getOutput(); + setOutput(output); +} diff --git a/firmware/controllers/actuators/gppwm/gppwm_channel.h b/firmware/controllers/actuators/gppwm/gppwm_channel.h new file mode 100644 index 0000000000..1045435157 --- /dev/null +++ b/firmware/controllers/actuators/gppwm/gppwm_channel.h @@ -0,0 +1,28 @@ +#pragma once + +#include "gppwm.h" + +class OutputPin; +class SimplePwm; +class ValueProvider3D; + +class GppwmChannel { +public: + DECLARE_ENGINE_PTR; + + void init(bool usePwm, SimplePwm* pwm, const ValueProvider3D* table, const gppwm_channel* config); + void update(); + +private: + float getOutput() const; + void setOutput(float result); + + // Store the current state so we can apply hysteresis + bool m_state = false; + + // Configuration fields + const gppwm_channel* m_config = nullptr; + bool m_usePwm = false; + SimplePwm* m_pwm = nullptr; + const ValueProvider3D* m_table = nullptr; +}; diff --git a/firmware/controllers/actuators/idle_thread.cpp b/firmware/controllers/actuators/idle_thread.cpp index 08e15f63b3..fa168795ae 100644 --- a/firmware/controllers/actuators/idle_thread.cpp +++ b/firmware/controllers/actuators/idle_thread.cpp @@ -32,13 +32,15 @@ #if EFI_IDLE_CONTROL #include "engine_configuration.h" #include "rpm_calculator.h" -#include "pwm_generator.h" +#include "pwm_generator_logic.h" #include "idle_thread.h" #include "engine_math.h" #include "engine.h" #include "periodic_task.h" #include "allsensors.h" +#include "sensor.h" +#include "electronic_throttle.h" #if ! EFI_UNIT_TEST #include "stepper.h" @@ -52,8 +54,7 @@ static StepperMotor iacMotor; static Logging *logger; -EXTERN_ENGINE -; +EXTERN_ENGINE; static bool shouldResetPid = false; // The idea of 'mightResetPid' is to reset PID only once - each time when TPS > idlePidDeactivationTpsThreshold. @@ -92,7 +93,8 @@ PidWithOverrides idlePid; #endif /* EFI_IDLE_PID_CIC */ // todo: extract interface for idle valve hardware, with solenoid and stepper implementations? -static SimplePwm idleSolenoid("idle"); +static SimplePwm idleSolenoidOpen("idle open"); +static SimplePwm idleSolenoidClose("idle close"); static uint32_t lastCrankingCyclesCounter = 0; static float lastCrankingIacPosition; @@ -125,11 +127,16 @@ static void showIdleInfo(void) { scheduleMsg(logger, "enablePin=%s/%d", hwPortname(engineConfiguration->stepperEnablePin), engineConfiguration->stepperEnablePinMode); } else { - scheduleMsg(logger, "idle valve freq=%d on %s", CONFIG(idle).solenoidFrequency, - hwPortname(CONFIG(idle).solenoidPin)); + if (!CONFIG(isDoubleSolenoidIdle)) { + scheduleMsg(logger, "idle valve freq=%d on %s", CONFIG(idle).solenoidFrequency, + hwPortname(CONFIG(idle).solenoidPin)); + } else { + scheduleMsg(logger, "idle valve freq=%d on %s", CONFIG(idle).solenoidFrequency, + hwPortname(CONFIG(idle).solenoidPin)); + scheduleMsg(logger, " and %s", hwPortname(CONFIG(secondSolenoidPin))); + } } - if (engineConfiguration->idleMode == IM_AUTO) { idlePid.showPidStatus(logger, "idle"); } @@ -141,18 +148,39 @@ void setIdleMode(idle_mode_e value) { } static void applyIACposition(percent_t position) { + /** + * currently idle level is an percent value (0-100 range), and PWM takes a float in the 0..1 range + * todo: unify? + */ + float duty = PERCENT_TO_DUTY(position); + if (CONFIG(useETBforIdleControl)) { - engine->engineState.idle.etbIdleAddition = position / 100 * CONFIG(etbIdleThrottleRange); + if (!Sensor::hasSensor(SensorType::AcceleratorPedal)) { + firmwareError(CUSTOM_NO_ETB_FOR_IDLE, "No ETB to use for idle"); + return; + } + +#if EFI_ELECTRONIC_THROTTLE_BODY + setEtbIdlePosition(position); +#endif #if ! EFI_UNIT_TEST } if (CONFIG(useStepperIdle)) { - iacMotor.setTargetPosition(position / 100 * engineConfiguration->idleStepperTotalSteps); + iacMotor.setTargetPosition(duty * engineConfiguration->idleStepperTotalSteps); #endif /* EFI_UNIT_TEST */ } else { - /** - * currently idle level is an percent value (0-100 range), and PWM takes a float in the 0..1 range - * todo: unify? - */ - idleSolenoid.setSimplePwmDutyCycle(PERCENT_TO_DUTY(position)); + if (!CONFIG(isDoubleSolenoidIdle)) { + idleSolenoidOpen.setSimplePwmDutyCycle(duty); + } else { + /* use 0.01..0.99 range */ + float idle_range = 0.98; /* move to config? */ + float idle_open, idle_close; + + idle_open = 0.01 + idle_range * duty; + idle_close = 0.01 + idle_range * (1.0 - duty); + + idleSolenoidOpen.setSimplePwmDutyCycle(idle_open); + idleSolenoidClose.setSimplePwmDutyCycle(idle_close); + } } } @@ -177,10 +205,6 @@ static percent_t manualIdleController(float cltCorrection DECLARE_ENGINE_PARAMET percent_t correctedPosition = cltCorrection * CONFIG(manIdlePosition); - // let's put the value into the right range - correctedPosition = maxF(correctedPosition, 0.01); - correctedPosition = minF(correctedPosition, 99.9); - return correctedPosition; } @@ -218,21 +242,20 @@ static bool isOutOfAutomaticIdleCondition(DECLARE_ENGINE_PARAMETER_SIGNATURE) { return !engine->engineState.idle.throttlePedalUpState; } - percent_t inputPosition; + const auto [valid, pos] = Sensor::get(SensorType::DriverThrottleIntent); - if (hasPedalPositionSensor(PASS_ENGINE_PARAMETER_SIGNATURE)) { - inputPosition = getPedalPosition(PASS_ENGINE_PARAMETER_SIGNATURE); - } else { - inputPosition = getTPS(PASS_ENGINE_PARAMETER_SIGNATURE); + // Disable auto idle in case of TPS/Pedal failure + if (!valid) { + return true; } - return inputPosition > CONFIG(idlePidDeactivationTpsThreshold); + return pos > CONFIG(idlePidDeactivationTpsThreshold); } /** * @return idle valve position percentage for automatic closed loop mode */ -static percent_t automaticIdleController(DECLARE_ENGINE_PARAMETER_SIGNATURE) { +static percent_t automaticIdleController(float tpsPos DECLARE_ENGINE_PARAMETER_SUFFIX) { if (isOutOfAutomaticIdleCondition(PASS_ENGINE_PARAMETER_SIGNATURE)) { // Don't store old I and D terms if PID doesn't work anymore. // Otherwise they will affect the idle position much later, when the throttle is closed. @@ -288,7 +311,6 @@ static percent_t automaticIdleController(DECLARE_ENGINE_PARAMETER_SIGNATURE) { } // Apply PID Deactivation Threshold as a smooth taper for TPS transients. - percent_t tpsPos = getTPS(PASS_ENGINE_PARAMETER_SIGNATURE); // if tps==0 then PID just works as usual, or we completely disable it if tps>=threshold newValue = interpolateClamped(0.0f, newValue, CONFIG(idlePidDeactivationTpsThreshold), engine->engineState.idle.baseIdlePosition, tpsPos); @@ -300,8 +322,9 @@ static percent_t automaticIdleController(DECLARE_ENGINE_PARAMETER_SIGNATURE) { int idlePidLowerRpm = targetRpm + CONFIG(idlePidRpmDeadZone); if (CONFIG(idlePidRpmUpperLimit) > 0) { engine->engineState.idle.idleState = PID_UPPER; - if (CONFIG(useIacTableForCoasting) && hasCltSensor()) { - percent_t iacPosForCoasting = interpolate2d("iacCoasting", getCoolantTemperature(), CONFIG(iacCoastingBins), CONFIG(iacCoasting)); + const auto [cltValid, clt] = Sensor::get(SensorType::Clt); + if (CONFIG(useIacTableForCoasting) && cltValid) { + percent_t iacPosForCoasting = interpolate2d("iacCoasting", clt, CONFIG(iacCoastingBins), CONFIG(iacCoasting)); newValue = interpolateClamped(idlePidLowerRpm, newValue, idlePidLowerRpm + CONFIG(idlePidRpmUpperLimit), iacPosForCoasting, rpm); } else { // Well, just leave it as is, without PID regulation... @@ -327,7 +350,9 @@ static percent_t automaticIdleController(DECLARE_ENGINE_PARAMETER_SIGNATURE) { idlePid.iTermMin = engineConfiguration->idlerpmpid_iTermMin; idlePid.iTermMax = engineConfiguration->idlerpmpid_iTermMax; - engine->engineState.isAutomaticIdle = engineConfiguration->idleMode == IM_AUTO; + SensorResult tps = Sensor::get(SensorType::DriverThrottleIntent); + + engine->engineState.isAutomaticIdle = tps.Valid && engineConfiguration->idleMode == IM_AUTO; if (engineConfiguration->isVerboseIAC && engine->engineState.isAutomaticIdle) { // todo: print each bit using 'getIdle_state_e' method @@ -370,7 +395,7 @@ static percent_t automaticIdleController(DECLARE_ENGINE_PARAMETER_SIGNATURE) { finishIdleTestIfNeeded(); undoIdleBlipIfNeeded(); - float clt = getCoolantTemperature(); + const auto [cltValid, clt] = Sensor::get(SensorType::Clt); #if EFI_SHAFT_POSITION_INPUT bool isRunning = engine->rpmCalculator.isRunning(PASS_ENGINE_PARAMETER_SIGNATURE); #else @@ -378,7 +403,7 @@ static percent_t automaticIdleController(DECLARE_ENGINE_PARAMETER_SIGNATURE) { #endif /* EFI_SHAFT_POSITION_INPUT */ // cltCorrection is used only for cranking or running in manual mode float cltCorrection; - if (!hasCltSensor()) + if (!cltValid) cltCorrection = 1.0f; // Use separate CLT correction table for cranking else if (engineConfiguration->overrideCrankingIacSetting && !isRunning) { @@ -397,25 +422,29 @@ static percent_t automaticIdleController(DECLARE_ENGINE_PARAMETER_SIGNATURE) { engine->engineState.idle.idleState = BLIP; } else if (!isRunning) { // during cranking it's always manual mode, PID would make no sense during cranking - iacPosition = cltCorrection * engineConfiguration->crankingIACposition; + iacPosition = clampPercentValue(cltCorrection * engineConfiguration->crankingIACposition); // save cranking position & cycles counter for taper transition lastCrankingIacPosition = iacPosition; lastCrankingCyclesCounter = engine->rpmCalculator.getRevolutionCounterSinceStart(); engine->engineState.idle.baseIdlePosition = iacPosition; } else { - if (engineConfiguration->idleMode == IM_MANUAL) { + if (!tps.Valid || engineConfiguration->idleMode == IM_MANUAL) { // let's re-apply CLT correction iacPosition = manualIdleController(cltCorrection PASS_ENGINE_PARAMETER_SUFFIX); } else { - iacPosition = automaticIdleController(PASS_ENGINE_PARAMETER_SIGNATURE); + iacPosition = automaticIdleController(tps.Value PASS_ENGINE_PARAMETER_SUFFIX); } + iacPosition = clampPercentValue(iacPosition); + // store 'base' iacPosition without adjustments engine->engineState.idle.baseIdlePosition = iacPosition; - - percent_t tpsPos = getTPS(PASS_ENGINE_PARAMETER_SIGNATURE); + float additionalAir = (float)engineConfiguration->iacByTpsTaper; - iacPosition += interpolateClamped(0.0f, 0.0f, CONFIG(idlePidDeactivationTpsThreshold), additionalAir, tpsPos); + + if (tps.Valid) { + iacPosition += interpolateClamped(0.0f, 0.0f, CONFIG(idlePidDeactivationTpsThreshold), additionalAir, tps.Value); + } // taper transition from cranking to running (uint32_t to float conversion is safe here) if (engineConfiguration->afterCrankingIACtaperDuration > 0) @@ -475,7 +504,8 @@ void setDefaultIdleParameters(DECLARE_CONFIG_PARAMETER_SIGNATURE) { void onConfigurationChangeIdleCallback(engine_configuration_s *previousConfiguration) { shouldResetPid = !idlePid.isSame(&previousConfiguration->idleRpmPid); - idleSolenoid.setFrequency(CONFIG(idle).solenoidFrequency); + idleSolenoidOpen.setFrequency(CONFIG(idle).solenoidFrequency); + idleSolenoidClose.setFrequency(CONFIG(idle).solenoidFrequency); } void setTargetIdleRpm(int value) { @@ -542,7 +572,8 @@ bool isIdleHardwareRestartNeeded() { isConfigurationChanged(useStepperIdle) || // isConfigurationChanged() || isConfigurationChanged(useETBforIdleControl) || - isConfigurationChanged(idle.solenoidPin); + isConfigurationChanged(idle.solenoidPin) || + isConfigurationChanged(secondSolenoidPin); } @@ -551,6 +582,7 @@ void stopIdleHardware(DECLARE_ENGINE_PARAMETER_SIGNATURE) { brain_pin_markUnused(activeConfiguration.stepperEnablePin); brain_pin_markUnused(activeConfiguration.idle.stepperStepPin); brain_pin_markUnused(activeConfiguration.idle.solenoidPin); + brain_pin_markUnused(activeConfiguration.secondSolenoidPin); // brain_pin_markUnused(activeConfiguration.idle.); // brain_pin_markUnused(activeConfiguration.idle.); // brain_pin_markUnused(activeConfiguration.idle.); @@ -598,11 +630,25 @@ void initIdleHardware(DECLARE_ENGINE_PARAMETER_SIGNATURE) { */ // todo: even for double-solenoid mode we can probably use same single SimplePWM // todo: open question why do we pass 'OutputPin' into 'startSimplePwmExt' if we have custom applyIdleSolenoidPinState listener anyway? - startSimplePwmExt(&idleSolenoid, "Idle Valve", - &engine->executor, - CONFIG(idle).solenoidPin, &enginePins.idleSolenoidPin, - CONFIG(idle).solenoidFrequency, CONFIG(manIdlePosition) / 100, - (pwm_gen_callback*)applyIdleSolenoidPinState); + if (!CONFIG(isDoubleSolenoidIdle)) { + startSimplePwmExt(&idleSolenoidOpen, "Idle Valve", + &engine->executor, + CONFIG(idle).solenoidPin, &enginePins.idleSolenoidPin, + CONFIG(idle).solenoidFrequency, PERCENT_TO_DUTY(CONFIG(manIdlePosition)), + (pwm_gen_callback*)applyIdleSolenoidPinState); + } else { + startSimplePwmExt(&idleSolenoidOpen, "Idle Valve Open", + &engine->executor, + CONFIG(idle).solenoidPin, &enginePins.idleSolenoidPin, + CONFIG(idle).solenoidFrequency, PERCENT_TO_DUTY(CONFIG(manIdlePosition)), + (pwm_gen_callback*)applyIdleSolenoidPinState); + + startSimplePwmExt(&idleSolenoidClose, "Idle Valve Close", + &engine->executor, + CONFIG(secondSolenoidPin), &enginePins.secondIdleSolenoidPin, + CONFIG(idle).solenoidFrequency, PERCENT_TO_DUTY(CONFIG(manIdlePosition)), + (pwm_gen_callback*)applyIdleSolenoidPinState); + } idlePositionSensitivityThreshold = 0.0f; } } diff --git a/firmware/controllers/actuators/pwm_tester.cpp b/firmware/controllers/actuators/pwm_tester.cpp index 5ce51f4bfd..fd604d920b 100644 --- a/firmware/controllers/actuators/pwm_tester.cpp +++ b/firmware/controllers/actuators/pwm_tester.cpp @@ -14,14 +14,12 @@ #include "state_requence.h" #include "pwm_generator_logic.h" #include "engine.h" -#include "pwm_generator.h" static LoggingWithStorage logger; static SimplePwm pwmTest[5]; extern OutputPin warningLedPin; -extern EnginePins enginePins; EXTERN_ENGINE; @@ -31,18 +29,18 @@ static void startPwmTest(int freq) { engine->isRunningPwmTest = true; // PD13 pin is initialized elsewhere already - startSimplePwm(&pwmTest[0], "tester", &warningLedPin, 10, 0.5f, applyPinState); + startSimplePwm(&pwmTest[0], "tester", &warningLedPin, 10, 0.5f); /** * See custom_engine.cpp for pinout */ // currently this is PB9 by default - see CONFIG(injectionPins) - startSimplePwm(&pwmTest[1], "tester", &enginePins.injectors[0], freq / 1.3333333333, 0.5f, applyPinState); + startSimplePwm(&pwmTest[1], "tester", &enginePins.injectors[0], freq / 1.3333333333, 0.5f); // currently this is PE2 by default - startSimplePwm(&pwmTest[2], "tester", &enginePins.injectors[1], freq / 1000, 0.5f, applyPinState); + startSimplePwm(&pwmTest[2], "tester", &enginePins.injectors[1], freq / 1000, 0.5f); // currently this is PB8 by default - startSimplePwm(&pwmTest[3], "tester", &enginePins.injectors[2], freq, 0.5, applyPinState); + startSimplePwm(&pwmTest[3], "tester", &enginePins.injectors[2], freq, 0.5); // currently this is PB7 by default - startSimplePwm(&pwmTest[4], "tester", &enginePins.injectors[3], freq / 33.33333333333, 0.5, applyPinState); + startSimplePwm(&pwmTest[4], "tester", &enginePins.injectors[3], freq / 33.33333333333, 0.5); } diff --git a/firmware/controllers/actuators/pwm_tester.h b/firmware/controllers/actuators/pwm_tester.h index b740c9e8eb..bac313c5c0 100644 --- a/firmware/controllers/actuators/pwm_tester.h +++ b/firmware/controllers/actuators/pwm_tester.h @@ -4,9 +4,7 @@ * @date Apr 29, 2014 * @author Andrey Belomutskiy, (c) 2012-2020 */ -#ifndef PWMTESTER_H_ -#define PWMTESTER_H_ + +#pragma once void initPwmTester(void); - -#endif /* PWMTESTER_H_ */ diff --git a/firmware/controllers/algo/accel_enrichment.cpp b/firmware/controllers/algo/accel_enrichment.cpp index 157f5c202c..9c5f9098e7 100644 --- a/firmware/controllers/algo/accel_enrichment.cpp +++ b/firmware/controllers/algo/accel_enrichment.cpp @@ -32,8 +32,7 @@ #include "tunerstudio_configuration.h" #endif /* EFI_TUNER_STUDIO */ -EXTERN_ENGINE -; +EXTERN_ENGINE; tps_tps_Map3D_t tpsTpsMap("tpsTps"); @@ -286,8 +285,7 @@ void AccelEnrichment::onNewValue(float currentValue DECLARE_ENGINE_PARAMETER_SUF } void TpsAccelEnrichment::onEngineCycleTps(DECLARE_ENGINE_PARAMETER_SIGNATURE) { - // we update values in handleFuel() directly - //onNewValue(getTPS(PASS_ENGINE_PARAMETER_SIGNATURE) PASS_ENGINE_PARAMETER_SUFFIX); + // we update values in handleFuel() directly by calling onNewValue() onUpdateInvocationCounter++; diff --git a/firmware/controllers/algo/advance_map.cpp b/firmware/controllers/algo/advance_map.cpp index 5cef2cb8d9..68fc648fbe 100644 --- a/firmware/controllers/algo/advance_map.cpp +++ b/firmware/controllers/algo/advance_map.cpp @@ -24,14 +24,14 @@ #include "advance_map.h" #include "interpolation.h" #include "engine_math.h" -#include "tps.h" +#include "sensor.h" #include "idle_thread.h" #include "allsensors.h" +#include "launch_control.h" #if EFI_ENGINE_CONTROL -EXTERN_ENGINE -; +EXTERN_ENGINE; static ign_Map3D_t advanceMap("advance"); // This coeff in ctor parameter is sufficient for int16<->float conversion! @@ -69,67 +69,80 @@ static const ignition_table_t defaultIatTiming = { #endif /* IGN_LOAD_COUNT == DEFAULT_IGN_LOAD_COUNT */ -//Todo: There are some more conditions that needs to be true, and RPM range must be added to launchrpm? - -//bool isLaunchCondition(int rpm DECLARE_ENGINE_PARAMETER_SUFFIX) { -// return CONFIG(launchControlEnabled) && rpm >= engineConfiguration->launchRpm; -//} - /** * @return ignition timing angle advance before TDC */ static angle_t getRunningAdvance(int rpm, float engineLoad DECLARE_ENGINE_PARAMETER_SUFFIX) { - if (CONFIG(timingMode) == TM_FIXED) + if (CONFIG(timingMode) == TM_FIXED) { return engineConfiguration->fixedTiming; + } - engine->m.beforeAdvance = getTimeNowLowerNt(); if (cisnan(engineLoad)) { warning(CUSTOM_NAN_ENGINE_LOAD, "NaN engine load"); return NAN; } - efiAssert(CUSTOM_ERR_ASSERT, !cisnan(engineLoad), "invalid el", NAN); - engine->m.beforeZeroTest = getTimeNowLowerNt(); - engine->m.zeroTestTime = getTimeNowLowerNt() - engine->m.beforeZeroTest; -//See comment at line 70 -// if (isLaunchCondition(rpm PASS_ENGINE_PARAMETER_SUFFIX)) { -// return engineConfiguration->launchTimingRetard; -// } - + efiAssert(CUSTOM_ERR_ASSERT, !cisnan(engineLoad), "invalid el", NAN); + float advanceAngle; if (CONFIG(useTPSAdvanceTable)) { - float tps = getTPS(PASS_ENGINE_PARAMETER_SIGNATURE); - advanceAngle = advanceTpsMap.getValue((float) rpm, tps); + // TODO: what do we do about multi-TPS? + float tps = Sensor::get(SensorType::Tps1).value_or(0); + advanceAngle = advanceTpsMap.getValue(rpm, tps); } else { advanceAngle = advanceMap.getValue((float) rpm, engineLoad); } - + // get advance from the separate table for Idle if (CONFIG(useSeparateAdvanceForIdle)) { float idleAdvance = interpolate2d("idleAdvance", rpm, config->idleAdvanceBins, config->idleAdvance); - // interpolate between idle table and normal (running) table using TPS threshold - float tps = getTPS(PASS_ENGINE_PARAMETER_SIGNATURE); - advanceAngle = interpolateClamped(0.0f, idleAdvance, CONFIG(idlePidDeactivationTpsThreshold), advanceAngle, tps); + + auto [valid, tps] = Sensor::get(SensorType::DriverThrottleIntent); + if (valid) { + // interpolate between idle table and normal (running) table using TPS threshold + advanceAngle = interpolateClamped(0.0f, idleAdvance, CONFIG(idlePidDeactivationTpsThreshold), advanceAngle, tps); + } } - engine->m.advanceLookupTime = getTimeNowLowerNt() - engine->m.beforeAdvance; + +#if EFI_LAUNCH_CONTROL + if (engine->isLaunchCondition && CONFIG(enableLaunchRetard)) { + if (CONFIG(launchSmoothRetard)) { + float launchAngle = CONFIG(launchTimingRetard); + int launchAdvanceRpmRange = CONFIG(launchTimingRpmRange); + int launchRpm = CONFIG(launchRpm); + // interpolate timing from rpm at launch triggered to full retard at launch launchRpm + launchTimingRpmRange + return interpolateClamped(launchRpm, advanceAngle, (launchRpm + launchAdvanceRpmRange), launchAngle, rpm); + } else { + return engineConfiguration->launchTimingRetard; + } + } +#endif /* EFI_LAUNCH_CONTROL */ + return advanceAngle; } angle_t getAdvanceCorrections(int rpm DECLARE_ENGINE_PARAMETER_SUFFIX) { float iatCorrection; - if (!hasIatSensor()) { + + const auto [iatValid, iat] = Sensor::get(SensorType::Iat); + + if (!iatValid) { iatCorrection = 0; } else { - iatCorrection = iatAdvanceCorrectionMap.getValue((float) rpm, getIntakeAirTemperature()); + iatCorrection = iatAdvanceCorrectionMap.getValue((float) rpm, iat); } + // PID Ignition Advance angle correction float pidTimingCorrection = 0.0f; if (CONFIG(useIdleTimingPidControl)) { int targetRpm = getTargetRpmForIdleCorrection(PASS_ENGINE_PARAMETER_SIGNATURE); int rpmDelta = absI(rpm - targetRpm); - float tps = getTPS(PASS_ENGINE_PARAMETER_SIGNATURE); - if (tps >= CONFIG(idlePidDeactivationTpsThreshold)) { + + auto [valid, tps] = Sensor::get(SensorType::Tps1); + + // If TPS is invalid, or we aren't in the region, so reset state and don't apply PID + if (!valid || tps >= CONFIG(idlePidDeactivationTpsThreshold)) { // we are not in the idle mode anymore, so the 'reset' flag will help us when we return to the idle. shouldResetTimingPid = true; } @@ -160,9 +173,10 @@ angle_t getAdvanceCorrections(int rpm DECLARE_ENGINE_PARAMETER_SUFFIX) { tsOutputChannels.debugFloatField2 = engine->engineState.cltTimingCorrection; tsOutputChannels.debugFloatField3 = engine->fsioState.fsioTimingAdjustment; tsOutputChannels.debugFloatField4 = pidTimingCorrection; + tsOutputChannels.debugIntField1 = engine->engineState.multispark.count; #endif /* EFI_TUNER_STUDIO */ } - + return iatCorrection + engine->fsioState.fsioTimingAdjustment + engine->engineState.cltTimingCorrection @@ -194,31 +208,35 @@ angle_t getAdvance(int rpm, float engineLoad DECLARE_ENGINE_PARAMETER_SUFFIX) { if (cisnan(engineLoad)) { return 0; // any error should already be reported } + angle_t angle; - if (ENGINE(rpmCalculator).isCranking(PASS_ENGINE_PARAMETER_SIGNATURE)) { + + bool isCranking = ENGINE(rpmCalculator).isCranking(PASS_ENGINE_PARAMETER_SIGNATURE); + if (isCranking) { angle = getCrankingAdvance(rpm, engineLoad PASS_ENGINE_PARAMETER_SUFFIX); assertAngleRange(angle, "crAngle", CUSTOM_ERR_6680); efiAssert(CUSTOM_ERR_ASSERT, !cisnan(angle), "cr_AngleN", 0); - if (CONFIG(useAdvanceCorrectionsForCranking)) { - angle_t correction = getAdvanceCorrections(rpm PASS_ENGINE_PARAMETER_SUFFIX); - if (!cisnan(correction)) { // correction could be NaN during settings update - angle += correction; - } - } - efiAssert(CUSTOM_ERR_ASSERT, !cisnan(angle), "cr_AngleN2", 0); } else { angle = getRunningAdvance(rpm, engineLoad PASS_ENGINE_PARAMETER_SUFFIX); + if (cisnan(angle)) { warning(CUSTOM_ERR_6610, "NaN angle from table"); return 0; } + } + + // Allow correction only if set to dynamic + // AND we're either not cranking OR allowed to correct in cranking + bool allowCorrections = CONFIG(timingMode) == TM_DYNAMIC + && (!isCranking || CONFIG(useAdvanceCorrectionsForCranking)); + + if (allowCorrections) { angle_t correction = getAdvanceCorrections(rpm PASS_ENGINE_PARAMETER_SUFFIX); if (!cisnan(correction)) { // correction could be NaN during settings update angle += correction; } - efiAssert(CUSTOM_ERR_ASSERT, !cisnan(angle), "AngleN3", 0); } - efiAssert(CUSTOM_ERR_ASSERT, !cisnan(angle), "_AngleN4", 0); + angle -= engineConfiguration->ignitionOffset; efiAssert(CUSTOM_ERR_ASSERT, !cisnan(angle), "_AngleN5", 0); fixAngle(angle, "getAdvance", CUSTOM_ERR_ADCANCE_CALC_ANGLE); @@ -228,6 +246,43 @@ angle_t getAdvance(int rpm, float engineLoad DECLARE_ENGINE_PARAMETER_SUFFIX) { #endif } +size_t getMultiSparkCount(int rpm DECLARE_ENGINE_PARAMETER_SUFFIX) { + // Compute multispark (if enabled) + if (CONFIG(multisparkEnable) + && rpm <= CONFIG(multisparkMaxRpm) + && CONFIG(multisparkMaxExtraSparkCount) > 0) { + // For zero RPM, disable multispark. We don't yet know the engine speed, so multispark may not be safe. + if (rpm == 0) { + return 0; + } + + floatus_t multiDelay = CONFIG(multisparkSparkDuration); + floatus_t multiDwell = CONFIG(multisparkDwell); + + ENGINE(engineState.multispark.delay) = US2NT(multiDelay); + ENGINE(engineState.multispark.dwell) = US2NT(multiDwell); + + constexpr float usPerDegreeAt1Rpm = 60e6 / 360; + floatus_t usPerDegree = usPerDegreeAt1Rpm / rpm; + + // How long is there for sparks? The user configured an angle, convert to time. + floatus_t additionalSparksUs = usPerDegree * CONFIG(multisparkMaxSparkingAngle); + // How long does one spark take? + floatus_t oneSparkTime = multiDelay + multiDwell; + + // How many sparks can we fit in the alloted time? + float sparksFitInTime = additionalSparksUs / oneSparkTime; + + // Take the floor (convert to uint8_t) - we want to undershoot, not overshoot + uint32_t floored = sparksFitInTime; + + // Allow no more than the maximum number of extra sparks + return minI(floored, CONFIG(multisparkMaxExtraSparkCount)); + } else { + return 0; + } +} + void setDefaultIatTimingCorrection(DECLARE_ENGINE_PARAMETER_SIGNATURE) { setLinearCurve(config->ignitionIatCorrLoadBins, /*from*/CLT_CURVE_RANGE_FROM, 110, 1); #if IGN_LOAD_COUNT == DEFAULT_IGN_LOAD_COUNT diff --git a/firmware/controllers/algo/advance_map.h b/firmware/controllers/algo/advance_map.h index 7f99999f91..d3c352617c 100644 --- a/firmware/controllers/algo/advance_map.h +++ b/firmware/controllers/algo/advance_map.h @@ -16,3 +16,4 @@ float getTopAdvanceForBore(chamber_style_e style, int octane, double compression float getInitialAdvance(int rpm, float map, float advanceMax); void buildTimingMap(float advanceMax DECLARE_CONFIG_PARAMETER_SUFFIX); angle_t getAdvanceCorrections(int rpm DECLARE_ENGINE_PARAMETER_SUFFIX); +size_t getMultiSparkCount(int rpm DECLARE_ENGINE_PARAMETER_SUFFIX); diff --git a/firmware/controllers/algo/algo.mk b/firmware/controllers/algo/algo.mk index d55e64de0a..ae6b29e0a4 100644 --- a/firmware/controllers/algo/algo.mk +++ b/firmware/controllers/algo/algo.mk @@ -5,6 +5,7 @@ CONTROLLERS_ALGO_SRC_CPP = $(PROJECT_DIR)/controllers/algo/advance_map.cpp \ $(GENERATED_ENUMS_DIR)/auto_generated_enums.cpp \ $(PROJECT_DIR)/controllers/algo/fuel_math.cpp \ $(PROJECT_DIR)/controllers/algo/accel_enrichment.cpp \ + $(PROJECT_DIR)/controllers/algo/launch_control.cpp \ $(PROJECT_DIR)/controllers/algo/engine_configuration.cpp \ $(PROJECT_DIR)/controllers/algo/engine.cpp \ $(PROJECT_DIR)/controllers/algo/engine2.cpp \ diff --git a/firmware/controllers/algo/auto_generated_enums.cpp b/firmware/controllers/algo/auto_generated_enums.cpp index 588b59576f..658f62907d 100644 --- a/firmware/controllers/algo/auto_generated_enums.cpp +++ b/firmware/controllers/algo/auto_generated_enums.cpp @@ -485,21 +485,11 @@ case TLE8888_PIN_9: } return NULL; } -const char *getCan_device_mode_e(can_device_mode_e value){ -switch(value) { -case CD_OFF: - return "CD_OFF"; -case CD_USE_CAN1: - return "CD_USE_CAN1"; -case CD_USE_CAN2: - return "CD_USE_CAN2"; -case Internal_ForceMyEnumIntSize_can_device_mode: - return "Internal_ForceMyEnumIntSize_can_device_mode"; - } - return NULL; -} + const char *getCan_nbc_e(can_nbc_e value){ switch(value) { +case CAN_BUS_NBC_NONE: + return "CAN_BUS_NBC_NONE"; case CAN_BUS_MAZDA_RX8: return "CAN_BUS_MAZDA_RX8"; case CAN_BUS_NBC_BMW: @@ -508,6 +498,8 @@ case CAN_BUS_NBC_FIAT: return "CAN_BUS_NBC_FIAT"; case CAN_BUS_NBC_VAG: return "CAN_BUS_NBC_VAG"; +case CAN_BUS_W202_C180: + return "CAN_BUS_W202_C180"; case Internal_ForceMyEnumIntSize_can_nbc: return "Internal_ForceMyEnumIntSize_can_nbc"; } @@ -541,8 +533,14 @@ const char *getDebug_mode_e(debug_mode_e value){ switch(value) { case DBG_BOOST: return "DBG_BOOST"; -case DBG_37: - return "DBG_37"; +case DBG_START_STOP: + return "DBG_START_STOP"; +case DBG_LAUNCH: + return "DBG_LAUNCH"; +case DBG_ETB_AUTOTUNE: + return "DBG_ETB_AUTOTUNE"; +case DBG_40: + return "DBG_40"; case DBG_ALTERNATOR_PID: return "DBG_ALTERNATOR_PID"; case DBG_ANALOG_INPUTS: @@ -551,8 +549,8 @@ case DBG_ANALOG_INPUTS2: return "DBG_ANALOG_INPUTS2"; case DBG_AUX_PID_1: return "DBG_AUX_PID_1"; -case DBG_AUX_TEMPERATURE: - return "DBG_AUX_TEMPERATURE"; +case DBG_34: + return "DBG_34"; case DBG_AUX_VALVES: return "DBG_AUX_VALVES"; case DBG_BENCH_TEST: @@ -607,8 +605,8 @@ case DBG_TPS_ACCEL: return "DBG_TPS_ACCEL"; case DBG_TRIGGER_COUNTERS: return "DBG_TRIGGER_COUNTERS"; -case DBG_TRIGGER_SYNC: - return "DBG_TRIGGER_SYNC"; +case DBG_16: + return "DBG_16"; case DBG_VEHICLE_SPEED_SENSOR: return "DBG_VEHICLE_SPEED_SENSOR"; case DBG_VVT: @@ -719,6 +717,8 @@ case BMW_M73_M: return "BMW_M73_M"; case BMW_M73_MRE: return "BMW_M73_MRE"; +case BMW_M73_MRE_SLAVE: + return "BMW_M73_MRE_SLAVE"; case BMW_M73_PROTEUS: return "BMW_M73_P"; case MRE_BOARD_TEST: @@ -959,6 +959,8 @@ case FOUR_STROKE_CAM_SENSOR: return "FOUR_STROKE_CAM_SENSOR"; case FOUR_STROKE_CRANK_SENSOR: return "FOUR_STROKE_CRANK_SENSOR"; +case FOUR_STROKE_THREE_TIMES_CRANK_SENSOR: + return "FOUR_STROKE_THREE_TIMES_CRANK_SENSOR"; case FOUR_STROKE_SYMMETRICAL_CRANK_SENSOR: return "FOUR_STROKE_SYMMETRICAL_CRANK_SENSOR"; case Force_4_bytes_size_operation_mode_e: @@ -1155,6 +1157,14 @@ case TT_MAZDA_MIATA_VVT_TEST: return "TT_MAZDA_MIATA_VVT_TEST"; case TT_MAZDA_SOHC_4: return "TT_MAZDA_SOHC_4"; +case TT_BOSCH_QUICK_START: + return "TT_BOSCH_QUICK_START"; +case TT_HONDA_K_12_1: + return "TT_HONDA_K_12_1"; +case TT_RENIX_66_2_2_2: + return "TT_RENIX_66_2_2_2"; +case TT_RENIX_44_2_2: + return "TT_RENIX_44_2_2"; case TT_MIATA_NB2_VVT_CAM: return "TT_MIATA_NB2_VVT_CAM"; case TT_MAZDA_Z5: diff --git a/firmware/controllers/algo/auto_generated_enums.h b/firmware/controllers/algo/auto_generated_enums.h index b261f14ec9..9c4afc4e86 100644 --- a/firmware/controllers/algo/auto_generated_enums.h +++ b/firmware/controllers/algo/auto_generated_enums.h @@ -16,7 +16,7 @@ const char *getAdc_channel_e(adc_channel_e value); const char *getAdc_channel_mode_e(adc_channel_mode_e value); const char *getAir_pressure_sensor_type_e(air_pressure_sensor_type_e value); const char *getBrain_pin_e(brain_pin_e value); -const char *getCan_device_mode_e(can_device_mode_e value); + const char *getCan_nbc_e(can_nbc_e value); const char *getChamber_style_e(chamber_style_e value); const char *getCranking_ignition_mode_e(cranking_ignition_mode_e value); diff --git a/firmware/controllers/algo/engine.cpp b/firmware/controllers/algo/engine.cpp index dbb347c80c..03cad6a76c 100644 --- a/firmware/controllers/algo/engine.cpp +++ b/firmware/controllers/algo/engine.cpp @@ -9,7 +9,6 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ -#include "global.h" #include "engine.h" #include "allsensors.h" #include "efi_gpio.h" @@ -25,9 +24,11 @@ #include "map_averaging.h" #include "fsio_impl.h" #include "perf_trace.h" +#include "sensor.h" +#include "gppwm.h" #if EFI_PROD_CODE -#include "injector_central.h" +#include "bench_test.h" #else #define isRunningBenchTest() true #endif /* EFI_PROD_CODE */ @@ -40,8 +41,7 @@ static TriggerState initState CCM_OPTIONAL; LoggingWithStorage engineLogger("engine"); -EXTERN_ENGINE -; +EXTERN_ENGINE; #if EFI_ENGINE_SNIFFER #include "engine_sniffer.h" @@ -79,9 +79,9 @@ void Engine::initializeTriggerWaveform(Logging *logger DECLARE_ENGINE_PARAMETER_ if (TRIGGER_WAVEFORM(bothFrontsRequired) && engineConfiguration->useOnlyRisingEdgeForTrigger) { #if EFI_PROD_CODE || EFI_SIMULATOR - firmwareError(CUSTOM_ERR_BOTH_FRONTS_REQUIRED, "Inconsistent trigger setup"); + firmwareError(CUSTOM_ERR_BOTH_FRONTS_REQUIRED, "trigger: both fronts required"); #else - warning(CUSTOM_ERR_BOTH_FRONTS_REQUIRED, "Inconsistent trigger setup"); + warning(CUSTOM_ERR_BOTH_FRONTS_REQUIRED, "trigger: both fronts required"); #endif } @@ -115,7 +115,7 @@ static void cylinderCleanupControl(DECLARE_ENGINE_PARAMETER_SIGNATURE) { #if EFI_ENGINE_CONTROL bool newValue; if (engineConfiguration->isCylinderCleanupEnabled) { - newValue = !engine->rpmCalculator.isRunning(PASS_ENGINE_PARAMETER_SIGNATURE) && getTPS(PASS_ENGINE_PARAMETER_SIGNATURE) > CLEANUP_MODE_TPS; + newValue = !engine->rpmCalculator.isRunning(PASS_ENGINE_PARAMETER_SIGNATURE) && Sensor::get(SensorType::DriverThrottleIntent).value_or(0) > CLEANUP_MODE_TPS; } else { newValue = false; } @@ -141,6 +141,8 @@ void Engine::periodicSlowCallback(DECLARE_ENGINE_PARAMETER_SIGNATURE) { runHardcodedFsio(PASS_ENGINE_PARAMETER_SIGNATURE); #endif /* EFI_FSIO */ + updateGppwm(); + cylinderCleanupControl(PASS_ENGINE_PARAMETER_SIGNATURE); #if (BOARD_TLE8888_COUNT > 0) @@ -226,8 +228,6 @@ void Engine::reset() { */ engineCycle = getEngineCycle(FOUR_STROKE_CRANK_SENSOR); memset(&ignitionPin, 0, sizeof(ignitionPin)); - - memset(&m, 0, sizeof(m)); } @@ -247,13 +247,6 @@ void Engine::preCalculate(DECLARE_ENGINE_PARAMETER_SIGNATURE) { void Engine::OnTriggerStateDecodingError() { Engine *engine = this; EXPAND_Engine; - if (engineConfiguration->debugMode == DBG_TRIGGER_SYNC) { -#if EFI_TUNER_STUDIO - tsOutputChannels.debugIntField1 = triggerCentral.triggerState.currentCycle.eventCount[0]; - tsOutputChannels.debugIntField2 = triggerCentral.triggerState.currentCycle.eventCount[1]; - tsOutputChannels.debugIntField3 = triggerCentral.triggerState.currentCycle.eventCount[2]; -#endif /* EFI_TUNER_STUDIO */ - } warning(CUSTOM_SYNC_COUNT_MISMATCH, "trigger not happy current %d/%d/%d expected %d/%d/%d", triggerCentral.triggerState.currentCycle.eventCount[0], @@ -489,11 +482,9 @@ void Engine::periodicFastCallback(DECLARE_ENGINE_PARAMETER_SIGNATURE) { engineState.periodicFastCallback(PASS_ENGINE_PARAMETER_SIGNATURE); #if EFI_ENGINE_CONTROL - engine->m.beforeFuelCalc = getTimeNowLowerNt(); int rpm = GET_RPM(); ENGINE(injectionDuration) = getInjectionDuration(rpm PASS_ENGINE_PARAMETER_SUFFIX); - engine->m.fuelCalcTime = getTimeNowLowerNt() - engine->m.beforeFuelCalc; #endif } diff --git a/firmware/controllers/algo/engine.h b/firmware/controllers/algo/engine.h index 502322661a..88238e2473 100644 --- a/firmware/controllers/algo/engine.h +++ b/firmware/controllers/algo/engine.h @@ -54,7 +54,7 @@ public: explicit Engine(persistent_config_s *config); Engine(); - IEtbController *etbControllers[ETB_COUNT]; + IEtbController *etbControllers[ETB_COUNT] = {nullptr}; cyclic_buffer triggerErrorDetection; @@ -79,6 +79,16 @@ public: bool needTdcCallback = true; #endif /* EFI_UNIT_TEST */ + +#if EFI_LAUNCH_CONTROL + bool launchActivatePinState = false; + bool isLaunchCondition = false; + bool applyLaunchExtraFuel = false; + bool setLaunchBoostDuty = false; + bool applyLaunchControlRetard = false; + bool rpmHardCut = false; +#endif /* EFI_LAUNCH_CONTROL */ + /** * if 2nd TPS is not configured we do not run 2nd ETB */ @@ -96,9 +106,6 @@ public: #if !EFI_PROD_CODE float mockMapValue = 0; - // for historical reasons we have options to mock TPS on different layers :( - int mockTpsAdcValue = 0; - float mockTpsValue = NAN; #endif int getGlobalConfigurationVersion(void) const; @@ -176,6 +183,11 @@ public: */ efitick_t stopEngineRequestTimeNt = 0; + + bool startStopState = false; + efitick_t startStopStateLastPushTime = 0; + int startStopStateToggleCounter = 0; + /** * This counter is incremented every time user adjusts ECU parameters online (either via rusEfi console or other * tuning software) @@ -248,6 +260,8 @@ public: */ bool isTestMode = false; + bool directSelfStimulation = false; + void resetEngineSnifferIfInTestMode(); /** @@ -307,8 +321,6 @@ public: */ bool isInShutdownMode() const; - monitoring_timestamps_s m; - void knockLogic(float knockVolts DECLARE_ENGINE_PARAMETER_SUFFIX); void printKnockState(void); diff --git a/firmware/controllers/algo/engine2.cpp b/firmware/controllers/algo/engine2.cpp index ead3ac910d..b3aedd9c0f 100644 --- a/firmware/controllers/algo/engine2.cpp +++ b/firmware/controllers/algo/engine2.cpp @@ -16,6 +16,7 @@ #include "advance_map.h" #include "aux_valves.h" #include "perf_trace.h" +#include "sensor.h" #if EFI_PROD_CODE #include "svnversion.h" @@ -28,8 +29,7 @@ extern fuel_Map3D_t veMap; extern afr_Map3D_t afrMap; -EXTERN_ENGINE -; +EXTERN_ENGINE; // this does not look exactly right extern LoggingWithStorage engineLogger; @@ -119,19 +119,9 @@ void EngineState::updateSlowSensors(DECLARE_ENGINE_PARAMETER_SIGNATURE) { engine->sensors.iat = getIntakeAirTemperatureM(PASS_ENGINE_PARAMETER_SIGNATURE); +#if !EFI_CANBUS_SLAVE engine->sensors.clt = getCoolantTemperatureM(PASS_ENGINE_PARAMETER_SIGNATURE); - - // todo: reduce code duplication with 'getCoolantTemperature' - if (engineConfiguration->auxTempSensor1.adcChannel != EFI_ADC_NONE) { - engine->sensors.auxTemp1 = getTemperatureC(&engineConfiguration->auxTempSensor1, - &engine->engineState.auxTemp1Curve, - false PASS_ENGINE_PARAMETER_SUFFIX); - } - if (engineConfiguration->auxTempSensor2.adcChannel != EFI_ADC_NONE) { - engine->sensors.auxTemp2 = getTemperatureC(&engineConfiguration->auxTempSensor2, - &engine->engineState.auxTemp2Curve, - false PASS_ENGINE_PARAMETER_SUFFIX); - } +#endif /* EFI_CANBUS_SLAVE */ #if EFI_UNIT_TEST if (!cisnan(engine->sensors.mockClt)) { @@ -164,7 +154,7 @@ void EngineState::periodicFastCallback(DECLARE_ENGINE_PARAMETER_SIGNATURE) { } // todo: move this into slow callback, no reason for IAT corr to be here - running.intakeTemperatureCoefficient = getIatFuelCorrection(getIntakeAirTemperature() PASS_ENGINE_PARAMETER_SUFFIX); + running.intakeTemperatureCoefficient = getIatFuelCorrection(PASS_ENGINE_PARAMETER_SIGNATURE); // todo: move this into slow callback, no reason for CLT corr to be here running.coolantTemperatureCoefficient = getCltFuelCorrection(PASS_ENGINE_PARAMETER_SIGNATURE); @@ -197,9 +187,11 @@ void EngineState::periodicFastCallback(DECLARE_ENGINE_PARAMETER_SIGNATURE) { float engineLoad = getEngineLoadT(PASS_ENGINE_PARAMETER_SIGNATURE); timingAdvance = getAdvance(rpm, engineLoad PASS_ENGINE_PARAMETER_SUFFIX); + multispark.count = getMultiSparkCount(rpm PASS_ENGINE_PARAMETER_SUFFIX); + if (engineConfiguration->fuelAlgorithm == LM_SPEED_DENSITY) { - float tps = getTPS(PASS_ENGINE_PARAMETER_SIGNATURE); - updateTChargeK(rpm, tps PASS_ENGINE_PARAMETER_SUFFIX); + auto tps = Sensor::get(SensorType::Tps1); + updateTChargeK(rpm, tps.value_or(0) PASS_ENGINE_PARAMETER_SUFFIX); float map = getMap(PASS_ENGINE_PARAMETER_SIGNATURE); /** @@ -207,15 +199,16 @@ void EngineState::periodicFastCallback(DECLARE_ENGINE_PARAMETER_SIGNATURE) { */ if (CONFIG(useTPSBasedVeTable)) { // todo: should we have 'veTpsMap' fuel_Map3D_t variable here? - currentRawVE = interpolate3d(tps, CONFIG(ignitionTpsBins), IGN_TPS_COUNT, rpm, config->veRpmBins, FUEL_RPM_COUNT, veMap.pointers); + currentRawVE = interpolate3d(tps.value_or(50), CONFIG(ignitionTpsBins), IGN_TPS_COUNT, rpm, config->veRpmBins, FUEL_RPM_COUNT, veMap.pointers); } else { currentRawVE = veMap.getValue(rpm, map); } + // get VE from the separate table for Idle - if (CONFIG(useSeparateVeForIdle)) { + if (tps.Valid && CONFIG(useSeparateVeForIdle)) { float idleVe = interpolate2d("idleVe", rpm, config->idleVeBins, config->idleVe); // interpolate between idle table and normal (running) table using TPS threshold - currentRawVE = interpolateClamped(0.0f, idleVe, CONFIG(idlePidDeactivationTpsThreshold), currentRawVE, tps); + currentRawVE = interpolateClamped(0.0f, idleVe, CONFIG(idlePidDeactivationTpsThreshold), currentRawVE, tps.Value); } currentBaroCorrectedVE = baroCorrection * currentRawVE * PERCENT_DIV; targetAFR = afrMap.getValue(rpm, map); @@ -227,7 +220,7 @@ void EngineState::periodicFastCallback(DECLARE_ENGINE_PARAMETER_SIGNATURE) { void EngineState::updateTChargeK(int rpm, float tps DECLARE_ENGINE_PARAMETER_SUFFIX) { #if EFI_ENGINE_CONTROL - float newTCharge = getTCharge(rpm, tps, getCoolantTemperature(), getIntakeAirTemperature() PASS_ENGINE_PARAMETER_SUFFIX); + float newTCharge = getTCharge(rpm, tps PASS_ENGINE_PARAMETER_SUFFIX); // convert to microsecs and then to seconds efitick_t curTime = getTimeNowNt(); float secsPassed = (float)NT2US(curTime - timeSinceLastTChargeK) / 1000000.0f; @@ -268,7 +261,7 @@ void StartupFuelPumping::setPumpsCounter(int newValue) { void StartupFuelPumping::update(DECLARE_ENGINE_PARAMETER_SIGNATURE) { if (GET_RPM() == 0) { - bool isTpsAbove50 = getTPS(PASS_ENGINE_PARAMETER_SIGNATURE) >= 50; + bool isTpsAbove50 = Sensor::get(SensorType::DriverThrottleIntent).value_or(0) >= 50; if (this->isTpsAbove50 != isTpsAbove50) { setPumpsCounter(pumpsCounter + 1); diff --git a/firmware/controllers/algo/engine_configuration.cpp b/firmware/controllers/algo/engine_configuration.cpp index ec43e111fd..bff36419d5 100644 --- a/firmware/controllers/algo/engine_configuration.cpp +++ b/firmware/controllers/algo/engine_configuration.cpp @@ -29,6 +29,7 @@ #include "engine_math.h" #include "speed_density.h" #include "advance_map.h" +#include "sensor.h" #include "hip9011_lookup.h" #if EFI_MEMS @@ -66,6 +67,7 @@ #include "test_engine.h" #include "sachs.h" #include "vw.h" +#include "me7pnp.h" #include "vw_b6.h" #include "daihatsu.h" #include "chevrolet_camaro_4.h" @@ -100,7 +102,7 @@ #endif /* EFI_PROD_CODE */ #if EFI_EMULATE_POSITION_SENSORS -#include "trigger_emulator.h" +#include "trigger_emulator_algo.h" #endif /* EFI_EMULATE_POSITION_SENSORS */ #if EFI_TUNER_STUDIO @@ -143,7 +145,7 @@ static fuel_table_t alphaNfuel = { * todo: place this field next to 'engineConfiguration'? */ #ifdef EFI_ACTIVE_CONFIGURATION_IN_FLASH -#include "flash.h" +#include "flash_int.h" engine_configuration_s & activeConfiguration = reinterpret_cast(getFlashAddrFirstCopy())->persistentConfiguration.engineConfiguration; // we cannot use this activeConfiguration until we call rememberCurrentConfiguration() bool isActiveConfigurationVoid = true; @@ -595,7 +597,6 @@ static void setDefaultStepperIdleParameters(DECLARE_ENGINE_PARAMETER_SIGNATURE) } static void setCanFrankensoDefaults(DECLARE_CONFIG_PARAMETER_SIGNATURE) { - engineConfiguration->canDeviceMode = CD_USE_CAN2; engineConfiguration->canTxPin = GPIOB_6; engineConfiguration->canRxPin = GPIOB_12; } @@ -609,17 +610,53 @@ void setTargetRpmCurve(int rpm DECLARE_CONFIG_PARAMETER_SUFFIX) { } int getTargetRpmForIdleCorrection(DECLARE_ENGINE_PARAMETER_SIGNATURE) { - float clt = getCoolantTemperature(); - int targetRpm; - if (!hasCltSensor()) { - // error is already reported, let's take first value from the table should be good enough error handing solution - targetRpm = CONFIG(cltIdleRpm)[0]; - } else { - targetRpm = interpolate2d("cltRpm", clt, CONFIG(cltIdleRpmBins), CONFIG(cltIdleRpm)); - } + // error is already reported, let's take the value at 0C since that should be a nice high idle + float clt = Sensor::get(SensorType::Clt).value_or(0); + + int targetRpm = interpolate2d("cltRpm", clt, CONFIG(cltIdleRpmBins), CONFIG(cltIdleRpm)); + return targetRpm + engine->fsioState.fsioIdleTargetRPMAdjustment; } +void setDefaultMultisparkParameters(DECLARE_ENGINE_PARAMETER_SIGNATURE) { + // 1ms spark + 2ms dwell + engineConfiguration->multisparkSparkDuration = 1000; + engineConfiguration->multisparkDwell = 2000; + + // Conservative defaults - probably won't blow up coils + engineConfiguration->multisparkMaxRpm = 1500; + engineConfiguration->multisparkMaxExtraSparkCount = 2; + engineConfiguration->multisparkMaxSparkingAngle = 30; +} + +void setDefaultGppwmParameters(DECLARE_ENGINE_PARAMETER_SIGNATURE) { + // Same config for all channels + for (size_t i = 0; i < efi::size(CONFIG(gppwm)); i++) { + auto& cfg = CONFIG(gppwm)[i]; + + cfg.pin = GPIO_UNASSIGNED; + cfg.dutyIfError = 0; + cfg.onAboveDuty = 60; + cfg.offBelowDuty = 50; + cfg.pwmFrequency = 250; + + for (size_t j = 0; j < efi::size(cfg.loadBins); j++) { + uint8_t z = j * 100 / (efi::size(cfg.loadBins) - 1); + cfg.loadBins[j] = z; + + // Fill some values in the table + for (size_t k = 0; k < efi::size(cfg.rpmBins); k++) { + cfg.table[j][k] = z; + } + + } + + for (size_t j = 0; j < efi::size(cfg.rpmBins); j++) { + cfg.rpmBins[j] = 1000 * j / RPM_1_BYTE_PACKING_MULT; + } + } +} + /** * @brief Global default engine configuration * This method sets the global engine configuration defaults. These default values are then @@ -670,7 +707,7 @@ static void setDefaultEngineConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE) { engineConfiguration->canNbcType = CAN_BUS_MAZDA_RX8; // Don't enable, but set default address - engineConfiguration->verboseCanBaseAddress = 0x200; + engineConfiguration->verboseCanBaseAddress = CAN_DEFAULT_BASE; engineConfiguration->sdCardPeriodMs = 50; @@ -678,16 +715,16 @@ static void setDefaultEngineConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE) { config->fsioFormulas[i][0] = 0; } - CONFIG(mapMinBufferLength) = 1; + CONFIG(startCrankingDuration) = 7; + engineConfiguration->idlePidRpmDeadZone = 50; engineConfiguration->startOfCrankingPrimingPulse = 0; engineConfiguration->acCutoffLowRpm = 700; engineConfiguration->acCutoffHighRpm = 5000; - engineConfiguration->postCrankingTargetClt = 25; engineConfiguration->postCrankingDurationSec = 2; initTemperatureCurve(IAT_FUEL_CORRECTION_CURVE, 1); @@ -860,6 +897,10 @@ static void setDefaultEngineConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE) { engineConfiguration->timingMode = TM_DYNAMIC; engineConfiguration->fixedModeTiming = 50; + setDefaultMultisparkParameters(PASS_ENGINE_PARAMETER_SIGNATURE); + + setDefaultGppwmParameters(PASS_ENGINE_PARAMETER_SIGNATURE); + #if !EFI_UNIT_TEST engineConfiguration->analogInputDividerCoefficient = 2; #endif @@ -910,7 +951,6 @@ static void setDefaultEngineConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE) { engineConfiguration->mapHighValueVoltage = 5; engineConfiguration->logFormat = LF_NATIVE; - engineConfiguration->directSelfStimulation = false; engineConfiguration->trigger.type = TT_TOOTHED_WHEEL_60_2; @@ -1103,9 +1143,6 @@ void resetConfigurationExt(Logging * logger, configuration_callback_t boardCallb setBoardConfigurationOverrides(); #endif -#if EFI_SIMULATOR - engineConfiguration->directSelfStimulation = true; -#endif /* */ engineConfiguration->engineType = engineType; /** @@ -1151,6 +1188,7 @@ void resetConfigurationExt(Logging * logger, configuration_callback_t boardCallb setEngineBMW_M73_Manhattan(PASS_CONFIG_PARAMETER_SIGNATURE); break; case BMW_M73_MRE: + case BMW_M73_MRE_SLAVE: setEngineBMW_M73_microRusEfi(PASS_CONFIG_PARAMETER_SIGNATURE); break; case BMW_M73_PROTEUS: @@ -1307,6 +1345,9 @@ void resetConfigurationExt(Logging * logger, configuration_callback_t boardCallb case TOYOTA_JZS147: setToyota_jzs147EngineConfiguration(PASS_CONFIG_PARAMETER_SIGNATURE); break; + case VAG_18_TURBO: + vag_18_Turbo(PASS_CONFIG_PARAMETER_SIGNATURE); + break; case TEST_33816: setTest33816EngineConfiguration(PASS_CONFIG_PARAMETER_SIGNATURE); break; @@ -1418,3 +1459,8 @@ void copyTimingTable(ignition_table_t const source, ignition_table_t destination } } +static const ConfigOverrides defaultConfigOverrides{}; +// This symbol is weak so that a board_configuration.cpp file can override it +__attribute__((weak)) const ConfigOverrides& getConfigOverrides() { + return defaultConfigOverrides; +} diff --git a/firmware/controllers/algo/engine_configuration.h b/firmware/controllers/algo/engine_configuration.h index 5b98393966..7e9ceb194b 100644 --- a/firmware/controllers/algo/engine_configuration.h +++ b/firmware/controllers/algo/engine_configuration.h @@ -66,3 +66,23 @@ typedef void (*configuration_callback_t)(engine_configuration_s*); void resetConfigurationExt(Logging * logger, configuration_callback_t boardCallback, engine_type_e engineType DECLARE_ENGINE_PARAMETER_SUFFIX); void resetConfigurationExt(Logging * logger, engine_type_e engineType DECLARE_ENGINE_PARAMETER_SUFFIX); #endif /* __cplusplus */ + +struct ConfigOverrides { + // CAN pinout + brain_pin_e canTxPin; + brain_pin_e canRxPin; +}; + +const ConfigOverrides& getConfigOverrides(); + +// If the overide value is default initialized +// Use the value from config if not overriden +// Otherwise use the override +// the == decltype(CONFIG(__x__)){} part means +// - take the type of the corresponding config field +// - default construct (ie, 0) an object of the corresponding type +// - check if the override value matches that (GPIO_UNASSIGNED, SPI_NONE, etc) +// If it matches, that field hasn't been overridden, so read from the config. +#define CONFIG_OVERRIDE(__x__) ( \ + (( getConfigOverrides().__x__ ) == decltype(CONFIG(__x__)){}) \ + ? (CONFIG( __x__ )) : ( getConfigOverrides().__x__ )) diff --git a/firmware/controllers/algo/engine_parts.h b/firmware/controllers/algo/engine_parts.h index 32c9ac61ce..a5e6b2728a 100644 --- a/firmware/controllers/algo/engine_parts.h +++ b/firmware/controllers/algo/engine_parts.h @@ -60,8 +60,6 @@ public: float mockClt = NAN; #endif float clt = NAN; - float auxTemp1 = NAN; - float auxTemp2 = NAN; Accelerometer accelerometer; @@ -105,35 +103,6 @@ public: cyclic_buffer recentWarnings; }; -typedef struct { - uint32_t beforeMainTrigger; - uint32_t mainTriggerCallbackTime; - - uint32_t beforeIgnitionSch; - uint32_t ignitionSchTime; - - uint32_t beforeInjectonSch; - uint32_t injectonSchTime; - - uint32_t beforeZeroTest; - uint32_t zeroTestTime; - - uint32_t beforeAdvance; - uint32_t advanceLookupTime; - - uint32_t beforeFuelCalc; - uint32_t fuelCalcTime; - - uint32_t beforeMapAveragingCb; - uint32_t mapAveragingCbTime; - - uint32_t beforeHipCb; - uint32_t hipCbTime; - - uint32_t beforeRpmCb; - uint32_t rpmCbTime; -} monitoring_timestamps_s; - class FsioState { public: FsioState(); @@ -184,3 +153,10 @@ public: private: void setPumpsCounter(int newValue); }; + +struct multispark_state +{ + efitick_t delay; + efitick_t dwell; + uint8_t count; +}; diff --git a/firmware/controllers/algo/engine_state.h b/firmware/controllers/algo/engine_state.h index 8c8bfcc48d..24589e6b95 100644 --- a/firmware/controllers/algo/engine_state.h +++ b/firmware/controllers/algo/engine_state.h @@ -46,8 +46,6 @@ public: // too much copy-paste here, something should be improved :) ThermistorMath iatCurve; ThermistorMath cltCurve; - ThermistorMath auxTemp1Curve; - ThermistorMath auxTemp2Curve; /** * MAP averaging angle start, in relation to 'mapAveragingSchedulingAtIndex' trigger index index @@ -90,5 +88,5 @@ public: MockAdcState mockAdcState; #endif /* EFI_ENABLE_MOCK_ADC */ + multispark_state multispark; }; - diff --git a/firmware/controllers/algo/event_registry.h b/firmware/controllers/algo/event_registry.h index b7f8bcbf81..0284b7d9c6 100644 --- a/firmware/controllers/algo/event_registry.h +++ b/firmware/controllers/algo/event_registry.h @@ -86,6 +86,11 @@ public: IgnitionOutputPin *outputs[MAX_OUTPUTS_FOR_IGNITION]; scheduling_s dwellStartTimer; AngleBasedEvent sparkEvent; + + // How many additional sparks should we fire after the first one? + // For single sparks, this should be zero. + uint8_t sparksRemaining = 0; + /** * Desired timing advance */ diff --git a/firmware/controllers/algo/fuel_math.cpp b/firmware/controllers/algo/fuel_math.cpp index 72bb80fb9e..0561c5c1e0 100644 --- a/firmware/controllers/algo/fuel_math.cpp +++ b/firmware/controllers/algo/fuel_math.cpp @@ -30,13 +30,13 @@ #include "rpm_calculator.h" #include "speed_density.h" #include "perf_trace.h" +#include "sensor.h" -EXTERN_ENGINE -; +EXTERN_ENGINE; fuel_Map3D_t fuelMap("fuel"); static fuel_Map3D_t fuelPhaseMap("fl ph"); -extern fuel_Map3D_t ve2Map; +extern fuel_Map3D_t veMap; extern afr_Map3D_t afrMap; extern baroCorr_Map3D_t baroCorrMap; @@ -75,10 +75,10 @@ DISPLAY(DISPLAY_IF(isCrankingState)) floatms_t getCrankingFuel3(float coolantTem DISPLAY_SENSOR(CLT); DISPLAY_TEXT(eol); - percent_t tps = getTPS(PASS_ENGINE_PARAMETER_SIGNATURE); + auto tps = Sensor::get(SensorType::DriverThrottleIntent); DISPLAY_TEXT(TPS_coef); - engine->engineState.DISPLAY_PREFIX(cranking).DISPLAY_FIELD(tpsCoefficient) = cisnan(tps) ? 1 : interpolate2d("crankTps", tps, engineConfiguration->crankingTpsBins, + engine->engineState.DISPLAY_PREFIX(cranking).DISPLAY_FIELD(tpsCoefficient) = tps.Valid ? 1 : interpolate2d("crankTps", tps.Value, engineConfiguration->crankingTpsBins, engineConfiguration->crankingTpsCoef); DISPLAY_SENSOR(TPS); DISPLAY_TEXT(eol); @@ -142,26 +142,40 @@ floatms_t getRunningFuel(floatms_t baseFuel DECLARE_ENGINE_PARAMETER_SUFFIX) { /* DISPLAY_ENDIF */ /** + * Function block now works to create a standardised load from the cylinder filling as well as tune fuel via VE table. * @return total duration of fuel injection per engine cycle, in milliseconds */ float getRealMafFuel(float airSpeed, int rpm DECLARE_ENGINE_PARAMETER_SUFFIX) { - if (rpm == 0) + // If the engine is stopped, MAF is meaningless + if (rpm == 0) { return 0; - // duration of engine cycle, in hours - float engineCycleDurationHr = 1.0 / 60 / rpm; + } - float airMassKg = airSpeed * engineCycleDurationHr; + // kg/hr -> g/s + float gramPerSecond = airSpeed * 1000 / 3600; - /** - * todo: pre-calculate gramm/second injector flow to save one multiplication - * open question if that's needed since that's just a multiplication - */ - float injectorFlowRate = cc_minute_to_gramm_second(engineConfiguration->injector.flow); + // 1/min -> 1/s + float revsPerSecond = rpm / 60.0f; + float airPerRevolution = gramPerSecond / revsPerSecond; - float afr = afrMap.getValue(rpm, airSpeed); - float fuelMassGramm = airMassKg / afr * 1000; + // Now we have to divide among cylinders - on a 4 stroke, half of the cylinders happen every rev + // This math is floating point to work properly on engines with odd cyl count + float halfCylCount = CONFIG(specs.cylindersCount) / 2.0f; - return 1000 * fuelMassGramm / injectorFlowRate; + float cylinderAirmass = airPerRevolution / halfCylCount; + + //Calculation of 100% VE air mass in g/rev - 1 cylinder filling at 1.2929g/L + float StandardAirCharge = CONFIG(specs.displacement) / CONFIG(specs.cylindersCount) * 1.2929; + //Create % load for fuel table using relative naturally aspiratedcylinder filling + float airChargeLoad = 100 * cylinderAirmass/StandardAirCharge; + + //Correct air mass by VE table + float corrCylAirmass = cylinderAirmass * veMap.getValue(rpm, airChargeLoad) / 100; + float fuelMassGram = corrCylAirmass / afrMap.getValue(rpm, airSpeed); + float pulseWidthSeconds = fuelMassGram / cc_minute_to_gramm_second(engineConfiguration->injector.flow); + + // Convert to ms + return 1000 * pulseWidthSeconds; } /** @@ -322,20 +336,29 @@ void initFuelMap(DECLARE_ENGINE_PARAMETER_SIGNATURE) { * @brief Engine warm-up fuel correction. */ float getCltFuelCorrection(DECLARE_ENGINE_PARAMETER_SIGNATURE) { - if (!hasCltSensor()) + const auto [valid, clt] = Sensor::get(SensorType::Clt); + + if (!valid) return 1; // this error should be already reported somewhere else, let's just handle it - return interpolate2d("cltf", getCoolantTemperature(), config->cltFuelCorrBins, config->cltFuelCorr); + + return interpolate2d("cltf", clt, config->cltFuelCorrBins, config->cltFuelCorr); } angle_t getCltTimingCorrection(DECLARE_ENGINE_PARAMETER_SIGNATURE) { - if (!hasCltSensor()) + const auto [valid, clt] = Sensor::get(SensorType::Clt); + + if (!valid) return 0; // this error should be already reported somewhere else, let's just handle it - return interpolate2d("timc", getCoolantTemperature(), engineConfiguration->cltTimingBins, engineConfiguration->cltTimingExtra); + + return interpolate2d("timc", clt, engineConfiguration->cltTimingBins, engineConfiguration->cltTimingExtra); } -float getIatFuelCorrection(float iat DECLARE_ENGINE_PARAMETER_SUFFIX) { - if (cisnan(iat)) +float getIatFuelCorrection(DECLARE_ENGINE_PARAMETER_SIGNATURE) { + const auto [valid, iat] = Sensor::get(SensorType::Iat); + + if (!valid) return 1; // this error should be already reported somewhere else, let's just handle it + return interpolate2d("iatc", iat, config->iatFuelCorrBins, config->iatFuelCorr); } @@ -350,14 +373,23 @@ float getFuelCutOffCorrection(efitick_t nowNt, int rpm DECLARE_ENGINE_PARAMETER_ // coasting fuel cut-off correction if (CONFIG(coastingFuelCutEnabled)) { - percent_t tpsPos = getTPS(PASS_ENGINE_PARAMETER_SIGNATURE); + auto [tpsValid, tpsPos] = Sensor::get(SensorType::Tps1); + if (!tpsValid) { + return 1.0f; + } + + const auto [cltValid, clt] = Sensor::get(SensorType::Clt); + if (!cltValid) { + return 1.0f; + } + float map = getMap(PASS_ENGINE_PARAMETER_SIGNATURE); // gather events bool mapDeactivate = (map >= CONFIG(coastingFuelCutMap)); bool tpsDeactivate = (tpsPos >= CONFIG(coastingFuelCutTps)); // If no CLT sensor (or broken), don't allow DFCO - bool cltDeactivate = hasCltSensor() ? (getCoolantTemperature() < (float)CONFIG(coastingFuelCutClt)) : true; + bool cltDeactivate = clt < (float)CONFIG(coastingFuelCutClt); bool rpmDeactivate = (rpm < CONFIG(coastingFuelCutRpmLow)); bool rpmActivate = (rpm > CONFIG(coastingFuelCutRpmHigh)); @@ -417,7 +449,7 @@ float getBaroCorrection(DECLARE_ENGINE_PARAMETER_SIGNATURE) { * @return Duration of fuel injection while craning */ floatms_t getCrankingFuel(DECLARE_ENGINE_PARAMETER_SIGNATURE) { - return getCrankingFuel3(getCoolantTemperature(), + return getCrankingFuel3(Sensor::get(SensorType::Clt).value_or(20), engine->rpmCalculator.getRevolutionCounterSinceStart() PASS_ENGINE_PARAMETER_SUFFIX); } #endif diff --git a/firmware/controllers/algo/fuel_math.h b/firmware/controllers/algo/fuel_math.h index 2cb54e0524..2680a94be3 100644 --- a/firmware/controllers/algo/fuel_math.h +++ b/firmware/controllers/algo/fuel_math.h @@ -27,7 +27,7 @@ floatms_t getBaseTableFuel(int rpm, float engineLoad); float getBaroCorrection(DECLARE_ENGINE_PARAMETER_SIGNATURE); int getNumberOfInjections(injection_mode_e mode DECLARE_ENGINE_PARAMETER_SUFFIX); angle_t getInjectionOffset(float rpm DECLARE_ENGINE_PARAMETER_SUFFIX); -float getIatFuelCorrection(float iat DECLARE_ENGINE_PARAMETER_SUFFIX); +float getIatFuelCorrection(DECLARE_ENGINE_PARAMETER_SIGNATURE); floatms_t getInjectorLag(float vBatt DECLARE_ENGINE_PARAMETER_SUFFIX); float getCltFuelCorrection(DECLARE_ENGINE_PARAMETER_SIGNATURE); float getFuelCutOffCorrection(efitick_t nowNt, int rpm DECLARE_ENGINE_PARAMETER_SUFFIX); diff --git a/firmware/controllers/algo/launch_control.cpp b/firmware/controllers/algo/launch_control.cpp new file mode 100644 index 0000000000..3d3921807d --- /dev/null +++ b/firmware/controllers/algo/launch_control.cpp @@ -0,0 +1,161 @@ +/* + * @file launch_control.cpp + * + * @date 10. sep. 2019 + * Author: Ola Ruud + */ + +#include "engine.h" + +#if EFI_LAUNCH_CONTROL +#include "boost_control.h" +#include "vehicle_speed.h" +#include "launch_control.h" +#include "io_pins.h" +#include "engine_configuration.h" +#include "engine_controller.h" +#include "periodic_task.h" +#include "pin_repository.h" +#include "allsensors.h" +#include "sensor.h" +#include "engine_math.h" +#include "efi_gpio.h" +#include "advance_map.h" +#include "engine_state.h" +#include "advance_map.h" + +static Logging *logger; + +#if EFI_TUNER_STUDIO +#include "tunerstudio_configuration.h" +extern TunerStudioOutputChannels tsOutputChannels; +#endif /* EFI_TUNER_STUDIO */ + +EXTERN_ENGINE; + +static bool getActivateSwitchCondition(DECLARE_ENGINE_PARAMETER_SIGNATURE) { + switch (engineConfiguration->launchActivationMode) { + case SWITCH_INPUT_LAUNCH: + if (CONFIG(launchActivatePin) != GPIO_UNASSIGNED) { + engine->launchActivatePinState = efiReadPin(CONFIG(launchActivatePin)); + } + return engine->launchActivatePinState; + + case CLUTCH_INPUT_LAUNCH: + if (CONFIG(clutchDownPin) != GPIO_UNASSIGNED) { + engine->clutchDownState = efiReadPin(CONFIG(clutchDownPin)); + } + return engine->clutchDownState; + default: + // ALWAYS_ACTIVE_LAUNCH + return true; + } +} + +class LaunchControl: public PeriodicTimerController { + efitick_t launchTimer; + + DECLARE_ENGINE_PTR; + + int getPeriodMs() override { + return 50; + } + + void PeriodicTask() override { + if (!CONFIG(launchControlEnabled)) { + return; + } + + int rpm = GET_RPM_VALUE; + int speed = getVehicleSpeed(); + auto tps = Sensor::get(SensorType::DriverThrottleIntent); + int tpstreshold = engineConfiguration->launchTpsTreshold; + float timeDelay = engineConfiguration->launchActivateDelay; + int cutRpmRange = engineConfiguration->hardCutRpmRange; + int launchAdvanceRpmRange = engineConfiguration->launchTimingRpmRange; + int launchRpm = engineConfiguration->launchRpm; + + bool activateSwitchCondition = getActivateSwitchCondition(PASS_ENGINE_PARAMETER_SIGNATURE); + + bool rpmCondition = (launchRpm < rpm); + bool tpsCondition = tps.Valid && (tpstreshold < tps.Value); + + bool speedCondition = (CONFIG(launchSpeedTreshold) > speed) || !engineConfiguration->launchDisableBySpeed; + + bool combinedConditions = speedCondition && activateSwitchCondition && rpmCondition && tpsCondition; + + if (!combinedConditions) { + // conditions not met, reset timer + launchTimer = getTimeNowNt(); + engine->isLaunchCondition = false; + engine->setLaunchBoostDuty = false; + engine->applyLaunchControlRetard = false; + engine->applyLaunchExtraFuel = false; + } else { + // If conditions are met... + if ((getTimeNowNt() - launchTimer > MS2NT(timeDelay * 1000)) && combinedConditions) { + engine->isLaunchCondition = true; // ...enable launch! + engine->applyLaunchExtraFuel = true; + } + if (engineConfiguration->enableLaunchBoost) { + engine->setLaunchBoostDuty = true; // ...enable boost! + } + if (engineConfiguration->enableLaunchRetard) { + engine->applyLaunchControlRetard = true; // ...enable retard! + } + } + if (engineConfiguration->debugMode == DBG_LAUNCH) { +#if EFI_TUNER_STUDIO + tsOutputChannels.debugIntField1 = rpmCondition; + tsOutputChannels.debugIntField2 = tpsCondition; + tsOutputChannels.debugIntField3 = speedCondition; + tsOutputChannels.debugIntField4 = activateSwitchCondition; + tsOutputChannels.debugIntField5 = engine->clutchDownState; + tsOutputChannels.debugFloatField1 = engine->launchActivatePinState; + tsOutputChannels.debugFloatField2 = engine->isLaunchCondition; + tsOutputChannels.debugFloatField3 = combinedConditions; +#endif /* EFI_TUNER_STUDIO */ + } + } +}; + +static LaunchControl Launch; + +void setDefaultLaunchParameters(DECLARE_CONFIG_PARAMETER_SIGNATURE) { + engineConfiguration->launchRpm = 4000; // Rpm to trigger Launch condition + engineConfiguration->launchTimingRetard = 10; // retard in absolute degrees ATDC + engineConfiguration->launchTimingRpmRange = 500; // Rpm above Launch triggered for full retard + engineConfiguration->launchSparkCutEnable = true; + engineConfiguration->launchFuelCutEnable = false; + engineConfiguration->hardCutRpmRange = 500; //Rpm above Launch triggered +(if retard enabled) launchTimingRpmRange to hard cut + engineConfiguration->launchSpeedTreshold = 10; //maximum speed allowed before disable launch + engineConfiguration->launchFuelAdded = 10; // Extra fuel in % when launch are triggered + engineConfiguration->launchBoostDuty = 70; // boost valve duty cycle at launch + engineConfiguration->launchActivateDelay = 3; // Delay in seconds for launch to kick in + engineConfiguration->enableLaunchRetard = true; + engineConfiguration->enableLaunchBoost = true; + engineConfiguration->launchSmoothRetard = true; //interpolates the advance linear from launchrpm to fully retarded at launchtimingrpmrange + engineConfiguration->unusedAntilagTimeout = 3; + engineConfiguration->antiLagRpmTreshold = 3000; +} + +void applyLaunchControlLimiting(bool *limitedSpark, bool *limitedFuel DECLARE_ENGINE_PARAMETER_SUFFIX) { + int rpm = GET_RPM_VALUE; + + int retardThresholdRpm = CONFIG(launchRpm) + + (CONFIG(enableLaunchRetard) ? CONFIG(launchAdvanceRpmRange) : 0) + + CONFIG(hardCutRpmRange); + + if (retardThresholdRpm > GET_RPM_VALUE) { + *limitedSpark = engine->isLaunchCondition && engineConfiguration->launchSparkCutEnable; + *limitedFuel = engine->isLaunchCondition && engineConfiguration->launchFuelCutEnable; + engine->rpmHardCut = true; + } +} + +void initLaunchControl(Logging *sharedLogger DECLARE_ENGINE_PARAMETER_SUFFIX) { + logger = sharedLogger; + Launch.Start(); +} + +#endif /* EFI_LAUNCH_CONTROL */ diff --git a/firmware/controllers/algo/launch_control.h b/firmware/controllers/algo/launch_control.h new file mode 100644 index 0000000000..71d48bf8fa --- /dev/null +++ b/firmware/controllers/algo/launch_control.h @@ -0,0 +1,13 @@ +/* + * @file launch_control.h + * + * @date Mar 23, 2020 + * @author Andrey Belomutskiy, (c) 2012-2020 + */ + +#pragma once + +#include "engine.h" + +void initLaunchControl(Logging *sharedLogger DECLARE_ENGINE_PARAMETER_SUFFIX); +void setDefaultLaunchParameters(DECLARE_CONFIG_PARAMETER_SIGNATURE); diff --git a/firmware/controllers/algo/obd_error_codes.h b/firmware/controllers/algo/obd_error_codes.h index 9fde1bd93e..ffe9086049 100644 --- a/firmware/controllers/algo/obd_error_codes.h +++ b/firmware/controllers/algo/obd_error_codes.h @@ -17,8 +17,8 @@ extern "C" { #endif /* __cplusplus */ -// for now I want most enums to be 32 bit integers. At some point maybe we will make the one-byte -// this is about offsets and sizes in TunerStudio +// Back in the day we wanted enums to be 32 bit integers. +// as of 2020 preference is with ' __attribute__ ((__packed__))' allowing one-byte enums #define ENUM_32_BITS 2000000000 typedef enum { @@ -1086,6 +1086,7 @@ typedef enum { //P2155 Fuel Injector Group D Supply Voltage Circ/Open //P2156 Fuel Injector Group D Supply Voltage Circ Low //P2157 Fuel Injector Group D Supply Voltage Circ High + OBD_Vehicle_Speed_SensorB = 2158, //P2158 Vehicle Speed SensorB //P2159 Vehicle Speed SensorB Range/Perf //P2160 Vehicle Speed SensorB Circ Low @@ -1727,7 +1728,7 @@ typedef enum { CUSTOM_OBD_6040 = 6040, CUSTOM_OBD_KNOCK_PROCESSOR = 6041, CUSTOM_OBD_LOCAL_FREEZE = 6042, - CUSTOM_OBD_MMC_ERROR = 6043, + CUSTOM_6043 = 6043, CUSTOM_LOGGING_BUFFER_OVERFLOW = 6044, /** * This is not engine miss detection - this is only internal scheduler state validation @@ -1871,7 +1872,7 @@ typedef enum { CUSTOM_ERR_UNEXPECTED_SPI = 6524, CUSTOM_ERR_EXT_MODE = 6525, CUSTOM_ERR_TIMER_OVERFLOW = 6526, - CUSTOM_ERR_NULL_TIMER_CALLBACK = 6527, + CUSTOM_ERR_6527 = 6527, CUSTOM_ERR_SCHEDULING_ERROR = 6528, CUSTOM_ERR_LOGGING_NOT_READY = 6529, ERROR_NAN_FIND_INDEX = 6530, @@ -2040,7 +2041,7 @@ typedef enum { CUSTOM_ERR_6679 = 6679, CUSTOM_ERR_6680 = 6680, - CUSTOM_ERR_6681 = 6681, + CUSTOM_DELTA_NOT_POSITIVE = 6681, CUSTOM_ERR_6682 = 6682, CUSTOM_SAME_TWICE = 6683, CUSTOM_ERR_6684 = 6684, @@ -2073,7 +2074,7 @@ typedef enum { CUSTOM_ERR_TIMER_TEST_CALLBACK_WRONG_TIME = 6708, CUSTOM_ERR_6709 = 6709, CUSTOM_DUTY_INVALID = 6710, - CUSTOM_DUTY_TOO_HIGH = 6711, + CUSTOM_PWM_DUTY_TOO_HIGH = 6711, CUSTOM_ERR_PWM_STATE_ASSERT = 6712, CUSTOM_ERR_PWM_CALLBACK_ASSERT = 6713, CUSTOM_ERR_PWM_SWITCH_ASSERT = 6714, @@ -2082,7 +2083,7 @@ typedef enum { CUSTOM_INVALID_ADC = 6720, CUSTOM_INVALID_MODE_SETTING = 6721, CUSTOM_ERR_TASK_TIMER_OVERFLOW = 6722, - CUSTOM_ERR_6723 = 6723, + CUSTOM_NO_ETB_FOR_IDLE = 6723, CUSTOM_ERR_6724 = 6724, CUSTOM_ERR_6725 = 6725, CUSTOM_ERR_6726 = 6726, @@ -2091,6 +2092,11 @@ typedef enum { CUSTOM_ERR_6729 = 6729, + // 8000-8050 logging errors + CUSTOM_OBD_MMC_ERROR = 8000, + + // 8000-8050 logging errors + CUSTOM_ERR_TRIGGER_SYNC = 9000, CUSTOM_OBD_TRIGGER_WAVEFORM = 9001, /** @@ -2109,6 +2115,8 @@ typedef enum { CUSTOM_TOO_LONG_FUEL_INJECTION = 9013, + + // this is needed for proper enum size, this matters for malfunction_central Internal_ForceMyEnumIntSize_cranking_obd_code = ENUM_32_BITS, } obd_code_e; diff --git a/firmware/controllers/algo/rusefi_enums.h b/firmware/controllers/algo/rusefi_enums.h index 8e6b09e36c..0c7954f436 100644 --- a/firmware/controllers/algo/rusefi_enums.h +++ b/firmware/controllers/algo/rusefi_enums.h @@ -196,6 +196,7 @@ typedef enum { TEST_33816 = 103, BMW_M73_MRE = 104, + BMW_M73_MRE_SLAVE = 105, Force_4_bytes_size_engine_type = ENUM_32_BITS, } engine_type_e; @@ -208,6 +209,9 @@ typedef enum { TT_TOOTHED_WHEEL = 0, TT_FORD_ASPIRE = 1, TT_DODGE_NEON_1995 = 2, + /** + * https://rusefi.com/wiki/index.php?title=Manual:Software:Trigger#Mazda_Miata_NA + */ TT_MAZDA_MIATA_NA = 3, /** * NB1 means non-VVT NB, 99 and 00 1.8 engine @@ -246,6 +250,9 @@ typedef enum { TT_ONE = 18, TT_DODGE_RAM = 19, + /** + * It looks like this is the VR shape if you have your wires flipped + */ TT_60_2_VW = 20, TT_HONDA_1_24 = 21, @@ -323,13 +330,24 @@ typedef enum { */ TT_MIATA_NB2_VVT_CAM = 43, + TT_RENIX_44_2_2 = 44, + + /** + * Same as TT_RENIX_44_2_2 but repeated three times, not two. + */ + TT_RENIX_66_2_2_2 = 45, + + TT_HONDA_K_12_1 = 46, + + TT_BOSCH_QUICK_START = 47, + // do not forget to edit "#define trigger_type_e_enum" line in integration/rusefi_config.txt file to propogate new value to rusefi.ini TS project // do not forget to invoke "gen_config.bat" once you make changes to integration/rusefi_config.txt // todo: one day a hero would integrate some of these things into Makefile in order to reduce manual magic // // Another point: once you add a new trigger, run get_trigger_images.bat which would run rusefi_test.exe from unit_tests // - TT_UNUSED = 44, // this is used if we want to iterate over all trigger types + TT_UNUSED = 48, // this is used if we want to iterate over all trigger types Force_4_bytes_size_trigger_type = ENUM_32_BITS, } trigger_type_e; @@ -414,6 +432,15 @@ typedef enum { } display_mode_e; +typedef enum __attribute__ ((__packed__)){ + TL_AUTO = 0, + TL_SEMI_AUTO = 1, + TL_MANUAL = 2, + TL_HALL = 3, + +} tle8888_mode_e; + + typedef enum { LF_NATIVE = 0, /** @@ -484,9 +511,15 @@ typedef enum { /** * 720 degree engine cycle but trigger is defined using a 180 cycle which is when repeated three more times + * In other words, same pattern is repeatet on the crank wheel twice. */ FOUR_STROKE_SYMMETRICAL_CRANK_SENSOR = 4, + /** + * Same pattern repeated three times on crank wheel. Crazy, I know! + */ + FOUR_STROKE_THREE_TIMES_CRANK_SENSOR = 5, + Force_4_bytes_size_operation_mode_e = ENUM_32_BITS, } operation_mode_e; @@ -574,6 +607,12 @@ typedef enum __attribute__ ((__packed__)) { SPI_DEVICE_4 = 4, } spi_device_e; +typedef enum { + BMW_e46 = 0, + W202 = 1, + Force_4_bytes_size_can_vss_nbc_e = ENUM_32_BITS, +} can_vss_nbc_e; + typedef enum { MS_AUTO = 0, MS_ALWAYS = 1, @@ -634,7 +673,7 @@ typedef enum { DBG_SD_CARD = 13, DBG_SR5_PROTOCOL = 14, DBG_KNOCK = 15, - DBG_TRIGGER_SYNC = 16, + DBG_16 = 16, /** * See also DBG_ELECTRONIC_THROTTLE_EXTRA */ @@ -666,10 +705,13 @@ typedef enum { */ DBG_ANALOG_INPUTS2 = 32, DBG_DWELL_METRIC = 33, - DBG_AUX_TEMPERATURE = 34, + DBG_34 = 34, DBG_ETB_LOGIC = 35, DBG_BOOST = 36, - DBG_37 = 37, + DBG_START_STOP = 37, + DBG_LAUNCH = 38, + DBG_ETB_AUTOTUNE = 39, + DBG_40 = 40, Force_4_bytes_size_debug_mode_e = ENUM_32_BITS, } debug_mode_e; @@ -714,14 +756,6 @@ typedef enum { Force_4_bytes_size_cranking_map_type = ENUM_32_BITS, } air_pressure_sensor_type_e; -typedef enum { - CD_OFF = 0, - CD_USE_CAN1 = 1, - CD_USE_CAN2 = 2, - - Internal_ForceMyEnumIntSize_can_device_mode = ENUM_32_BITS, -} can_device_mode_e; - typedef enum { SC_OFF = 0, /** @@ -780,10 +814,12 @@ typedef enum { * Net Body Computer types */ typedef enum { - CAN_BUS_NBC_BMW = 0, + CAN_BUS_NBC_NONE = 0, CAN_BUS_NBC_FIAT = 1, CAN_BUS_NBC_VAG = 2, CAN_BUS_MAZDA_RX8 = 3, + CAN_BUS_NBC_BMW = 4, + CAN_BUS_W202_C180 = 5, Internal_ForceMyEnumIntSize_can_nbc = ENUM_32_BITS, } can_nbc_e; @@ -870,3 +906,15 @@ typedef enum { ALWAYS_ON_ANTILAG = 1, Force_4bytes_size_antiLagActivationMode_e = ENUM_32_BITS, } antiLagActivationMode_e; + +typedef enum __attribute__ ((__packed__)) { + GPPWM_Tps = 0, + GPPWM_Map = 1, + GPPWM_Clt = 2, + GPPWM_Iat = 3, +} gppwm_channel_e; + +typedef enum __attribute__ ((__packed__)) { + GPPWM_GreaterThan = 0, + GPPWM_LessThan = 1, +} gppwm_compare_mode_e; diff --git a/firmware/controllers/algo/rusefi_types.h b/firmware/controllers/algo/rusefi_types.h index c4ebbe8f51..a3b998363e 100644 --- a/firmware/controllers/algo/rusefi_types.h +++ b/firmware/controllers/algo/rusefi_types.h @@ -81,6 +81,8 @@ typedef float percent_t; typedef void (*Void)(void); +typedef char error_message_t[ERROR_BUFFER_SIZE]; + typedef char le_formula_t[LE_COMMAND_LENGTH]; typedef brain_pin_e egt_cs_array_t[EGT_CHANNEL_COUNT]; @@ -99,6 +101,7 @@ typedef float fsio_table_8x8_f32t[FSIO_TABLE_8][FSIO_TABLE_8]; typedef float tps_tps_table_t[TPS_TPS_ACCEL_TABLE][TPS_TPS_ACCEL_TABLE]; typedef uint8_t fsio_table_8x8_u8t[FSIO_TABLE_8][FSIO_TABLE_8]; typedef uint8_t boost_table_t[BOOST_LOAD_COUNT][BOOST_RPM_COUNT]; +typedef uint8_t gppwm_table_t[GPPWM_LOAD_COUNT][GPPWM_RPM_COUNT]; // this is different type simply to have different hi/low range in rusefi.ini diff --git a/firmware/controllers/injector_central.cpp b/firmware/controllers/bench_test.cpp similarity index 83% rename from firmware/controllers/injector_central.cpp rename to firmware/controllers/bench_test.cpp index 216021c1cd..a15b460fcc 100644 --- a/firmware/controllers/injector_central.cpp +++ b/firmware/controllers/bench_test.cpp @@ -1,6 +1,6 @@ /** - * @file injector_central.cpp - * @brief Utility methods related to fuel injection. + * @file bench_test.cpp + * @brief Utility methods related to bench testing. * * * @date Sep 8, 2013 @@ -27,7 +27,7 @@ #if !EFI_UNIT_TEST #include "flash_main.h" -#include "injector_central.h" +#include "bench_test.h" #include "io_pins.h" #include "main_trigger_callback.h" #include "engine_configuration.h" @@ -37,6 +37,8 @@ #include "idle_thread.h" #include "periodic_thread_controller.h" #include "tps.h" +#include "cj125.h" +#include "malfunction_central.h" #if EFI_PROD_CODE #include "rusefi.h" @@ -49,50 +51,15 @@ -EXTERN_ENGINE -; +EXTERN_ENGINE; static Logging * logger; static bool isRunningBench = false; -// todo: move into Engine object? -// todo: looks like these flags are not currently used? dead functionality? unfinished functionality? -static int is_injector_enabled[INJECTION_PIN_COUNT]; - bool isRunningBenchTest(void) { return isRunningBench; } -static void assertCylinderId(int cylinderId, const char *msg) { - int isValid = cylinderId >= 1 && cylinderId <= engineConfiguration->specs.cylindersCount; - if (!isValid) { - // we are here only in case of a fatal issue - at this point it is fine to make some blocking i-o - //scheduleSimpleMsg(&logger, "cid=", cylinderId); - print("ERROR [%s] cid=%d\r\n", msg, cylinderId); - efiAssertVoid(CUSTOM_ERR_6647, false, "Cylinder ID"); - } -} - -/** - * @param cylinderId - from 1 to NUMBER_OF_CYLINDERS - */ -static int isInjectorEnabled(int cylinderId) { - assertCylinderId(cylinderId, "isInjectorEnabled"); - return is_injector_enabled[cylinderId - 1]; -} - -static void printInjectorsStatus(void) { - for (int id = 1; id <= engineConfiguration->specs.cylindersCount; id++) { - scheduleMsg(logger, "injector_%d: %d", id, isInjectorEnabled(id)); - } -} - -static void setInjectorEnabled(int id, int value) { - efiAssertVoid(CUSTOM_ERR_6648, id >= 0 && id < engineConfiguration->specs.cylindersCount, "injector id"); - is_injector_enabled[id] = value; - printInjectorsStatus(); -} - static void runBench(brain_pin_e brainPin, OutputPin *output, float delayMs, float onTimeMs, float offTimeMs, int count) { int delaySt = delayMs < 1 ? 1 : TIME_MS2I(delayMs); @@ -183,6 +150,10 @@ void milBench(void) { pinbench("0", "500", "500", "16", &enginePins.checkEnginePin, CONFIG(malfunctionIndicatorPin)); } +void starterRelayBench(void) { + pinbench("0", "6000", "100", "1", &enginePins.starterControl, CONFIG(starterControlPin)); +} + void fuelPumpBenchExt(const char *durationMs) { pinbench("0", durationMs, "100", "1", &enginePins.fuelPumpRelay, CONFIG(fuelPumpPin)); } @@ -278,22 +249,31 @@ static void handleCommandX14(uint16_t index) { case 9: acRelayBench(); return; - case 10: + case 0xA: // cmd_write_config #if EFI_PROD_CODE writeToFlashNow(); #endif /* EFI_PROD_CODE */ return; - + case 0xB: + starterRelayBench(); + return; + case 0xC: + engine->etbAutoTune = true; + return; + case 0xD: + engine->directSelfStimulation = true; + return; } - } // todo: this is probably a wrong place for this method now void executeTSCommand(uint16_t subsystem, uint16_t index) { scheduleMsg(logger, "IO test subsystem=%d index=%d", subsystem, index); - if (subsystem == 0x12) { + if (subsystem == 0x11) { + clearWarnings(); + } else if (subsystem == 0x12) { doRunSpark(index, "300", "4", "400", "3"); } else if (subsystem == 0x13) { doRunFuel(index, "300", "4", "400", "3"); @@ -308,10 +288,15 @@ void executeTSCommand(uint16_t subsystem, uint16_t index) { // cmd_test_idle_valve #if EFI_IDLE_CONTROL startIdleBench(); -#endif +#endif /* EFI_IDLE_CONTROL */ + } else if (subsystem == 0x18) { +#if EFI_CJ125 && HAL_USE_SPI + cjCalibrate(); +#endif /* EFI_CJ125 */ } else if (subsystem == 0x20 && index == 0x3456) { // call to pit setCallFromPitStop(30000); + } else if (subsystem == 0x21) { } else if (subsystem == 0x30) { setEngineType(index); } else if (subsystem == 0x31) { @@ -329,20 +314,9 @@ void executeTSCommand(uint16_t subsystem, uint16_t index) { } } -void initInjectorCentral(Logging *sharedLogger) { +void initBenchTest(Logging *sharedLogger) { logger = sharedLogger; - for (int i = 0; i < INJECTION_PIN_COUNT; i++) { - is_injector_enabled[i] = true; - } - - enginePins.startInjectionPins(); - enginePins.startIgnitionPins(); - enginePins.startAuxValves(); - - printInjectorsStatus(); - addConsoleActionII("injector", setInjectorEnabled); - addConsoleAction("fuelpumpbench", fuelPumpBench); addConsoleAction("acrelaybench", acRelayBench); addConsoleActionS("fuelpumpbench2", fuelPumpBenchExt); @@ -350,6 +324,7 @@ void initInjectorCentral(Logging *sharedLogger) { addConsoleActionS("fanbench2", fanBenchExt); addConsoleAction("dizzybench", dizzyBench); // this is useful for tach output testing + addConsoleAction("starterbench", starterRelayBench); addConsoleAction("milbench", milBench); addConsoleActionSSS("fuelbench", fuelbench); addConsoleActionSSS("sparkbench", sparkbench); diff --git a/firmware/controllers/injector_central.h b/firmware/controllers/bench_test.h similarity index 68% rename from firmware/controllers/injector_central.h rename to firmware/controllers/bench_test.h index 3bcdcdf5a0..f64ee1706a 100644 --- a/firmware/controllers/injector_central.h +++ b/firmware/controllers/bench_test.h @@ -1,6 +1,6 @@ /** - * @file injector_central.h - * @brief Utility methods related to fuel injection. + * @file bench_test.h + * @brief Utility methods related to bench testing. * * todo: rename this file * @@ -12,11 +12,14 @@ #include "global.h" +void initBenchTest(Logging *sharedLogger); + +bool isRunningBenchTest(void); + void fanBench(void); void fuelPumpBench(void); void acRelayBench(void); void milBench(void); -void initInjectorCentral(Logging *sharedLogger); -bool isRunningBenchTest(void); +void starterRelayBench(void); void executeTSCommand(uint16_t subsystem, uint16_t index); diff --git a/firmware/controllers/can/can.h b/firmware/controllers/can/can.h index 261176de79..71e46d4761 100644 --- a/firmware/controllers/can/can.h +++ b/firmware/controllers/can/can.h @@ -11,8 +11,14 @@ #include "periodic_thread_controller.h" +#define CAN_PEDAL_TPS_OFFSET 2 +#define CAN_SENSOR_1_OFFSET 3 + class Logging; -void processCanRxMessage(const CANRxFrame& msg, Logging* logger); +class CanSensorBase; + +void processCanRxMessage(const CANRxFrame& msg, Logging* logger, efitick_t nowNt); +void registerCanSensor(CanSensorBase& sensor); class CanWrite final : public PeriodicController<512> { public: diff --git a/firmware/controllers/can/can_dash.cpp b/firmware/controllers/can/can_dash.cpp index e7ea76d26e..0f4cc4f3a7 100644 --- a/firmware/controllers/can/can_dash.cpp +++ b/firmware/controllers/can/can_dash.cpp @@ -11,11 +11,10 @@ #if EFI_CAN_SUPPORT #include "engine.h" -#include "can.h" -#include "can_hw.h" #include "can_dash.h" +#include "can_msg_tx.h" - +#include "sensor.h" #include "allsensors.h" #include "vehicle_speed.h" @@ -45,99 +44,166 @@ EXTERN_ENGINE; #define CAN_VAG_CLT 0x288 #define CAN_VAG_CLT_V2 0x420 #define CAN_VAG_IMMO 0x3D0 - -extern CANTxFrame txmsg; - -static void setShortValue(CANTxFrame *txmsg, int value, int offset) { - txmsg->data8[offset] = value; - txmsg->data8[offset + 1] = value >> 8; -} +//w202 DASH +#define W202_STAT_1 0x308 +#define W202_STAT_2 0x608 +#define W202_ALIVE 0x210 +#define W202_STAT_3 0x310 void canDashboardBMW(void) { //BMW Dashboard - commonTxInit(CAN_BMW_E46_SPEED); - setShortValue(&txmsg, 10 * 8, 1); - sendCanMessage(); + { + CanTxMessage msg(CAN_BMW_E46_SPEED); + msg.setShortValue(10 * 8, 1); + } - commonTxInit(CAN_BMW_E46_RPM); - setShortValue(&txmsg, (int) (GET_RPM() * 6.4), 2); - sendCanMessage(); + { + CanTxMessage msg(CAN_BMW_E46_RPM); + msg.setShortValue((int) (GET_RPM() * 6.4), 2); + } - commonTxInit(CAN_BMW_E46_DME2); - setShortValue(&txmsg, (int) ((getCoolantTemperature() + 48.373) / 0.75), 1); - sendCanMessage(); + { + CanTxMessage msg(CAN_BMW_E46_DME2); + msg.setShortValue((int) ((Sensor::get(SensorType::Clt).value_or(0) + 48.373) / 0.75), 1); + } } void canMazdaRX8(void) { - commonTxInit(CAN_MAZDA_RX_STEERING_WARNING); - // todo: something needs to be set here? see http://rusefi.com/wiki/index.php?title=Vehicle:Mazda_Rx8_2004 - sendCanMessage(); - - commonTxInit(CAN_MAZDA_RX_RPM_SPEED); - - float kph = getVehicleSpeed(); - - setShortValue(&txmsg, SWAP_UINT16(GET_RPM() * 4), 0); - setShortValue(&txmsg, 0xFFFF, 2); - setShortValue(&txmsg, SWAP_UINT16((int )(100 * kph + 10000)), 4); - setShortValue(&txmsg, 0, 6); - sendCanMessage(); - - commonTxInit(CAN_MAZDA_RX_STATUS_1); - txmsg.data8[0] = 0xFE; //Unknown - txmsg.data8[1] = 0xFE; //Unknown - txmsg.data8[2] = 0xFE; //Unknown - txmsg.data8[3] = 0x34; //DSC OFF in combo with byte 5 Live data only seen 0x34 - txmsg.data8[4] = 0x00; // B01000000; // Brake warning B00001000; //ABS warning - txmsg.data8[5] = 0x40; // TCS in combo with byte 3 - txmsg.data8[6] = 0x00; // Unknown - txmsg.data8[7] = 0x00; // Unused - sendCanMessage(); - - commonTxInit(CAN_MAZDA_RX_STATUS_2); - txmsg.data8[0] = (uint8_t)(getCoolantTemperature() + 69); //temp gauge //~170 is red, ~165 last bar, 152 centre, 90 first bar, 92 second bar - txmsg.data8[1] = ((int16_t)(engine->engineState.vssEventCounter*(engineConfiguration->vehicleSpeedCoef*0.277*2.58))) & 0xff; - txmsg.data8[2] = 0x00; // unknown - txmsg.data8[3] = 0x00; //unknown - txmsg.data8[4] = 0x01; //Oil Pressure (not really a gauge) - txmsg.data8[5] = 0x00; //check engine light - txmsg.data8[6] = 0x00; //Coolant, oil and battery - if ((GET_RPM()>0) && (engine->sensors.vBatt<13)) { - setTxBit(6, 6); // battery light + { + CanTxMessage msg(CAN_MAZDA_RX_STEERING_WARNING); + // todo: something needs to be set here? see http://rusefi.com/wiki/index.php?title=Vehicle:Mazda_Rx8_2004 } - if (getCoolantTemperature() > 105) { - setTxBit(6, 1); // coolant light, 101 - red zone, light means its get too hot + + { + CanTxMessage msg(CAN_MAZDA_RX_RPM_SPEED); + + float kph = getVehicleSpeed(); + + msg.setShortValue(SWAP_UINT16(GET_RPM() * 4), 0); + msg.setShortValue(0xFFFF, 2); + msg.setShortValue(SWAP_UINT16((int )(100 * kph + 10000)), 4); + msg.setShortValue(0, 6); + } + + { + CanTxMessage msg(CAN_MAZDA_RX_STATUS_1); + msg[0] = 0xFE; //Unknown + msg[1] = 0xFE; //Unknown + msg[2] = 0xFE; //Unknown + msg[3] = 0x34; //DSC OFF in combo with byte 5 Live data only seen 0x34 + msg[4] = 0x00; // B01000000; // Brake warning B00001000; //ABS warning + msg[5] = 0x40; // TCS in combo with byte 3 + msg[6] = 0x00; // Unknown + msg[7] = 0x00; // Unused + } + + { + CanTxMessage msg(CAN_MAZDA_RX_STATUS_2); + auto clt = Sensor::get(SensorType::Clt); + msg[0] = (uint8_t)(clt.value_or(0) + 69); //temp gauge //~170 is red, ~165 last bar, 152 centre, 90 first bar, 92 second bar + msg[1] = ((int16_t)(engine->engineState.vssEventCounter*(engineConfiguration->vehicleSpeedCoef*0.277*2.58))) & 0xff; + msg[2] = 0x00; // unknown + msg[3] = 0x00; //unknown + msg[4] = 0x01; //Oil Pressure (not really a gauge) + msg[5] = 0x00; //check engine light + msg[6] = 0x00; //Coolant, oil and battery + if ((GET_RPM()>0) && (engine->sensors.vBatt<13)) { + msg.setBit(6, 6); // battery light + } + if (!clt.Valid || clt.Value > 105) { + // coolant light, 101 - red zone, light means its get too hot + // Also turn on the light in case of sensor failure + msg.setBit(6, 1); + } + //oil pressure warning lamp bit is 7 + msg[7] = 0x00; //unused } - //oil pressure warning lamp bit is 7 - txmsg.data8[7] = 0x00; //unused - sendCanMessage(); } void canDashboardFiat(void) { - //Fiat Dashboard - commonTxInit(CAN_FIAT_MOTOR_INFO); - setShortValue(&txmsg, (int) (getCoolantTemperature() - 40), 3); //Coolant Temp - setShortValue(&txmsg, GET_RPM() / 32, 6); //RPM - sendCanMessage(); + { + //Fiat Dashboard + CanTxMessage msg(CAN_FIAT_MOTOR_INFO); + msg.setShortValue((int) (Sensor::get(SensorType::Clt).value_or(0) - 40), 3); //Coolant Temp + msg.setShortValue(GET_RPM() / 32, 6); //RPM + } } void canDashboardVAG(void) { - //VAG Dashboard - commonTxInit(CAN_VAG_RPM); - setShortValue(&txmsg, GET_RPM() * 4, 2); //RPM - sendCanMessage(); + { + //VAG Dashboard + CanTxMessage msg(CAN_VAG_RPM); + msg.setShortValue(GET_RPM() * 4, 2); //RPM + } - commonTxInit(CAN_VAG_CLT); - setShortValue(&txmsg, (int) ((getCoolantTemperature() + 48.373) / 0.75), 1); //Coolant Temp - sendCanMessage(); + float clt = Sensor::get(SensorType::Clt).value_or(0); - commonTxInit(CAN_VAG_CLT_V2); - setShortValue(&txmsg, (int) ((getCoolantTemperature() + 48.373) / 0.75), 4); //Coolant Temp - sendCanMessage(); + { + CanTxMessage msg(CAN_VAG_CLT); + msg.setShortValue((int) ((clt + 48.373) / 0.75), 1); //Coolant Temp + } - commonTxInit(CAN_VAG_IMMO); - setShortValue(&txmsg, 0x80, 1); - sendCanMessage(); + { + CanTxMessage msg(CAN_VAG_CLT_V2); + msg.setShortValue((int) ((clt + 48.373) / 0.75), 4); //Coolant Temp + } + + { + CanTxMessage msg(CAN_VAG_IMMO); + msg.setShortValue(0x80, 1); + } } +void canDashboardW202(void) { + + uint16_t tmp; + { + CanTxMessage msg(W202_STAT_1); + tmp = GET_RPM(); + msg[0] = 0x08; // Unknown + msg[1] = (tmp >> 8); //RPM + msg[2] = (tmp & 0xff); //RPM + msg[3] = 0x00; // 0x01 - tank blink, 0x02 - EPC + msg[4] = 0x00; // Unknown + msg[5] = 0x00; // Unknown + msg[6] = 0x00; // Unknown - oil info + msg[7] = 0x00; // Unknown - oil info + } + + { + CanTxMessage msg(W202_STAT_2); //dlc 7 + msg[0] = (int)(Sensor::get(SensorType::Clt).value_or(0) + 40); // CLT -40 offset + msg[1] = 0x3D; // TBD + msg[2] = 0x63; // Const + msg[3] = 0x41; // Const + msg[4] = 0x00; // Unknown + msg[5] = 0x05; // Const + msg[6] = 0x50; // TBD + msg[7] = 0x00; // Unknown + } + + { + CanTxMessage msg(W202_ALIVE); + msg[0] = 0x0A; // Const + msg[1] = 0x18; // Const + msg[2] = 0x00; // Const + msg[3] = 0x00; // Const + msg[4] = 0xC0; // Const + msg[5] = 0x00; // Const + msg[6] = 0x00; // Const + msg[7] = 0x00; // Const + } + + { + CanTxMessage msg(W202_STAT_3); + msg[0] = 0x00; // Const + msg[1] = 0x00; // Const + msg[2] = 0x6D; // TBD + msg[3] = 0x7B; // Const + msg[4] = 0x21; // TBD + msg[5] = 0x07; // Const + msg[6] = 0x33; // Const + msg[7] = 0x05; // Const + } +} #endif // EFI_CAN_SUPPORT diff --git a/firmware/controllers/can/can_dash.h b/firmware/controllers/can/can_dash.h index 234cf8692f..ced3a5a842 100644 --- a/firmware/controllers/can/can_dash.h +++ b/firmware/controllers/can/can_dash.h @@ -11,3 +11,4 @@ void canDashboardBMW(); void canDashboardFiat(); void canDashboardVAG(); void canMazdaRX8(); +void canDashboardW202(); diff --git a/firmware/controllers/can/can_rx.cpp b/firmware/controllers/can/can_rx.cpp index f0e7cb057b..b76ff4b9d9 100644 --- a/firmware/controllers/can/can_rx.cpp +++ b/firmware/controllers/can/can_rx.cpp @@ -14,6 +14,8 @@ #include "can.h" #include "obd2.h" #include "engine.h" +#include "can_sensor.h" +#include "can_vss.h" EXTERN_ENGINE; @@ -26,20 +28,47 @@ static void printPacket(const CANRxFrame& rx, Logging* logger) { } volatile float aemXSeriesLambda = 0; -volatile float canPedal = 0; +volatile float canMap = 0; + +static CanSensorBase* s_head = nullptr; + +void serviceCanSubscribers(const CANRxFrame& frame, efitick_t nowNt) { + CanSensorBase* current = s_head; + + while (current) { + current = current->processFrame(frame, nowNt); + } +} + +void registerCanSensor(CanSensorBase& sensor) { + sensor.setNext(s_head); + s_head = &sensor; +} + +void processCanRxMessage(const CANRxFrame& frame, Logging* logger, efitick_t nowNt) { + if (CONFIG(debugMode) == DBG_CAN) { + printPacket(frame, logger); + } + + serviceCanSubscribers(frame, nowNt); + + //Vss is configurable, should we handle it here: + processCanRxVss(frame, nowNt); -void processCanRxMessage(const CANRxFrame& frame, Logging* logger) { // TODO: if/when we support multiple lambda sensors, sensor N // has address 0x0180 + N where N = [0, 15] if (frame.SID == 0x0180) { // AEM x-series lambda sensor reports in 0.0001 lambda per bit uint16_t lambdaInt = SWAP_UINT16(frame.data16[0]); aemXSeriesLambda = 0.0001f * lambdaInt; - } else if (frame.EID == 0x202) { - int16_t pedalScaled = *reinterpret_cast(&frame.data8[0]); - canPedal = pedalScaled * 0.01f; + } else if (frame.EID == CONFIG(verboseCanBaseAddress) + CAN_SENSOR_1_OFFSET) { + int16_t mapScaled = *reinterpret_cast(&frame.data8[0]); + canMap = mapScaled / (1.0 * PACK_MULT_PRESSURE); + uint8_t cltShifted = *reinterpret_cast(&frame.data8[2]); +#if EFI_CANBUS_SLAVE + engine->sensors.clt = cltShifted - PACK_ADD_TEMPERATURE; +#endif /* EFI_CANBUS_SLAVE */ } else { - printPacket(frame, logger); obdOnCanPacketRx(frame); } } diff --git a/firmware/controllers/can/can_tx.cpp b/firmware/controllers/can/can_tx.cpp index 09f6ed0eb7..b36aa4bcd4 100644 --- a/firmware/controllers/can/can_tx.cpp +++ b/firmware/controllers/can/can_tx.cpp @@ -45,6 +45,9 @@ void CanWrite::PeriodicTask(efitime_t nowNt) { case CAN_BUS_MAZDA_RX8: canMazdaRX8(); break; + case CAN_BUS_W202_C180: + canDashboardW202(); + break; default: break; } diff --git a/firmware/controllers/can/can_verbose.cpp b/firmware/controllers/can/can_verbose.cpp index 9d3aa852ec..de82bbc82a 100644 --- a/firmware/controllers/can/can_verbose.cpp +++ b/firmware/controllers/can/can_verbose.cpp @@ -1,3 +1,10 @@ +/** + * @file can_verbose.cpp + * + * TODO: change 'verbose' into 'broadcast'? + * + * @author Matthew Kennedy, (c) 2020 + */ #include "globalaccess.h" #if EFI_CAN_SUPPORT @@ -7,6 +14,7 @@ #include "scaled_channel.h" #include "can_msg_tx.h" #include "sensor.h" +#include "can.h" #include "allsensors.h" #include "fuel_math.h" #include "spark_logic.h" @@ -73,7 +81,7 @@ struct PedalAndTps { static void populateFrame(PedalAndTps& msg) { - msg.pedal = getPedalPosition(); + msg.pedal = Sensor::get(SensorType::AcceleratorPedal).value_or(-1); msg.tps1 = Sensor::get(SensorType::Tps1).value_or(-1); msg.tps2 = Sensor::get(SensorType::Tps2).value_or(-1); } @@ -91,12 +99,12 @@ struct Sensors1 { static void populateFrame(Sensors1& msg) { msg.map = getMap(); - msg.clt = getCoolantTemperature() + 40; - msg.iat = getIntakeAirTemperature() + 40; + msg.clt = Sensor::get(SensorType::Clt).value_or(0) + PACK_ADD_TEMPERATURE; + msg.iat = Sensor::get(SensorType::Iat).value_or(0) + PACK_ADD_TEMPERATURE; // todo: does aux temp even work? - msg.aux1 = 0 + 40; - msg.aux2 = 0 + 40; + msg.aux1 = 0 + PACK_ADD_TEMPERATURE; + msg.aux2 = 0 + PACK_ADD_TEMPERATURE; msg.mcuTemp = getMCUInternalTemperature(); msg.fuelLevel = engine->sensors.fuelTankLevel; @@ -137,8 +145,8 @@ void sendCanVerbose() { transmitStruct (base + 0); transmitStruct (base + 1); - transmitStruct (base + 2); - transmitStruct (base + 3); + transmitStruct (base + CAN_PEDAL_TPS_OFFSET); + transmitStruct (base + CAN_SENSOR_1_OFFSET); transmitStruct (base + 4); transmitStruct (base + 5); } diff --git a/firmware/controllers/can/can_vss.cpp b/firmware/controllers/can/can_vss.cpp new file mode 100644 index 0000000000..2243d720e2 --- /dev/null +++ b/firmware/controllers/can/can_vss.cpp @@ -0,0 +1,136 @@ +/** + * @file can_vss.cpp + * + * This file handles incomming vss values from can. + * + * @date Apr 19, 2020 + * @author Alex Miculescu, (c) 2020 + */ + +#include "globalaccess.h" +#if EFI_CAN_SUPPORT +#include "can.h" +#include "engine_configuration.h" +#include "engine.h" +#include "vehicle_speed.h" + +EXTERN_ENGINE; + +static Logging *logger; +static bool isInit = false; +static uint16_t filterCanID = 0; +static efitick_t frameTime; +static float vssSpeed = 0; + + +uint16_t look_up_can_id(can_vss_nbc_e type) { + + uint16_t retCanID; + switch (type) { + case BMW_e46: + retCanID = 0x01F0; /* BMW e46 ABS Message */ + break; + case W202: + retCanID = 0x0200; /* W202 C180 ABS signal */ + break; + default: + firmwareError(OBD_Vehicle_Speed_SensorB, "Wrong Can DBC selected: %d", type); + retCanID = 0xffff; + break; + } + return retCanID; +} + + +/* Module specitifc processing functions */ +/* source: http://z4evconversion.blogspot.com/2016/07/completely-forgot-but-it-does-live-on.html */ +void processBMW_e46(const CANRxFrame& frame) { + + uint16_t tmp; + + /* left front wheel speed is used here */ + tmp = ((frame.data8[1] & 0x0f) << 8 ); + tmp |= frame.data8[0]; + + vssSpeed = tmp / 16; + + +} + +void processW202(const CANRxFrame& frame) { + + uint16_t tmp; + + tmp = (frame.data8[2] << 8); + tmp |= frame.data8[3]; + vssSpeed = ((float)tmp) * 0.0277; +} + +/* End of specific processing functions */ + +void canVssInfo(void) { + scheduleMsg(logger, "vss using can option selected %x", CONFIG(canVssNbcType)); + scheduleMsg(logger, "vss filter for %x canID", filterCanID); + scheduleMsg(logger, "Vss module is %d", isInit); + scheduleMsg(logger, "CONFIG_enableCanVss is %d", CONFIG(enableCanVss)); +} + +void processCanRxVss(const CANRxFrame& frame, efitick_t nowNt) { + if ((!CONFIG(enableCanVss)) || (!isInit)) { + return; + } + + //filter it we need to process the can message or not + if ( frame.SID != filterCanID ) { + return; + } + + frameTime = nowNt; + switch (CONFIG(canVssNbcType)){ + case BMW_e46: + processBMW_e46(frame); + break; + case W202: + processW202(frame); + break; + default: + scheduleMsg(logger, "vss unsupported can option selected %x", CONFIG(canVssNbcType) ); + break; + } + +} + +float getVehicleCanSpeed(void) { + + efitick_t nowNt = getTimeNowNt(); + + if ((nowNt - frameTime ) > NT_PER_SECOND) { + return 0; /* can timeout? */ + } else { + return vssSpeed; + } +} + +void initCanVssSupport(Logging *logger_ptr) { + + addConsoleAction("canvssinfo", canVssInfo); + logger = logger_ptr; + + if (CONFIG(enableCanVss)) { + + isInit = true; + filterCanID = look_up_can_id(CONFIG(canVssNbcType)); + + if (filterCanID == 0xffff) { + isInit = false; + } + } + +} + +void setCanVss(int type) { + engineConfiguration->canVssNbcType = (can_vss_nbc_e)type; + canVssInfo(); +} + +#endif // EFI_CAN_SUPPORT \ No newline at end of file diff --git a/firmware/controllers/can/can_vss.h b/firmware/controllers/can/can_vss.h new file mode 100644 index 0000000000..7f80119be9 --- /dev/null +++ b/firmware/controllers/can/can_vss.h @@ -0,0 +1,13 @@ +/** + * @file can_vss.h + * + * @date Apr 19, 2020 + * @author Alex Miculescu, (c) 2020 + */ + +#pragma once + +float getVehicleCanSpeed(void); +void processCanRxVss(const CANRxFrame& frame, efitick_t nowNt); +void initCanVssSupport(Logging *logger_ptr); +void setCanVss(int type); \ No newline at end of file diff --git a/firmware/controllers/can/obd2.cpp b/firmware/controllers/can/obd2.cpp index d753a8a811..e9446a098a 100644 --- a/firmware/controllers/can/obd2.cpp +++ b/firmware/controllers/can/obd2.cpp @@ -34,13 +34,12 @@ #include "vehicle_speed.h" #include "map.h" #include "maf.h" -#include "tps.h" +#include "sensor.h" #include "engine_math.h" #include "fuel_math.h" #include "thermistors.h" -EXTERN_ENGINE -; +EXTERN_ENGINE; static LoggingWithStorage logger("obd2"); @@ -137,7 +136,7 @@ static void handleGetDataRequest(const CANRxFrame& rx) { break; case PID_COOLANT_TEMP: scheduleMsg(&logger, "Got CLT request"); - obdSendValue(1, pid, 1, getCoolantTemperature() + 40.0f); + obdSendValue(1, pid, 1, Sensor::get(SensorType::Clt).value_or(0) + 40.0f); break; case PID_INTAKE_MAP: scheduleMsg(&logger, "Got MAP request"); @@ -160,7 +159,7 @@ static void handleGetDataRequest(const CANRxFrame& rx) { } case PID_INTAKE_TEMP: scheduleMsg(&logger, "Got IAT request"); - obdSendValue(1, pid, 1, getIntakeAirTemperature() + 40.0f); + obdSendValue(1, pid, 1, Sensor::get(SensorType::Iat).value_or(0) + 40.0f); break; case PID_INTAKE_MAF: scheduleMsg(&logger, "Got MAF request"); @@ -168,7 +167,7 @@ static void handleGetDataRequest(const CANRxFrame& rx) { break; case PID_THROTTLE: scheduleMsg(&logger, "Got throttle request"); - obdSendValue(1, pid, 1, getTPS(PASS_ENGINE_PARAMETER_SIGNATURE) * 2.55f); // (A*100/255) + obdSendValue(1, pid, 1, Sensor::get(SensorType::Tps1).value_or(0) * 2.55f); // (A*100/255) break; case PID_FUEL_RATE: scheduleMsg(&logger, "Got fuel rate request"); @@ -182,7 +181,9 @@ static void handleGetDataRequest(const CANRxFrame& rx) { static void handleDtcRequest(int numCodes, int *dtcCode) { // TODO: this appears to be unfinished? - + UNUSED(numCodes); + UNUSED(dtcCode); + // int numBytes = numCodes * 2; // // write CAN-TP Single Frame header? // txmsg.data8[0] = (uint8_t)((0 << 4) | numBytes); diff --git a/firmware/controllers/closed_loop_controller.h b/firmware/controllers/closed_loop_controller.h new file mode 100644 index 0000000000..62efc28716 --- /dev/null +++ b/firmware/controllers/closed_loop_controller.h @@ -0,0 +1,56 @@ +#pragma once + +#include "expected.h" + +template +class ClosedLoopController { +public: + void update() { + expected outputValue = getOutput(); + setOutput(outputValue); + } + +private: + expected getOutput() { + expected setpoint = getSetpoint(); + // If we don't know the setpoint, return failure. + if (!setpoint) { + return unexpected; + } + + expected observation = observePlant(); + // If we couldn't observe the plant, return failure. + if (!observation) { + return unexpected; + } + + expected openLoopResult = getOpenLoop(setpoint.Value); + // If we couldn't compute open loop, return failure. + if (!openLoopResult) { + return unexpected; + } + + expected closedLoopResult = getClosedLoop(setpoint.Value, observation.Value); + // If we couldn't compute closed loop, return failure. + if (!closedLoopResult) { + return unexpected; + } + + return openLoopResult.Value + closedLoopResult.Value; + } + + // Get the setpoint: where should the controller put the plant? + virtual expected getSetpoint() const = 0; + + // Get the current observation: what is the current state of the world? + virtual expected observePlant() const = 0; + + // Get the open-loop output: output state based on only the setpoint + virtual expected getOpenLoop(TInput setpoint) const = 0; + + // Get the closed-loop output: output state based on setpoint and observation + virtual expected getClosedLoop(TInput setpoint, TInput observation) = 0; + + // Set the output: Drive whatever output system will perturb the plant in the real world + virtual void setOutput(expected outputValue) = 0; +}; diff --git a/firmware/controllers/controllers.mk b/firmware/controllers/controllers.mk index 9a4d4ad22e..78dcadfa8f 100644 --- a/firmware/controllers/controllers.mk +++ b/firmware/controllers/controllers.mk @@ -18,6 +18,8 @@ CONTROLLERS_SRC_CPP = \ $(CONTROLLERS_DIR)/actuators/idle_thread.cpp \ $(CONTROLLERS_DIR)/actuators/pwm_tester.cpp \ $(CONTROLLERS_DIR)/actuators/algo/aux_pid.cpp \ + $(CONTROLLERS_DIR)/actuators/gppwm/gppwm_channel.cpp \ + $(CONTROLLERS_DIR)/actuators/gppwm/gppwm.cpp \ $(CONTROLLERS_DIR)/gauges/tachometer.cpp \ $(CONTROLLERS_DIR)/gauges/malfunction_indicator.cpp \ $(CONTROLLERS_DIR)/gauges/lcd_controller.cpp \ @@ -33,13 +35,15 @@ CONTROLLERS_SRC_CPP = \ $(CONTROLLERS_DIR)/engine_cycle/main_trigger_callback.cpp \ $(CONTROLLERS_DIR)/engine_cycle/aux_valves.cpp \ $(CONTROLLERS_DIR)/flash_main.cpp \ - $(CONTROLLERS_DIR)/injector_central.cpp \ + $(CONTROLLERS_DIR)/bench_test.cpp \ $(CONTROLLERS_DIR)/can/obd2.cpp \ $(CONTROLLERS_DIR)/can/can_verbose.cpp \ $(CONTROLLERS_DIR)/can/can_rx.cpp \ $(CONTROLLERS_DIR)/can/can_tx.cpp \ $(CONTROLLERS_DIR)/can/can_dash.cpp \ + $(CONTROLLERS_DIR)/can/can_vss.cpp \ $(CONTROLLERS_DIR)/engine_controller.cpp \ + $(CONTROLLERS_DIR)/engine_controller_misc.cpp \ $(CONTROLLERS_DIR)/persistent_store.cpp \ @@ -59,4 +63,5 @@ CONTROLLERS_INC=\ $(CONTROLLERS_DIR)/math \ $(CONTROLLERS_DIR)/generated \ $(CONTROLLERS_DIR)/actuators \ + $(CONTROLLERS_DIR)/actuators/gppwm \ diff --git a/firmware/controllers/core/common_headers.h b/firmware/controllers/core/common_headers.h index ed1a2e6b40..a1fcd9fec9 100644 --- a/firmware/controllers/core/common_headers.h +++ b/firmware/controllers/core/common_headers.h @@ -7,8 +7,7 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ -#ifndef CONTROLLERS_CORE_COMMON_HEADERS_H_ -#define CONTROLLERS_CORE_COMMON_HEADERS_H_ +#pragma once #ifdef __cplusplus #define EXTERNC extern "C" @@ -104,5 +103,3 @@ extern bool isActiveConfigurationVoid; #endif /* EFI_ACTIVE_CONFIGURATION_IN_FLASH */ #define isPinOrModeChanged(pin, mode) (isConfigurationChanged(pin) || isConfigurationChanged(mode)) - -#endif /* CONTROLLERS_CORE_COMMON_HEADERS_H_ */ diff --git a/firmware/controllers/core/error_handling.cpp b/firmware/controllers/core/error_handling.cpp index 7ea2198586..1ab32d445b 100644 --- a/firmware/controllers/core/error_handling.cpp +++ b/firmware/controllers/core/error_handling.cpp @@ -5,9 +5,8 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ -#include "global.h" -#include "os_access.h" #include "engine.h" +#include "os_access.h" #if EFI_SIMULATOR || EFI_PROD_CODE //todo: move into simulator global @@ -16,8 +15,7 @@ static MemoryStream warningStream; static MemoryStream firmwareErrorMessageStream; #endif /* EFI_SIMULATOR || EFI_PROD_CODE */ -#define WARNING_BUFFER_SIZE 80 -static char warningBuffer[WARNING_BUFFER_SIZE]; +static char warningBuffer[ERROR_BUFFER_SIZE]; static volatile bool isWarningStreamInitialized = false; #if EFI_HD44780_LCD @@ -33,15 +31,18 @@ EXTERN_ENGINE; extern int warningEnabled; extern bool main_loop_started; -// todo: rename to fatalErrorMessage? -static fatal_msg_t errorMessageBuffer; +static critical_msg_t criticalErrorMessageBuffer; bool hasFirmwareErrorFlag = false; const char *dbg_panic_file; int dbg_panic_line; +#if EFI_TUNER_STUDIO && !defined(EFI_NO_CONFIG_WORKING_COPY) +extern persistent_config_s configWorkingCopy; +#endif + char *getFirmwareError(void) { - return (char*) errorMessageBuffer; + return (char*) criticalErrorMessageBuffer; } #if EFI_PROD_CODE @@ -52,7 +53,7 @@ extern ioportmask_t errorLedPin; /** * low-level function is used here to reduce stack usage */ -#define ON_FATAL_ERROR() \ +#define ON_CRITICAL_ERROR() \ palWritePad(errorLedPort, errorLedPin, 1); \ turnAllPinsOff(); \ enginePins.communicationLedPin.setValue(1); @@ -61,7 +62,7 @@ extern ioportmask_t errorLedPin; #if EFI_SIMULATOR || EFI_PROD_CODE void chDbgPanic3(const char *msg, const char * file, int line) { - if (hasFatalError()) + if (hasOsPanicError()) return; dbg_panic_file = file; dbg_panic_line = line; @@ -70,7 +71,7 @@ void chDbgPanic3(const char *msg, const char * file, int line) { #endif /* CH_DBG_SYSTEM_STATE_CHECK */ #if EFI_PROD_CODE - ON_FATAL_ERROR(); + ON_CRITICAL_ERROR(); #else printf("chDbgPanic3 %s %s%d", msg, file, line); exit(-1); @@ -81,7 +82,7 @@ void chDbgPanic3(const char *msg, const char * file, int line) { #endif /* EFI_HD44780_LCD */ if (!main_loop_started) { - print("fatal %s %s:%d\r\n", msg, file, line); + print("%s %s %s:%d\r\n", CRITICAL_PREFIX, msg, file, line); // chThdSleepSeconds(1); chSysHalt("Main loop did not start"); } @@ -106,6 +107,16 @@ static void printWarning(const char *fmt, va_list ap) { printToStream(&warningStream, fmt, ap); + if (CONFIG(showHumanReadableWarning)) { +#if EFI_TUNER_STUDIO + #if defined(EFI_NO_CONFIG_WORKING_COPY) + memcpy(persistentState.persistentConfiguration.warning_message, warningBuffer, sizeof(warningBuffer)); + #else /* defined(EFI_NO_CONFIG_WORKING_COPY) */ + memcpy(configWorkingCopy.warning_message, warningBuffer, sizeof(warningBuffer)); + #endif /* defined(EFI_NO_CONFIG_WORKING_COPY) */ +#endif /* EFI_TUNER_STUDIO */ + } + logger.append(warningBuffer); append(&logger, DELIMETER); scheduleLogging(&logger); @@ -160,7 +171,7 @@ bool warning(obd_code_e code, const char *fmt, ...) { return false; } -char *getWarning(void) { +char *getWarningMessage(void) { return warningBuffer; } @@ -206,8 +217,8 @@ void onUnlockHook(void) { */ void initErrorHandlingDataStructures(void) { #if EFI_SIMULATOR || EFI_PROD_CODE - msObjectInit(&warningStream, (uint8_t *) warningBuffer, WARNING_BUFFER_SIZE, 0); - msObjectInit(&firmwareErrorMessageStream, errorMessageBuffer, sizeof(errorMessageBuffer), 0); + msObjectInit(&warningStream, (uint8_t *) warningBuffer, ERROR_BUFFER_SIZE, 0); + msObjectInit(&firmwareErrorMessageStream, criticalErrorMessageBuffer, sizeof(criticalErrorMessageBuffer), 0); #endif isWarningStreamInitialized = true; } @@ -223,7 +234,7 @@ void firmwareError(obd_code_e code, const char *fmt, ...) { printWarning(fmt, ap); va_end(ap); #endif - ON_FATAL_ERROR() + ON_CRITICAL_ERROR() ; hasFirmwareErrorFlag = true; if (indexOf(fmt, '%') == -1) { @@ -231,8 +242,8 @@ void firmwareError(obd_code_e code, const char *fmt, ...) { * in case of simple error message let's reduce stack usage * because chvprintf might be causing an error */ - strncpy((char*) errorMessageBuffer, fmt, sizeof(errorMessageBuffer) - 1); - errorMessageBuffer[sizeof(errorMessageBuffer) - 1] = 0; // just to be sure + strncpy((char*) criticalErrorMessageBuffer, fmt, sizeof(criticalErrorMessageBuffer) - 1); + criticalErrorMessageBuffer[sizeof(criticalErrorMessageBuffer) - 1] = 0; // just to be sure } else { // todo: look into chsnprintf once on Chibios 3 firmwareErrorMessageStream.eos = 0; // reset @@ -243,6 +254,7 @@ void firmwareError(obd_code_e code, const char *fmt, ...) { // todo: reuse warning buffer helper method firmwareErrorMessageStream.buffer[firmwareErrorMessageStream.eos] = 0; // need to terminate explicitly } + #else printf("firmwareError [%s]\r\n", fmt); diff --git a/firmware/controllers/core/error_handling.h b/firmware/controllers/core/error_handling.h index 5d25289041..bca7435b04 100644 --- a/firmware/controllers/core/error_handling.h +++ b/firmware/controllers/core/error_handling.h @@ -5,8 +5,7 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ -#ifndef ERROR_HANDLING_H_ -#define ERROR_HANDLING_H_ +#pragma once #include "global.h" #include "obd_error_codes.h" @@ -24,22 +23,26 @@ extern "C" */ bool warning(obd_code_e code, const char *fmt, ...); -typedef uint8_t fatal_msg_t[200]; +typedef uint8_t critical_msg_t[ERROR_BUFFER_SIZE]; /** * Something really bad had happened - firmware cannot function, we cannot run the engine + * We definitely use this critical error approach in case of invalid configuration. If user sets a self-contradicting + * configuration we have to just put a hard stop on this. * * see also warning() */ void firmwareError(obd_code_e code, const char *fmt, ...); +extern bool hasFirmwareErrorFlag; + #define hasFirmwareError() hasFirmwareErrorFlag -// todo: rename to getFatalErrorMessage +// todo: rename to getCriticalErrorMessage char *getFirmwareError(void); void initErrorHandlingDataStructures(void); // todo: rename to getWarningMessage? -char *getWarning(void); +char *getWarningMessage(void); // todo: better place for this shared declaration? int getRusEfiVersion(void); @@ -59,5 +62,3 @@ int getRusEfiVersion(void); #ifdef __cplusplus } #endif /* __cplusplus */ - -#endif /* ERROR_HANDLING_H_ */ diff --git a/firmware/controllers/core/fsio_core.h b/firmware/controllers/core/fsio_core.h index e1e9657af7..6763d09270 100644 --- a/firmware/controllers/core/fsio_core.h +++ b/firmware/controllers/core/fsio_core.h @@ -5,8 +5,7 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ -#ifndef LOGIC_EXPRESSION_H_ -#define LOGIC_EXPRESSION_H_ +#pragma once #include "rusefi_enums.h" #include "fl_stack.h" @@ -56,6 +55,7 @@ typedef enum { LE_METHOD_IN_SHUTDOWN = 122, LE_METHOD_FSIO_DIGITAL_INPUT = 123, LE_METHOD_FSIO_SETTING = 124, + LE_METHOD_PPS = 125, #include "fsio_enums_generated.def" @@ -135,5 +135,3 @@ const char *getNextToken(const char *line, char *buffer, const int bufferSize); bool isNumeric(const char* line); le_action_e parseAction(const char * line); bool float2bool(float v); - -#endif /* LOGIC_EXPRESSION_H_ */ diff --git a/firmware/controllers/core/fsio_impl.cpp b/firmware/controllers/core/fsio_impl.cpp index c60b72c2c8..1381d0e4fe 100644 --- a/firmware/controllers/core/fsio_impl.cpp +++ b/firmware/controllers/core/fsio_impl.cpp @@ -14,6 +14,9 @@ #include "global.h" #include "fsio_impl.h" #include "allsensors.h" +#include "sensor.h" + +EXTERN_ENGINE; #if EFI_FSIO @@ -39,13 +42,12 @@ fsio8_Map3D_u8t fsioTable2("fsio#2"); fsio8_Map3D_u8t fsioTable3("fsio#3"); fsio8_Map3D_u8t fsioTable4("fsio#4"); -extern pin_output_mode_e DEFAULT_OUTPUT; - /** * Here we define all rusEfi-specific methods */ static LENameOrdinalPair leRpm(LE_METHOD_RPM, "rpm"); static LENameOrdinalPair leTps(LE_METHOD_TPS, "tps"); +static LENameOrdinalPair lePps(LE_METHOD_PPS, "pps"); static LENameOrdinalPair leMaf(LE_METHOD_MAF, "maf"); static LENameOrdinalPair leMap(LE_METHOD_MAP, "map"); static LENameOrdinalPair leVBatt(LE_METHOD_VBATT, "vbatt"); @@ -57,10 +59,10 @@ static LENameOrdinalPair leAcToggle(LE_METHOD_AC_TOGGLE, "ac_on_switch"); // @returns float number of seconds since last A/C toggle static LENameOrdinalPair leTimeSinceAcToggle(LE_METHOD_TIME_SINCE_AC_TOGGLE, "time_since_ac_on_switch"); static LENameOrdinalPair leTimeSinceBoot(LE_METHOD_TIME_SINCE_BOOT, "time_since_boot"); -static LENameOrdinalPair leFsioSetting(LE_METHOD_FSIO_SETTING, "fsio_setting"); -static LENameOrdinalPair leFsioTable(LE_METHOD_FSIO_TABLE, "fsio_table"); -static LENameOrdinalPair leFsioAnalogInput(LE_METHOD_FSIO_ANALOG_INPUT, "fsio_analog_input"); -static LENameOrdinalPair leFsioDigitalInput(LE_METHOD_FSIO_DIGITAL_INPUT, "fsio_digital_input"); +static LENameOrdinalPair leFsioSetting(LE_METHOD_FSIO_SETTING, FSIO_METHOD_FSIO_SETTING); +static LENameOrdinalPair leFsioTable(LE_METHOD_FSIO_TABLE, FSIO_METHOD_FSIO_TABLE); +static LENameOrdinalPair leFsioAnalogInput(LE_METHOD_FSIO_ANALOG_INPUT, FSIO_METHOD_FSIO_ANALOG_INPUT); +static LENameOrdinalPair leFsioDigitalInput(LE_METHOD_FSIO_DIGITAL_INPUT, FSIO_METHOD_FSIO_DIGITAL_INPUT); static LENameOrdinalPair leKnock(LE_METHOD_KNOCK, "knock"); static LENameOrdinalPair leIntakeVVT(LE_METHOD_INTAKE_VVT, "ivvt"); static LENameOrdinalPair leExhaustVVT(LE_METHOD_EXHAUST_VVT, "evvt"); @@ -72,8 +74,6 @@ static LENameOrdinalPair leInShutdown(LE_METHOD_IN_SHUTDOWN, "in_shutdown"); #define LE_EVAL_POOL_SIZE 32 -extern EnginePins enginePins; - static LECalculator evalCalc; static LEElement evalPoolElements[LE_EVAL_POOL_SIZE]; static LEElementPool evalPool(evalPoolElements, LE_EVAL_POOL_SIZE); @@ -108,9 +108,6 @@ static LEElement * starterRelayDisableLogic; static LEElement * mainRelayLogic; #endif /* EFI_MAIN_RELAY_CONTROL */ -EXTERN_ENGINE -; - static Logging *logger; #if EFI_PROD_CODE || EFI_SIMULATOR @@ -124,11 +121,11 @@ float getEngineValue(le_action_e action DECLARE_ENGINE_PARAMETER_SUFFIX) { case LE_METHOD_AC_TOGGLE: return getAcToggle(PASS_ENGINE_PARAMETER_SIGNATURE); case LE_METHOD_COOLANT: - return getCoolantTemperature(); + return Sensor::get(SensorType::Clt).value_or(0); case LE_METHOD_IS_COOLANT_BROKEN: - return engine->isCltBroken; + return !Sensor::get(SensorType::Clt).Valid; case LE_METHOD_INTAKE_AIR: - return getIntakeAirTemperature(); + return Sensor::get(SensorType::Iat).value_or(0); case LE_METHOD_RPM: return engine->rpmCalculator.getRpm(); case LE_METHOD_MAF: @@ -152,9 +149,11 @@ float getEngineValue(le_action_e action DECLARE_ENGINE_PARAMETER_SUFFIX) { return engine->isInShutdownMode(); case LE_METHOD_VBATT: return getVBatt(PASS_ENGINE_PARAMETER_SIGNATURE); + case LE_METHOD_TPS: + return Sensor::get(SensorType::DriverThrottleIntent).value_or(0); #include "fsio_getters.def" default: - warning(CUSTOM_FSIO_UNEXPECTED, "FSIO unexpected %d", action); + warning(CUSTOM_FSIO_UNEXPECTED, "FSIO ERROR no data for action=%d", action); return NAN; } } @@ -163,9 +162,9 @@ float getEngineValue(le_action_e action DECLARE_ENGINE_PARAMETER_SUFFIX) { #if EFI_PROD_CODE #include "pin_repository.h" -#include "pwm_generator.h" +#include "pwm_generator_logic.h" // todo: that's about bench test mode, wrong header for sure! -#include "injector_central.h" +#include "bench_test.h" static void setFsioAnalogInputPin(const char *indexStr, const char *pinName) { // todo: reduce code duplication between all "set pin methods" @@ -574,8 +573,11 @@ static void showFsioInfo(void) { * in case of FSIO user interface indexes are starting with 0, the argument for that * is the fact that the target audience is more software developers */ - scheduleMsg(logger, "FSIO #%d [%s] at %s@%dHz value=%.2f", (i + 1), exp, - hwPortname(CONFIG(fsioOutputPins)[i]), CONFIG(fsioFrequency)[i], + int freq = CONFIG(fsioFrequency)[i]; + const char *modeMessage = freq == 0 ? " (on/off mode)" : ""; + scheduleMsg(logger, "FSIO #%d [%s] at %s@%dHz%s value=%.2f", (i + 1), exp, + hwPortname(CONFIG(fsioOutputPins)[i]), + freq, modeMessage, engine->fsioState.fsioLastValue[i]); // scheduleMsg(logger, "user-defined #%d value=%.2f", i, engine->engineConfigurationPtr2->fsioLastValue[i]); showFsio(NULL, state.fsioLogics[i]); @@ -689,11 +691,11 @@ void initFsioImpl(Logging *sharedLogger DECLARE_ENGINE_PARAMETER_SUFFIX) { if (brainPin != GPIO_UNASSIGNED) { int frequency = CONFIG(fsioFrequency)[i]; if (frequency == 0) { - enginePins.fsioOutputs[i].initPin(getGpioPinName(i), CONFIG(fsioOutputPins)[i], &DEFAULT_OUTPUT); + enginePins.fsioOutputs[i].initPin(getGpioPinName(i), CONFIG(fsioOutputPins)[i]); } else { startSimplePwmExt(&fsioPwm[i], "FSIOpwm", &engine->executor, - brainPin, &enginePins.fsioOutputs[i], frequency, 0.5f, (pwm_gen_callback*)applyPinState); + brainPin, &enginePins.fsioOutputs[i], frequency, 0.5f); } } } @@ -734,10 +736,6 @@ void initFsioImpl(Logging *sharedLogger DECLARE_ENGINE_PARAMETER_SUFFIX) { #else /* !EFI_FSIO */ -EXTERN_ENGINE -; -extern EnginePins enginePins; - // "Limp-mode" implementation for some RAM-limited configs without FSIO void runHardcodedFsio(DECLARE_ENGINE_PARAMETER_SIGNATURE) { // see MAIN_RELAY_LOGIC @@ -750,8 +748,9 @@ void runHardcodedFsio(DECLARE_ENGINE_PARAMETER_SIGNATURE) { } // see FAN_CONTROL_LOGIC if (CONFIG(fanPin) != GPIO_UNASSIGNED) { - enginePins.fanRelay.setValue((enginePins.fanRelay.getLogicValue() && (getCoolantTemperature() > engineConfiguration->fanOffTemperature)) || - (getCoolantTemperature() > engineConfiguration->fanOnTemperature) || engine->isCltBroken); + auto clt = Sensor::get(SensorType::Clt); + enginePins.fanRelay.setValue(!clt.Valid || (enginePins.fanRelay.getLogicValue() && (clt.Value > engineConfiguration->fanOffTemperature)) || + (clt.Value > engineConfiguration->fanOnTemperature) || engine->isCltBroken); } // see AC_RELAY_LOGIC if (CONFIG(acRelayPin) != GPIO_UNASSIGNED) { diff --git a/firmware/controllers/core/state_sequence.h b/firmware/controllers/core/state_sequence.h index beac99c09a..ee6969a7f2 100644 --- a/firmware/controllers/core/state_sequence.h +++ b/firmware/controllers/core/state_sequence.h @@ -17,7 +17,10 @@ * Looks like 252 is explained by 60 tooth * 2 (number of fronts) * 2 (number of crank rotations within engine cycle) */ #ifndef PWM_PHASE_MAX_COUNT -#define PWM_PHASE_MAX_COUNT 252 +// as of April 2020, trigger which requires most array length is REMIX_66_2_2_2 +// we can probably reduce RAM usage if we have more custom logic of triggers with large number of tooth while +// pretty easy logic. like we do not need to REALLY have an array to remember the shape of evenly spaces 360 or 60/2 trigger :) +#define PWM_PHASE_MAX_COUNT 280 #endif /* PWM_PHASE_MAX_COUNT */ #define PWM_PHASE_MAX_WAVE_PER_PWM 3 diff --git a/firmware/controllers/engine_controller.cpp b/firmware/controllers/engine_controller.cpp index e8986a6cf6..d16ef2b340 100644 --- a/firmware/controllers/engine_controller.cpp +++ b/firmware/controllers/engine_controller.cpp @@ -33,7 +33,7 @@ #include "main_trigger_callback.h" #include "io_pins.h" #include "flash_main.h" -#include "injector_central.h" +#include "bench_test.h" #include "os_util.h" #include "engine_math.h" #include "allsensors.h" @@ -41,7 +41,6 @@ #include "map_averaging.h" #include "malfunction_central.h" #include "malfunction_indicator.h" -#include "engine.h" #include "speed_density.h" #include "local_version_holder.h" #include "alternator_controller.h" @@ -54,18 +53,21 @@ #include "counter64.h" #include "perf_trace.h" #include "boost_control.h" +#include "launch_control.h" +#include "tachometer.h" +#include "gppwm.h" #if EFI_SENSOR_CHART #include "sensor_chart.h" -#endif +#endif /* EFI_SENSOR_CHART */ #if EFI_TUNER_STUDIO #include "tunerstudio.h" -#endif +#endif /* EFI_TUNER_STUDIO */ #if EFI_LOGIC_ANALYZER #include "logic_analyzer.h" -#endif +#endif /* EFI_LOGIC_ANALYZER */ #if HAL_USE_ADC #include "AdcConfiguration.h" @@ -75,23 +77,20 @@ #include "bootloader/bootloader.h" #endif /* EFI_BOOTLOADER_INCLUDE_CODE */ -#if EFI_PROD_CODE || EFI_SIMULATOR #include "periodic_task.h" -#endif + #if ! EFI_UNIT_TEST #include "init.h" #endif /* EFI_UNIT_TEST */ -#if EFI_PROD_CODE -#include "pwm_generator.h" #include "adc_inputs.h" +#include "pwm_generator_logic.h" +#if EFI_PROD_CODE #include "pwm_tester.h" -#include "pwm_generator.h" #include "lcd_controller.h" #include "pin_repository.h" -#include "tachometer.h" #endif /* EFI_PROD_CODE */ #if EFI_CJ125 @@ -100,6 +99,19 @@ EXTERN_ENGINE; +#if !EFI_UNIT_TEST + +static LoggingWithStorage logger("Engine Controller"); + +/** + * todo: this should probably become 'static', i.e. private, and propagated around explicitly? + */ +Engine ___engine CCM_OPTIONAL; +Engine * engine = &___engine; + +#endif /* EFI_UNIT_TEST */ + + void initDataStructures(DECLARE_ENGINE_PARAMETER_SIGNATURE) { #if EFI_ENGINE_CONTROL initFuelMap(PASS_ENGINE_PARAMETER_SIGNATURE); @@ -110,7 +122,9 @@ void initDataStructures(DECLARE_ENGINE_PARAMETER_SIGNATURE) { static void mostCommonInitEngineController(Logging *sharedLogger DECLARE_ENGINE_PARAMETER_SUFFIX) { #if !EFI_UNIT_TEST - initSensors(); + // This is tested independently - don't configure sensors for tests. + // This lets us selectively mock them for each test. + initNewSensors(sharedLogger); #endif /* EFI_UNIT_TEST */ initSensors(sharedLogger PASS_ENGINE_PARAMETER_SUFFIX); @@ -121,6 +135,8 @@ static void mostCommonInitEngineController(Logging *sharedLogger DECLARE_ENGINE_ initFsioImpl(sharedLogger PASS_ENGINE_PARAMETER_SUFFIX); #endif /* EFI_FSIO */ + initGpPwm(PASS_ENGINE_PARAMETER_SIGNATURE); + #if EFI_IDLE_CONTROL startIdleThread(sharedLogger PASS_ENGINE_PARAMETER_SUFFIX); #endif /* EFI_IDLE_CONTROL */ @@ -135,22 +151,30 @@ static void mostCommonInitEngineController(Logging *sharedLogger DECLARE_ENGINE_ } #endif /* EFI_MAP_AVERAGING */ -} +#if EFI_BOOST_CONTROL + initBoostCtrl(sharedLogger PASS_ENGINE_PARAMETER_SUFFIX); +#endif /* EFI_BOOST_CONTROL */ -EXTERN_ENGINE; +#if EFI_LAUNCH_CONTROL + initLaunchControl(sharedLogger PASS_ENGINE_PARAMETER_SUFFIX); +#endif /* EFI_LAUNCH_CONTROL */ + +} #if EFI_ENABLE_MOCK_ADC -void setMockVoltage(int hwChannel, float voltage DECLARE_ENGINE_PARAMETER_SUFFIX) { - engine->engineState.mockAdcState.setMockVoltage(hwChannel, voltage PASS_ENGINE_PARAMETER_SUFFIX); + +static void initMockVoltage(void) { +#if EFI_SIMULATOR + setMockCltVoltage(2); + setMockIatVoltage(2); +#endif /* EFI_SIMULATOR */ } -#endif + +#endif /* EFI_ENABLE_MOCK_ADC */ + #if !EFI_UNIT_TEST -extern bool hasFirmwareErrorFlag; -extern EnginePins enginePins; - - static void doPeriodicSlowCallback(DECLARE_ENGINE_PARAMETER_SIGNATURE); class PeriodicFastController : public PeriodicTimerController { @@ -178,17 +202,6 @@ class PeriodicSlowController : public PeriodicTimerController { static PeriodicFastController fastController; static PeriodicSlowController slowController; -static LoggingWithStorage logger("Engine Controller"); - -#if EFI_PROD_CODE || EFI_SIMULATOR - -/** - * todo: this should probably become 'static', i.e. private, and propagated around explicitly? - */ -Engine ___engine CCM_OPTIONAL; -Engine * engine = &___engine; -#endif /* EFI_PROD_CODE || EFI_SIMULATOR */ - class EngineStateBlinkingTask : public PeriodicTimerController { int getPeriodMs() override { return 50; @@ -200,7 +213,7 @@ class EngineStateBlinkingTask : public PeriodicTimerController { bool is_running = ENGINE(rpmCalculator).isRunning(PASS_ENGINE_PARAMETER_SIGNATURE); #else bool is_running = false; -#endif +#endif /* EFI_SHAFT_POSITION_INPUT */ if (is_running) { // blink in running mode @@ -216,78 +229,6 @@ private: static EngineStateBlinkingTask engineStateBlinkingTask; -#if EFI_PROD_CODE -static Overflow64Counter halTime; - -/** - * 64-bit result would not overflow, but that's complex stuff for our 32-bit MCU - */ -//todo: macro to save method invocation -efitimeus_t getTimeNowUs(void) { - ScopePerf perf(PE::GetTimeNowUs); - return getTimeNowNt() / (CORE_CLOCK / 1000000); -} - -//todo: macro to save method invocation -efitick_t getTimeNowNt(void) { -#if EFI_PROD_CODE - /* Entering a reentrant critical zone.*/ - syssts_t sts = chSysGetStatusAndLockX(); - efitime_t localH = halTime.state.highBits; - uint32_t localLow = halTime.state.lowBits; - - uint32_t value = getTimeNowLowerNt(); - - if (value < localLow) { - // new value less than previous value means there was an overflow in that 32 bit counter - localH += 0x100000000LL; - } - - efitime_t result = localH + value; - - /* Leaving the critical zone.*/ - chSysRestoreStatusX(sts); - return result; -#else /* EFI_PROD_CODE */ -// todo: why is this implementation not used? - /** - * this method is lock-free and thread-safe, that's because the 'update' method - * is atomic with a critical zone requirement. - * - * http://stackoverflow.com/questions/5162673/how-to-read-two-32bit-counters-as-a-64bit-integer-without-race-condition - */ - efitime_t localH; - efitime_t localH2; - uint32_t localLow; - int counter = 0; - do { - localH = halTime.state.highBits; - localLow = halTime.state.lowBits; - localH2 = halTime.state.highBits; -#if EFI_PROD_CODE - if (counter++ == 10000) - chDbgPanic("lock-free frozen"); -#endif /* EFI_PROD_CODE */ - } while (localH != localH2); - /** - * We need to take current counter after making a local 64 bit snapshot - */ - uint32_t value = getTimeNowLowerNt(); - - if (value < localLow) { - // new value less than previous value means there was an overflow in that 32 bit counter - localH += 0x100000000LL; - } - - return localH + value; -#endif /* EFI_PROD_CODE */ - -} - -#endif /* EFI_PROD_CODE */ - -#if ! EFI_UNIT_TEST - /** * number of SysClock ticks in one ms */ @@ -303,7 +244,6 @@ efitimems_t currentTimeMillis(void) { efitimesec_t getTimeNowSeconds(void) { return currentTimeMillis() / 1000; } -#endif /* EFI_UNIT_TEST */ static void resetAccel(void) { engine->engineLoadAccelEnrichment.resetAE(); @@ -315,36 +255,16 @@ static void resetAccel(void) { } } -#if ENABLE_PERF_TRACE - -void irqEnterHook(void) { - perfEventBegin(PE::ISR); -} - -void irqExitHook(void) { - perfEventEnd(PE::ISR); -} - -void contextSwitchHook() { - perfEventInstantGlobal(PE::ContextSwitch); -} - -#endif /* ENABLE_PERF_TRACE */ - static void doPeriodicSlowCallback(DECLARE_ENGINE_PARAMETER_SIGNATURE) { - #if EFI_ENGINE_CONTROL && EFI_SHAFT_POSITION_INPUT +#if EFI_ENGINE_CONTROL && EFI_SHAFT_POSITION_INPUT efiAssertVoid(CUSTOM_ERR_6661, getCurrentRemainingStack() > 64, "lowStckOnEv"); #if EFI_PROD_CODE - /** - * We need to push current value into the 64 bit counter often enough so that we do not miss an overflow - */ - /* Entering a reentrant critical zone.*/ - syssts_t sts = chSysGetStatusAndLockX(); - updateAndSet(&halTime.state, getTimeNowLowerNt()); - /* Leaving the critical zone.*/ - chSysRestoreStatusX(sts); + touchTimeCounter(); + + slowStartStopButtonCallback(PASS_ENGINE_PARAMETER_SIGNATURE); #endif /* EFI_PROD_CODE */ + /** * Update engine RPM state if needed (check timeouts). */ @@ -353,12 +273,21 @@ static void doPeriodicSlowCallback(DECLARE_ENGINE_PARAMETER_SIGNATURE) { engine->rpmCalculator.setStopSpinning(PASS_ENGINE_PARAMETER_SIGNATURE); } - if (engine->rpmCalculator.isStopped(PASS_ENGINE_PARAMETER_SIGNATURE)) { + if (ENGINE(directSelfStimulation) || engine->rpmCalculator.isStopped(PASS_ENGINE_PARAMETER_SIGNATURE)) { + /** + * rusEfi usually runs on hardware which halts execution while writing to internal flash, so we + * postpone writes to until engine is stopped. Writes in case of self-stimulation are fine. + * + * todo: allow writing if 2nd bank of flash is used + */ #if EFI_INTERNAL_FLASH writeToFlashIfPending(); #endif /* EFI_INTERNAL_FLASH */ resetAccel(); - } else { + } + + + if (!engine->rpmCalculator.isStopped(PASS_ENGINE_PARAMETER_SIGNATURE)) { updatePrimeInjectionPulseState(PASS_ENGINE_PARAMETER_SIGNATURE); } @@ -367,7 +296,7 @@ static void doPeriodicSlowCallback(DECLARE_ENGINE_PARAMETER_SIGNATURE) { } engine->periodicSlowCallback(PASS_ENGINE_PARAMETER_SIGNATURE); -#endif +#endif /* if EFI_ENGINE_CONTROL && EFI_SHAFT_POSITION_INPUT */ } void initPeriodicEvents(DECLARE_ENGINE_PARAMETER_SIGNATURE) { @@ -385,7 +314,7 @@ char * getPinNameByAdcChannel(const char *msg, adc_channel_e hwChannel, char *bu } #else strcpy(buffer, "NONE"); -#endif +#endif /* HAL_USE_ADC */ return (char*) buffer; } @@ -393,7 +322,7 @@ static char pinNameBuffer[16]; #if HAL_USE_ADC extern AdcDevice fastAdc; -#endif +#endif /* HAL_USE_ADC */ static void printAnalogChannelInfoExt(const char *name, adc_channel_e hwChannel, float adcVoltage, float dividerCoeff) { @@ -410,13 +339,13 @@ static void printAnalogChannelInfoExt(const char *name, adc_channel_e hwChannel, float voltage = adcVoltage * dividerCoeff; scheduleMsg(&logger, "%s ADC%d %s %s adc=%.2f/input=%.2fv/divider=%.2f", name, hwChannel, getAdcMode(hwChannel), getPinNameByAdcChannel(name, hwChannel, pinNameBuffer), adcVoltage, voltage, dividerCoeff); -#endif +#endif /* HAL_USE_ADC */ } static void printAnalogChannelInfo(const char *name, adc_channel_e hwChannel) { #if HAL_USE_ADC printAnalogChannelInfoExt(name, hwChannel, getVoltage("print", hwChannel PASS_ENGINE_PARAMETER_SUFFIX), engineConfiguration->analogInputDividerCoefficient); -#endif +#endif /* HAL_USE_ADC */ } static void printAnalogInfo(void) { @@ -425,38 +354,33 @@ static void printAnalogInfo(void) { printAnalogChannelInfo("hip9011", engineConfiguration->hipOutputChannel); printAnalogChannelInfo("fuel gauge", engineConfiguration->fuelLevelSensor); printAnalogChannelInfo("TPS", engineConfiguration->tps1_1AdcChannel); + printAnalogChannelInfo("TPS2", engineConfiguration->tps2_1AdcChannel); printAnalogChannelInfo("pPS", engineConfiguration->throttlePedalPositionAdcChannel); - if (engineConfiguration->clt.adcChannel != EFI_ADC_NONE) { - printAnalogChannelInfo("CLT", engineConfiguration->clt.adcChannel); - } - if (engineConfiguration->iat.adcChannel != EFI_ADC_NONE) { - printAnalogChannelInfo("IAT", engineConfiguration->iat.adcChannel); - } - if (hasMafSensor()) { - printAnalogChannelInfo("MAF", engineConfiguration->mafAdcChannel); - } + printAnalogChannelInfo("CLT", engineConfiguration->clt.adcChannel); + printAnalogChannelInfo("IAT", engineConfiguration->iat.adcChannel); + printAnalogChannelInfo("MAF", engineConfiguration->mafAdcChannel); for (int i = 0; i < FSIO_ANALOG_INPUT_COUNT ; i++) { adc_channel_e ch = engineConfiguration->fsioAdc[i]; - if (ch != EFI_ADC_NONE) { - printAnalogChannelInfo("fsio", ch); - } + printAnalogChannelInfo("fsio", ch); } printAnalogChannelInfo("AFR", engineConfiguration->afr.hwChannel); - if (hasMapSensor(PASS_ENGINE_PARAMETER_SIGNATURE)) { - printAnalogChannelInfo("MAP", engineConfiguration->map.sensor.hwChannel); - } - if (hasBaroSensor(PASS_ENGINE_PARAMETER_SIGNATURE)) { - printAnalogChannelInfo("BARO", engineConfiguration->baroSensor.hwChannel); - } - if (engineConfiguration->externalKnockSenseAdc != EFI_ADC_NONE) { - printAnalogChannelInfo("extKno", engineConfiguration->externalKnockSenseAdc); - } + printAnalogChannelInfo("MAP", engineConfiguration->map.sensor.hwChannel); + printAnalogChannelInfo("BARO", engineConfiguration->baroSensor.hwChannel); + printAnalogChannelInfo("extKno", engineConfiguration->externalKnockSenseAdc); printAnalogChannelInfo("OilP", engineConfiguration->oilPressure.hwChannel); + printAnalogChannelInfo("CJ UR", engineConfiguration->cj125ur); + printAnalogChannelInfo("CJ UA", engineConfiguration->cj125ua); + printAnalogChannelInfo("A/C sw", engineConfiguration->acSwitchAdc); printAnalogChannelInfo("HIP9011", engineConfiguration->hipOutputChannel); + + for (int i = 0; i < FSIO_ANALOG_INPUT_COUNT ; i++) { + printAnalogChannelInfo("FSIO", engineConfiguration->fsioAdc[i]); + } + printAnalogChannelInfoExt("Vbatt", engineConfiguration->vbattAdcChannel, getVoltage("vbatt", engineConfiguration->vbattAdcChannel PASS_ENGINE_PARAMETER_SUFFIX), engineConfiguration->vbattDividerCoeff); } @@ -601,57 +525,6 @@ static void setFloat(const char *offsetStr, const char *valueStr) { getFloat(offset); onConfigurationChanged(); } -#endif /* EFI_UNIT_TEST */ - -#if EFI_ENABLE_MOCK_ADC - -void setMockCltVoltage(float voltage DECLARE_ENGINE_PARAMETER_SUFFIX) { - setMockVoltage(engineConfiguration->clt.adcChannel, voltage PASS_ENGINE_PARAMETER_SUFFIX); -} - -void setMockIatVoltage(float voltage DECLARE_ENGINE_PARAMETER_SUFFIX) { - setMockVoltage(engineConfiguration->iat.adcChannel, voltage PASS_ENGINE_PARAMETER_SUFFIX); -} - -void setMockMafVoltage(float voltage DECLARE_ENGINE_PARAMETER_SUFFIX) { - setMockVoltage(engineConfiguration->mafAdcChannel, voltage PASS_ENGINE_PARAMETER_SUFFIX); -} - -void setMockAfrVoltage(float voltage DECLARE_ENGINE_PARAMETER_SUFFIX) { - setMockVoltage(engineConfiguration->afr.hwChannel, voltage PASS_ENGINE_PARAMETER_SUFFIX); -} - -void setMockThrottlePedalSensorVoltage(float voltage DECLARE_ENGINE_PARAMETER_SUFFIX) { - setMockVoltage(engineConfiguration->throttlePedalPositionAdcChannel, voltage PASS_ENGINE_PARAMETER_SUFFIX); -} - -void setMockThrottlePositionSensorVoltage(float voltage DECLARE_ENGINE_PARAMETER_SUFFIX) { - setMockVoltage(engineConfiguration->tps1_1AdcChannel, voltage PASS_ENGINE_PARAMETER_SUFFIX); -} - -void setMockMapVoltage(float voltage DECLARE_ENGINE_PARAMETER_SUFFIX) { - setMockVoltage(engineConfiguration->map.sensor.hwChannel, voltage PASS_ENGINE_PARAMETER_SUFFIX); -} - -void setMockVBattVoltage(float voltage DECLARE_ENGINE_PARAMETER_SUFFIX) { - setMockVoltage(engineConfiguration->vbattAdcChannel, voltage PASS_ENGINE_PARAMETER_SUFFIX); -} - -static void initMockVoltage(void) { -#if EFI_SIMULATOR - setMockCltVoltage(2); -#endif /* EFI_SIMULATOR */ - -#if EFI_SIMULATOR - setMockIatVoltage(2); -#endif /* EFI_SIMULATOR */ - -} - -#endif /* EFI_ENABLE_MOCK_ADC */ - - -#if !EFI_UNIT_TEST static void initConfigActions(void) { addConsoleActionSS("set_float", (VoidCharPtrCharPtr) setFloat); @@ -690,7 +563,7 @@ void commonInitEngineController(Logging *sharedLogger DECLARE_ENGINE_PARAMETER_S #if EFI_ENGINE_CONTROL /** - * This has to go after 'initInjectorCentral' in order to + * This has to go after 'enginePins.startPins()' in order to * properly detect un-assigned output pins */ prepareShapes(PASS_ENGINE_PARAMETER_SIGNATURE); @@ -720,7 +593,43 @@ void commonInitEngineController(Logging *sharedLogger DECLARE_ENGINE_PARAMETER_S } #endif - mostCommonInitEngineController(sharedLogger PASS_ENGINE_PARAMETER_SUFFIX); +#if !EFI_UNIT_TEST + // This is tested independently - don't configure sensors for tests. + // This lets us selectively mock them for each test. + initNewSensors(sharedLogger); +#endif /* EFI_UNIT_TEST */ + + initSensors(sharedLogger PASS_ENGINE_PARAMETER_SUFFIX); + + initAccelEnrichment(sharedLogger PASS_ENGINE_PARAMETER_SUFFIX); + +#if EFI_FSIO + initFsioImpl(sharedLogger PASS_ENGINE_PARAMETER_SUFFIX); +#endif /* EFI_FSIO */ + + initGpPwm(PASS_ENGINE_PARAMETER_SIGNATURE); + +#if EFI_IDLE_CONTROL + startIdleThread(sharedLogger PASS_ENGINE_PARAMETER_SUFFIX); +#endif /* EFI_IDLE_CONTROL */ + +#if EFI_ELECTRONIC_THROTTLE_BODY + initElectronicThrottle(PASS_ENGINE_PARAMETER_SIGNATURE); +#endif /* EFI_ELECTRONIC_THROTTLE_BODY */ + +#if EFI_MAP_AVERAGING + if (engineConfiguration->isMapAveragingEnabled) { + initMapAveraging(sharedLogger PASS_ENGINE_PARAMETER_SUFFIX); + } +#endif /* EFI_MAP_AVERAGING */ + +#if EFI_BOOST_CONTROL + initBoostCtrl(sharedLogger PASS_ENGINE_PARAMETER_SUFFIX); +#endif /* EFI_BOOST_CONTROL */ + +#if EFI_LAUNCH_CONTROL + initLaunchControl(sharedLogger PASS_ENGINE_PARAMETER_SUFFIX); +#endif #if EFI_SHAFT_POSITION_INPUT /** @@ -741,26 +650,22 @@ void commonInitEngineController(Logging *sharedLogger DECLARE_ENGINE_PARAMETER_S } #endif /* EFI_ENGINE_CONTROL */ + initTachometer(PASS_ENGINE_PARAMETER_SIGNATURE); } #if !EFI_UNIT_TEST void initEngineContoller(Logging *sharedLogger DECLARE_ENGINE_PARAMETER_SUFFIX) { -#if EFI_SIMULATOR - printf("initEngineContoller\n"); -#endif addConsoleAction("analoginfo", printAnalogInfo); #if EFI_PROD_CODE && EFI_ENGINE_CONTROL - initInjectorCentral(sharedLogger); + enginePins.startPins(); + + initBenchTest(sharedLogger); #endif /* EFI_PROD_CODE && EFI_ENGINE_CONTROL */ commonInitEngineController(sharedLogger); -#if EFI_PROD_CODE - initPwmGenerator(); -#endif - #if EFI_LOGIC_ANALYZER if (engineConfiguration->isWaveAnalyzerEnabled) { initWaveAnalyzer(sharedLogger); @@ -788,18 +693,13 @@ void initEngineContoller(Logging *sharedLogger DECLARE_ENGINE_PARAMETER_SUFFIX) initPwmTester(); #endif /* EFI_PWM_TESTER */ - initMalfunctionCentral(); - #if EFI_ALTERNATOR_CONTROL initAlternatorCtrl(sharedLogger PASS_ENGINE_PARAMETER_SUFFIX); -#endif +#endif /* EFI_ALTERNATOR_CONTROL */ -#if EFI_BOOST_CONTROL - initBoostCtrl(sharedLogger PASS_ENGINE_PARAMETER_SUFFIX); -#endif #if EFI_AUX_PID initAuxPid(sharedLogger); -#endif +#endif /* EFI_AUX_PID */ #if EFI_MALFUNCTION_INDICATOR initMalfunctionIndicator(); @@ -819,19 +719,16 @@ void initEngineContoller(Logging *sharedLogger DECLARE_ENGINE_PARAMETER_SUFFIX) initLcdController(); #endif /* EFI_HD44780_LCD */ -#if EFI_PROD_CODE - initTachometer(); -#endif /* EFI_PROD_CODE */ } // these two variables are here only to let us know how much RAM is available, also these // help to notice when RAM usage goes up - if a code change adds to RAM usage these variables would fail // linking process which is the way to raise the alarm #ifndef RAM_UNUSED_SIZE -#define RAM_UNUSED_SIZE 14300 +#define RAM_UNUSED_SIZE 12800 #endif #ifndef CCM_UNUSED_SIZE -#define CCM_UNUSED_SIZE 4100 +#define CCM_UNUSED_SIZE 2900 #endif static char UNUSED_RAM_SIZE[RAM_UNUSED_SIZE]; static char UNUSED_CCM_SIZE[CCM_UNUSED_SIZE] CCM_OPTIONAL; @@ -849,6 +746,6 @@ int getRusEfiVersion(void) { if (initBootloader() != 0) return 123; #endif /* EFI_BOOTLOADER_INCLUDE_CODE */ - return 201200320; + return 20200422; } #endif /* EFI_UNIT_TEST */ diff --git a/firmware/controllers/engine_controller.h b/firmware/controllers/engine_controller.h index b4740ce7e5..c70d28fbe1 100644 --- a/firmware/controllers/engine_controller.h +++ b/firmware/controllers/engine_controller.h @@ -8,7 +8,7 @@ #pragma once -#include "global.h" +#include "engine.h" char * getPinNameByAdcChannel(const char *msg, adc_channel_e hwChannel, char *buffer); void initPeriodicEvents(DECLARE_ENGINE_PARAMETER_SIGNATURE); @@ -16,6 +16,9 @@ void initEngineContoller(Logging *sharedLogger DECLARE_ENGINE_PARAMETER_SUFFIX); void commonInitEngineController(Logging *sharedLogger DECLARE_ENGINE_PARAMETER_SUFFIX); void initDataStructures(DECLARE_ENGINE_PARAMETER_SIGNATURE); +void touchTimeCounter(); + +void slowStartStopButtonCallback(DECLARE_ENGINE_PARAMETER_SIGNATURE); #if EFI_ENABLE_MOCK_ADC void setMockVoltage(int hwChannel, float voltage DECLARE_ENGINE_PARAMETER_SUFFIX); @@ -23,9 +26,6 @@ void setMockVoltage(int hwChannel, float voltage DECLARE_ENGINE_PARAMETER_SUFFIX void setMockVBattVoltage(float voltage DECLARE_ENGINE_PARAMETER_SUFFIX); void setMockMapVoltage(float voltage DECLARE_ENGINE_PARAMETER_SUFFIX); -// throttle body sensor -void setMockThrottlePositionSensorVoltage(float voltage DECLARE_ENGINE_PARAMETER_SUFFIX); -void setMockThrottlePedalSensorVoltage(float voltage DECLARE_ENGINE_PARAMETER_SUFFIX); void setMockAfrVoltage(float voltage DECLARE_ENGINE_PARAMETER_SUFFIX); void setMockMafVoltage(float voltage DECLARE_ENGINE_PARAMETER_SUFFIX); void setMockIatVoltage(float voltage DECLARE_ENGINE_PARAMETER_SUFFIX); diff --git a/firmware/controllers/engine_controller_misc.cpp b/firmware/controllers/engine_controller_misc.cpp new file mode 100644 index 0000000000..4b13150f41 --- /dev/null +++ b/firmware/controllers/engine_controller_misc.cpp @@ -0,0 +1,203 @@ +/* + * @file engine_controller_misc.cpp + * + * @date Mar 22, 2020 + * @author Andrey Belomutskiy, (c) 2012-2020 + */ + +#include "engine_controller.h" +#include "perf_trace.h" +#include "counter64.h" +#include "settings.h" + +EXTERN_ENGINE; + +extern LoggingWithStorage sharedLogger; + +#if ENABLE_PERF_TRACE + +void irqEnterHook(void) { + perfEventBegin(PE::ISR); +} + +void irqExitHook(void) { + perfEventEnd(PE::ISR); +} + +void contextSwitchHook() { + perfEventInstantGlobal(PE::ContextSwitch); +} + +#endif /* ENABLE_PERF_TRACE */ + +#if EFI_ENABLE_MOCK_ADC +void setMockVoltage(int hwChannel, float voltage DECLARE_ENGINE_PARAMETER_SUFFIX) { + engine->engineState.mockAdcState.setMockVoltage(hwChannel, voltage PASS_ENGINE_PARAMETER_SUFFIX); +} + +void setMockCltVoltage(float voltage DECLARE_ENGINE_PARAMETER_SUFFIX) { + setMockVoltage(engineConfiguration->clt.adcChannel, voltage PASS_ENGINE_PARAMETER_SUFFIX); +} + +void setMockIatVoltage(float voltage DECLARE_ENGINE_PARAMETER_SUFFIX) { + setMockVoltage(engineConfiguration->iat.adcChannel, voltage PASS_ENGINE_PARAMETER_SUFFIX); +} + +void setMockMafVoltage(float voltage DECLARE_ENGINE_PARAMETER_SUFFIX) { + setMockVoltage(engineConfiguration->mafAdcChannel, voltage PASS_ENGINE_PARAMETER_SUFFIX); +} + +void setMockAfrVoltage(float voltage DECLARE_ENGINE_PARAMETER_SUFFIX) { + setMockVoltage(engineConfiguration->afr.hwChannel, voltage PASS_ENGINE_PARAMETER_SUFFIX); +} + +void setMockMapVoltage(float voltage DECLARE_ENGINE_PARAMETER_SUFFIX) { + setMockVoltage(engineConfiguration->map.sensor.hwChannel, voltage PASS_ENGINE_PARAMETER_SUFFIX); +} + +void setMockVBattVoltage(float voltage DECLARE_ENGINE_PARAMETER_SUFFIX) { + setMockVoltage(engineConfiguration->vbattAdcChannel, voltage PASS_ENGINE_PARAMETER_SUFFIX); +} + +#endif /* EFI_ENABLE_MOCK_ADC */ + +#if EFI_PROD_CODE +static Overflow64Counter halTime; + +/** + * 64-bit result would not overflow, but that's complex stuff for our 32-bit MCU + */ +//todo: macro to save method invocation +efitimeus_t getTimeNowUs(void) { + ScopePerf perf(PE::GetTimeNowUs); + return getTimeNowNt() / (CORE_CLOCK / 1000000); +} + +//todo: macro to save method invocation +efitick_t getTimeNowNt(void) { +#if EFI_PROD_CODE + /* Entering a reentrant critical zone.*/ + syssts_t sts = chSysGetStatusAndLockX(); + efitime_t localH = halTime.state.highBits; + uint32_t localLow = halTime.state.lowBits; + + uint32_t value = getTimeNowLowerNt(); + + if (value < localLow) { + // new value less than previous value means there was an overflow in that 32 bit counter + localH += 0x100000000LL; + } + + efitime_t result = localH + value; + + /* Leaving the critical zone.*/ + chSysRestoreStatusX(sts); + return result; +#else /* EFI_PROD_CODE */ +// todo: why is this implementation not used? + /** + * this method is lock-free and thread-safe, that's because the 'update' method + * is atomic with a critical zone requirement. + * + * http://stackoverflow.com/questions/5162673/how-to-read-two-32bit-counters-as-a-64bit-integer-without-race-condition + */ + efitime_t localH; + efitime_t localH2; + uint32_t localLow; + int counter = 0; + do { + localH = halTime.state.highBits; + localLow = halTime.state.lowBits; + localH2 = halTime.state.highBits; +#if EFI_PROD_CODE + if (counter++ == 10000) + chDbgPanic("lock-free frozen"); +#endif /* EFI_PROD_CODE */ + } while (localH != localH2); + /** + * We need to take current counter after making a local 64 bit snapshot + */ + uint32_t value = getTimeNowLowerNt(); + + if (value < localLow) { + // new value less than previous value means there was an overflow in that 32 bit counter + localH += 0x100000000LL; + } + + return localH + value; +#endif /* EFI_PROD_CODE */ + +} + +void touchTimeCounter() { + /** + * We need to push current value into the 64 bit counter often enough so that we do not miss an overflow + */ + /* Entering a reentrant critical zone.*/ + syssts_t sts = chSysGetStatusAndLockX(); + updateAndSet(&halTime.state, getTimeNowLowerNt()); + /* Leaving the critical zone.*/ + chSysRestoreStatusX(sts); +} + +static void onStartStopButtonToggle(DECLARE_ENGINE_PARAMETER_SIGNATURE) { + engine->startStopStateToggleCounter++; + + if (engine->rpmCalculator.isStopped(PASS_ENGINE_PARAMETER_SIGNATURE)) { + engine->startStopStateLastPushTime = getTimeNowNt(); + + bool wasStarterEngaged = enginePins.starterControl.getAndSet(1); + if (!wasStarterEngaged) { + scheduleMsg(&sharedLogger, "Let's crank this engine for up to %dseconds!", CONFIG(startCrankingDuration)); + } + } else if (engine->rpmCalculator.isRunning(PASS_ENGINE_PARAMETER_SIGNATURE)) { + scheduleMsg(&sharedLogger, "Let's stop this engine!"); + scheduleStopEngine(); + } +} + +static bool isFirstStartStopCallback = true; + +void slowStartStopButtonCallback(DECLARE_ENGINE_PARAMETER_SIGNATURE) { + if (CONFIG(startStopButtonPin) != GPIO_UNASSIGNED) { +#if EFI_PROD_CODE + bool startStopState = efiReadPin(CONFIG(startStopButtonPin)); + + if (isFirstStartStopCallback) { + // we just remember initial value on first callback and do not react to it + isFirstStartStopCallback = false; + } else if (startStopState && !engine->startStopState) { + // we are here on transition from 0 to 1 + onStartStopButtonToggle(PASS_ENGINE_PARAMETER_SIGNATURE); + } + engine->startStopState = startStopState; +#endif /* EFI_PROD_CODE */ + } + + if (engine->startStopStateLastPushTime == 0) { + // nothing is going on with startStop button + return; + } + + + // todo: should this be simply FSIO? + if (engine->rpmCalculator.isRunning(PASS_ENGINE_PARAMETER_SIGNATURE)) { + // turn starter off once engine is running + bool wasStarterEngaged = enginePins.starterControl.getAndSet(0); + if (wasStarterEngaged) { + scheduleMsg(&sharedLogger, "Engine runs we can disengage the starter"); + } + engine->startStopStateLastPushTime = 0; + } + + if (getTimeNowNt() - engine->startStopStateLastPushTime > NT_PER_SECOND * CONFIG(startCrankingDuration)) { + bool wasStarterEngaged = enginePins.starterControl.getAndSet(0); + if (wasStarterEngaged) { + scheduleMsg(&sharedLogger, "Cranking timeout %dseconds", CONFIG(startCrankingDuration)); + } + engine->startStopStateLastPushTime = 0; + } +} + + +#endif /* EFI_PROD_CODE */ diff --git a/firmware/controllers/engine_cycle/aux_valves.cpp b/firmware/controllers/engine_cycle/aux_valves.cpp index cb620876a1..7cd5e53eaf 100644 --- a/firmware/controllers/engine_cycle/aux_valves.cpp +++ b/firmware/controllers/engine_cycle/aux_valves.cpp @@ -16,11 +16,11 @@ #include "engine_math.h" #include "aux_valves.h" #include "allsensors.h" +#include "sensor.h" #include "trigger_central.h" #include "spark_logic.h" -EXTERN_ENGINE -; +EXTERN_ENGINE; void plainPinTurnOn(AuxActor *current) { NamedOutputPin *output = &enginePins.auxValve[current->valveIndex]; @@ -125,14 +125,8 @@ void initAuxValves(Logging *sharedLogger DECLARE_ENGINE_PARAMETER_SUFFIX) { return; } -#if !EFI_UNIT_TEST - // let's give it time to grab TPS value - chThdSleepMilliseconds(50); -#endif /* EFI_UNIT_TESTS */ - - float tps = getTPS(PASS_ENGINE_PARAMETER_SIGNATURE); - if (cisnan(tps)) { - firmwareError(CUSTOM_OBD_91, "No TPS for Aux Valves"); + if (!Sensor::hasSensor(SensorType::DriverThrottleIntent)) { + warning(CUSTOM_OBD_91, "No TPS for Aux Valves"); return; } @@ -167,11 +161,12 @@ void updateAuxValves(DECLARE_ENGINE_PARAMETER_SIGNATURE) { return; } - float tps = getTPS(PASS_ENGINE_PARAMETER_SIGNATURE); - if (cisnan(tps)) { + auto [valid, tps] = Sensor::get(SensorType::DriverThrottleIntent); + if (!valid) { // error should be already reported by now return; } + engine->engineState.auxValveStart = interpolate2d("aux", tps, engineConfiguration->fsioCurve1Bins, engineConfiguration->fsioCurve1); diff --git a/firmware/controllers/engine_cycle/main_trigger_callback.cpp b/firmware/controllers/engine_cycle/main_trigger_callback.cpp index 21ff61b808..5d1c2c9ed8 100644 --- a/firmware/controllers/engine_cycle/main_trigger_callback.cpp +++ b/firmware/controllers/engine_cycle/main_trigger_callback.cpp @@ -23,9 +23,6 @@ #include "global.h" #include "os_access.h" -#if EFI_PROD_CODE -#include -#endif #if EFI_ENGINE_CONTROL && EFI_SHAFT_POSITION_INPUT @@ -51,12 +48,11 @@ #include "event_queue.h" #include "engine.h" #include "perf_trace.h" +#include "sensor.h" #include "backup_ram.h" -EXTERN_ENGINE -; -extern bool hasFirmwareErrorFlag; +EXTERN_ENGINE; static const char *prevOutputName = nullptr; @@ -64,8 +60,7 @@ static InjectionEvent primeInjEvent; static Logging *logger; #if ! EFI_UNIT_TEST -static pid_s *fuelPidS = &persistentState.persistentConfiguration.engineConfiguration.fuelClosedLoopPid; -static Pid fuelPid(fuelPidS); +static Pid fuelPid(&persistentState.persistentConfiguration.engineConfiguration.fuelClosedLoopPid); #endif // todo: figure out if this even helps? @@ -235,8 +230,8 @@ static ALWAYS_INLINE void handleFuelInjectionEvent(int injEventIndex, InjectionE prevOutputName = outputName; } +#if EFI_UNIT_TEST || EFI_SIMULATOR || EFI_PRINTF_FUEL_DETAILS InjectorOutputPin *output = event->outputs[0]; -#if EFI_PRINTF_FUEL_DETAILS printf("fuelout %s duration %d total=%d\t\n", output->name, (int)durationUs, (int)MS2US(getCrankshaftRevolutionTimeMs(GET_RPM_VALUE))); #endif /*EFI_PRINTF_FUEL_DETAILS */ @@ -281,8 +276,8 @@ static ALWAYS_INLINE void handleFuelInjectionEvent(int injEventIndex, InjectionE static void fuelClosedLoopCorrection(DECLARE_ENGINE_PARAMETER_SIGNATURE) { #if ! EFI_UNIT_TEST if (GET_RPM_VALUE < CONFIG(fuelClosedLoopRpmThreshold) || - getCoolantTemperature() < CONFIG(fuelClosedLoopCltThreshold) || - getTPS(PASS_ENGINE_PARAMETER_SIGNATURE) > CONFIG(fuelClosedLoopTpsThreshold) || + Sensor::get(SensorType::Clt).value_or(0) < CONFIG(fuelClosedLoopCltThreshold) || + Sensor::get(SensorType::Tps1).value_or(100) > CONFIG(fuelClosedLoopTpsThreshold) || ENGINE(sensors.currentAfr) < CONFIG(fuelClosedLoopAfrLowThreshold) || ENGINE(sensors.currentAfr) > engineConfiguration->fuelClosedLoopAfrHighThreshold) { engine->engineState.running.pidCorrection = 0; @@ -329,7 +324,7 @@ static ALWAYS_INLINE void handleFuel(const bool limitedFuel, uint32_t trgEventIn scheduleMsg(logger, "handleFuel ind=%d %d", trgEventIndex, getRevolutionCounter()); #endif /* FUEL_MATH_EXTREME_LOGGING */ - ENGINE(tpsAccelEnrichment.onNewValue(getTPS(PASS_ENGINE_PARAMETER_SIGNATURE) PASS_ENGINE_PARAMETER_SUFFIX)); + ENGINE(tpsAccelEnrichment.onNewValue(Sensor::get(SensorType::Tps1).value_or(0) PASS_ENGINE_PARAMETER_SUFFIX)); if (trgEventIndex == 0) { ENGINE(tpsAccelEnrichment.onEngineCycleTps(PASS_ENGINE_PARAMETER_SIGNATURE)); ENGINE(engineLoadAccelEnrichment.onEngineCycle(PASS_ENGINE_PARAMETER_SIGNATURE)); @@ -363,7 +358,6 @@ static void mainTriggerCallback(trigger_event_e ckpSignalType, uint32_t trgEvent (void) ckpSignalType; - ENGINE(m.beforeMainTrigger) = getTimeNowLowerNt(); if (hasFirmwareError()) { /** * In case on a major error we should not process any more events. @@ -454,17 +448,13 @@ static void mainTriggerCallback(trigger_event_e ckpSignalType, uint32_t trgEvent * For spark we schedule both start of coil charge and actual spark based on trigger angle */ onTriggerEventSparkLogic(limitedSpark, trgEventIndex, rpm, edgeTimestamp PASS_ENGINE_PARAMETER_SUFFIX); - - if (trgEventIndex == 0) { - ENGINE(m.mainTriggerCallbackTime) = getTimeNowLowerNt() - ENGINE(m.beforeMainTrigger); - } } // Check if the engine is not stopped or cylinder cleanup is activated static bool isPrimeInjectionPulseSkipped(DECLARE_ENGINE_PARAMETER_SIGNATURE) { if (!engine->rpmCalculator.isStopped(PASS_ENGINE_PARAMETER_SIGNATURE)) return true; - return CONFIG(isCylinderCleanupEnabled) && (getTPS(PASS_ENGINE_PARAMETER_SIGNATURE) > CLEANUP_MODE_TPS); + return CONFIG(isCylinderCleanupEnabled) && (Sensor::get(SensorType::Tps1).value_or(0) > CLEANUP_MODE_TPS); } /** @@ -501,7 +491,7 @@ void startPrimeInjectionPulse(DECLARE_ENGINE_PARAMETER_SIGNATURE) { // If 'primeInjFalloffTemperature' is not specified (by default), we have a prime pulse deactivation at zero celsius degrees, which is okay. const float maxPrimeInjAtTemperature = -40.0f; // at this temperature the pulse is maximal. floatms_t pulseLength = interpolateClamped(maxPrimeInjAtTemperature, CONFIG(startOfCrankingPrimingPulse), - CONFIG(primeInjFalloffTemperature), 0.0f, getCoolantTemperature()); + CONFIG(primeInjFalloffTemperature), 0.0f, Sensor::get(SensorType::Clt).value_or(70)); if (pulseLength > 0) { startSimultaniousInjection(engine); efitimeus_t turnOffDelayUs = (efitimeus_t)efiRound(MS2US(pulseLength), 1.0f); diff --git a/firmware/controllers/engine_cycle/map_averaging.cpp b/firmware/controllers/engine_cycle/map_averaging.cpp index ce4a2c636b..e7eac6a6fe 100644 --- a/firmware/controllers/engine_cycle/map_averaging.cpp +++ b/firmware/controllers/engine_cycle/map_averaging.cpp @@ -93,8 +93,7 @@ static int averagedMapBufIdx = 0; // this is 'minimal averaged' MAP within avegaging window static float currentPressure = NO_VALUE_YET; -EXTERN_ENGINE -; +EXTERN_ENGINE; /** * here we have averaging start and averaging end points for each cylinder @@ -108,8 +107,9 @@ static scheduling_s endTimer[INJECTION_PIN_COUNT][2]; */ static bool isAveraging = false; -static void startAveraging(void *arg) { - (void) arg; +static void endAveraging(void *arg); + +static void startAveraging(scheduling_s *endAveragingScheduling) { efiAssertVoid(CUSTOM_ERR_6649, getCurrentRemainingStack() > 128, "lowstck#9"); bool wasLocked = lockAnyContext(); @@ -122,6 +122,11 @@ static void startAveraging(void *arg) { } mapAveragingPin.setHigh(); + +#if ! EFI_UNIT_TEST + scheduleByAngle(endAveragingScheduling, getTimeNowNt(), ENGINE(engineState.mapAveragingDuration), + endAveraging PASS_ENGINE_PARAMETER_SUFFIX); +#endif } #if HAL_USE_ADC @@ -273,7 +278,6 @@ static void mapAveragingTriggerCallback(trigger_event_e ckpEventType, if (index != (uint32_t)CONFIG(mapAveragingSchedulingAtIndex)) return; - engine->m.beforeMapAveragingCb = getTimeNowLowerNt(); int rpm = GET_RPM_VALUE; if (!isValidRpm(rpm)) { return; @@ -306,7 +310,6 @@ static void mapAveragingTriggerCallback(trigger_event_e ckpEventType, return; } - fixAngle(samplingEnd, "samplingEnd", CUSTOM_ERR_6563); // only if value is already prepared int structIndex = getRevolutionCounter() % 2; @@ -314,11 +317,7 @@ static void mapAveragingTriggerCallback(trigger_event_e ckpEventType, // we are loosing precision in case of changing RPM - the further away is the event the worse is precision // todo: schedule this based on closest trigger event, same as ignition works scheduleByAngle(&startTimer[i][structIndex], edgeTimestamp, samplingStart, - startAveraging PASS_ENGINE_PARAMETER_SUFFIX); - scheduleByAngle(&endTimer[i][structIndex], edgeTimestamp, samplingEnd, - endAveraging PASS_ENGINE_PARAMETER_SUFFIX); - engine->m.mapAveragingCbTime = getTimeNowLowerNt() - - engine->m.beforeMapAveragingCb; + { startAveraging, &endTimer[i][structIndex] } PASS_ENGINE_PARAMETER_SUFFIX); } #endif } @@ -351,11 +350,6 @@ float getMap(void) { void initMapAveraging(Logging *sharedLogger DECLARE_ENGINE_PARAMETER_SUFFIX) { logger = sharedLogger; -// startTimer[0].name = "map start0"; -// startTimer[1].name = "map start1"; -// endTimer[0].name = "map end0"; -// endTimer[1].name = "map end1"; - #if EFI_SHAFT_POSITION_INPUT addTriggerEventListener(&mapAveragingTriggerCallback, "MAP averaging", engine); #endif /* EFI_SHAFT_POSITION_INPUT */ diff --git a/firmware/controllers/engine_cycle/rpm_calculator.cpp b/firmware/controllers/engine_cycle/rpm_calculator.cpp index c44539df8d..29e7553f52 100644 --- a/firmware/controllers/engine_cycle/rpm_calculator.cpp +++ b/firmware/controllers/engine_cycle/rpm_calculator.cpp @@ -22,6 +22,7 @@ #include "engine_configuration.h" #include "engine_math.h" #include "perf_trace.h" +#include "tooth_logger.h" #if EFI_PROD_CODE #include "os_util.h" @@ -81,10 +82,7 @@ int RpmCalculator::getRpm(DECLARE_ENGINE_PARAMETER_SIGNATURE) const { #if EFI_SHAFT_POSITION_INPUT -EXTERN_ENGINE -; - -extern bool hasFirmwareErrorFlag; +EXTERN_ENGINE; static Logging * logger; @@ -233,8 +231,6 @@ void rpmShaftPositionCallback(trigger_event_e ckpSignalType, RpmCalculator *rpmState = &engine->rpmCalculator; if (index == 0) { - ENGINE(m.beforeRpmCb) = getTimeNowLowerNt(); - bool hadRpmRecently = rpmState->checkIfSpinning(nowNt PASS_ENGINE_PARAMETER_SUFFIX); if (hadRpmRecently) { @@ -256,7 +252,6 @@ void rpmShaftPositionCallback(trigger_event_e ckpSignalType, } rpmState->onNewEngineCycle(); rpmState->lastRpmEventTimeNt = nowNt; - ENGINE(m.rpmCbTime) = getTimeNowLowerNt() - ENGINE(m.beforeRpmCb); } @@ -306,6 +301,9 @@ static void onTdcCallback(Engine *engine) { waveChart.startDataCollection(); #endif addEngineSnifferEvent(TOP_DEAD_CENTER_MESSAGE, (char* ) rpmBuffer); +#if EFI_TOOTH_LOGGER + LogTriggerTopDeadCenter(getTimeNowNt() PASS_ENGINE_PARAMETER_SUFFIX); +#endif /* EFI_TOOTH_LOGGER */ } /** @@ -321,7 +319,10 @@ static void tdcMarkCallback(trigger_event_e ckpSignalType, int rpm = GET_RPM(); // todo: use tooth event-based scheduling, not just time-based scheduling if (isValidRpm(rpm)) { - scheduleByAngle(&tdcScheduler[revIndex2], edgeTimestamp, tdcPosition(), + angle_t tdcPosition = tdcPosition(); + // we need a positive angle offset here + fixAngle(tdcPosition, "tdcPosition", CUSTOM_ERR_6553); + scheduleByAngle(&tdcScheduler[revIndex2], edgeTimestamp, tdcPosition, { onTdcCallback, engine } PASS_ENGINE_PARAMETER_SUFFIX); } } diff --git a/firmware/controllers/engine_cycle/spark_logic.cpp b/firmware/controllers/engine_cycle/spark_logic.cpp index 1bfb581238..dba3d71269 100644 --- a/firmware/controllers/engine_cycle/spark_logic.cpp +++ b/firmware/controllers/engine_cycle/spark_logic.cpp @@ -171,7 +171,26 @@ if (engineConfiguration->debugMode == DBG_DWELL_METRIC) { // we are here if engine has just stopped return; } - prepareCylinderIgnitionSchedule(dwellAngleDuration, sparkDwell, event PASS_ENGINE_PARAMETER_SUFFIX); + + // If there are more sparks to fire, schedule them + if (event->sparksRemaining > 0) + { + event->sparksRemaining--; + + efitick_t nowNt = getTimeNowNt(); + + efitick_t nextDwellStart = nowNt + engine->engineState.multispark.delay; + efitick_t nextFiring = nextDwellStart + engine->engineState.multispark.dwell; + + // We can schedule both of these right away, since we're going for "asap" not "particular angle" + engine->executor.scheduleByTimestampNt(&event->dwellStartTimer, nextDwellStart, { &turnSparkPinHigh, event }); + engine->executor.scheduleByTimestampNt(&event->sparkEvent.scheduling, nextFiring, { fireSparkAndPrepareNextSchedule, event }); + } + else + { + // If all events have been scheduled, prepare for next time. + prepareCylinderIgnitionSchedule(dwellAngleDuration, sparkDwell, event PASS_ENGINE_PARAMETER_SUFFIX); + } } static void startDwellByTurningSparkPinHigh(IgnitionEvent *event, IgnitionOutputPin *output) { @@ -321,7 +340,13 @@ static ALWAYS_INLINE void handleSparkEvent(bool limitedSpark, uint32_t trgEventI * the coil. */ engine->executor.scheduleByTimestampNt(&event->dwellStartTimer, edgeTimestamp + US2NT(chargeDelayUs), { &turnSparkPinHigh, event }); + + event->sparksRemaining = ENGINE(engineState.multispark.count); + } else { + // don't fire multispark if spark is cut completely! + event->sparksRemaining = 0; } + /** * Spark event is often happening during a later trigger event timeframe */ @@ -329,7 +354,6 @@ static ALWAYS_INLINE void handleSparkEvent(bool limitedSpark, uint32_t trgEventI efiAssertVoid(CUSTOM_ERR_6591, !cisnan(sparkAngle), "findAngle#4"); assertAngleRange(sparkAngle, "findAngle#a5", CUSTOM_ERR_6549); - bool scheduled = scheduleOrQueue(&event->sparkEvent, trgEventIndex, edgeTimestamp, sparkAngle, { fireSparkAndPrepareNextSchedule, event } PASS_ENGINE_PARAMETER_SUFFIX); if (scheduled) { @@ -376,8 +400,8 @@ void initializeIgnitionActions(DECLARE_ENGINE_PARAMETER_SIGNATURE) { } static ALWAYS_INLINE void prepareIgnitionSchedule(DECLARE_ENGINE_PARAMETER_SIGNATURE) { - - engine->m.beforeIgnitionSch = getTimeNowLowerNt(); + ScopePerf perf(PE::PrepareIgnitionSchedule); + /** * TODO: warning. there is a bit of a hack here, todo: improve. * currently output signals/times dwellStartTimer from the previous revolutions could be @@ -402,7 +426,6 @@ static ALWAYS_INLINE void prepareIgnitionSchedule(DECLARE_ENGINE_PARAMETER_SIGNA // todo: add some check for dwell overflow? like 4 times 6 ms while engine cycle is less then that initializeIgnitionActions(PASS_ENGINE_PARAMETER_SIGNATURE); - engine->m.ignitionSchTime = getTimeNowLowerNt() - engine->m.beforeIgnitionSch; } diff --git a/firmware/controllers/flash_main.cpp b/firmware/controllers/flash_main.cpp index 9bc8d2252b..9de0cface6 100644 --- a/firmware/controllers/flash_main.cpp +++ b/firmware/controllers/flash_main.cpp @@ -13,7 +13,7 @@ #include "flash_main.h" #include "eficonsole.h" -#include "flash.h" +#include "flash_int.h" #include "engine_math.h" // this message is part of console API, see FLASH_SUCCESS_MSG in java code @@ -69,8 +69,8 @@ void writeToFlashIfPending() { template int eraseAndFlashCopy(flashaddr_t storageAddress, const TStorage& data) { - flashErase(storageAddress, sizeof(TStorage)); - return flashWrite(storageAddress, reinterpret_cast(&data), sizeof(TStorage)); + intFlashErase(storageAddress, sizeof(TStorage)); + return intFlashWrite(storageAddress, reinterpret_cast(&data), sizeof(TStorage)); } void writeToFlashNow(void) { @@ -114,7 +114,7 @@ persisted_configuration_state_e flashState; static persisted_configuration_state_e doReadConfiguration(flashaddr_t address, Logging * logger) { printMsg(logger, "readFromFlash %x", address); - flashRead(address, (char *) &persistentState, sizeof(persistentState)); + intFlashRead(address, (char *) &persistentState, sizeof(persistentState)); if (!isValidCrc(&persistentState)) { return CRC_FAILED; @@ -150,6 +150,7 @@ persisted_configuration_state_e readConfiguration(Logging * logger) { } // we can only change the state after the CRC check engineConfiguration->byFirmwareVersion = getRusEfiVersion(); + memset(persistentState.persistentConfiguration.warning_message , 0, ERROR_BUFFER_SIZE); validateConfiguration(PASS_ENGINE_PARAMETER_SIGNATURE); return result; } diff --git a/firmware/controllers/gauges/lcd_controller.cpp b/firmware/controllers/gauges/lcd_controller.cpp index 98e16ec5e6..669a080830 100644 --- a/firmware/controllers/gauges/lcd_controller.cpp +++ b/firmware/controllers/gauges/lcd_controller.cpp @@ -35,16 +35,15 @@ #include "lcd_menu_tree.h" #include "memstreams.h" #include "settings.h" -#include "injector_central.h" +#include "bench_test.h" #include "engine_controller.h" #include "mmc_card.h" #include "idle_thread.h" #include "fuel_math.h" +#include "sensor.h" -EXTERN_ENGINE -; -extern bool hasFirmwareErrorFlag; +EXTERN_ENGINE; static MenuItem ROOT(NULL, NULL); @@ -130,64 +129,6 @@ void initLcdController(void) { msObjectInit(&lcdLineStream, (uint8_t *) lcdLineBuffer, sizeof(lcdLineBuffer), 0); } -static const char* ignitionModeStr[] = { "1C", "IND", "WS" }; -static const char* injectionModeStr[] = { "Sim", "Seq", "Bch" }; -static const char* idleModeStr[] = { "I:A", "I:M" }; - -//static const char *getPinShortName(io_pin_e pin) { -// switch (pin) { -// case ALTERNATOR_SWITCH: -// return "AL"; -// case FUEL_PUMP_RELAY: -// return "FP"; -// case FAN_RELAY: -// return "FN"; -// case O2_HEATER: -// return "O2H"; -// default: -// firmwareError(OBD_PCM_Processor_Fault, "No short name for %d", (int) pin); -// return ""; -// } -//} - -//char * appendPinStatus(char *buffer, io_pin_e pin) { -// char *ptr = appendStr(buffer, getPinShortName(pin)); -// int state = getOutputPinValue(pin); -// // todo: should we handle INITIAL_PIN_STATE? -// if (state) { -// return appendStr(ptr, ":Y "); -// } else { -// return appendStr(ptr, ":n "); -// } -//} - -#if 0 -static char * prepareInfoLine(engine_configuration_s *engineConfiguration, char *buffer) { - char *ptr = buffer; - - ptr = appendStr(ptr, " "); - ptr = appendStr(ptr, ignitionModeStr[engineConfiguration->ignitionMode]); - - ptr = appendStr(ptr, " "); - ptr = appendStr(ptr, injectionModeStr[engineConfiguration->injectionMode]); - - ptr = appendStr(ptr, " "); - ptr = appendStr(ptr, idleModeStr[engineConfiguration->idleMode]); - - ptr = appendStr(ptr, " "); - return ptr; -} -#endif - -//static char * prepareStatusLine(char *buffer) { -// char *ptr = buffer; -// -// ptr = appendPinStatus(ptr, FUEL_PUMP_RELAY); -// ptr = appendPinStatus(ptr, FAN_RELAY); -// ptr = appendPinStatus(ptr, O2_HEATER); -// return ptr; -//} - static char buffer[MAX_LCD_WIDTH + 4]; static void lcdPrintf(const char *fmt, ...) { @@ -230,10 +171,10 @@ static void showLine(lcd_line_e line, int screenY) { #endif return; case LL_CLT_TEMPERATURE: - lcdPrintf("Coolant %.2f", getCoolantTemperature()); + lcdPrintf("Coolant %.2f", Sensor::get(SensorType::Clt).value_or(0)); return; case LL_IAT_TEMPERATURE: - lcdPrintf("Intake Air %.2f", getIntakeAirTemperature()); + lcdPrintf("Intake Air %.2f", Sensor::get(SensorType::Iat).value_or(0)); return; case LL_ALGORITHM: lcdPrintf(getEngine_load_mode_e(engineConfiguration->fuelAlgorithm)); @@ -250,13 +191,13 @@ static void showLine(lcd_line_e line, int screenY) { case LL_TPS: getPinNameByAdcChannel("tps", engineConfiguration->tps1_1AdcChannel, buffer); - lcdPrintf("Throttle %s %.2f%%", buffer, getTPS()); + lcdPrintf("Throttle %s %.2f%%", buffer, Sensor::get(SensorType::Tps1).value_or(0)); return; case LL_FUEL_CLT_CORRECTION: lcdPrintf("CLT corr %.2f", getCltFuelCorrection(PASS_ENGINE_PARAMETER_SIGNATURE)); return; case LL_FUEL_IAT_CORRECTION: - lcdPrintf("IAT corr %.2f", getIatFuelCorrection(getIntakeAirTemperature() PASS_ENGINE_PARAMETER_SIGNATURE)); + lcdPrintf("IAT corr %.2f", getIatFuelCorrection(PASS_ENGINE_PARAMETER_SIGNATURE)); return; case LL_FUEL_INJECTOR_LAG: lcdPrintf("ING LAG %.2f", getInjectorLag(engine->sensors.vBatt PASS_ENGINE_PARAMETER_SIGNATURE)); @@ -355,7 +296,7 @@ void updateHD44780lcd(void) { } - const char * message = hasFirmwareErrorFlag ? getFirmwareError() : getWarning(); + const char * message = hasFirmwareErrorFlag ? getFirmwareError() : getWarningMessage(); memcpy(buffer, message, engineConfiguration->HD44780width); buffer[engineConfiguration->HD44780width] = 0; lcd_HD44780_set_position(engineConfiguration->HD44780height - 1, 0); @@ -392,7 +333,7 @@ void updateHD44780lcd(void) { // // lcd_HD44780_set_position(1, 0); // memset(buffer, ' ', LCD_WIDTH); -// memcpy(buffer, getWarning(), LCD_WIDTH); +// memcpy(buffer, getWarningMessage(), LCD_WIDTH); // buffer[LCD_WIDTH] = 0; // lcd_HD44780_print_string(buffer); // diff --git a/firmware/controllers/gauges/malfunction_central.cpp b/firmware/controllers/gauges/malfunction_central.cpp index 48699b2547..7e93680884 100644 --- a/firmware/controllers/gauges/malfunction_central.cpp +++ b/firmware/controllers/gauges/malfunction_central.cpp @@ -24,7 +24,7 @@ static int find_position(obd_code_e e_code) // Search if code is present return -1; // -1 if code not found } -void initMalfunctionCentral(void) { +void clearWarnings(void) { error_codes_set.count = 0; } @@ -40,15 +40,16 @@ void removeError(obd_code_e errorCode) { if (pos >= 0) { for (int t = pos; t < error_codes_set.count; t++) // shift all right elements to one pos left error_codes_set.error_codes[t] = error_codes_set.error_codes[t + 1]; - error_codes_set.error_codes[--error_codes_set.count] = (obd_code_e)0; // place 0 + error_codes_set.error_codes[--error_codes_set.count] = (obd_code_e)0; // place 0 } } void setError(bool isError, obd_code_e errorCode) { - if (isError) + if (isError) { addError(errorCode); - else + } else { removeError(errorCode); + } } void getErrorCodes(error_codes_set_s * copy) { diff --git a/firmware/controllers/gauges/malfunction_central.h b/firmware/controllers/gauges/malfunction_central.h index ebbabd05ad..b8731f5981 100644 --- a/firmware/controllers/gauges/malfunction_central.h +++ b/firmware/controllers/gauges/malfunction_central.h @@ -6,27 +6,18 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ -#ifndef MALFUNCTION_CENTRAL_H_ -#define MALFUNCTION_CENTRAL_H_ +#pragma once #include "global.h" - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - #include "obd_error_codes.h" #define MAX_ERROR_CODES_COUNT 10 typedef struct { - int count; + int count = 0; obd_code_e error_codes[MAX_ERROR_CODES_COUNT]; } error_codes_set_s; -void initMalfunctionCentral(void); - /** * @brief Adds an error code into the set of current errors. * The error code is placed into the fixed-size data structure if it fits into it. @@ -42,15 +33,10 @@ void removeError(obd_code_e errorCode); void setError(bool isError, obd_code_e errorCode); +void clearWarnings(void); /** * @brief Copies the current set of errors into the specified buffer */ void getErrorCodes(error_codes_set_s * buffer); bool hasErrorCodes(void); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif /* MALFUNCTION_CENTRAL_H_ */ diff --git a/firmware/controllers/gauges/malfunction_indicator.h b/firmware/controllers/gauges/malfunction_indicator.h index d32c1abd0e..b6dc14581f 100644 --- a/firmware/controllers/gauges/malfunction_indicator.h +++ b/firmware/controllers/gauges/malfunction_indicator.h @@ -8,10 +8,8 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ -#ifndef MALFUNCTION_INDICATOR_H_ -#define MALFUNCTION_INDICATOR_H_ +#pragma once -#include "global.h" #include "engine.h" #if EFI_MALFUNCTION_INDICATOR @@ -21,4 +19,3 @@ void initMalfunctionIndicator(void); #endif /* EFI_MALFUNCTION_INDICATOR */ -#endif /* MALFUNCTION_INDICATOR_H_ */ diff --git a/firmware/controllers/gauges/tachometer.cpp b/firmware/controllers/gauges/tachometer.cpp index 9781e2a4d0..71427b0d7c 100644 --- a/firmware/controllers/gauges/tachometer.cpp +++ b/firmware/controllers/gauges/tachometer.cpp @@ -12,44 +12,84 @@ #include "tachometer.h" #include "trigger_central.h" - -#if !EFI_UNIT_TEST +#include "pwm_generator_logic.h" EXTERN_ENGINE; -static scheduling_s tachTurnSignalOff; +static SimplePwm tachControl("tach"); +static float tachFreq; +static float duty; -static void turnTachPinLow(void *) { - enginePins.tachOut.setLow(); +#if EFI_UNIT_TEST +float getTachFreq(void) { + return tachFreq; } +float getTachDuty(void) { + return duty; +} +#endif + static void tachSignalCallback(trigger_event_e ckpSignalType, uint32_t index, efitick_t edgeTimestamp DECLARE_ENGINE_PARAMETER_SUFFIX) { - UNUSED(ckpSignalType); - if (index != (uint32_t)engineConfiguration->tachPulseTriggerIndex) { + // only process at index configured to avoid too much cpu time for index 0? + if (index != (uint32_t)CONFIG(tachPulseTriggerIndex)) { return; } - enginePins.tachOut.setHigh(); - float durationMs; - if (engineConfiguration->tachPulseDurationAsDutyCycle) { - // todo: implement tachPulseDurationAsDutyCycle - durationMs = engineConfiguration->tachPulseDuractionMs; - } else { - durationMs = engineConfiguration->tachPulseDuractionMs; + +#if EFI_UNIT_TEST + printf("tachSignalCallback(%d %d)\n", ckpSignalType, index); + printf("Current RPM: %d\n",GET_RPM()); + UNUSED(edgeTimestamp); +#else + UNUSED(ckpSignalType); + UNUSED(edgeTimestamp); +#endif + + // How many tach pulse periods do we have? + int periods = CONFIG(tachPulsePerRev); + + if(periods == 0){ + warning(CUSTOM_ERR_6709,"Check Tachometer Pulse per Rev!"); + return; } - engine->executor.scheduleForLater(&tachTurnSignalOff, (int)MS2US(durationMs), &turnTachPinLow); + + // What is the angle per tach output period? + float cycleTimeMs = 60000.0 / GET_RPM(); + float periodTimeMs = cycleTimeMs / periods; + tachFreq = 1000.0 / periodTimeMs; + + if (CONFIG(tachPulseDurationAsDutyCycle)) { + // Simple case - duty explicitly set + duty = CONFIG(tachPulseDuractionMs); + } else { + // Constant high-time mode - compute the correct duty cycle + duty = CONFIG(tachPulseDuractionMs) / periodTimeMs; + } + + // In case Freq is under 1Hz, we stop pwm to avoid warnings! + if (tachFreq < 1.0) { + tachFreq = NAN; + } + + tachControl.setSimplePwmDutyCycle(duty); + tachControl.setFrequency(tachFreq); + } -void initTachometer(void) { +void initTachometer(DECLARE_ENGINE_PARAMETER_SIGNATURE) { if (CONFIG(tachOutputPin) == GPIO_UNASSIGNED) { return; } - enginePins.tachOut.initPin("analog tach output", CONFIG(tachOutputPin), &CONFIG(tachOutputPinMode)); + startSimplePwmExt(&tachControl, + "Tachometer", + &engine->executor, + CONFIG(tachOutputPin), + &enginePins.tachOut, + NAN, 0.1, (pwm_gen_callback*)applyPinState); #if EFI_SHAFT_POSITION_INPUT addTriggerEventListener(tachSignalCallback, "tach", engine); #endif /* EFI_SHAFT_POSITION_INPUT */ } - -#endif /* EFI_UNIT_TEST */ diff --git a/firmware/controllers/gauges/tachometer.h b/firmware/controllers/gauges/tachometer.h index bfeefe755d..6f4608641d 100644 --- a/firmware/controllers/gauges/tachometer.h +++ b/firmware/controllers/gauges/tachometer.h @@ -5,11 +5,9 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ -#ifndef CONTROLLERS_TACHOMETER_H_ -#define CONTROLLERS_TACHOMETER_H_ +#pragma once #include "engine.h" -void initTachometer(void); +void initTachometer(DECLARE_ENGINE_PARAMETER_SIGNATURE); -#endif /* CONTROLLERS_TACHOMETER_H_ */ diff --git a/firmware/controllers/generated/engine_configuration_generated_structures.h b/firmware/controllers/generated/engine_configuration_generated_structures.h index 1c324af2d0..825640b81f 100644 --- a/firmware/controllers/generated/engine_configuration_generated_structures.h +++ b/firmware/controllers/generated/engine_configuration_generated_structures.h @@ -1,9 +1,79 @@ -// this section was generated automatically by rusEfi tool ConfigDefinition.jar based on integration\rusefi_config.txt Fri Mar 20 19:54:54 EDT 2020 +// this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.bat integration\rusefi_config.txt Sun Apr 26 14:16:11 EDT 2020 // by class com.rusefi.output.CHeaderConsumer // begin #ifndef CONTROLLERS_GENERATED_ENGINE_CONFIGURATION_GENERATED_STRUCTURES_H #define CONTROLLERS_GENERATED_ENGINE_CONFIGURATION_GENERATED_STRUCTURES_H #include "rusefi_types.h" +// start of stft_cell_cfg_s +struct stft_cell_cfg_s { + /** + * offset 0 + */ + int8_t maxAdd; + /** + * offset 1 + */ + int8_t maxRemove; + /** + * offset 2 + */ + uint16_t timeConstant; + /** total size 4*/ +}; + +typedef struct stft_cell_cfg_s stft_cell_cfg_s; + +// start of stft_s +struct stft_s { + /** + * Below this RPM, the idle region is active + * offset 0 + */ + uint8_t maxIdleRegionRpm; + /** + * Below this engine load, the overrun region is active + * offset 1 + */ + uint8_t maxOverrunLoad; + /** + * Above this engine load, the power region is active + * offset 2 + */ + uint8_t minPowerLoad; + /** + * When close to correct AFR, pause correction. This can improve stability by not changing the adjustment if the error is extremely small, but is not required. + * offset 3 + */ + uint8_t deadband; + /** + * Below this temperature, correction is disabled. + * offset 4 + */ + int8_t minClt; + /** + * Below this AFR, correction is paused + * offset 5 + */ + uint8_t minAfr; + /** + * Above this AFR, correction is paused + * offset 6 + */ + uint8_t maxAfr; + /** + * Delay after starting the engine before beginning closed loop correction. + * offset 7 + */ + uint8_t startupDelay; + /** + * offset 8 + */ + stft_cell_cfg_s cellCfgs[STFT_CELL_COUNT]; + /** total size 24*/ +}; + +typedef struct stft_s stft_s; + // start of pid_s struct pid_s { /** @@ -90,6 +160,61 @@ struct spi_pins { typedef struct spi_pins spi_pins; +// start of gppwm_channel +struct gppwm_channel { + /** + * Select a pin to use for PWM or on-off output. + * offset 0 + */ + output_pin_e pin; + /** + * If an error (with a sensor, etc) is detected, this value is used instead of reading from the table. + * This should be a safe value for whatever hardware is connected to prevent damage. + * offset 1 + */ + uint8_t dutyIfError; + /** + * Select a frequency to run PWM at. + * Set this to 0hz to enable on-off mode. + * offset 2 + */ + uint16_t pwmFrequency; + /** + * In on-off mode, turn the output on when the table value is above this duty. + * offset 4 + */ + uint8_t onAboveDuty; + /** + * In on-off mode, turn the output off when the table value is below this duty. + * offset 5 + */ + uint8_t offBelowDuty; + /** + * Selects the load axis to use for the table. + * offset 6 + */ + gppwm_channel_e loadAxis; + /** + * offset 7 + */ + uint8_t pad; + /** + * offset 8 + */ + uint8_t loadBins[GPPWM_LOAD_COUNT]; + /** + * offset 16 + */ + uint8_t rpmBins[GPPWM_RPM_COUNT]; + /** + * offset 24 + */ + gppwm_table_t table; + /** total size 88*/ +}; + +typedef struct gppwm_channel gppwm_channel; + // start of air_pressure_sensor_config_s struct air_pressure_sensor_config_s { /** @@ -278,33 +403,6 @@ struct injector_s { typedef struct injector_s injector_s; -// start of bi_quard_s -struct bi_quard_s { - /** - * offset 0 - */ - float a0; - /** - * offset 4 - */ - float a1; - /** - * offset 8 - */ - float a2; - /** - * offset 12 - */ - float b1; - /** - * offset 16 - */ - float b2; - /** total size 20*/ -}; - -typedef struct bi_quard_s bi_quard_s; - // start of specs_s struct specs_s { /** @@ -339,10 +437,10 @@ struct trigger_config_s { trigger_type_e type; /** offset 4 bit 0 */ - bool unusedTriggerBit0 : 1; + bool todoRemoveMeOneDay0 : 1; /** offset 4 bit 1 */ - bool unusedTriggerBit1 : 1; + bool todoRemoveMeOneDay1 : 1; /** * This option could be used if your second trigger channel is broken offset 4 bit 2 */ @@ -522,7 +620,7 @@ struct etb_io { /** * offset 3 */ - pin_output_mode_e controlPinMode; + brain_pin_e disablePin; /** total size 4*/ }; @@ -547,11 +645,8 @@ struct engine_configuration_s { */ injector_s injector; /** - * Should trigger emulator push data right into trigger handling logic, eliminating the need for physical jumper wires? - * See also triggerSimulatorPins - * PS: Funny name, right? :) offset 76 bit 0 */ - bool directSelfStimulation : 1; + bool unused76b0 : 1; /** offset 76 bit 1 */ bool activateAuxPid1 : 1; @@ -577,8 +672,9 @@ struct engine_configuration_s { offset 76 bit 8 */ bool isVerboseAuxPid4 : 1; /** + * enable cj125verbose/disable cj125verbose offset 76 bit 9 */ - bool useBiQuadAnalogFiltering : 1; + bool isCJ125Verbose : 1; /** * Is your UA CJ125 output wired to MCU via resistor divider? offset 76 bit 10 */ @@ -587,6 +683,7 @@ struct engine_configuration_s { offset 76 bit 11 */ bool cj125isLsu49 : 1; /** + * TLE7209 uses two-wire mode. TLE9201 and VNH2SP30 do NOT use two wire mode. offset 76 bit 12 */ bool etb_use_two_wires : 1; /** @@ -602,7 +699,7 @@ struct engine_configuration_s { bool cj125isUrDivided : 1; /** offset 76 bit 16 */ - bool useTLE8888_hall_mode : 1; + bool issue_294_unused : 1; /** offset 76 bit 17 */ bool useTLE8888_cranking_hack : 1; @@ -627,7 +724,7 @@ struct engine_configuration_s { bool useRunningMathForCranking : 1; /** offset 76 bit 24 */ - bool issue_294_25 : 1; + bool displayLogicLevelsInEngineSniffer : 1; /** offset 76 bit 25 */ bool issue_294_26 : 1; @@ -898,6 +995,7 @@ struct engine_configuration_s { adc_channel_e fuelLevelSensor; /** * Second throttle body position sensor, single channel so far + * set_analog_input_pin tps2 X * offset 515 */ adc_channel_e tps2_1AdcChannel; @@ -959,6 +1057,7 @@ struct engine_configuration_s { * Electronic throttle pedal position input * First channel * See also tps1_1AdcChannel + * set_analog_input_pin pps X * offset 580 */ adc_channel_e throttlePedalPositionAdcChannel; @@ -1103,10 +1202,12 @@ struct engine_configuration_s { */ pin_output_mode_e electronicThrottlePin1Mode; /** + * set_cj125_heater_pin XXX * offset 673 */ brain_pin_e wboHeaterPin; /** + * set_cj125_cs_pin XXX * offset 674 */ brain_pin_e cj125CsPin; @@ -1196,10 +1297,12 @@ struct engine_configuration_s { */ brain_pin_e sdCardCsPin; /** + * set_can_tx_pin X * offset 708 */ brain_pin_e canTxPin; /** + * set_can_rx_pin X * offset 709 */ brain_pin_e canRxPin; @@ -1210,7 +1313,7 @@ struct engine_configuration_s { /** * offset 711 */ - brain_pin_e debugTimerCallback; + uint8_t unused711; /** * offset 712 */ @@ -1234,7 +1337,7 @@ struct engine_configuration_s { /** * offset 732 */ - can_device_mode_e canDeviceMode; + int anUnused4Bytes; /** * Each rusEfi piece can provide synthetic trigger signal for external ECU. Sometimes these wires are routed back into trigger inputs of the same rusEfi board. * See also directSelfStimulation which is different. @@ -1298,6 +1401,7 @@ struct engine_configuration_s { offset 744 bit 13 */ bool verboseTLE8888 : 1; /** + * enable can_broadcast/disable can_broadcast offset 744 bit 14 */ bool enableVerboseCanTx : 1; /** @@ -1305,6 +1409,7 @@ struct engine_configuration_s { offset 744 bit 15 */ bool onOffAlternatorLogic : 1; /** + * enable cj125/disable cj125 offset 744 bit 16 */ bool isCJ125Enabled : 1; /** @@ -1386,7 +1491,11 @@ struct engine_configuration_s { /** * offset 760 */ - int unrealisticRpmThreashold; + uint8_t mc33_hvolt; + /** + * offset 761 + */ + uint8_t unusedHere[3]; /** * offset 764 */ @@ -1408,7 +1517,7 @@ struct engine_configuration_s { /** * offset 806 */ - brain_pin_e debugSetTimer; + uint8_t unused806; /** * offset 807 */ @@ -1445,15 +1554,18 @@ struct engine_configuration_s { */ int16_t stepperParkingExtraSteps; /** - * This magic property is specific to Mazda Miata NB2 * offset 820 */ - float unusedmiataNb2VVTRatioFrom; + float unusedAntilagTimeout; /** - * This magic property is specific to Mazda Miata NB2 * offset 824 */ - float unusedmiataNb2VVTRatioTo; + int16_t antiLagRpmTreshold; + /** + * Maximum time to crank starter + * offset 826 + */ + int16_t startCrankingDuration; /** * This pin is used for debugging - snap a logic analyzer on it and see if it's ever high * offset 828 @@ -1603,22 +1715,22 @@ struct engine_configuration_s { bool multisparkEnable : 1; /** offset 976 bit 4 */ - bool unusedBit_251_4 : 1; + bool enableLaunchRetard : 1; /** offset 976 bit 5 */ - bool unusedBit_251_5 : 1; + bool enableLaunchBoost : 1; /** offset 976 bit 6 */ - bool unusedBit_251_6 : 1; + bool launchDisableBySpeed : 1; /** offset 976 bit 7 */ - bool unusedBit_251_7 : 1; + bool enableCanVss : 1; /** offset 976 bit 8 */ - bool unusedBit_251_8 : 1; + bool enableInnovateLC2 : 1; /** offset 976 bit 9 */ - bool unusedBit_251_9 : 1; + bool showHumanReadableWarning : 1; /** offset 976 bit 10 */ bool unusedBit_251_10 : 1; @@ -1681,10 +1793,10 @@ struct engine_configuration_s { bool unusedBit_251_29 : 1; /** offset 976 bit 30 */ - bool unusedBit_280_30 : 1; + bool unusedBit_282_30 : 1; /** offset 976 bit 31 */ - bool unusedBit_280_31 : 1; + bool unusedBit_282_31 : 1; /** * offset 980 */ @@ -1758,7 +1870,23 @@ struct engine_configuration_s { /** * offset 1052 */ - int unusedAtOldBoardConfigurationEnd[103]; + int launchAdvanceRpmRange; + /** + * offset 1056 + */ + int launchTpsTreshold; + /** + * offset 1060 + */ + float launchActivateDelay; + /** + * offset 1064 + */ + stft_s stft; + /** + * offset 1088 + */ + int unusedAtOldBoardConfigurationEnd[94]; /** offset 1464 bit 0 */ bool vvtDisplayInverted : 1; @@ -1790,9 +1918,11 @@ struct engine_configuration_s { offset 1464 bit 7 */ bool useLinearCltSensor : 1; /** + * enable can_read/disable can_read offset 1464 bit 8 */ bool canReadEnabled : 1; /** + * enable can_write/disable can_write offset 1464 bit 9 */ bool canWriteEnabled : 1; /** @@ -2147,7 +2277,7 @@ struct engine_configuration_s { */ int16_t tps2Max; /** - * See also startStopButton + * See also startStopButtonPin * offset 1772 */ output_pin_e starterControlPin; @@ -2158,7 +2288,7 @@ struct engine_configuration_s { /** * offset 1774 */ - uint8_t unusedFormerWarmupAfrPid; + brain_pin_e mc33816_flag0; /** * offset 1775 */ @@ -2291,17 +2421,19 @@ struct engine_configuration_s { */ int16_t iacByTpsTaper; /** + * set_aux_tx_pin X * offset 2040 */ - brain_pin_e unusedErrorPin; + brain_pin_e auxSerialTxPin; /** * offset 2041 */ brain_pin_e warningLedPin; /** + * set_aux_rx_pin X * offset 2042 */ - brain_pin_e unused1234234; + brain_pin_e auxSerialRxPin; /** * offset 2043 */ @@ -2369,7 +2501,11 @@ struct engine_configuration_s { /** * offset 2096 */ - uint32_t unused_former_warmup_target_afr[9]; + uint32_t auxSerialSpeed; + /** + * offset 2100 + */ + uint32_t unused_former_warmup_target_afr[8]; /** * kPa value at which we need to cut fuel and spark, 0 if not enabled * offset 2132 @@ -2479,7 +2615,7 @@ struct engine_configuration_s { /** * offset 2332 */ - bi_quard_s biQuad; + uint8_t unusedOldBiquad[20]; /** * CLT-based timing correction * offset 2352 @@ -2492,7 +2628,11 @@ struct engine_configuration_s { /** * offset 2416 */ - int nbVvtIndex; + tle8888_mode_e tle8888mode; + /** + * offset 2417 + */ + uint8_t unusedSomethingWasHere[3]; /** * offset 2420 */ @@ -2508,7 +2648,7 @@ struct engine_configuration_s { /** * offset 2432 */ - float postCrankingTargetClt; + float unused2432; /** * Fuel multiplier taper, see also postCrankingDurationSec * offset 2436 @@ -2957,10 +3097,19 @@ struct engine_configuration_s { */ uint8_t iacPidMultRpmBins[IAC_PID_MULT_SIZE]; /** + * set can_vss X * offset 4140 */ - int mainUnusedEnd[527]; - /** total size 6248*/ + can_vss_nbc_e canVssNbcType; + /** + * offset 4144 + */ + gppwm_channel gppwm[4]; + /** + * offset 4496 + */ + int mainUnusedEnd[376]; + /** total size 6000*/ }; typedef struct engine_configuration_s engine_configuration_s; @@ -2971,6 +3120,26 @@ struct persistent_config_s { * offset 0 */ engine_configuration_s engineConfiguration; + /** + * offset 6000 + */ + error_message_t warning_message; + /** + * offset 6120 + */ + float afterstartCoolantBins[AFTERSTART_HOLD_CURVE_SIZE]; + /** + * offset 6152 + */ + float afterstartHoldTime[AFTERSTART_HOLD_CURVE_SIZE]; + /** + * offset 6184 + */ + float afterstartEnrich[AFTERSTART_ENRICH_CURVE_SIZE]; + /** + * offset 6216 + */ + float afterstartDecayTime[AFTERSTART_DECAY_CURVE_SIZE]; /** * offset 6248 */ @@ -3242,4 +3411,4 @@ typedef struct persistent_config_s persistent_config_s; #endif // end -// this section was generated automatically by rusEfi tool ConfigDefinition.jar based on integration\rusefi_config.txt Fri Mar 20 19:54:54 EDT 2020 +// this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.bat integration\rusefi_config.txt Sun Apr 26 14:16:11 EDT 2020 diff --git a/firmware/controllers/generated/engine_state_generated.h b/firmware/controllers/generated/engine_state_generated.h index 9c6d5554aa..a66a11d285 100644 --- a/firmware/controllers/generated/engine_state_generated.h +++ b/firmware/controllers/generated/engine_state_generated.h @@ -1,4 +1,4 @@ -// this section was generated automatically by rusEfi tool ConfigDefinition.jar based on integration/engine_state.txt Sat Feb 22 15:19:24 EST 2020 +// this section was generated automatically by rusEfi tool ConfigDefinition.jar based on integration/engine_state.txt Fri Apr 10 12:53:32 EDT 2020 // by class com.rusefi.output.CHeaderConsumer // begin #ifndef CONTROLLERS_GENERATED_ENGINE_STATE_GENERATED_H @@ -299,97 +299,97 @@ struct engine_state2_s { bool isCrankingState : 1; /** offset 88 bit 1 */ - bool hasEtbPedalPositionSensor : 1; - /** - offset 88 bit 2 */ bool isAutomaticIdle : 1; /** + offset 88 bit 2 */ + bool unusedBit_13_2 : 1; + /** offset 88 bit 3 */ - bool unusedBit_14_3 : 1; + bool unusedBit_13_3 : 1; /** offset 88 bit 4 */ - bool unusedBit_14_4 : 1; + bool unusedBit_13_4 : 1; /** offset 88 bit 5 */ - bool unusedBit_14_5 : 1; + bool unusedBit_13_5 : 1; /** offset 88 bit 6 */ - bool unusedBit_14_6 : 1; + bool unusedBit_13_6 : 1; /** offset 88 bit 7 */ - bool unusedBit_14_7 : 1; + bool unusedBit_13_7 : 1; /** offset 88 bit 8 */ - bool unusedBit_14_8 : 1; + bool unusedBit_13_8 : 1; /** offset 88 bit 9 */ - bool unusedBit_14_9 : 1; + bool unusedBit_13_9 : 1; /** offset 88 bit 10 */ - bool unusedBit_14_10 : 1; + bool unusedBit_13_10 : 1; /** offset 88 bit 11 */ - bool unusedBit_14_11 : 1; + bool unusedBit_13_11 : 1; /** offset 88 bit 12 */ - bool unusedBit_14_12 : 1; + bool unusedBit_13_12 : 1; /** offset 88 bit 13 */ - bool unusedBit_14_13 : 1; + bool unusedBit_13_13 : 1; /** offset 88 bit 14 */ - bool unusedBit_14_14 : 1; + bool unusedBit_13_14 : 1; /** offset 88 bit 15 */ - bool unusedBit_14_15 : 1; + bool unusedBit_13_15 : 1; /** offset 88 bit 16 */ - bool unusedBit_14_16 : 1; + bool unusedBit_13_16 : 1; /** offset 88 bit 17 */ - bool unusedBit_14_17 : 1; + bool unusedBit_13_17 : 1; /** offset 88 bit 18 */ - bool unusedBit_14_18 : 1; + bool unusedBit_13_18 : 1; /** offset 88 bit 19 */ - bool unusedBit_14_19 : 1; + bool unusedBit_13_19 : 1; /** offset 88 bit 20 */ - bool unusedBit_14_20 : 1; + bool unusedBit_13_20 : 1; /** offset 88 bit 21 */ - bool unusedBit_14_21 : 1; + bool unusedBit_13_21 : 1; /** offset 88 bit 22 */ - bool unusedBit_14_22 : 1; + bool unusedBit_13_22 : 1; /** offset 88 bit 23 */ - bool unusedBit_14_23 : 1; + bool unusedBit_13_23 : 1; /** offset 88 bit 24 */ - bool unusedBit_14_24 : 1; + bool unusedBit_13_24 : 1; /** offset 88 bit 25 */ - bool unusedBit_14_25 : 1; + bool unusedBit_13_25 : 1; /** offset 88 bit 26 */ - bool unusedBit_14_26 : 1; + bool unusedBit_13_26 : 1; /** offset 88 bit 27 */ - bool unusedBit_14_27 : 1; + bool unusedBit_13_27 : 1; /** offset 88 bit 28 */ - bool unusedBit_14_28 : 1; + bool unusedBit_13_28 : 1; /** offset 88 bit 29 */ - bool unusedBit_14_29 : 1; + bool unusedBit_13_29 : 1; /** offset 88 bit 30 */ - bool unusedBit_14_30 : 1; + bool unusedBit_13_30 : 1; /** offset 88 bit 31 */ - bool unusedBit_14_31 : 1; + bool unusedBit_13_31 : 1; /** * offset 92 */ @@ -430,4 +430,4 @@ typedef struct engine_state2_s engine_state2_s; #endif // end -// this section was generated automatically by rusEfi tool ConfigDefinition.jar based on integration/engine_state.txt Sat Feb 22 15:19:24 EST 2020 +// this section was generated automatically by rusEfi tool ConfigDefinition.jar based on integration/engine_state.txt Fri Apr 10 12:53:32 EDT 2020 diff --git a/firmware/controllers/generated/rusefi_generated.h b/firmware/controllers/generated/rusefi_generated.h index a903063fb8..a126f01fe7 100644 --- a/firmware/controllers/generated/rusefi_generated.h +++ b/firmware/controllers/generated/rusefi_generated.h @@ -1,5 +1,5 @@ // -// was generated automatically by rusEfi tool ConfigDefinition.jar based on integration\rusefi_config.txt +// was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.bat integration\rusefi_config.txt // #define absoluteFuelPressure_offset 76 @@ -53,6 +53,17 @@ #define afrTable_offset_hex 48a0 #define afterCrankingIACtaperDuration_offset 2036 #define afterCrankingIACtaperDuration_offset_hex 7f4 +#define AFTERSTART_DECAY_CURVE_SIZE 8 +#define AFTERSTART_ENRICH_CURVE_SIZE 8 +#define AFTERSTART_HOLD_CURVE_SIZE 8 +#define afterstartCoolantBins_offset 6120 +#define afterstartCoolantBins_offset_hex 17e8 +#define afterstartDecayTime_offset 6216 +#define afterstartDecayTime_offset_hex 1848 +#define afterstartEnrich_offset 6184 +#define afterstartEnrich_offset_hex 1828 +#define afterstartHoldTime_offset 6152 +#define afterstartHoldTime_offset_hex 1808 #define alFIn_offset 4024 #define alFIn_offset_hex fb8 #define alignEngineSnifferAtTDC_offset 744 @@ -96,6 +107,10 @@ #define antiLagActivationMode_offset_hex 400 #define antiLagEnabled_offset 76 #define antiLagEnabled_offset_hex 4c +#define antiLagRpmTreshold_offset 824 +#define antiLagRpmTreshold_offset_hex 338 +#define anUnused4Bytes_offset 732 +#define anUnused4Bytes_offset_hex 2dc #define autoTuneCltThreshold_offset 2420 #define autoTuneCltThreshold_offset_hex 974 #define autoTuneTpsQuietPeriod_offset 2428 @@ -186,6 +201,12 @@ #define auxPidPins3_offset_hex 8ae #define auxPidPins4_offset 2223 #define auxPidPins4_offset_hex 8af +#define auxSerialRxPin_offset 2042 +#define auxSerialRxPin_offset_hex 7fa +#define auxSerialSpeed_offset 2096 +#define auxSerialSpeed_offset_hex 830 +#define auxSerialTxPin_offset 2040 +#define auxSerialTxPin_offset_hex 7f8 #define auxTempSensor1_adcChannel_offset 2472 #define auxTempSensor1_adcChannel_offset_hex 9a8 #define auxTempSensor1_alignmentFill_at_29_offset 2473 @@ -257,18 +278,6 @@ #define binarySerialRxPin_offset_hex 717 #define binarySerialTxPin_offset 1814 #define binarySerialTxPin_offset_hex 716 -#define biQuad_a0_offset 2332 -#define biQuad_a0_offset_hex 91c -#define biQuad_a1_offset 2336 -#define biQuad_a1_offset_hex 920 -#define biQuad_a2_offset 2340 -#define biQuad_a2_offset_hex 924 -#define biQuad_b1_offset 2344 -#define biQuad_b1_offset_hex 928 -#define biQuad_b2_offset 2348 -#define biQuad_b2_offset_hex 92c -#define biQuad_offset 2332 -#define biQuad_offset_hex 91c #define BLOCKING_FACTOR 400 #define BOOST_LOAD_COUNT 8 #define BOOST_RPM_COUNT 8 @@ -325,9 +334,7 @@ #define camInputs3_offset_hex 22e #define camInputs4_offset 559 #define camInputs4_offset_hex 22f -#define can_device_mode_e_enum "v0", "v1" -#define canDeviceMode_offset 732 -#define canDeviceMode_offset_hex 2dc +#define CAN_DEFAULT_BASE 0x200 #define canNbcType_offset 480 #define canNbcType_offset_hex 1e0 #define canReadEnabled_offset 1464 @@ -338,6 +345,8 @@ #define canSleepPeriodMs_offset_hex 1e4 #define canTxPin_offset 708 #define canTxPin_offset_hex 2c4 +#define canVssNbcType_offset 4140 +#define canVssNbcType_offset_hex 102c #define canWriteEnabled_offset 1464 #define canWriteEnabled_offset_hex 5b8 #define cdmInputPin_offset 937 @@ -440,6 +449,9 @@ #define coastingFuelCutTps_offset_hex c50 #define communicationLedPin_offset 1812 #define communicationLedPin_offset_hex 714 +#define COMPOSITE_DATA_LENGTH 2500 +#define COMPOSITE_PACKET_COUNT 500 +#define COMPOSITE_PACKET_SIZE 5 #define CONSOLE_DATA_PROTOCOL_TAG " @" #define consoleLoopPeriodMs_offset 716 #define consoleLoopPeriodMs_offset_hex 2cc @@ -484,6 +496,7 @@ #define crankingTpsBins_offset_hex 688 #define crankingTpsCoef_offset 1640 #define crankingTpsCoef_offset_hex 668 +#define CRITICAL_PREFIX "CRITICAL" #define cutFuelOnHardLimit_offset 1464 #define cutFuelOnHardLimit_offset_hex 5b8 #define cutSparkOnHardLimit_offset 1464 @@ -492,15 +505,11 @@ #define cylinderBore_offset_hex 198 #define cylindersCount_offset 400 #define cylindersCount_offset_hex 190 -#define debug_mode_e_enum "Alternator PID", "TPS acceleration enrichment", "INVALID", "Idle Control", "Engine Load accl enrich", "Trigger Counters", "FSIO_ADC", "AUX_PID_1", "VVT input", "Cranking", "Timing", "Closed-loop fuel corr PID", "VSS", "SD card", "sr5", "Knock", "Trigger Sync", "Electronic Throttle", "Executor", "Bench Test / TS commands", "Aux Valves", "Analog inputs #1", "INSTANT_RPM", "FSIO_EXPRESSION", "Status", "CJ125", "CAN", "MAP", "Metrics", "ETB#2", "Ion Sense", "TLE8888", "Analog inputs #2", "Dwell Metric", "Aux Temperature", "ETB Logic", "Boost Control" +#define debug_mode_e_enum "Alternator PID", "TPS acceleration enrichment", "INVALID", "Idle Control", "Engine Load accl enrich", "Trigger Counters", "FSIO_ADC", "AUX_PID_1", "VVT input", "Cranking", "Timing", "Closed-loop fuel corr PID", "VSS", "SD card", "sr5", "Knock", "mode16", "Electronic Throttle", "Executor", "Bench Test / TS commands", "Aux Valves", "Analog inputs #1", "INSTANT_RPM", "FSIO_EXPRESSION", "Status", "CJ125", "CAN", "MAP", "Metrics", "ETB#2", "Ion Sense", "TLE8888", "Analog inputs #2", "Dwell Metric", "INVALID", "ETB Logic", "Boost Control", "Start/Stop", "Launch", "ETB Autotune", "Mode40" #define debugMapAveraging_offset 807 #define debugMapAveraging_offset_hex 327 #define debugMode_offset 2092 #define debugMode_offset_hex 82c -#define debugSetTimer_offset 806 -#define debugSetTimer_offset_hex 326 -#define debugTimerCallback_offset 711 -#define debugTimerCallback_offset_hex 2c7 #define debugTriggerSync_offset 676 #define debugTriggerSync_offset_hex 2a4 #define DIGIPOT_COUNT 4 @@ -514,10 +523,10 @@ #define digitalPotentiometerChipSelect4_offset_hex 29f #define digitalPotentiometerSpiDevice_offset 677 #define digitalPotentiometerSpiDevice_offset_hex 2a5 -#define directSelfStimulation_offset 76 -#define directSelfStimulation_offset_hex 4c #define displacement_offset 396 #define displacement_offset_hex 18c +#define displayLogicLevelsInEngineSniffer_offset 76 +#define displayLogicLevelsInEngineSniffer_offset_hex 4c #define displayMode_offset 492 #define displayMode_offset_hex 1ec #define dizzySparkOutputPin_offset 2226 @@ -533,8 +542,16 @@ #define electronicThrottlePin1Mode_offset_hex 2a0 #define enableAemXSeries_offset 744 #define enableAemXSeries_offset_hex 2e8 +#define enableCanVss_offset 976 +#define enableCanVss_offset_hex 3d0 #define enabledStep1Limiter_offset 744 #define enabledStep1Limiter_offset_hex 2e8 +#define enableInnovateLC2_offset 976 +#define enableInnovateLC2_offset_hex 3d0 +#define enableLaunchBoost_offset 976 +#define enableLaunchBoost_offset_hex 3d0 +#define enableLaunchRetard_offset 976 +#define enableLaunchRetard_offset_hex 3d0 #define enableVerboseCanTx_offset 744 #define enableVerboseCanTx_offset_hex 2e8 #define engine_load_mode_e_enum "MAF", "Alpha-N/TPS", "MAP", "SPEED DENSITY", "MAF Air Charge" @@ -557,6 +574,7 @@ #define engineSnifferRpmThreshold_offset_hex 4 #define engineType_offset 0 #define engineType_offset_hex 0 +#define ERROR_BUFFER_SIZE 120 #define ETB_BIAS_CURVE_LENGTH 8 #define ETB_COUNT 2 #define etb_dFactor_offset 1744 @@ -595,22 +613,22 @@ #define etbIdleThrottleRange_offset_hex fac #define etbIo1_controlPin1_offset 982 #define etbIo1_controlPin1_offset_hex 3d6 -#define etbIo1_controlPinMode_offset 983 -#define etbIo1_controlPinMode_offset_hex 3d7 #define etbIo1_directionPin1_offset 980 #define etbIo1_directionPin1_offset_hex 3d4 #define etbIo1_directionPin2_offset 981 #define etbIo1_directionPin2_offset_hex 3d5 +#define etbIo1_disablePin_offset 983 +#define etbIo1_disablePin_offset_hex 3d7 #define etbIo1_offset 980 #define etbIo1_offset_hex 3d4 #define etbIo2_controlPin1_offset 986 #define etbIo2_controlPin1_offset_hex 3da -#define etbIo2_controlPinMode_offset 987 -#define etbIo2_controlPinMode_offset_hex 3db #define etbIo2_directionPin1_offset 984 #define etbIo2_directionPin1_offset_hex 3d8 #define etbIo2_directionPin2_offset 985 #define etbIo2_directionPin2_offset_hex 3d9 +#define etbIo2_disablePin_offset 987 +#define etbIo2_disablePin_offset_hex 3db #define etbIo2_offset 984 #define etbIo2_offset_hex 3d8 #define etbNeutralPosition_offset 1471 @@ -639,6 +657,10 @@ #define FSIO_COMMAND_COUNT 16 #define FSIO_CURVE_16 16 #define FSIO_CURVE_8 8 +#define FSIO_METHOD_FSIO_ANALOG_INPUT "fsio_analog_input" +#define FSIO_METHOD_FSIO_DIGITAL_INPUT "fsio_digital_input" +#define FSIO_METHOD_FSIO_SETTING "fsio_setting" +#define FSIO_METHOD_FSIO_TABLE "fsio_table" #define fsio_setting10_offset 900 #define fsio_setting10_offset_hex 384 #define fsio_setting11_offset 904 @@ -1024,6 +1046,97 @@ #define gpioPinModes8_offset_hex 303 #define gpioPinModes9_offset 772 #define gpioPinModes9_offset_hex 304 +#define gppwm1_dutyIfError_offset 4145 +#define gppwm1_dutyIfError_offset_hex 1031 +#define gppwm1_loadAxis_offset 4150 +#define gppwm1_loadAxis_offset_hex 1036 +#define gppwm1_loadBins_offset 4152 +#define gppwm1_loadBins_offset_hex 1038 +#define gppwm1_offBelowDuty_offset 4149 +#define gppwm1_offBelowDuty_offset_hex 1035 +#define gppwm1_offset 4144 +#define gppwm1_offset_hex 1030 +#define gppwm1_onAboveDuty_offset 4148 +#define gppwm1_onAboveDuty_offset_hex 1034 +#define gppwm1_pad_offset 4151 +#define gppwm1_pad_offset_hex 1037 +#define gppwm1_pin_offset 4144 +#define gppwm1_pin_offset_hex 1030 +#define gppwm1_pwmFrequency_offset 4146 +#define gppwm1_pwmFrequency_offset_hex 1032 +#define gppwm1_rpmBins_offset 4160 +#define gppwm1_rpmBins_offset_hex 1040 +#define gppwm1_table_offset 4168 +#define gppwm1_table_offset_hex 1048 +#define gppwm2_dutyIfError_offset 4233 +#define gppwm2_dutyIfError_offset_hex 1089 +#define gppwm2_loadAxis_offset 4238 +#define gppwm2_loadAxis_offset_hex 108e +#define gppwm2_loadBins_offset 4240 +#define gppwm2_loadBins_offset_hex 1090 +#define gppwm2_offBelowDuty_offset 4237 +#define gppwm2_offBelowDuty_offset_hex 108d +#define gppwm2_offset 4232 +#define gppwm2_offset_hex 1088 +#define gppwm2_onAboveDuty_offset 4236 +#define gppwm2_onAboveDuty_offset_hex 108c +#define gppwm2_pad_offset 4239 +#define gppwm2_pad_offset_hex 108f +#define gppwm2_pin_offset 4232 +#define gppwm2_pin_offset_hex 1088 +#define gppwm2_pwmFrequency_offset 4234 +#define gppwm2_pwmFrequency_offset_hex 108a +#define gppwm2_rpmBins_offset 4248 +#define gppwm2_rpmBins_offset_hex 1098 +#define gppwm2_table_offset 4256 +#define gppwm2_table_offset_hex 10a0 +#define gppwm3_dutyIfError_offset 4321 +#define gppwm3_dutyIfError_offset_hex 10e1 +#define gppwm3_loadAxis_offset 4326 +#define gppwm3_loadAxis_offset_hex 10e6 +#define gppwm3_loadBins_offset 4328 +#define gppwm3_loadBins_offset_hex 10e8 +#define gppwm3_offBelowDuty_offset 4325 +#define gppwm3_offBelowDuty_offset_hex 10e5 +#define gppwm3_offset 4320 +#define gppwm3_offset_hex 10e0 +#define gppwm3_onAboveDuty_offset 4324 +#define gppwm3_onAboveDuty_offset_hex 10e4 +#define gppwm3_pad_offset 4327 +#define gppwm3_pad_offset_hex 10e7 +#define gppwm3_pin_offset 4320 +#define gppwm3_pin_offset_hex 10e0 +#define gppwm3_pwmFrequency_offset 4322 +#define gppwm3_pwmFrequency_offset_hex 10e2 +#define gppwm3_rpmBins_offset 4336 +#define gppwm3_rpmBins_offset_hex 10f0 +#define gppwm3_table_offset 4344 +#define gppwm3_table_offset_hex 10f8 +#define gppwm4_dutyIfError_offset 4409 +#define gppwm4_dutyIfError_offset_hex 1139 +#define gppwm4_loadAxis_offset 4414 +#define gppwm4_loadAxis_offset_hex 113e +#define gppwm4_loadBins_offset 4416 +#define gppwm4_loadBins_offset_hex 1140 +#define gppwm4_offBelowDuty_offset 4413 +#define gppwm4_offBelowDuty_offset_hex 113d +#define gppwm4_offset 4408 +#define gppwm4_offset_hex 1138 +#define gppwm4_onAboveDuty_offset 4412 +#define gppwm4_onAboveDuty_offset_hex 113c +#define gppwm4_pad_offset 4415 +#define gppwm4_pad_offset_hex 113f +#define gppwm4_pin_offset 4408 +#define gppwm4_pin_offset_hex 1138 +#define gppwm4_pwmFrequency_offset 4410 +#define gppwm4_pwmFrequency_offset_hex 113a +#define gppwm4_rpmBins_offset 4424 +#define gppwm4_rpmBins_offset_hex 1148 +#define gppwm4_table_offset 4432 +#define gppwm4_table_offset_hex 1150 +#define gppwm_channel_e_enum "TPS", "MAP", "CLT", "IAT" +#define GPPWM_LOAD_COUNT 8 +#define GPPWM_RPM_COUNT 8 #define gps_rx_pin_offset 656 #define gps_rx_pin_offset_hex 290 #define gps_tx_pin_offset 657 @@ -1337,6 +1450,8 @@ #define isBoostControlEnabled_offset_hex 5c4 #define isCJ125Enabled_offset 744 #define isCJ125Enabled_offset_hex 2e8 +#define isCJ125Verbose_offset 76 +#define isCJ125Verbose_offset_hex 4c #define isCylinderCleanupEnabled_offset 1476 #define isCylinderCleanupEnabled_offset_hex 5c4 #define isDoubleSolenoidIdle_offset 76 @@ -1361,8 +1476,6 @@ #define isMapAveragingEnabled_offset_hex 5c4 #define isSdCardEnabled_offset 744 #define isSdCardEnabled_offset_hex 2e8 -#define issue_294_25_offset 76 -#define issue_294_25_offset_hex 4c #define issue_294_26_offset 76 #define issue_294_26_offset_hex 4c #define issue_294_27_offset 76 @@ -1375,6 +1488,8 @@ #define issue_294_30_offset_hex 4c #define issue_294_31_offset 76 #define issue_294_31_offset_hex 4c +#define issue_294_unused_offset 76 +#define issue_294_unused_offset_hex 4c #define isTunerStudioEnabled_offset 1476 #define isTunerStudioEnabled_offset_hex 5c4 #define isVerboseAlternator_offset 744 @@ -1415,15 +1530,21 @@ #define knockNoiseRpmBins_offset_hex 73c #define knockVThreshold_offset 1512 #define knockVThreshold_offset_hex 5e8 +#define launchActivateDelay_offset 1060 +#define launchActivateDelay_offset_hex 424 #define launchActivatePin_offset 991 #define launchActivatePin_offset_hex 3df #define launchActivationMode_e_enum "Switch Input", "Clutch Input", "Always Active(Disabled By Speed)","INVALID" #define launchActivationMode_offset 1020 #define launchActivationMode_offset_hex 3fc +#define launchAdvanceRpmRange_offset 1052 +#define launchAdvanceRpmRange_offset_hex 41c #define launchBoostDuty_offset 1044 #define launchBoostDuty_offset_hex 414 #define launchControlEnabled_offset 76 #define launchControlEnabled_offset_hex 4c +#define launchDisableBySpeed_offset 976 +#define launchDisableBySpeed_offset_hex 3d0 #define launchFuelAdded_offset 1040 #define launchFuelAdded_offset_hex 410 #define launchFuelCutEnable_offset 1464 @@ -1442,6 +1563,8 @@ #define launchTimingRetard_offset_hex 140 #define launchTimingRpmRange_offset 1036 #define launchTimingRpmRange_offset_hex 40c +#define launchTpsTreshold_offset 1056 +#define launchTpsTreshold_offset_hex 420 #define lcdThreadPeriodMs_offset 720 #define lcdThreadPeriodMs_offset_hex 2d0 #define LDS_ALTERNATOR_PID_STATE_INDEX 9 @@ -1485,8 +1608,8 @@ #define mainRelayPin_offset_hex 2c2 #define mainRelayPinMode_offset 752 #define mainRelayPinMode_offset_hex 2f0 -#define mainUnusedEnd_offset 4140 -#define mainUnusedEnd_offset_hex 102c +#define mainUnusedEnd_offset 4496 +#define mainUnusedEnd_offset_hex 1190 #define malfunctionIndicatorPin_offset 660 #define malfunctionIndicatorPin_offset_hex 294 #define malfunctionIndicatorPinMode_offset 661 @@ -1563,6 +1686,8 @@ #define mc33816_cs_offset_hex c23 #define mc33816_driven_offset 2607 #define mc33816_driven_offset_hex a2f +#define mc33816_flag0_offset 1774 +#define mc33816_flag0_offset_hex 6ee #define mc33816_rstb_offset 2606 #define mc33816_rstb_offset_hex a2e #define mc33816spiDevice_offset 4001 @@ -1573,6 +1698,8 @@ #define mc33972_csPinMode_offset_hex 2a7 #define mc33972spiDevice_offset 4008 #define mc33972spiDevice_offset_hex fa8 +#define mc33_hvolt_offset 760 +#define mc33_hvolt_offset_hex 2f8 #define measureMapOnlyInOneCylinder_offset 744 #define measureMapOnlyInOneCylinder_offset_hex 2e8 #define MOCK_AFR_COMMAND "mock_afr_voltage" @@ -1582,7 +1709,6 @@ #define MOCK_MAP_COMMAND "mock_map_voltage" #define MOCK_PPS_POSITION_COMMAND "mock_pps_position" #define MOCK_PPS_VOLTAGE_COMMAND "mock_pps_voltage" -#define MOCK_TPS_COMMAND "mock_tps_voltage" #define multisparkDwell_offset 1786 #define multisparkDwell_offset_hex 6fa #define multisparkEnable_offset 976 @@ -1600,8 +1726,6 @@ #define narrowToWideOxygen_offset_hex 8f8 #define narrowToWideOxygenBins_offset 2264 #define narrowToWideOxygenBins_offset_hex 8d8 -#define nbVvtIndex_offset 2416 -#define nbVvtIndex_offset_hex 970 #define noAccelAfterHardLimitPeriodSecs_offset 1536 #define noAccelAfterHardLimitPeriodSecs_offset_hex 600 #define o2heaterPin_offset 742 @@ -1629,6 +1753,7 @@ #define overrideCrankingIacSetting_offset_hex 5c4 #define overrideCrankingIgnition_offset 516 #define overrideCrankingIgnition_offset_hex 204 +#define PACK_ADD_TEMPERATURE 40 #define PACK_MULT_AFR 1000 #define PACK_MULT_ANGLE 50 #define PACK_MULT_MS 300 @@ -1653,8 +1778,6 @@ #define postCrankingDurationSec_offset_hex 988 #define postCrankingFactor_offset 2436 #define postCrankingFactor_offset_hex 984 -#define postCrankingTargetClt_offset 2432 -#define postCrankingTargetClt_offset_hex 980 #define primeInjFalloffTemperature_offset 1486 #define primeInjFalloffTemperature_offset_hex 5ce #define primingSquirtDurationMs_offset 96 @@ -1720,6 +1843,8 @@ #define servoOutputPins7_offset_hex c4a #define servoOutputPins8_offset 3147 #define servoOutputPins8_offset_hex c4b +#define showHumanReadableWarning_offset 976 +#define showHumanReadableWarning_offset_hex 3d0 #define showSdCardWarning_offset 76 #define showSdCardWarning_offset_hex 4c #define silentTriggerError_offset 1464 @@ -1768,6 +1893,8 @@ #define spi3SckMode_offset_hex a2a #define spi3sckPin_offset 936 #define spi3sckPin_offset_hex 3a8 +#define startCrankingDuration_offset 826 +#define startCrankingDuration_offset_hex 33a #define starterControlPin_offset 1772 #define starterControlPin_offset_hex 6ec #define starterRelayDisableMode_offset 809 @@ -1792,6 +1919,57 @@ #define stepperForceParkingEveryRestart_offset_hex 2e8 #define stepperParkingExtraSteps_offset 818 #define stepperParkingExtraSteps_offset_hex 332 +#define STFT_CELL_COUNT 4 +#define stft_cellCfgs1_maxAdd_offset 1072 +#define stft_cellCfgs1_maxAdd_offset_hex 430 +#define stft_cellCfgs1_maxRemove_offset 1073 +#define stft_cellCfgs1_maxRemove_offset_hex 431 +#define stft_cellCfgs1_offset 1072 +#define stft_cellCfgs1_offset_hex 430 +#define stft_cellCfgs1_timeConstant_offset 1074 +#define stft_cellCfgs1_timeConstant_offset_hex 432 +#define stft_cellCfgs2_maxAdd_offset 1076 +#define stft_cellCfgs2_maxAdd_offset_hex 434 +#define stft_cellCfgs2_maxRemove_offset 1077 +#define stft_cellCfgs2_maxRemove_offset_hex 435 +#define stft_cellCfgs2_offset 1076 +#define stft_cellCfgs2_offset_hex 434 +#define stft_cellCfgs2_timeConstant_offset 1078 +#define stft_cellCfgs2_timeConstant_offset_hex 436 +#define stft_cellCfgs3_maxAdd_offset 1080 +#define stft_cellCfgs3_maxAdd_offset_hex 438 +#define stft_cellCfgs3_maxRemove_offset 1081 +#define stft_cellCfgs3_maxRemove_offset_hex 439 +#define stft_cellCfgs3_offset 1080 +#define stft_cellCfgs3_offset_hex 438 +#define stft_cellCfgs3_timeConstant_offset 1082 +#define stft_cellCfgs3_timeConstant_offset_hex 43a +#define stft_cellCfgs4_maxAdd_offset 1084 +#define stft_cellCfgs4_maxAdd_offset_hex 43c +#define stft_cellCfgs4_maxRemove_offset 1085 +#define stft_cellCfgs4_maxRemove_offset_hex 43d +#define stft_cellCfgs4_offset 1084 +#define stft_cellCfgs4_offset_hex 43c +#define stft_cellCfgs4_timeConstant_offset 1086 +#define stft_cellCfgs4_timeConstant_offset_hex 43e +#define stft_deadband_offset 1067 +#define stft_deadband_offset_hex 42b +#define stft_maxAfr_offset 1070 +#define stft_maxAfr_offset_hex 42e +#define stft_maxIdleRegionRpm_offset 1064 +#define stft_maxIdleRegionRpm_offset_hex 428 +#define stft_maxOverrunLoad_offset 1065 +#define stft_maxOverrunLoad_offset_hex 429 +#define stft_minAfr_offset 1069 +#define stft_minAfr_offset_hex 42d +#define stft_minClt_offset 1068 +#define stft_minClt_offset_hex 42c +#define stft_minPowerLoad_offset 1066 +#define stft_minPowerLoad_offset_hex 42a +#define stft_offset 1064 +#define stft_offset_hex 428 +#define stft_startupDelay_offset 1071 +#define stft_startupDelay_offset_hex 42f #define storageMode_offset 2260 #define storageMode_offset_hex 8d4 #define switch_input_pin_e_enum "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" @@ -1884,12 +2062,17 @@ #define tle8888_cs_offset_hex c21 #define tle8888_csPinMode_offset 3106 #define tle8888_csPinMode_offset_hex c22 +#define tle8888mode_offset 2416 +#define tle8888mode_offset_hex 970 #define tle8888spiDevice_offset 4000 #define tle8888spiDevice_offset_hex fa0 #define todoClutchDownPinInverted_offset 976 #define todoClutchDownPinInverted_offset_hex 3d0 #define todoClutchUpPinInverted_offset 976 #define todoClutchUpPinInverted_offset_hex 3d0 +#define TOOTH_DATA_LENGTH 2000 +#define TOOTH_PACKET_COUNT 1000 +#define TOOTH_PACKET_SIZE 2 #define TOP_DEAD_CENTER_MESSAGE "r" #define TOTAL_CONFIG_SIZE 20000 #define TOTAL_CONFIG_SIZE_hex 4e20 @@ -1941,7 +2124,13 @@ #define trigger_offset 524 #define trigger_offset_hex 20c #define TRIGGER_SIMULATOR_PIN_COUNT 3 -#define trigger_type_e_enum "custom toothed wheel", "Ford Aspire", "Dodge Neon 1995", "Miata NA", "Miata NB", "GM_7X", "Cooper R50", "Mazda SOHC 4", "60/2", "36/1", "Honda 4+24+1", "Mitsubishi", "Honda 4+24", "Honda 1+4+24", "Dodge Neon 2003", "Mazda DOHC 1+4", "1+1", "1+60/2", "Single Tooth", "Dodge Ram 1+16", "60/2 VW", "Honda 1+24", "Dodge Stratus", "36_2_2_2", "Nissan Primera", "2JZ", "Rover K", "GM LS 24", "Honda CBR 600", "2JZ_1_12", "Honda CBR 600 custom", "3/1 skipped" , "Dodge Neon 2003 crank", "Miata VVT", "trg34", "trg35", "Subaru 7+6", "Jeep 18-2-2-2", "WIP", "Dodge Neon 1995 crank only", "Jeep XJ 4 cyl", "FiatIAQ_P8", "Mazda Z5", "trg43", "trg44", "trg45", "INVALID" +#define trigger_todoRemoveMeOneDay0_offset 528 +#define trigger_todoRemoveMeOneDay0_offset_hex 210 +#define trigger_todoRemoveMeOneDay1_offset 528 +#define trigger_todoRemoveMeOneDay1_offset_hex 210 +#define TRIGGER_TYPE_36_1 9 +#define TRIGGER_TYPE_60_2 8 +#define trigger_type_e_enum "custom toothed wheel", "Ford Aspire", "Dodge Neon 1995", "Miata NA", "Miata NB", "GM_7X", "Cooper R50", "Mazda SOHC 4", "60/2", "36/1", "Honda 4+24+1", "Mitsubishi", "Honda 4+24", "Honda 1+4+24", "Dodge Neon 2003", "Mazda DOHC 1+4", "1+1", "1+60/2", "Single Tooth", "Dodge Ram 1+16", "60/2 VW", "Honda 1+24", "Dodge Stratus", "36_2_2_2", "Nissan Primera", "2JZ", "Rover K", "GM LS 24", "Honda CBR 600", "2JZ_1_12", "Honda CBR 600 custom", "3/1 skipped" , "Dodge Neon 2003 crank", "Miata VVT", "trg34", "trg35", "Subaru 7+6", "Jeep 18-2-2-2", "WIP", "Dodge Neon 1995 crank only", "Jeep XJ 4 cyl", "FiatIAQ_P8", "Mazda Z5", "trg43", "Renix 44-2-2", "Renix 66-2-2-2", "Honda K 12+1", "trg47", "trg48", "INVALID" #define trigger_type_offset 524 #define trigger_type_offset_hex 20c #define trigger_unusedBit_4_10_offset 528 @@ -2002,10 +2191,6 @@ #define trigger_unusedBit_4_8_offset_hex 210 #define trigger_unusedBit_4_9_offset 528 #define trigger_unusedBit_4_9_offset_hex 210 -#define trigger_unusedTriggerBit0_offset 528 -#define trigger_unusedTriggerBit0_offset_hex 210 -#define trigger_unusedTriggerBit1_offset 528 -#define trigger_unusedTriggerBit1_offset_hex 210 #define trigger_useOnlyFirstChannel_offset 528 #define trigger_useOnlyFirstChannel_offset_hex 210 #define triggerCompCenterVolt_offset 4036 @@ -2041,8 +2226,10 @@ #define triggerSimulatorPins3_offset 738 #define triggerSimulatorPins3_offset_hex 2e2 #define TS_FILE_VERSION 20200310 -#define TS_OUTPUT_SIZE 240 +#define TS_OUTPUT_SIZE 244 #define ts_show_analog_divider true +#define ts_show_auxserial_pins true +#define ts_show_can_pins true #define ts_show_cj125 true #define ts_show_egt true #define ts_show_etb true @@ -2052,8 +2239,11 @@ #define ts_show_hip9011 true #define ts_show_joystick true #define ts_show_lcd true +#define ts_show_sd_card true #define ts_show_spi true -#define TS_SIGNATURE "rusEFI v1.2020.3" +#define ts_show_trigger_comparator false +#define ts_show_tunerstudio_port true +#define TS_SIGNATURE "rusEFI v1.2020.4" #define tunerStudioSerialSpeed_offset 728 #define tunerStudioSerialSpeed_offset_hex 2d8 #define twoWireBatchIgnition_offset 1476 @@ -2062,12 +2252,16 @@ #define twoWireBatchInjection_offset_hex 5c4 #define uartConsoleSerialSpeed_offset 2076 #define uartConsoleSerialSpeed_offset_hex 81c -#define unrealisticRpmThreashold_offset 760 -#define unrealisticRpmThreashold_offset_hex 2f8 #define unused1059_offset 3964 #define unused1059_offset_hex f7c -#define unused1234234_offset 2042 -#define unused1234234_offset_hex 7fa +#define unused2432_offset 2432 +#define unused2432_offset_hex 980 +#define unused711_offset 711 +#define unused711_offset_hex 2c7 +#define unused76b0_offset 76 +#define unused76b0_offset_hex 4c +#define unused806_offset 806 +#define unused806_offset_hex 326 #define unused_1484_bit_24_offset 1476 #define unused_1484_bit_24_offset_hex 5c4 #define unused_1484_bit_25_offset 1476 @@ -2084,10 +2278,12 @@ #define unused_1484_bit_30_offset_hex 5c4 #define unused_1484_bit_31_offset 1476 #define unused_1484_bit_31_offset_hex 5c4 -#define unused_former_warmup_target_afr_offset 2096 -#define unused_former_warmup_target_afr_offset_hex 830 -#define unusedAtOldBoardConfigurationEnd_offset 1052 -#define unusedAtOldBoardConfigurationEnd_offset_hex 41c +#define unused_former_warmup_target_afr_offset 2100 +#define unused_former_warmup_target_afr_offset_hex 834 +#define unusedAntilagTimeout_offset 820 +#define unusedAntilagTimeout_offset_hex 334 +#define unusedAtOldBoardConfigurationEnd_offset 1088 +#define unusedAtOldBoardConfigurationEnd_offset_hex 440 #define unusedBit4_1476_offset 1476 #define unusedBit4_1476_offset_hex 5c4 #define unusedBit_251_10_offset 976 @@ -2130,34 +2326,20 @@ #define unusedBit_251_28_offset_hex 3d0 #define unusedBit_251_29_offset 976 #define unusedBit_251_29_offset_hex 3d0 -#define unusedBit_251_4_offset 976 -#define unusedBit_251_4_offset_hex 3d0 -#define unusedBit_251_5_offset 976 -#define unusedBit_251_5_offset_hex 3d0 -#define unusedBit_251_6_offset 976 -#define unusedBit_251_6_offset_hex 3d0 -#define unusedBit_251_7_offset 976 -#define unusedBit_251_7_offset_hex 3d0 -#define unusedBit_251_8_offset 976 -#define unusedBit_251_8_offset_hex 3d0 -#define unusedBit_251_9_offset 976 -#define unusedBit_251_9_offset_hex 3d0 -#define unusedBit_280_30_offset 976 -#define unusedBit_280_30_offset_hex 3d0 -#define unusedBit_280_31_offset 976 -#define unusedBit_280_31_offset_hex 3d0 +#define unusedBit_282_30_offset 976 +#define unusedBit_282_30_offset_hex 3d0 +#define unusedBit_282_31_offset 976 +#define unusedBit_282_31_offset_hex 3d0 #define unusedBit_34_31_offset 76 #define unusedBit_34_31_offset_hex 4c -#define unusedErrorPin_offset 2040 -#define unusedErrorPin_offset_hex 7f8 #define unusedFlexFuelSensor_offset 3100 #define unusedFlexFuelSensor_offset_hex c1c -#define unusedFormerWarmupAfrPid_offset 1774 -#define unusedFormerWarmupAfrPid_offset_hex 6ee -#define unusedmiataNb2VVTRatioFrom_offset 820 -#define unusedmiataNb2VVTRatioFrom_offset_hex 334 -#define unusedmiataNb2VVTRatioTo_offset 824 -#define unusedmiataNb2VVTRatioTo_offset_hex 338 +#define unusedHere_offset 761 +#define unusedHere_offset_hex 2f9 +#define unusedOldBiquad_offset 2332 +#define unusedOldBiquad_offset_hex 91c +#define unusedSomethingWasHere_offset 2417 +#define unusedSomethingWasHere_offset_hex 971 #define unusedSpiPadding4_offset 2593 #define unusedSpiPadding4_offset_hex a21 #define unusedSpiPadding5_offset 2713 @@ -2172,8 +2354,6 @@ #define unusuedvref_offset_hex fb0 #define useAdvanceCorrectionsForCranking_offset 1476 #define useAdvanceCorrectionsForCranking_offset_hex 5c4 -#define useBiQuadAnalogFiltering_offset 76 -#define useBiQuadAnalogFiltering_offset_hex 4c #define useConstantDwellDuringCranking_offset 1464 #define useConstantDwellDuringCranking_offset_hex 5b8 #define useETBforIdleControl_offset 744 @@ -2238,8 +2418,6 @@ #define useStepperIdle_offset_hex 2e8 #define useTLE8888_cranking_hack_offset 76 #define useTLE8888_cranking_hack_offset_hex 4c -#define useTLE8888_hall_mode_offset 76 -#define useTLE8888_hall_mode_offset_hex 4c #define useTpicAdvancedMode_offset 744 #define useTpicAdvancedMode_offset_hex 2e8 #define useTPSAdvanceTable_offset 1476 @@ -2279,6 +2457,8 @@ #define vvtMode_offset_hex 918 #define vvtOffset_offset 2052 #define vvtOffset_offset_hex 804 +#define warning_message_offset 6000 +#define warning_message_offset_hex 1770 #define warningLedPin_offset 2041 #define warningLedPin_offset_hex 7f9 #define warningPeriod_offset 1498 diff --git a/firmware/controllers/generated/trigger_central_generated.h b/firmware/controllers/generated/trigger_central_generated.h index b8a35d41fc..d8168698d3 100644 --- a/firmware/controllers/generated/trigger_central_generated.h +++ b/firmware/controllers/generated/trigger_central_generated.h @@ -1,4 +1,4 @@ -// this section was generated automatically by rusEfi tool ConfigDefinition.jar based on integration/trigger_central.txt Sat Feb 22 15:19:25 EST 2020 +// this section was generated automatically by rusEfi tool ConfigDefinition.jar based on integration/trigger_central.txt Fri Apr 10 12:53:33 EDT 2020 // by class com.rusefi.output.CHeaderConsumer // begin #ifndef CONTROLLERS_GENERATED_TRIGGER_CENTRAL_GENERATED_H @@ -9,6 +9,7 @@ struct trigger_central_s { trigger_central_s(); /** + * Counter of hardware events since ECU start * offset 0 */ int hwEventCounters[HW_EVENT_TYPES]; @@ -31,4 +32,4 @@ typedef struct trigger_central_s trigger_central_s; #endif // end -// this section was generated automatically by rusEfi tool ConfigDefinition.jar based on integration/trigger_central.txt Sat Feb 22 15:19:25 EST 2020 +// this section was generated automatically by rusEfi tool ConfigDefinition.jar based on integration/trigger_central.txt Fri Apr 10 12:53:33 EDT 2020 diff --git a/firmware/controllers/global_shared.h b/firmware/controllers/global_shared.h index d0bb855ee4..6f89a3f740 100644 --- a/firmware/controllers/global_shared.h +++ b/firmware/controllers/global_shared.h @@ -64,6 +64,9 @@ EXTERN_CONFIG \ extern EnginePins enginePins \ +// See also DECLARE_ENGINE_PTR +// See also INJECT_ENGINE_REFERENCE + // Use this macro to declare a function which only takes magic references #define DECLARE_ENGINE_PARAMETER_SIGNATURE void diff --git a/firmware/controllers/math/engine_math.cpp b/firmware/controllers/math/engine_math.cpp index 1f7a9e3c5d..74a431f87d 100644 --- a/firmware/controllers/math/engine_math.cpp +++ b/firmware/controllers/math/engine_math.cpp @@ -24,14 +24,14 @@ #include "engine_configuration.h" #include "interpolation.h" #include "allsensors.h" +#include "sensor.h" #include "event_registry.h" #include "efi_gpio.h" #include "fuel_math.h" #include "advance_map.h" #include "config_engine_specs.h" -EXTERN_ENGINE -; +EXTERN_ENGINE; #if EFI_UNIT_TEST extern bool verboseMode; #endif /* EFI_UNIT_TEST */ @@ -70,7 +70,7 @@ float getEngineLoadT(DECLARE_ENGINE_PARAMETER_SIGNATURE) { case LM_MAP: return getMap(PASS_ENGINE_PARAMETER_SIGNATURE); case LM_ALPHA_N: - return getTPS(PASS_ENGINE_PARAMETER_SIGNATURE); + return Sensor::get(SensorType::Tps1).value_or(0); case LM_REAL_MAF: { return getRealMaf(PASS_ENGINE_PARAMETER_SIGNATURE); } diff --git a/firmware/controllers/math/speed_density.cpp b/firmware/controllers/math/speed_density.cpp index 4ad47b95e2..cb9eaae845 100644 --- a/firmware/controllers/math/speed_density.cpp +++ b/firmware/controllers/math/speed_density.cpp @@ -16,6 +16,7 @@ #include "maf2map.h" #include "config_engine_specs.h" #include "perf_trace.h" +#include "sensor.h" #if defined(HAS_OS_ACCESS) #error "Unexpected OS ACCESS HERE" @@ -35,12 +36,28 @@ baroCorr_Map3D_t baroCorrMap("baro"); #define tpMax 100 // http://rusefi.com/math/t_charge.html /***panel:Charge Temperature*/ -temperature_t getTCharge(int rpm, float tps, float coolantTemp, float airTemp DECLARE_ENGINE_PARAMETER_SUFFIX) { - if (cisnan(coolantTemp) || cisnan(airTemp)) { - warning(CUSTOM_ERR_NAN_TCHARGE, "t-getTCharge NaN"); - return coolantTemp; +temperature_t getTCharge(int rpm, float tps DECLARE_ENGINE_PARAMETER_SUFFIX) { + const auto clt = Sensor::get(SensorType::Clt); + const auto iat = Sensor::get(SensorType::Iat); + + float airTemp = 0; + + // Without either valid, return 0C. It's wrong, but it'll pretend to be nice and dense, so at least you won't go lean. + if (!iat && !clt) { + return 0; + } else if (!clt && iat) { + // Intake temperature will almost always be colder (richer) than CLT - use that + return airTemp; + } else if (!iat && clt) { + // Without valid intake temperature, assume intake temp is 0C, and interpolate anyway + airTemp = 0; + } else { + // All is well - use real air temp + airTemp = iat.Value; } + float coolantTemp = clt.Value; + DISPLAY_STATE(Engine) if ((engine->engineState.sd.DISPLAY_IF(isTChargeAirModel) = (CONFIG(tChargeMode) == TCHARGE_MODE_AIR_INTERP))) { diff --git a/firmware/controllers/math/speed_density.h b/firmware/controllers/math/speed_density.h index 67b9ebb0ef..8d581aa2b5 100644 --- a/firmware/controllers/math/speed_density.h +++ b/firmware/controllers/math/speed_density.h @@ -10,7 +10,7 @@ #define gramm_second_to_cc_minute(gs) ((gs) / 0.0119997981) #define cc_minute_to_gramm_second(ccm) ((ccm) * 0.0119997981) -temperature_t getTCharge(int rpm, float tps, float coolantTemperature, float airTemperature DECLARE_ENGINE_PARAMETER_SUFFIX); +temperature_t getTCharge(int rpm, float tps DECLARE_ENGINE_PARAMETER_SUFFIX); float getCylinderAirMass(float volumetricEfficiency, float MAP, float tempK DECLARE_ENGINE_PARAMETER_SUFFIX); float sdMath(float airMass, float AFR DECLARE_ENGINE_PARAMETER_SUFFIX); diff --git a/firmware/controllers/sensors/can_sensor.h b/firmware/controllers/sensors/can_sensor.h new file mode 100644 index 0000000000..32395ef95c --- /dev/null +++ b/firmware/controllers/sensors/can_sensor.h @@ -0,0 +1,67 @@ +/** + * @file can_sensor.h + * + * @date March 31, 2020 + * @author Matthew Kennedy, (c) 2020 + */ + +#pragma once + +#include "stored_value_sensor.h" +#include "scaled_channel.h" +#include "hal.h" + +class CanSensorBase : public StoredValueSensor { +public: + CanSensorBase(uint32_t eid, SensorType type, efitick_t timeout) + : StoredValueSensor(type, timeout) + , m_eid(eid) + { + } + + void showInfo(Logging* logger, const char* sensorName) const override; + + CanSensorBase* processFrame(const CANRxFrame& frame, efitick_t nowNt) { + if (frame.EID == m_eid) { + decodeFrame(frame, nowNt); + } + + return m_next; + } + + void setNext(CanSensorBase* next) { + m_next = next; + } + +protected: + virtual void decodeFrame(const CANRxFrame& frame, efitick_t nowNt) = 0; + +private: + CanSensorBase* m_next = nullptr; + const uint32_t m_eid; +}; + +template +class CanSensor : public CanSensorBase { +public: + CanSensor(uint32_t eid, uint8_t offset, SensorType type, efitick_t timeout) + : CanSensorBase(eid, type, timeout) + , m_offset(offset) + { + } + + void decodeFrame(const CANRxFrame& frame, efitick_t nowNt) override { + // Compute the location of our data within the frame + const uint8_t* dataLocation = &frame.data8[m_offset]; + + // Reinterpret as a scaled_channel - it already has the logic for decoding a scaled integer to a float + const auto scaler = reinterpret_cast*>(dataLocation); + + // Actually do the conversion + float value = *scaler; + setValidValue(value, nowNt); + } + +private: + const uint8_t m_offset; +}; diff --git a/firmware/controllers/sensors/converters/func_chain.h b/firmware/controllers/sensors/converters/func_chain.h index f28aa371ca..164d5bd349 100644 --- a/firmware/controllers/sensors/converters/func_chain.h +++ b/firmware/controllers/sensors/converters/func_chain.h @@ -22,7 +22,13 @@ class FuncChain<> { protected: SensorResult convert(float input) const { // Base case is the identity function - return {true, input}; + return input; + } + + void showInfo(Logging* logger, float testInputValue) const { + // base case does nothing + (void)logger; + (void)testInputValue; } }; @@ -42,7 +48,7 @@ public: if (currentStep.Valid) { return TBase::convert(currentStep.Value); } else { - return {false, 0}; + return unexpected; } } @@ -58,6 +64,17 @@ public: return TBase::template get(); } + void showInfo(Logging* logger, float testInputValue) const { + // Print info about this level + m_f.showInfo(logger, testInputValue); + + // If valid, recurse down + auto res = m_f.convert(testInputValue); + if (res.Valid) { + TBase::showInfo(logger, res.Value); + } + } + private: TFirst m_f; }; @@ -77,6 +94,10 @@ public: return m_fs.template get(); } + void showInfo(Logging* logger, float testInputValue) const override { + m_fs.showInfo(logger, testInputValue); + } + private: priv::FuncChain m_fs; }; diff --git a/firmware/controllers/sensors/converters/linear_func.cpp b/firmware/controllers/sensors/converters/linear_func.cpp index 8664805642..f54531a6f3 100644 --- a/firmware/controllers/sensors/converters/linear_func.cpp +++ b/firmware/controllers/sensors/converters/linear_func.cpp @@ -6,6 +6,9 @@ void LinearFunc::configure(float in1, float out1, float in2, float out2, float m m_minOutput = minOutput; m_maxOutput = maxOutput; + in1 = in1 / m_divideInput; + in2 = in2 / m_divideInput; + m_a = INTERPOLATION_A(in1, out1, in2, out2); m_b = out1 - m_a * in1; } @@ -16,5 +19,15 @@ SensorResult LinearFunc::convert(float inputValue) const { // Bounds check bool isValid = result <= m_maxOutput && result >= m_minOutput; - return {isValid, result}; + if (!isValid) { + return unexpected; + } + + return result; +} + +void LinearFunc::showInfo(Logging* logger, float testRawValue) const { + scheduleMsg(logger, " Linear function slope: %.2f offset: %.2f min: %.1f max: %.1f", m_a, m_b, m_minOutput, m_maxOutput); + const auto [valid, value] = convert(testRawValue); + scheduleMsg(logger, " raw value %.2f converts to %.2f valid: %d", testRawValue, value, valid); } diff --git a/firmware/controllers/sensors/converters/linear_func.h b/firmware/controllers/sensors/converters/linear_func.h index 3cb3a44161..15c1cfc529 100644 --- a/firmware/controllers/sensors/converters/linear_func.h +++ b/firmware/controllers/sensors/converters/linear_func.h @@ -4,12 +4,14 @@ class LinearFunc final : public SensorConverter { public: - LinearFunc() = default; + LinearFunc(float divideInput = 1.0f) : m_divideInput(divideInput) {} void configure(float in1, float out1, float in2, float out2, float minOutput, float maxOutput); SensorResult convert(float inputValue) const override; + void showInfo(Logging* logger, float testRawValue) const override; + private: // Linear equation parameters for equation of form // y = ax + b @@ -18,4 +20,7 @@ private: float m_minOutput = 0; float m_maxOutput = 0; + + // Divisor for the input values - some configurations use a ratio'd value for compat + const float m_divideInput; }; diff --git a/firmware/controllers/sensors/converters/resistance_func.cpp b/firmware/controllers/sensors/converters/resistance_func.cpp index 8f39c71c3f..6553258be3 100644 --- a/firmware/controllers/sensors/converters/resistance_func.cpp +++ b/firmware/controllers/sensors/converters/resistance_func.cpp @@ -3,6 +3,7 @@ */ #include "resistance_func.h" +#include "loggingcentral.h" void ResistanceFunc::configure(float supplyVoltage, float pullupResistor) { m_pullupResistor = pullupResistor; @@ -12,16 +13,21 @@ void ResistanceFunc::configure(float supplyVoltage, float pullupResistor) { SensorResult ResistanceFunc::convert(float raw) const { // If the voltage is very low, the sensor is a dead short. if (raw < 0.05f) { - return {false, 0.0f}; + return unexpected; } - // If the voltage is very high (95% VCC), the sensor is open circuit. - if (raw > (m_supplyVoltage * 0.95f)) { - return {false, 1e6}; + // If the voltage is very high (98% VCC), the sensor is open circuit. + if (raw > (m_supplyVoltage * 0.98f)) { + return unexpected; } // Voltage is in a sensible range - convert float resistance = m_pullupResistor / (m_supplyVoltage / raw - 1); - return {true, resistance}; + return resistance; +} + +void ResistanceFunc::showInfo(Logging* logger, float testInputValue) const { + const auto result = convert(testInputValue); + scheduleMsg(logger, " %.2f volts -> %.1f ohms with supply voltage %.2f and pullup %.1f.", testInputValue, result.Value, m_supplyVoltage, m_pullupResistor); } diff --git a/firmware/controllers/sensors/converters/resistance_func.h b/firmware/controllers/sensors/converters/resistance_func.h index 8f12577135..4afef36994 100644 --- a/firmware/controllers/sensors/converters/resistance_func.h +++ b/firmware/controllers/sensors/converters/resistance_func.h @@ -16,6 +16,8 @@ public: SensorResult convert(float inputValue) const override; + void showInfo(Logging* logger, float testInputValue) const override; + private: float m_supplyVoltage = 5.0f; float m_pullupResistor = 1000.0f; diff --git a/firmware/controllers/sensors/converters/sensor_converter_func.h b/firmware/controllers/sensors/converters/sensor_converter_func.h index ee13adb9aa..b2f25f9b7b 100644 --- a/firmware/controllers/sensors/converters/sensor_converter_func.h +++ b/firmware/controllers/sensors/converters/sensor_converter_func.h @@ -2,6 +2,18 @@ #include "sensor.h" +class Logging; + struct SensorConverter { + // Trying to copy a converter func by value is almost guaranteed to be a bug - disallow it + SensorConverter(const SensorConverter&) = delete; + // ...but doing so requires explicitly declaring the default constructor, so do that too. + SensorConverter() = default; + virtual SensorResult convert(float raw) const = 0; + virtual void showInfo(Logging* logger, float testRawValue) const { + // Unused base - nothing to print + (void)logger; + (void)testRawValue; + } }; diff --git a/firmware/controllers/sensors/converters/thermistor_func.cpp b/firmware/controllers/sensors/converters/thermistor_func.cpp index 8253d50da9..362d3ff5a5 100644 --- a/firmware/controllers/sensors/converters/thermistor_func.cpp +++ b/firmware/controllers/sensors/converters/thermistor_func.cpp @@ -6,13 +6,14 @@ #include "thermistors.h" +#include "loggingcentral.h" #include SensorResult ThermistorFunc::convert(float ohms) const { // This resistance should have already been validated - only // thing we can check is that it's non-negative if (ohms <= 0) { - return {false, 0}; + return unexpected; } float lnR = logf(ohms); @@ -25,7 +26,7 @@ SensorResult ThermistorFunc::convert(float ohms) const { float celsius = convertKelvinToCelcius(kelvin); - return {true, celsius}; + return celsius; } void ThermistorFunc::configure(thermistor_conf_s &cfg) { @@ -45,3 +46,8 @@ void ThermistorFunc::configure(thermistor_conf_s &cfg) { m_b = u2 - m_c * (l1 * l1 + l1 * l2 + l2 * l2); m_a = y1 - (m_b + l1 * l1 * m_c) * l1; } + +void ThermistorFunc::showInfo(Logging* logger, float testInputValue) const { + const auto [valid, value] = convert(testInputValue); + scheduleMsg(logger, " %.1f ohms -> valid: %d. %.1f deg C", testInputValue, valid, value); +} diff --git a/firmware/controllers/sensors/converters/thermistor_func.h b/firmware/controllers/sensors/converters/thermistor_func.h index ea9f2e715e..98627b4e32 100644 --- a/firmware/controllers/sensors/converters/thermistor_func.h +++ b/firmware/controllers/sensors/converters/thermistor_func.h @@ -2,7 +2,7 @@ * @author Matthew Kennedy, (c) 2019 * * A function to convert resistance to thermistor temperature (NTC). Uses the - * Steinhart-Hart equation to prevent having to compute many logarithms at runtime. + * Steinhart-Hart equation to avoid having to compute many logarithms at runtime. */ #pragma once @@ -16,6 +16,8 @@ public: void configure(thermistor_conf_s &cfg); + void showInfo(Logging* logger, float testRawValue) const override; + private: // Steinhart-Hart coefficients float m_a; diff --git a/firmware/controllers/sensors/ego.cpp b/firmware/controllers/sensors/ego.cpp index 7d7a282591..7fdfffa110 100644 --- a/firmware/controllers/sensors/ego.cpp +++ b/firmware/controllers/sensors/ego.cpp @@ -43,9 +43,10 @@ static const float maxAfrDeviation = 5.0f; // 9.7..19.7 static const int minAvgSize = (EGO_AVG_BUF_SIZE / 2); // ~0.6 sec for 20ms period of 'fast' callback, and it matches a lag time of most narrow EGOs static const int maxAvgSize = (EGO_AVG_BUF_SIZE - 1); // the whole buffer +#ifdef EFI_NARROW_EGO_AVERAGING // we store the last measured AFR value to predict the current averaging window size static float lastAfr = stoichAfr; - +#endif void initEgoAveraging(DECLARE_ENGINE_PARAMETER_SIGNATURE) { // Our averaging is intended for use only with Narrow EGOs. diff --git a/firmware/controllers/sensors/function_pointer_sensor.h b/firmware/controllers/sensors/function_pointer_sensor.h index 716fd0ef05..98243f1773 100644 --- a/firmware/controllers/sensors/function_pointer_sensor.h +++ b/firmware/controllers/sensors/function_pointer_sensor.h @@ -26,9 +26,15 @@ public: // check for NaN bool valid = !(result != result); - return {valid, result}; + if (!valid) { + return unexpected; + } + + return result; } + void showInfo(Logging* logger, const char* sensorName) const override {} + private: float (*m_func)(); }; diff --git a/firmware/controllers/sensors/functional_sensor.h b/firmware/controllers/sensors/functional_sensor.h index a9ff9f530b..0a51374b88 100644 --- a/firmware/controllers/sensors/functional_sensor.h +++ b/firmware/controllers/sensors/functional_sensor.h @@ -38,6 +38,8 @@ public: return m_rawValue; } + void showInfo(Logging* logger, const char* sensorName) const override; + private: // Conversion function for this sensor SensorConverter* m_function = nullptr; diff --git a/firmware/controllers/sensors/maf.cpp b/firmware/controllers/sensors/maf.cpp index 496798f9cf..6978a43aa9 100644 --- a/firmware/controllers/sensors/maf.cpp +++ b/firmware/controllers/sensors/maf.cpp @@ -3,8 +3,7 @@ #include "adc_inputs.h" #include "maf.h" -EXTERN_ENGINE -; +EXTERN_ENGINE; /** * @return MAF sensor voltage diff --git a/firmware/controllers/sensors/proxy_sensor.h b/firmware/controllers/sensors/proxy_sensor.h new file mode 100644 index 0000000000..5518d4e108 --- /dev/null +++ b/firmware/controllers/sensors/proxy_sensor.h @@ -0,0 +1,32 @@ +/** + * @file proxy_sensor.h + * @brief A sensor to duplicate a sensor to an additional SensorType. + * + * This was built for the use case of "driver throttle intent" where we care what the driver's + * right foot is doing, but that might mean TPS (cable throttle) or pedal (electronic throttle). + * + * @date March 22, 2020 + * @author Matthew Kennedy, (c) 2019 + */ + +#pragma once + +#include "sensor.h" + +class ProxySensor final : public Sensor { +public: + explicit ProxySensor(SensorType type) : Sensor(type) {} + + void setProxiedSensor(SensorType proxiedSensor) { + m_proxiedSensor = proxiedSensor; + } + + void showInfo(Logging* logger, const char* sensorName) const override; + +private: + SensorResult get() const { + return Sensor::get(m_proxiedSensor); + } + + SensorType m_proxiedSensor = SensorType::Invalid; +}; diff --git a/firmware/controllers/sensors/redundant_sensor.cpp b/firmware/controllers/sensors/redundant_sensor.cpp new file mode 100644 index 0000000000..e4412b66e6 --- /dev/null +++ b/firmware/controllers/sensors/redundant_sensor.cpp @@ -0,0 +1,41 @@ +#include "redundant_sensor.h" + +#include "efilib.h" + +RedundantSensor::RedundantSensor(SensorType outputType, SensorType first, SensorType second) + : Sensor(outputType) + , m_first(first) + , m_second(second) +{ +} + +void RedundantSensor::configure(float maxDifference, bool ignoreSecondSensor) { + m_maxDifference = maxDifference; + m_ignoreSecond = ignoreSecondSensor; +} + +SensorResult RedundantSensor::get() const { + auto result1 = Sensor::get(m_first); + + // If we're set to disable redundancy, just pass thru the first sensor + if (m_ignoreSecond) { + return result1; + } + + auto result2 = Sensor::get(m_second); + + // If either result is invalid, return invalid. + if (!result1.Valid || !result2.Valid) { + return unexpected; + } + + // If both are valid, check that they're near one another + float delta = absF(result1.Value - result2.Value); + if (delta > m_maxDifference) { + return unexpected; + } + + // Both sensors are valid, and their readings are close. All is well. + // Return the average + return (result1.Value + result2.Value) / 2; +} diff --git a/firmware/controllers/sensors/redundant_sensor.h b/firmware/controllers/sensors/redundant_sensor.h new file mode 100644 index 0000000000..2b2f03710b --- /dev/null +++ b/firmware/controllers/sensors/redundant_sensor.h @@ -0,0 +1,30 @@ +#pragma once + +#include "sensor.h" + +class RedundantSensor final : public Sensor +{ +public: + RedundantSensor( + SensorType outputType, + SensorType firstSensor, + SensorType secondSensor + ); + + void configure(float maxDifference, bool ignoreSecondSensor); + + SensorResult get() const override; + + void showInfo(Logging* logger, const char* sensorName) const override; + +private: + // The two sensors we interpret to form one redundant sensor + const SensorType m_first; + const SensorType m_second; + + // How far apart do we allow the sensors to be before reporting an issue? + float m_maxDifference = 0; + + // Should we ignore the second sensor? (disable redundancy) + bool m_ignoreSecond = false; +}; diff --git a/firmware/controllers/sensors/sensor.cpp b/firmware/controllers/sensors/sensor.cpp index 9081e2cbc2..c0127c5305 100644 --- a/firmware/controllers/sensors/sensor.cpp +++ b/firmware/controllers/sensors/sensor.cpp @@ -1,4 +1,6 @@ #include "sensor.h" +#include "efilib.h" +#include "loggingcentral.h" // This struct represents one sensor in the registry. // It stores whether the sensor should use a mock value, @@ -12,6 +14,33 @@ struct SensorRegistryEntry { static SensorRegistryEntry s_sensorRegistry[static_cast(SensorType::PlaceholderLast)] = {}; +static const char* s_sensorNames[] = { + "Invalid", + "CLT", + "IAT", + + "Oil Pressure", + + "TPS 1", + "TPS 1 Primary", + "TPS 1 Secondary", + + "TPS 2", + "TPS 2 Primary", + "TPS 2 Secondary", + + "Acc Pedal", + "Acc Pedal Primary", + "Acc Pedal Secondary", + + "Driver Acc Intent", + + "Aux Temp 1", + "Aux Temp 2", +}; + +static_assert(efi::size(s_sensorNames) == efi::size(s_sensorRegistry)); + bool Sensor::Register() { // Get a ref to where we should be auto &entry = s_sensorRegistry[getIndex()]; @@ -28,10 +57,8 @@ bool Sensor::Register() { } /*static*/ void Sensor::resetRegistry() { - constexpr size_t len = sizeof(s_sensorRegistry) / sizeof(s_sensorRegistry[0]); - // Clear all entries - for (size_t i = 0; i < len; i++) { + for (size_t i = 0; i < efi::size(s_sensorRegistry); i++) { auto &entry = s_sensorRegistry[i]; entry.sensor = nullptr; @@ -60,12 +87,12 @@ bool Sensor::Register() { // Check if this is a valid sensor entry if (!entry) { - return {false, 0.0f}; + return unexpected; } // Next check for mock if (entry->useMock) { - return {true, entry->mockValue}; + return entry->mockValue; } // Get the sensor out of the entry @@ -76,7 +103,7 @@ bool Sensor::Register() { } // We've exhausted all valid ways to return something - sensor not found. - return {false, 0}; + return unexpected; } /*static*/ float Sensor::getRaw(SensorType type) { @@ -96,6 +123,16 @@ bool Sensor::Register() { return 0; } +/*static*/ bool Sensor::hasSensor(SensorType type) { + const auto entry = getEntryForType(type); + + if (!entry) { + return false; + } + + return entry->useMock || entry->sensor; +} + /*static*/ void Sensor::setMockValue(SensorType type, float value) { auto entry = getEntryForType(type); @@ -123,12 +160,34 @@ bool Sensor::Register() { } /*static*/ void Sensor::resetAllMocks() { - constexpr size_t len = sizeof(s_sensorRegistry) / sizeof(s_sensorRegistry[0]); - // Reset all mocks - for (size_t i = 0; i < len; i++) { + for (size_t i = 0; i < efi::size(s_sensorRegistry); i++) { auto &entry = s_sensorRegistry[i]; entry.useMock = false; } } + +/*static*/ const char* Sensor::getSensorName(SensorType type) { + return s_sensorNames[static_cast(type)]; +} + +// Print information about all sensors +/*static*/ void Sensor::showAllSensorInfo(Logging* logger) { + for (size_t i = 1; i < efi::size(s_sensorRegistry); i++) { + auto& entry = s_sensorRegistry[i]; + const char* name = s_sensorNames[i]; + + if (entry.useMock) { + scheduleMsg(logger, "Sensor \"%s\" mocked with value %.2f", name, entry.mockValue); + } else { + const auto sensor = entry.sensor; + + if (sensor) { + sensor->showInfo(logger, name); + } else { + scheduleMsg(logger, "Sensor \"%s\" is not configured.", name); + } + } + } +} diff --git a/firmware/controllers/sensors/sensor.h b/firmware/controllers/sensors/sensor.h index 63c2da2a42..2eafcd79a1 100644 --- a/firmware/controllers/sensors/sensor.h +++ b/firmware/controllers/sensors/sensor.h @@ -48,26 +48,15 @@ #pragma once #include "sensor_type.h" +#include "expected.h" #include -struct SensorResult { - const bool Valid; - const float Value; - - // Implicit conversion operator to bool, so you can do things like if (myResult) { ... } - constexpr explicit operator bool() const { - return Valid; - } - - // Easy default value handling - constexpr float value_or(float valueIfInvalid) const { - return Valid ? Value : valueIfInvalid; - } -}; +using SensorResult = expected; // Fwd declare - nobody outside of Sensor.cpp needs to see inside this type struct SensorRegistryEntry; +class Logging; class Sensor { public: @@ -78,6 +67,12 @@ public: // done internally! [[nodiscard]] bool Register(); + // Print information about this sensor + virtual void showInfo(Logging* logger, const char* sensorName) const = 0; + + // Print information about all sensors + static void showAllSensorInfo(Logging* logger); + // Remove all sensors from the sensor registry - tread carefully if you use this outside of a unit test static void resetRegistry(); @@ -96,6 +91,11 @@ public: */ static float getRaw(SensorType type); + /* + * Query whether there is a sensor of a particular type currently registered. + */ + static bool hasSensor(SensorType type); + /* * Mock a value for a particular sensor. */ @@ -116,11 +116,19 @@ public: */ static void resetAllMocks(); + /* + * Get a friendly name for the sensor. + * For example, CLT, IAT, Throttle Position 2, etc. + */ + const char* getSensorName() { return getSensorName(m_type); } + protected: // Protected constructor - only subclasses call this explicit Sensor(SensorType type) : m_type(type) {} + static const char* getSensorName(SensorType type); + private: // Retrieve the current reading from the sensor. // @@ -136,7 +144,7 @@ private: return 0; } - SensorType m_type; + const SensorType m_type; // Get this sensor's index in the list constexpr size_t getIndex() { diff --git a/firmware/controllers/sensors/sensor_info_printing.cpp b/firmware/controllers/sensors/sensor_info_printing.cpp new file mode 100644 index 0000000000..ab6616c921 --- /dev/null +++ b/firmware/controllers/sensors/sensor_info_printing.cpp @@ -0,0 +1,33 @@ +#include "global.h" +#include "proxy_sensor.h" +#include "functional_sensor.h" +#include "redundant_sensor.h" +#include "efilib.h" +#include "loggingcentral.h" + +void ProxySensor::showInfo(Logging* logger, const char* sensorName) const { + scheduleMsg(logger, "Sensor \"%s\" proxied from sensor \"%s\"", sensorName, getSensorName(m_proxiedSensor)); +} + +void FunctionalSensor::showInfo(Logging* logger, const char* sensorName) const { + const auto [valid, value] = get(); + scheduleMsg(logger, "Sensor \"%s\": Raw value: %.2f Valid: %d Converted value %.2f", sensorName, m_rawValue, valid, value); + + // now print out the underlying function's info + if (auto func = m_function) { + func->showInfo(logger, m_rawValue); + } +} + +#if EFI_CAN_SUPPORT +#include "can_sensor.h" + +void CanSensorBase::showInfo(Logging* logger, const char* sensorName) const { + const auto [valid, value] = get(); + scheduleMsg(logger, "CAN Sensor \"%s\": valid: %d value: %.2f", sensorName, valid, value); +} +#endif // EFI_CAN_SUPPORT + +void RedundantSensor::showInfo(Logging* logger, const char* sensorName) const { + scheduleMsg(logger, "Redundant sensor \"%s\" combining \"%s\" and \"%s\"", sensorName, getSensorName(m_first), getSensorName(m_second)); +} diff --git a/firmware/controllers/sensors/sensor_type.h b/firmware/controllers/sensors/sensor_type.h index 8b44077e89..4d24158270 100644 --- a/firmware/controllers/sensors/sensor_type.h +++ b/firmware/controllers/sensors/sensor_type.h @@ -32,6 +32,17 @@ enum class SensorType : unsigned char { Tps2Primary, Tps2Secondary, + // Redundant and combined sensors for acc pedal + AcceleratorPedal, + AcceleratorPedalPrimary, + AcceleratorPedalSecondary, + + // This maps to the pedal if we have one, and Tps1 if not. + DriverThrottleIntent, + + AuxTemp1, + AuxTemp2, + // Leave me at the end! PlaceholderLast }; diff --git a/firmware/controllers/sensors/sensors.mk b/firmware/controllers/sensors/sensors.mk index bd61f4bc00..b853df363d 100644 --- a/firmware/controllers/sensors/sensors.mk +++ b/firmware/controllers/sensors/sensors.mk @@ -11,7 +11,9 @@ CONTROLLERS_SENSORS_SRC_CPP = $(PROJECT_DIR)/controllers/sensors/thermistors.cp $(PROJECT_DIR)/controllers/sensors/maf2map.cpp \ $(PROJECT_DIR)/controllers/sensors/hip9011_lookup.cpp \ $(PROJECT_DIR)/controllers/sensors/sensor.cpp \ + $(PROJECT_DIR)/controllers/sensors/sensor_info_printing.cpp \ $(PROJECT_DIR)/controllers/sensors/functional_sensor.cpp \ + $(PROJECT_DIR)/controllers/sensors/redundant_sensor.cpp \ $(PROJECT_DIR)/controllers/sensors/converters/linear_func.cpp \ $(PROJECT_DIR)/controllers/sensors/converters/resistance_func.cpp \ $(PROJECT_DIR)/controllers/sensors/converters/thermistor_func.cpp diff --git a/firmware/controllers/sensors/stored_value_sensor.h b/firmware/controllers/sensors/stored_value_sensor.h index 96280a089e..c5b89f00d2 100644 --- a/firmware/controllers/sensors/stored_value_sensor.h +++ b/firmware/controllers/sensors/stored_value_sensor.h @@ -29,19 +29,19 @@ */ class StoredValueSensor : public Sensor { public: - SensorResult get() const final { + SensorResult get() const final override { bool valid = m_isValid; float value = m_value; if (!valid) { - return {false, value}; + return unexpected; } if (getTimeNowNt() - m_timeoutPeriod > m_lastUpdate) { - return {false, value}; + return unexpected; } - return {true, value}; + return value; } protected: diff --git a/firmware/controllers/sensors/thermistors.cpp b/firmware/controllers/sensors/thermistors.cpp index e4268acb98..e102ce05c7 100644 --- a/firmware/controllers/sensors/thermistors.cpp +++ b/firmware/controllers/sensors/thermistors.cpp @@ -24,8 +24,7 @@ #define LIMPING_MODE_CLT_TEMPERATURE 70.0f #define NO_CLT_SENSOR_TEMPERATURE 72.0f -EXTERN_ENGINE -; +EXTERN_ENGINE; static Logging *logger = nullptr; @@ -56,21 +55,6 @@ float ThermistorMath::getKelvinTemperatureByResistance(float resistance) const { return 1 / (s_h_a + s_h_b * logR + s_h_c * logR * logR * logR); } -/* -float convertCelsiustoF(temperature_t tempC) { - return tempC * 9 / 5 + 32; -} - -temperature_t convertFtoCelsius(float tempF) { - return (tempF - 32) / 9 * 5; -} - -float convertKelvinToFahrenheit(float kelvin) { - float tempC = convertKelvinToCelcius(kelvin); - return convertCelsiustoF(tempC); -} -*/ - float getResistance(ThermistorConf *config, float voltage) { efiAssert(CUSTOM_ERR_ASSERT, config != NULL, "thermistor config is null", NAN); thermistor_conf_s *tc = &config->config; @@ -114,24 +98,16 @@ temperature_t getTemperatureC(ThermistorConf *cfg, ThermistorMath *tm, bool useL return convertKelvinToCelcius(kelvinTemperature); } -bool isValidCoolantTemperature(temperature_t temperature) { +static bool isValidCoolantTemperature(temperature_t temperature) { // I hope magic constants are appropriate here return !cisnan(temperature) && temperature > -50 && temperature < 250; } -bool isValidIntakeAirTemperature(temperature_t temperature) { +static bool isValidIntakeAirTemperature(temperature_t temperature) { // I hope magic constants are appropriate here return !cisnan(temperature) && temperature > -50 && temperature < 100; } -bool hasCltSensorM(DECLARE_ENGINE_PARAMETER_SIGNATURE) { - bool haveSensorChannel = engineConfiguration->clt.adcChannel != EFI_ADC_NONE; - if (!haveSensorChannel) { - return false; - } - return !cisnan(engine->sensors.clt); -} - /** * @return coolant temperature, in Celsius */ @@ -210,14 +186,6 @@ void ThermistorMath::prepareThermistorCurve(thermistor_conf_s *tc) { #endif } -bool hasIatSensorM(DECLARE_ENGINE_PARAMETER_SIGNATURE) { - bool haveSensorChannel = engineConfiguration->iat.adcChannel != EFI_ADC_NONE; - if (!haveSensorChannel) { - return false; - } - return !cisnan(engine->sensors.iat); -} - /** * @return Celsius value */ diff --git a/firmware/controllers/sensors/thermistors.h b/firmware/controllers/sensors/thermistors.h index 79e1cf5ce0..ee3e1e2c5d 100644 --- a/firmware/controllers/sensors/thermistors.h +++ b/firmware/controllers/sensors/thermistors.h @@ -32,23 +32,8 @@ float getKelvinTemperature(float resistance, ThermistorMath *tm); float getResistance(ThermistorConf *cfg, float voltage); temperature_t getTemperatureC(ThermistorConf *cfg, ThermistorMath *tm, bool useLinear DECLARE_ENGINE_PARAMETER_SUFFIX); temperature_t getCoolantTemperatureM(DECLARE_ENGINE_PARAMETER_SIGNATURE); -bool isValidCoolantTemperature(temperature_t temperature); temperature_t getIntakeAirTemperatureM(DECLARE_ENGINE_PARAMETER_SIGNATURE); -/** - * This macro points to readily-available pre-calculated value - * for actual slow calculation see 'getCoolantTemperatureM' - */ -#define getCoolantTemperature() engine->sensors.clt -#define getIntakeAirTemperature() engine->sensors.iat - -bool isValidIntakeAirTemperature(temperature_t temperature); -bool hasIatSensorM(DECLARE_ENGINE_PARAMETER_SIGNATURE); -bool hasCltSensorM(DECLARE_ENGINE_PARAMETER_SIGNATURE); - -#define hasIatSensor() hasIatSensorM(PASS_ENGINE_PARAMETER_SIGNATURE) -#define hasCltSensor() hasCltSensorM(PASS_ENGINE_PARAMETER_SIGNATURE) - void initThermistors(Logging *sharedLogger DECLARE_ENGINE_PARAMETER_SUFFIX); void setCommonNTCSensor(ThermistorConf *thermistorConf, float pullup); diff --git a/firmware/controllers/sensors/tps.cpp b/firmware/controllers/sensors/tps.cpp index 5d6f021d80..877fb872c0 100644 --- a/firmware/controllers/sensors/tps.cpp +++ b/firmware/controllers/sensors/tps.cpp @@ -3,169 +3,17 @@ */ #include "engine.h" #include "tps.h" -#include "interpolation.h" -#include "adc_inputs.h" +#include "sensor.h" #if EFI_PROD_CODE #include "settings.h" #endif /* EFI_PROD_CODE */ EXTERN_ENGINE; -/** - * set mock_pedal_position X - * See also directPwmValue - */ -percent_t mockPedalPosition = MOCK_UNDEFINED; - -#if !EFI_PROD_CODE -/** - * this allows unit tests to simulate TPS position - */ -void setMockTpsAdc(percent_t tpsPosition DECLARE_ENGINE_PARAMETER_SUFFIX) { - engine->mockTpsAdcValue = tpsPosition; -} - -void setMockTpsValue(percent_t tpsPosition DECLARE_ENGINE_PARAMETER_SUFFIX) { - engine->mockTpsValue = tpsPosition; -} -#endif /* EFI_PROD_CODE */ - -// see also setMockThrottlePedalSensorVoltage -void setMockThrottlePedalPosition(percent_t value DECLARE_ENGINE_PARAMETER_SUFFIX) { - mockPedalPosition = value; -} - -/** - * We are using one instance for read and another for modification, this is how we get lock-free thread-safety - * - */ -static tps_roc_s states[2]; - -// todo if TPS_FAST_ADC -//int tpsFastAdc = 0; - -static volatile int tpsRocIndex = 0; - -/** - * this method is lock-free thread-safe if invoked only from one thread - */ -void saveTpsState(efitimeus_t now, float curValue) { - int tpsNextIndex = (tpsRocIndex + 1) % 2; - tps_roc_s *cur = &states[tpsRocIndex]; - tps_roc_s *next = &states[tpsNextIndex]; - - next->prevTime = cur->curTime; - next->prevValue = cur->curValue; - next->curTime = now; - next->curValue = curValue; - - //int diffSysticks = overflowDiff(now, cur->curTime); - float diffSeconds = 0;// TODO: do we need this? diffSysticks * 1.0 / CH_FREQUENCY; - next->rateOfChange = (curValue - cur->curValue) / diffSeconds; - - // here we update volatile index - tpsRocIndex = tpsNextIndex; -} - -/** - * this read-only method is lock-free thread-safe - */ -float getTpsRateOfChange(void) { - return states[tpsRocIndex].rateOfChange; -} - -/* - * Return current TPS position based on configured ADC levels, and adc - * - * */ -percent_t getTpsValue(int index, float adc DECLARE_ENGINE_PARAMETER_SUFFIX) { - - DISPLAY_STATE(Engine) - DISPLAY_TAG(TPS_SECTION); - DISPLAY_SENSOR(TPS) - DISPLAY_TEXT(EOL) - - - DISPLAY_TEXT(Analog_MCU_reads); - engine->engineState.currentTpsAdc = adc; -#if !EFI_UNIT_TEST - engine->engineState.DISPLAY_FIELD(tpsVoltageMCU) = adcToVolts(adc); -#endif - DISPLAY_TEXT(Volts); - DISPLAY_TEXT(from_pin) DISPLAY(DISPLAY_CONFIG(tps1_1AdcChannel)) - DISPLAY_TEXT(EOL); - - DISPLAY_TEXT(Analog_ECU_reads); - engine->engineState.DISPLAY_FIELD(tpsVoltageBoard) = - DISPLAY_TEXT(Rdivider) engine->engineState.tpsVoltageMCU * CONFIG(DISPLAY_CONFIG(analogInputDividerCoefficient)); - DISPLAY_TEXT(EOL); - - - if (engineConfiguration->tpsMin == engineConfiguration->tpsMax) { - warning(CUSTOM_INVALID_TPS_SETTING, "Invalid TPS configuration: same value %d", engineConfiguration->tpsMin); - return NAN; - } - - DISPLAY_TEXT(Current_ADC) - DISPLAY(DISPLAY_FIELD(currentTpsAdc)) - DISPLAY_TEXT(interpolate_between) - - DISPLAY(DISPLAY_CONFIG(tpsMax)) - DISPLAY_TEXT(and) - DISPLAY(DISPLAY_CONFIG(tpsMin)) - - int tpsMax = index == 0 ? CONFIG(tpsMax) : CONFIG(tps2Max); - int tpsMin = index == 0 ? CONFIG(tpsMin) : CONFIG(tps2Min); - - float result = interpolateMsg("TPS", tpsMax, 100, tpsMin, 0, adc); - if (result < engineConfiguration->tpsErrorDetectionTooLow) { -#if EFI_PROD_CODE - // too much noise with simulator - warning(OBD_Throttle_Position_Sensor_Circuit_Malfunction, "TPS too low: %.2f", result); -#endif /* EFI_PROD_CODE */ - } - if (result > engineConfiguration->tpsErrorDetectionTooHigh) { -#if EFI_PROD_CODE - // too much noise with simulator - warning(OBD_Throttle_Position_Sensor_Range_Performance_Problem, "TPS too high: %.2f", result); -#endif /* EFI_PROD_CODE */ - } - - // this would put the value into the 0-100 range - return maxF(0, minF(100, result)); -} - -/* - * Return TPS ADC readings. - * We need ADC value because TunerStudio has a nice TPS configuration wizard, and this wizard - * wants a TPS value. - * @param index [0, ETB_COUNT) - */ -static float getTPS10bitAdc(int index DECLARE_ENGINE_PARAMETER_SUFFIX) { -#if !EFI_PROD_CODE - if (engine->mockTpsAdcValue != MOCK_UNDEFINED) { - return engine->mockTpsAdcValue; - } -#endif - if (engineConfiguration->tps1_1AdcChannel == EFI_ADC_NONE) - return -1; -#if EFI_PROD_CODE - - if (index == 0) { - return convertVoltageTo10bitADC(getVoltageDivided("tps10", engineConfiguration->tps1_1AdcChannel)); - } else { - return convertVoltageTo10bitADC(getVoltageDivided("tps20", engineConfiguration->tps2_1AdcChannel)); - } - // return tpsFastAdc / 4; -#else - return 0; -#endif /* EFI_PROD_CODE */ -} - void grabTPSIsClosed() { #if EFI_PROD_CODE printTPSInfo(); - engineConfiguration->tpsMin = getTPS10bitAdc(0); + engineConfiguration->tpsMin = convertVoltageTo10bitADC(Sensor::getRaw(SensorType::Tps1)); printTPSInfo(); #endif /* EFI_PROD_CODE */ } @@ -173,97 +21,21 @@ void grabTPSIsClosed() { void grabTPSIsWideOpen() { #if EFI_PROD_CODE printTPSInfo(); - engineConfiguration->tpsMax = getTPS10bitAdc(0); + engineConfiguration->tpsMax = convertVoltageTo10bitADC(Sensor::getRaw(SensorType::Tps1)); printTPSInfo(); #endif /* EFI_PROD_CODE */ } void grabPedalIsUp() { #if EFI_PROD_CODE - float voltage = getVoltageDivided("pPS", engineConfiguration->throttlePedalPositionAdcChannel PASS_ENGINE_PARAMETER_SUFFIX); - engineConfiguration->throttlePedalUpVoltage = voltage; + engineConfiguration->throttlePedalUpVoltage = Sensor::getRaw(SensorType::AcceleratorPedal); printTPSInfo(); #endif /* EFI_PROD_CODE */ } void grabPedalIsWideOpen() { #if EFI_PROD_CODE - float voltage = getVoltageDivided("pPS", engineConfiguration->throttlePedalPositionAdcChannel PASS_ENGINE_PARAMETER_SUFFIX); - engineConfiguration->throttlePedalWOTVoltage = voltage; + engineConfiguration->throttlePedalWOTVoltage = Sensor::getRaw(SensorType::AcceleratorPedal); printTPSInfo(); #endif /* EFI_PROD_CODE */ } - -/** - * @brief Position on physical primary TPS - */ -static percent_t getPrimaryRawTPS(int index DECLARE_ENGINE_PARAMETER_SUFFIX) { - float adcValue = getTPS10bitAdc(index PASS_ENGINE_PARAMETER_SUFFIX); - percent_t tpsValue = getTpsValue(index, adcValue PASS_ENGINE_PARAMETER_SUFFIX); - return tpsValue; -} - -#define NO_TPS_MAGIC_VALUE 66.611 - -bool hasPedalPositionSensor(DECLARE_ENGINE_PARAMETER_SIGNATURE) { - return engineConfiguration->throttlePedalPositionAdcChannel != EFI_ADC_NONE; -} - -bool hasSecondThrottleBody(DECLARE_ENGINE_PARAMETER_SIGNATURE) { - return engineConfiguration->tps2_1AdcChannel != EFI_ADC_NONE; -} - -extern float canPedal; - -percent_t getPedalPosition(DECLARE_ENGINE_PARAMETER_SIGNATURE) { -#if EFI_CANBUS_PEDAL - return canPedal; -#endif - - - if (mockPedalPosition != MOCK_UNDEFINED) { - return mockPedalPosition; - } - - // Don't choke without a pedal set - if (CONFIG(throttlePedalPositionAdcChannel) == EFI_ADC_NONE) { - return 0; - } - - DISPLAY_TAG(PEDAL_SECTION); - DISPLAY_TEXT(Analog_MCU_reads); - - float voltage = getVoltageDivided("pPS", CONFIG(DISPLAY_CONFIG(throttlePedalPositionAdcChannel)) PASS_ENGINE_PARAMETER_SUFFIX); - percent_t result = interpolateMsg("pedal", engineConfiguration->throttlePedalUpVoltage, 0, engineConfiguration->throttlePedalWOTVoltage, 100, voltage); - - // this would put the value into the 0-100 range - return maxF(0, minF(100, result)); -} - -static bool hasTpsSensor(DECLARE_ENGINE_PARAMETER_SIGNATURE) { - return engineConfiguration->tps1_1AdcChannel != EFI_ADC_NONE; -} - -percent_t getTPSWithIndex(int index DECLARE_ENGINE_PARAMETER_SUFFIX) { -#if !EFI_PROD_CODE - if (!cisnan(engine->mockTpsValue)) { - return engine->mockTpsValue; - } -#endif /* EFI_PROD_CODE */ - if (!hasTpsSensor(PASS_ENGINE_PARAMETER_SIGNATURE)) - return NO_TPS_MAGIC_VALUE; - // todo: if (config->isDualTps) - // todo: blah blah - // todo: if two TPS do not match - show OBD code via malfunction_central.c - - return getPrimaryRawTPS(index PASS_ENGINE_PARAMETER_SUFFIX); -} - -percent_t getTPS(DECLARE_ENGINE_PARAMETER_SIGNATURE) { - return getTPSWithIndex(0 PASS_ENGINE_PARAMETER_SUFFIX); -} - -int convertVoltageTo10bitADC(float voltage) { - // divided by 2 because of voltage divider, then converted into 10bit ADC value (TunerStudio format) - return (int) (voltage * TPS_TS_CONVERSION); -} diff --git a/firmware/controllers/sensors/tps.h b/firmware/controllers/sensors/tps.h index fe1e9f3505..2b00b32088 100644 --- a/firmware/controllers/sensors/tps.h +++ b/firmware/controllers/sensors/tps.h @@ -15,38 +15,11 @@ // Scaled to 1000 counts = 5.0 volts #define TPS_TS_CONVERSION 200 -bool hasPedalPositionSensor(DECLARE_ENGINE_PARAMETER_SIGNATURE); -percent_t getPedalPosition(DECLARE_ENGINE_PARAMETER_SIGNATURE); -/** - * Throttle Position Sensor - * In case of dual TPS this function would return logical TPS position - * @return Current TPS position, percent of WOT. 0 means idle and 100 means Wide Open Throttle - */ -percent_t getTPS(DECLARE_ENGINE_PARAMETER_SIGNATURE); -percent_t getTPSWithIndex(int index DECLARE_ENGINE_PARAMETER_SUFFIX); -int convertVoltageTo10bitADC(float voltage); -bool hasSecondThrottleBody(DECLARE_ENGINE_PARAMETER_SIGNATURE); -percent_t getTpsValue(int index, float adc DECLARE_ENGINE_PARAMETER_SUFFIX); -void setMockTpsAdc(percent_t tpsPosition DECLARE_ENGINE_PARAMETER_SUFFIX); -void setMockTpsValue(percent_t tpsPosition DECLARE_ENGINE_PARAMETER_SUFFIX); -void setMockThrottlePedalPosition(percent_t value DECLARE_ENGINE_PARAMETER_SUFFIX); +constexpr inline int convertVoltageTo10bitADC(float voltage) { + return (int) (voltage * TPS_TS_CONVERSION); +} + void grabTPSIsClosed(); void grabTPSIsWideOpen(); void grabPedalIsUp(); void grabPedalIsWideOpen(); - -typedef struct { - efitimeus_t prevTime; - // value 0-100% - float prevValue; - efitimeus_t curTime; - // value 0-100% - float curValue; - // % per second - float rateOfChange; -} tps_roc_s; - -//void saveTpsState(efitimeus_t now, float curValue); -float getTpsRateOfChange(void); - - diff --git a/firmware/controllers/settings.cpp b/firmware/controllers/settings.cpp index 5ca5f36b47..0659397e71 100644 --- a/firmware/controllers/settings.cpp +++ b/firmware/controllers/settings.cpp @@ -25,7 +25,7 @@ #include "idle_thread.h" #include "allsensors.h" #include "alternator_controller.h" -#include "trigger_emulator.h" +#include "trigger_emulator_algo.h" #include "sensor.h" #if EFI_PROD_CODE @@ -58,9 +58,7 @@ extern WaveChart waveChart; static char LOGGING_BUFFER[SETTINGS_LOGGING_BUFFER_SIZE]; static Logging logger("settings control", LOGGING_BUFFER, sizeof(LOGGING_BUFFER)); -extern int maxNesting; -EXTERN_ENGINE -; +EXTERN_ENGINE; /* static void printIntArray(int array[], int size) { @@ -279,8 +277,6 @@ void printConfiguration(const engine_configuration_s *engineConfiguration) { scheduleMsg(&logger, "clutchDown@%s: %s", hwPortname(engineConfiguration->clutchDownPin), boolToString(engine->clutchDownState)); - scheduleMsg(&logger, "nesting=%d", maxNesting); - scheduleMsg(&logger, "digitalPotentiometerSpiDevice %d", engineConfiguration->digitalPotentiometerSpiDevice); for (int i = 0; i < DIGIPOT_COUNT; i++) { @@ -399,39 +395,34 @@ static void printThermistor(const char *msg, ThermistorConf *config, ThermistorM scheduleMsg(&logger, "=============================="); } -void printTPSInfo(void) { - auto tps = Sensor::get(SensorType::Tps1); - auto raw = Sensor::getRaw(SensorType::Tps1); +static void printTpsSenser(const char *msg, SensorType sensor, int16_t min, int16_t max, adc_channel_e channel) { + auto tps = Sensor::get(sensor); + auto raw = Sensor::getRaw(sensor); if (!tps.Valid) { scheduleMsg(&logger, "TPS not valid"); } static char pinNameBuffer[16]; - scheduleMsg(&logger, "tps min (closed) %d/max (full) %d v=%.2f @%s", engineConfiguration->tpsMin, engineConfiguration->tpsMax, - raw, getPinNameByAdcChannel("tps", engineConfiguration->tps1_1AdcChannel, pinNameBuffer)); + scheduleMsg(&logger, "tps min (closed) %d/max (full) %d v=%.2f @%s", min, max, + raw, getPinNameByAdcChannel(msg, channel, pinNameBuffer)); - if (hasPedalPositionSensor()) { - scheduleMsg(&logger, "pedal up %f / down %f", - engineConfiguration->throttlePedalUpVoltage, - engineConfiguration->throttlePedalWOTVoltage); - } - scheduleMsg(&logger, "current 10bit=%d value=%.2f rate=%.2f", convertVoltageTo10bitADC(raw), tps.Value, getTpsRateOfChange()); + scheduleMsg(&logger, "current 10bit=%d value=%.2f", convertVoltageTo10bitADC(raw), tps.Value); +} + +void printTPSInfo(void) { + scheduleMsg(&logger, "pedal up %f / down %f", + engineConfiguration->throttlePedalUpVoltage, + engineConfiguration->throttlePedalWOTVoltage); + + printTpsSenser("TPS", SensorType::Tps1, engineConfiguration->tpsMin, engineConfiguration->tpsMax, engineConfiguration->tps1_1AdcChannel); + printTpsSenser("TPS2", SensorType::Tps2, engineConfiguration->tps2Min, engineConfiguration->tps2Max, engineConfiguration->tps2_1AdcChannel); } static void printTemperatureInfo(void) { #if EFI_ANALOG_SENSORS - printThermistor("CLT", &engineConfiguration->clt, &engine->engineState.cltCurve, - engineConfiguration->useLinearCltSensor); - if (!isValidCoolantTemperature(getCoolantTemperature())) { - scheduleMsg(&logger, "CLT sensing error"); - } - printThermistor("IAT", &engineConfiguration->iat, &engine->engineState.iatCurve, - engineConfiguration->useLinearIatSensor); - if (!isValidIntakeAirTemperature(getIntakeAirTemperature())) { - scheduleMsg(&logger, "IAT sensing error"); - } + Sensor::showAllSensorInfo(&logger); scheduleMsg(&logger, "fan=%s @ %s", boolToString(enginePins.fanRelay.getLogicValue()), hwPortname(engineConfiguration->fanPin)); @@ -679,10 +670,30 @@ static void setMainRelayPin(const char *pinName) { setIndividualPin(pinName, &engineConfiguration->mainRelayPin, "main relay"); } +static void setCj125CsPin(const char *pinName) { + setIndividualPin(pinName, &engineConfiguration->starterRelayDisablePin, "starter disable relay"); +} + +static void setCj125HeaterPin(const char *pinName) { + setIndividualPin(pinName, &engineConfiguration->wboHeaterPin, "cj125 heater"); +} + +static void setTriggerSyncPin(const char *pinName) { + setIndividualPin(pinName, &engineConfiguration->debugTriggerSync, "trigger sync"); +} + static void setStarterRelayPin(const char *pinName) { setIndividualPin(pinName, &engineConfiguration->starterRelayDisablePin, "starter disable relay"); } +static void setCanRxPin(const char *pinName) { + setIndividualPin(pinName, &engineConfiguration->canRxPin, "CAN RX"); +} + +static void setCanTxPin(const char *pinName) { + setIndividualPin(pinName, &engineConfiguration->canTxPin, "CAN TX"); +} + static void setAlternatorPin(const char *pinName) { setIndividualPin(pinName, &engineConfiguration->alternatorControlPin, "alternator"); } @@ -888,12 +899,16 @@ static void enableOrDisable(const char *param, bool isEnabled) { CONFIG(useTLE8888_cranking_hack) = isEnabled; } else if (strEqualCaseInsensitive(param, "verboseTLE8888")) { CONFIG(verboseTLE8888) = isEnabled; + } else if (strEqualCaseInsensitive(param, "can_broadcast")) { + CONFIG(enableVerboseCanTx) = isEnabled; } else if (strEqualCaseInsensitive(param, "etb_auto")) { engine->etbAutoTune = isEnabled; } else if (strEqualCaseInsensitive(param, "cranking_constant_dwell")) { engineConfiguration->useConstantDwellDuringCranking = isEnabled; } else if (strEqualCaseInsensitive(param, "cj125")) { engineConfiguration->isCJ125Enabled = isEnabled; + } else if (strEqualCaseInsensitive(param, "cj125verbose")) { + engineConfiguration->isCJ125Verbose = isEnabled; } else if (strEqualCaseInsensitive(param, "engine_sniffer")) { engineConfiguration->isEngineChartEnabled = isEnabled; } else if (strEqualCaseInsensitive(param, "step1limimter")) { @@ -957,7 +972,7 @@ static void enableOrDisable(const char *param, bool isEnabled) { } else if (strEqualCaseInsensitive(param, "ignition")) { engineConfiguration->isIgnitionEnabled = isEnabled; } else if (strEqualCaseInsensitive(param, "self_stimulation")) { - engineConfiguration->directSelfStimulation = isEnabled; + engine->directSelfStimulation = isEnabled; } else if (strEqualCaseInsensitive(param, "engine_control")) { engineConfiguration->isEngineControlEnabled = isEnabled; } else if (strEqualCaseInsensitive(param, "map_avg")) { @@ -1120,12 +1135,10 @@ static void getValue(const char *paramStr) { #endif /* EFI_PROD_CODE */ } else if (strEqualCaseInsensitive(paramStr, "tps_min")) { scheduleMsg(&logger, "tps_min=%d", engineConfiguration->tpsMin); + } else if (strEqualCaseInsensitive(paramStr, "trigger_only_front")) { + scheduleMsg(&logger, "trigger_only_front=%d", engineConfiguration->useOnlyRisingEdgeForTrigger); } else if (strEqualCaseInsensitive(paramStr, "tps_max")) { scheduleMsg(&logger, "tps_max=%d", engineConfiguration->tpsMax); - } else if (strEqualCaseInsensitive(paramStr, "nb_vvt_index")) { - scheduleMsg(&logger, "nb_vvt_index=%d", engineConfiguration->nbVvtIndex); - } else if (strEqualCaseInsensitive(paramStr, "nb_vvt_index")) { - scheduleMsg(&logger, "nb_vvt_index=%d", engineConfiguration->nbVvtIndex); } else if (strEqualCaseInsensitive(paramStr, "global_trigger_offset_angle")) { scheduleMsg(&logger, "global_trigger_offset=%.2f", engineConfiguration->globalTriggerAngleOffset); } else if (strEqualCaseInsensitive(paramStr, "isHip9011Enabled")) { @@ -1164,9 +1177,6 @@ const command_f_s commandsF[] = { #if EFI_ENGINE_CONTROL #if EFI_ENABLE_MOCK_ADC {MOCK_IAT_COMMAND, setMockIatVoltage}, - {MOCK_PPS_POSITION_COMMAND, setMockThrottlePedalPosition}, - {MOCK_PPS_VOLTAGE_COMMAND, setMockThrottlePedalSensorVoltage}, - {MOCK_TPS_COMMAND, setMockThrottlePositionSensorVoltage}, {MOCK_MAF_COMMAND, setMockMafVoltage}, {MOCK_AFR_COMMAND, setMockAfrVoltage}, {MOCK_MAP_COMMAND, setMockMapVoltage}, @@ -1259,6 +1269,7 @@ const command_i_s commandsI[] = {{"ignition_mode", setIgnitionMode}, {"bor", setBor}, #if EFI_CAN_SUPPORT {"can_mode", setCanType}, + {"can_vss", setCanVss}, #endif /* EFI_CAN_SUPPORT */ #if EFI_IDLE_CONTROL {"idle_position", setIdleValvePosition}, @@ -1343,8 +1354,6 @@ static void setValue(const char *paramStr, const char *valueStr) { engineConfiguration->vvtOffset = valueF; } else if (strEqualCaseInsensitive(paramStr, "vvt_mode")) { engineConfiguration->vvtMode = (vvt_mode_e)valueI; - } else if (strEqualCaseInsensitive(paramStr, "nb_vvt_index")) { - engineConfiguration->nbVvtIndex = valueI; } else if (strEqualCaseInsensitive(paramStr, "operation_mode")) { engineConfiguration->ambiguousOperationMode = (operation_mode_e)valueI; } else if (strEqualCaseInsensitive(paramStr, "wwaeTau")) { @@ -1428,6 +1437,12 @@ void initSettings(void) { addConsoleActionS("set_idle_pin", setIdlePin); addConsoleActionS("set_main_relay_pin", setMainRelayPin); addConsoleActionS("set_starter_relay_pin", setStarterRelayPin); + addConsoleActionS("set_cj125_cs_pin", setCj125CsPin); + addConsoleActionS("set_cj125_heater_pin", setCj125HeaterPin); + addConsoleActionS("set_trigger_sync_pin", setTriggerSyncPin); + + addConsoleActionS("set_can_rx_pin", setCanRxPin); + addConsoleActionS("set_can_tx_pin", setCanTxPin); #if HAL_USE_ADC addConsoleActionSS("set_analog_input_pin", setAnalogInputPin); diff --git a/firmware/controllers/system/dc_motor.cpp b/firmware/controllers/system/dc_motor.cpp index 2b3db71ef8..af9832f713 100644 --- a/firmware/controllers/system/dc_motor.cpp +++ b/firmware/controllers/system/dc_motor.cpp @@ -7,13 +7,31 @@ */ #include "dc_motor.h" +#include "efi_gpio.h" #include "pwm_generator_logic.h" -TwoPinDcMotor::TwoPinDcMotor(SimplePwm* enable, SimplePwm* dir1, SimplePwm* dir2) +TwoPinDcMotor::TwoPinDcMotor(SimplePwm* enable, SimplePwm* dir1, SimplePwm* dir2, OutputPin* disablePin) : m_enable(enable) , m_dir1(dir1) , m_dir2(dir2) + , m_disable(disablePin) { + disable(); +} + +void TwoPinDcMotor::enable() { + if (m_disable) { + m_disable->setValue(false); + } +} + +void TwoPinDcMotor::disable() { + if (m_disable) { + m_disable->setValue(true); + } + + // Also set the duty to zero + set(0); } bool TwoPinDcMotor::isOpenDirection() const { diff --git a/firmware/controllers/system/dc_motor.h b/firmware/controllers/system/dc_motor.h index c5d5237e78..47c2905af8 100644 --- a/firmware/controllers/system/dc_motor.h +++ b/firmware/controllers/system/dc_motor.h @@ -32,10 +32,14 @@ public: */ virtual float get() const = 0; + virtual void disable() = 0; + virtual void enable() = 0; + virtual bool isOpenDirection() const = 0; }; class SimplePwm; +class OutputPin; /** * @brief Represents a DC motor controller (H-bridge) with some combination of PWM and on/off control pins. @@ -70,6 +74,7 @@ private: SimplePwm* const m_enable; SimplePwm* const m_dir1; SimplePwm* const m_dir2; + OutputPin* const m_disable; float m_value = 0; ControlType m_type; @@ -79,11 +84,14 @@ public: * @param dir1 Enable 1 or direction 1 pin. Gets set high to rotate forward. * @param dir2 Enable 2 or direction 2 pin. Gets set high to rotate backward. */ - TwoPinDcMotor(SimplePwm* enable, SimplePwm* dir1, SimplePwm* dir2); + TwoPinDcMotor(SimplePwm* enable, SimplePwm* dir1, SimplePwm* dir2, OutputPin* disable); virtual bool set(float duty) override; float get() const override; bool isOpenDirection() const override; + void enable(); + void disable(); + void setType(ControlType type) { m_type = type; } }; diff --git a/firmware/controllers/system/efi_gpio.cpp b/firmware/controllers/system/efi_gpio.cpp index 94eb0229b5..1793bc05df 100644 --- a/firmware/controllers/system/efi_gpio.cpp +++ b/firmware/controllers/system/efi_gpio.cpp @@ -32,17 +32,17 @@ extern WaveChart waveChart; EnginePins enginePins; static Logging* logger; -pin_output_mode_e DEFAULT_OUTPUT = OM_DEFAULT; +static const pin_output_mode_e DEFAULT_OUTPUT = OM_DEFAULT; -static const char *sparkNames[] = { "coil1", "coil2", "coil3", "coil4", "coil5", "coil6", "coil7", "coil8", - "coil9", "coil10", "coil11", "coil12"}; +static const char *sparkNames[] = { "Coil 1", "Coil 2", "Coil 3", "Coil 4", "Coil 5", "Coil 6", "Coil 7", "Coil 8", + "Coil 9", "Coil 10", "Coil 11", "Coil 12"}; // these short names are part of engine sniffer protocol static const char *sparkShortNames[] = { PROTOCOL_COIL1_SHORT_NAME, "c2", "c3", "c4", "c5", "c6", "c7", "c8", "c9", "cA", "cB", "cD"}; -static const char *injectorNames[] = { "injector1", "injector2", "injector3", "injector4", "injector5", "injector6", - "injector7", "injector8", "injector9", "injector10", "injector11", "injector12"}; +static const char *injectorNames[] = { "Injector 1", "Injector 2", "Injector 3", "Injector 4", "Injector 5", "Injector 6", + "Injector 7", "Injector 8", "Injector 9", "Injector 10", "Injector 11", "Injector 12"}; static const char *injectorShortNames[] = { PROTOCOL_INJ1_SHORT_NAME, "i2", "i3", "i4", "i5", "i6", "i7", "i8", "j9", "iA", "iB", "iC"}; @@ -60,7 +60,7 @@ EnginePins::EnginePins() { } static_assert(efi::size(injectorNames) >= INJECTION_PIN_COUNT, "Too many injection pins"); - for (int i = 0; i < INJECTION_PIN_COUNT;i++) { + for (int i = 0; i < INJECTION_PIN_COUNT;i++) { enginePins.injectors[i].injectorIndex = i; enginePins.injectors[i].name = injectorNames[i]; enginePins.injectors[i].shortName = injectorShortNames[i]; @@ -148,9 +148,17 @@ void EnginePins::unregisterPins() { unregisterOutputIfPinOrModeChanged(mainRelay, mainRelayPin, mainRelayPinMode); unregisterOutputIfPinOrModeChanged(starterRelayDisable, starterRelayDisablePin, starterRelayDisableMode); + unregisterOutputIfPinChanged(starterControl, starterControlPin); + #endif /* EFI_PROD_CODE */ } +void EnginePins::startPins() { + startInjectionPins(); + startIgnitionPins(); + startAuxValves(); +} + void EnginePins::reset() { for (int i = 0; i < INJECTION_PIN_COUNT;i++) { injectors[i].reset(); @@ -194,7 +202,7 @@ void EnginePins::startIgnitionPins(void) { } } if (isPinOrModeChanged(dizzySparkOutputPin, dizzySparkOutputPinMode)) { - enginePins.dizzyOutput.initPin("dizzy tach", engineConfiguration->dizzySparkOutputPin, + enginePins.dizzyOutput.initPin("Distributor", engineConfiguration->dizzySparkOutputPin, &engineConfiguration->dizzySparkOutputPinMode); } @@ -291,11 +299,6 @@ void IgnitionOutputPin::reset() { OutputPin::OutputPin() { modePtr = &DEFAULT_OUTPUT; -#if EFI_GPIO_HARDWARE - port = NULL; - pin = 0; -#endif /* EFI_GPIO_HARDWARE */ - currentLogicValue = INITIAL_PIN_STATE; } bool OutputPin::isInitialized() { @@ -312,8 +315,14 @@ bool OutputPin::isInitialized() { void OutputPin::toggle() { setValue(!getLogicValue()); - } + +bool OutputPin::getAndSet(int logicValue) { + bool oldValue = currentLogicValue; + setValue(logicValue); + return oldValue; +} + void OutputPin::setValue(int logicValue) { ScopePerf perf(PE::OutputPinSetValue); @@ -368,17 +377,18 @@ void initOutputPins(DECLARE_ENGINE_PARAMETER_SIGNATURE) { // memset(&outputs, 0, sizeof(outputs)); #if HAL_USE_SPI - enginePins.sdCsPin.initPin("spi CS5", CONFIG(sdCardCsPin)); + enginePins.sdCsPin.initPin("SD CS", CONFIG(sdCardCsPin)); #endif /* HAL_USE_SPI */ // todo: should we move this code closer to the fuel pump logic? - enginePins.fuelPumpRelay.initPin("fuel pump relay", CONFIG(fuelPumpPin), &CONFIG(fuelPumpPinMode)); + enginePins.fuelPumpRelay.initPin("Fuel pump", CONFIG(fuelPumpPin), &CONFIG(fuelPumpPinMode)); - enginePins.mainRelay.initPin("main relay", CONFIG(mainRelayPin), &CONFIG(mainRelayPinMode)); - enginePins.starterRelayDisable.initPin("starter relay", CONFIG(starterRelayDisablePin), &CONFIG(starterRelayDisableMode)); + enginePins.mainRelay.initPin("Main relay", CONFIG(mainRelayPin), &CONFIG(mainRelayPinMode)); + enginePins.starterRelayDisable.initPin("Starter disable", CONFIG(starterRelayDisablePin), &CONFIG(starterRelayDisableMode)); + enginePins.starterControl.initPin("Starter control", CONFIG(starterControlPin)); - enginePins.fanRelay.initPin("fan relay", CONFIG(fanPin), &CONFIG(fanPinMode)); - enginePins.o2heater.initPin("o2 heater", CONFIG(o2heaterPin)); + enginePins.fanRelay.initPin("Fan", CONFIG(fanPin), &CONFIG(fanPinMode)); + enginePins.o2heater.initPin("O2 heater", CONFIG(o2heaterPin)); enginePins.acRelay.initPin("A/C relay", CONFIG(acRelayPin), &CONFIG(acRelayPinMode)); // digit 1 diff --git a/firmware/controllers/system/efi_gpio.h b/firmware/controllers/system/efi_gpio.h index 13fadc4138..44fc631412 100644 --- a/firmware/controllers/system/efi_gpio.h +++ b/firmware/controllers/system/efi_gpio.h @@ -12,6 +12,7 @@ #include "global.h" #include "io_pins.h" #include "engine_configuration.h" +#include "smart_gpio.h" void initPrimaryPins(Logging *sharedLogger); void initOutputPins(DECLARE_ENGINE_PARAMETER_SIGNATURE); @@ -45,21 +46,22 @@ public: bool isInitialized(); + bool getAndSet(int logicValue); void setValue(int logicValue); void toggle(); bool getLogicValue() const; #if EFI_GPIO_HARDWARE - ioportid_t port; - uint8_t pin; + ioportid_t port = 0; + uint8_t pin = 0; #if (BOARD_EXT_GPIOCHIPS > 0) /* used for external pins */ brain_pin_e brainPin; bool ext; #endif #endif /* EFI_GPIO_HARDWARE */ - int8_t currentLogicValue; + int8_t currentLogicValue = INITIAL_PIN_STATE; /** * we track current pin status so that we do not touch the actual hardware if we want to write new pin bit * which is same as current pin value. This maybe helps in case of status leds, but maybe it's a total over-engineering @@ -113,6 +115,7 @@ public: class EnginePins { public: EnginePins(); + void startPins(); void reset(); bool stopPins(); void unregisterPins(); @@ -122,7 +125,12 @@ public: void stopInjectionPins(); void stopIgnitionPins(); OutputPin mainRelay; + + // this one cranks engine + OutputPin starterControl; + // this one prevents driver from cranknig engine OutputPin starterRelayDisable; + OutputPin fanRelay; // see acRelayPin OutputPin acRelay; @@ -137,8 +145,6 @@ public: OutputPin runningLedPin; // green LED on brain board by default OutputPin debugTriggerSync; - OutputPin debugTimerCallback; - OutputPin debugSetTimer; OutputPin boostPin; OutputPin idleSolenoidPin; OutputPin secondIdleSolenoidPin; @@ -188,5 +194,6 @@ const char *portname(ioportid_t GPIOx); #endif /* EFI_GPIO_HARDWARE */ +void printSpiConfig(Logging *logging, const char *msg, spi_device_e device); brain_pin_e parseBrainPin(const char *str); const char *hwPortname(brain_pin_e brainPin); diff --git a/firmware/controllers/system/thread_controller.h b/firmware/controllers/system/thread_controller.h index dfd37af9b0..e32aaeb41f 100644 --- a/firmware/controllers/system/thread_controller.h +++ b/firmware/controllers/system/thread_controller.h @@ -55,7 +55,7 @@ public: /** * @brief Start the thread. */ - virtual void Start() + void Start() { m_thread = chThdCreateStatic(m_threadstack, sizeof(m_threadstack), m_prio, StaticThreadTaskAdapter, this); m_thread->name = GetName(); diff --git a/firmware/controllers/system/timer/pwm_generator_logic.cpp b/firmware/controllers/system/timer/pwm_generator_logic.cpp index 0208e8bb9e..6c3c90d1dc 100644 --- a/firmware/controllers/system/timer/pwm_generator_logic.cpp +++ b/firmware/controllers/system/timer/pwm_generator_logic.cpp @@ -11,7 +11,6 @@ #include "global.h" #include "os_access.h" #include "pwm_generator_logic.h" -#include "pwm_generator.h" #include "perf_trace.h" /** @@ -67,13 +66,13 @@ void SimplePwm::setSimplePwmDutyCycle(float dutyCycle) { return; } if (cisnan(dutyCycle)) { - warning(CUSTOM_DUTY_INVALID, "spwd:dutyCycle %.2f", dutyCycle); + warning(CUSTOM_DUTY_INVALID, "%s spwd:dutyCycle %.2f", name, dutyCycle); return; } else if (dutyCycle < 0) { - warning(CUSTOM_DUTY_TOO_LOW, "spwd:dutyCycle %.2f", dutyCycle); + warning(CUSTOM_DUTY_TOO_LOW, "%s dutyCycle %.2f", name, dutyCycle); dutyCycle = 0; } else if (dutyCycle > 1) { - warning(CUSTOM_DUTY_TOO_HIGH, "spwd:dutyCycle %.2f", dutyCycle); + warning(CUSTOM_PWM_DUTY_TOO_HIGH, "%s duty %.2f", name, dutyCycle); dutyCycle = 1; } if (dutyCycle == 0.0f && stateChangeCallback != NULL) { @@ -373,4 +372,3 @@ void applyPinState(int stateIndex, PwmConfig *state) /* pwm_gen_callback */ { output->setValue(value); } } - diff --git a/firmware/controllers/system/timer/pwm_generator_logic.h b/firmware/controllers/system/timer/pwm_generator_logic.h index 182cc9d27b..f30e1a81d3 100644 --- a/firmware/controllers/system/timer/pwm_generator_logic.h +++ b/firmware/controllers/system/timer/pwm_generator_logic.h @@ -117,7 +117,7 @@ class SimplePwm : public PwmConfig { public: SimplePwm(); explicit SimplePwm(const char *name); - void setSimplePwmDutyCycle(float dutyCycle); + virtual void setSimplePwmDutyCycle(float dutyCycle); pin_state_t pinStates[2]; SingleChannelStateSequence sr[1]; float _switchTimes[2]; @@ -125,6 +125,12 @@ private: SingleChannelStateSequence waveInstance; }; +/** + * default implementation of pwm_gen_callback which simply toggles the pins + * + */ +void applyPinState(int stateIndex, PwmConfig* state) /* pwm_gen_callback */; + /** * Start a one-channel software PWM driver. * @@ -133,7 +139,7 @@ private: void startSimplePwm(SimplePwm *state, const char *msg, ExecutorInterface *executor, OutputPin *output, - float frequency, float dutyCycle, pwm_gen_callback *stateChangeCallback); + float frequency, float dutyCycle, pwm_gen_callback *stateChangeCallback = (pwm_gen_callback*)applyPinState); /** * initialize GPIO pin and start a one-channel software PWM driver. @@ -144,7 +150,7 @@ void startSimplePwmExt(SimplePwm *state, const char *msg, ExecutorInterface *executor, brain_pin_e brainPin, OutputPin *output, - float frequency, float dutyCycle, pwm_gen_callback *stateChangeCallback); + float frequency, float dutyCycle, pwm_gen_callback *stateChangeCallback = (pwm_gen_callback*)applyPinState); void copyPwmParameters(PwmConfig *state, int phaseCount, float const *switchTimes, int waveCount, pin_state_t *const *pinStates); diff --git a/firmware/controllers/system/timer/single_timer_executor.cpp b/firmware/controllers/system/timer/single_timer_executor.cpp index c2f06bad58..a30dff3aa2 100644 --- a/firmware/controllers/system/timer/single_timer_executor.cpp +++ b/firmware/controllers/system/timer/single_timer_executor.cpp @@ -35,8 +35,6 @@ #include "engine.h" EXTERN_ENGINE; -extern schfunc_t globalTimerCallback; - /** * these fields are global in order to facilitate debugging */ @@ -45,15 +43,9 @@ static efitime_t nextEventTimeNt = 0; uint32_t hwSetTimerDuration; uint32_t lastExecutionCount; -static void executorCallback(void *arg) { - (void)arg; +void globalTimerCallback() { efiAssertVoid(CUSTOM_ERR_6624, getCurrentRemainingStack() > EXPECTED_REMAINING_STACK, "lowstck#2y"); -// callbackTime = getTimeNowNt(); -// if ((callbackTime > nextEventTimeNt) && (callbackTime - nextEventTimeNt > US2NT(5000))) { -// timerIsLate++; -// } - ___engine.executor.onTimerCallback(); } @@ -180,7 +172,6 @@ void SingleTimerExecutor::scheduleTimerCallback() { } void initSingleTimerExecutorHardware(void) { - globalTimerCallback = executorCallback; initMicrosecondTimer(); } diff --git a/firmware/controllers/trigger/decoders/trigger_honda.cpp b/firmware/controllers/trigger/decoders/trigger_honda.cpp index ea4cd67221..bf3b00ac08 100644 --- a/firmware/controllers/trigger/decoders/trigger_honda.cpp +++ b/firmware/controllers/trigger/decoders/trigger_honda.cpp @@ -314,8 +314,7 @@ void configureHondaAccordShifted(TriggerWaveform *s) { s->isSynchronizationNeeded = false; } -void configureOnePlus16(TriggerWaveform *s, operation_mode_e operationMode) { - UNUSED(operationMode); +void configureOnePlus16(TriggerWaveform *s) { s->initialize(FOUR_STROKE_CAM_SENSOR); int totalTeethCount = 16; @@ -333,4 +332,22 @@ void configureOnePlus16(TriggerWaveform *s, operation_mode_e operationMode) { s->useOnlyPrimaryForSync = true; } +// TT_HONDA_K_12_1 +void configureHondaK_12_1(TriggerWaveform *s) { + s->initialize(FOUR_STROKE_CRANK_SENSOR); + + s->setTriggerSynchronizationGap(3); + + int count = 12; + float tooth = s->getCycleDuration() / count; // hint: tooth = 30 + float width = 4; // for VR we only handle rises so width does not matter much + + s->addEventAngle(20 - width, T_PRIMARY, TV_RISE); + s->addEventAngle(20, T_PRIMARY, TV_FALL); + + for (int i = 1; i <= count; i++) { + s->addEventAngle(tooth * i - width, T_PRIMARY, TV_RISE); + s->addEventAngle(tooth * i, T_PRIMARY, TV_FALL); + } +} diff --git a/firmware/controllers/trigger/decoders/trigger_honda.h b/firmware/controllers/trigger/decoders/trigger_honda.h index da2829e060..83a7ef5102 100644 --- a/firmware/controllers/trigger/decoders/trigger_honda.h +++ b/firmware/controllers/trigger/decoders/trigger_honda.h @@ -17,9 +17,11 @@ void configureHonda_1_4_24(TriggerWaveform *s, bool withOneEventSignal, bool wit trigger_wheel_e const fourEventWave, float d); -void configureOnePlus16(TriggerWaveform *s, operation_mode_e operationMode); +void configureOnePlus16(TriggerWaveform *s); void configureHondaCbr600(TriggerWaveform *s); void configureHondaCbr600custom(TriggerWaveform *s); +void configureHondaK_12_1(TriggerWaveform *s); + diff --git a/firmware/controllers/trigger/decoders/trigger_mazda.cpp b/firmware/controllers/trigger/decoders/trigger_mazda.cpp index 16b03f6682..f3902acc0d 100644 --- a/firmware/controllers/trigger/decoders/trigger_mazda.cpp +++ b/firmware/controllers/trigger/decoders/trigger_mazda.cpp @@ -90,17 +90,17 @@ void initialize_Mazda_Engine_z5_Shape(TriggerWaveform *s) { void initializeMazdaMiataNb2Crank(TriggerWaveform *s) { s->initialize(FOUR_STROKE_SYMMETRICAL_CRANK_SENSOR); - float o = 160; + float o = 40; s->tdcPosition = 60 + 655; s->setTriggerSynchronizationGap2(0.35f, 0.98f); // 384 - s->addEvent720(o + 4 * 56.0f, T_PRIMARY, TV_FALL); + s->addEventAngle(o + 56.0f, T_PRIMARY, TV_FALL); // 400 - s->addEvent720(o + 4 * 60.0f, T_PRIMARY, TV_RISE); - s->addEvent720(o + 4 * 136.0f, T_PRIMARY, TV_FALL); - s->addEvent720(o + 4 * 140.0f, T_PRIMARY, TV_RISE); + s->addEventAngle(o + 60.0f, T_PRIMARY, TV_RISE); + s->addEventAngle(o + 136.0f, T_PRIMARY, TV_FALL); + s->addEventAngle(o + 140.0f, T_PRIMARY, TV_RISE); } static void initializeMazdaMiataNb1ShapeWithOffset(TriggerWaveform *s, float offset) { diff --git a/firmware/controllers/trigger/decoders/trigger_mazda.h b/firmware/controllers/trigger/decoders/trigger_mazda.h index a3267cd1cc..1fdf82b2f8 100644 --- a/firmware/controllers/trigger/decoders/trigger_mazda.h +++ b/firmware/controllers/trigger/decoders/trigger_mazda.h @@ -19,4 +19,9 @@ void configureMazdaProtegeSOHC(TriggerWaveform *s); void configureMazdaProtegeLx(TriggerWaveform *s); void initialize_Mazda_Engine_z5_Shape(TriggerWaveform *s); +/** + * TT_MIATA_NB2_VVT_CAM + * if you unplug VVT you can start & run your engine on it + * trigger offset "-90" seems to be doing the job + */ void initializeMazdaMiataVVtCamShape(TriggerWaveform *s); diff --git a/firmware/controllers/trigger/decoders/trigger_renix.cpp b/firmware/controllers/trigger/decoders/trigger_renix.cpp new file mode 100644 index 0000000000..c8c1fae6ff --- /dev/null +++ b/firmware/controllers/trigger/decoders/trigger_renix.cpp @@ -0,0 +1,41 @@ +/** + * @file trigger_renix.cpp + * + * https://en.wikipedia.org/wiki/Renix + * Has something to do with AMC/Jeep + * + * @date Apr 18, 2020 + * @author Andrey Belomutskiy, (c) 2012-2020 + */ + +#include "trigger_renix.h" + +static void commonRenix(TriggerWaveform *s) { + // 44-2-2 is symmetrical so we only need to define one half + int count = 22; + float tooth = s->getCycleDuration() / count; // hint: tooth = 8.181818 degrees + + float currentAngle = 0; + for (int i = 0;i < 20;i++) { + s->addEventAngle(currentAngle + tooth / 2, T_PRIMARY, TV_RISE); + s->addEventAngle(currentAngle + tooth, T_PRIMARY, TV_FALL); + currentAngle += tooth; + } + + s->addEventAngle(currentAngle + tooth, T_PRIMARY, TV_RISE); + + // float math error accumulates at this point so we have to spell out 180 + s->addEventAngle(s->getCycleDuration(), T_PRIMARY, TV_FALL); +} + +// TT_RENIX_44_2_2 +void initializeRenix44_2_2(TriggerWaveform *s) { + s->initialize(FOUR_STROKE_SYMMETRICAL_CRANK_SENSOR); + commonRenix(s); +} + +// TT_RENIX_66_2_2_2 +void initializeRenix66_2_2(TriggerWaveform *s) { + s->initialize(FOUR_STROKE_THREE_TIMES_CRANK_SENSOR); + commonRenix(s); +} diff --git a/firmware/controllers/trigger/decoders/trigger_renix.h b/firmware/controllers/trigger/decoders/trigger_renix.h new file mode 100644 index 0000000000..d1b7eebb64 --- /dev/null +++ b/firmware/controllers/trigger/decoders/trigger_renix.h @@ -0,0 +1,16 @@ +/* + * @file trigger_renix.h + * + * @date Apr 18, 2020 + * @author Andrey Belomutskiy, (c) 2012-2020 + */ + +#pragma once + +#include "trigger_structure.h" + +// TT_RENIX_44_2_2 +void initializeRenix44_2_2(TriggerWaveform *s); + +// TT_RENIX_66_2_2_2 +void initializeRenix66_2_2(TriggerWaveform *s); diff --git a/firmware/controllers/trigger/decoders/trigger_rover.h b/firmware/controllers/trigger/decoders/trigger_rover.h index e92c220562..53354eb7ab 100644 --- a/firmware/controllers/trigger/decoders/trigger_rover.h +++ b/firmware/controllers/trigger/decoders/trigger_rover.h @@ -6,11 +6,8 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ -#ifndef CONTROLLERS_TRIGGER_TRIGGER_ROVER_H_ -#define CONTROLLERS_TRIGGER_TRIGGER_ROVER_H_ +#pragma once #include "trigger_structure.h" void initializeRoverK(TriggerWaveform *s); - -#endif /* CONTROLLERS_TRIGGER_TRIGGER_ROVER_H_ */ diff --git a/firmware/controllers/trigger/decoders/trigger_structure.cpp b/firmware/controllers/trigger/decoders/trigger_structure.cpp index f43049bd75..95ad817449 100644 --- a/firmware/controllers/trigger/decoders/trigger_structure.cpp +++ b/firmware/controllers/trigger/decoders/trigger_structure.cpp @@ -32,6 +32,7 @@ #include "trigger_subaru.h" #include "trigger_structure.h" #include "trigger_toyota.h" +#include "trigger_renix.h" #include "trigger_rover.h" #include "trigger_honda.h" #include "trigger_vw.h" @@ -115,6 +116,8 @@ int TriggerWaveform::getTriggerWaveformSynchPointIndex() const { */ angle_t TriggerWaveform::getCycleDuration() const { switch (operationMode) { + case FOUR_STROKE_THREE_TIMES_CRANK_SENSOR: + return 120; case FOUR_STROKE_SYMMETRICAL_CRANK_SENSOR: return 180; case FOUR_STROKE_CRANK_SENSOR: @@ -190,8 +193,12 @@ void TriggerWaveform::calculateExpectedEventCounts(bool useOnlyRisingEdgeForTrig } -void TriggerWaveform::addEvent720(angle_t angle, trigger_wheel_e const channelIndex, trigger_value_e const stateParam) { - addEvent(angle / 720, channelIndex, stateParam); +void TriggerWaveform::addEvent720(angle_t angle, trigger_wheel_e const channelIndex, trigger_value_e const state) { + addEvent(angle / 720, channelIndex, state); +} + +void TriggerWaveform::addEventAngle(angle_t angle, trigger_wheel_e const channelIndex, trigger_value_e const state) { + addEvent(angle / getCycleDuration(), channelIndex, state); } void TriggerWaveform::addEvent(angle_t angle, trigger_wheel_e const channelIndex, trigger_value_e const stateParam) { @@ -463,6 +470,14 @@ void TriggerWaveform::initializeTriggerWaveform(Logging *logger, operation_mode_ initializeMazdaMiataVVtCamShape(this); break; + case TT_RENIX_66_2_2_2: + initializeRenix66_2_2(this); + break; + + case TT_RENIX_44_2_2: + initializeRenix44_2_2(this); + break; + case TT_MIATA_VVT: initializeMazdaMiataNb2Crank(this); break; @@ -501,15 +516,15 @@ void TriggerWaveform::initializeTriggerWaveform(Logging *logger, operation_mode_ break; case TT_ONE_PLUS_ONE: - configureOnePlusOne(this, ambiguousOperationMode); + configureOnePlusOne(this); break; case TT_3_1_CAM: - configure3_1_cam(this, ambiguousOperationMode); + configure3_1_cam(this); break; case TT_ONE_PLUS_TOOTHED_WHEEL_60_2: - configureOnePlus60_2(this, ambiguousOperationMode); + configureOnePlus60_2(this); break; case TT_ONE: @@ -536,6 +551,14 @@ void TriggerWaveform::initializeTriggerWaveform(Logging *logger, operation_mode_ setToothedWheelConfiguration(this, 36, 1, ambiguousOperationMode); break; + case TT_BOSCH_QUICK_START: + configureQuickStartSenderWheel(this); + break; + + case TT_HONDA_K_12_1: + configureHondaK_12_1(this); + break; + case TT_HONDA_4_24_1: configureHonda_1_4_24(this, true, true, T_CHANNEL_3, T_PRIMARY, 0); shapeWithoutTdc = true; diff --git a/firmware/controllers/trigger/decoders/trigger_structure.h b/firmware/controllers/trigger/decoders/trigger_structure.h index 8cddeb8367..fbc5c42d64 100644 --- a/firmware/controllers/trigger/decoders/trigger_structure.h +++ b/firmware/controllers/trigger/decoders/trigger_structure.h @@ -222,10 +222,16 @@ public: /* 0..1 angle range */ void addEvent(angle_t angle, trigger_wheel_e const channelIndex, trigger_value_e const state); /* 0..720 angle range - * Deprecated? + * Deprecated! */ void addEvent720(angle_t angle, trigger_wheel_e const channelIndex, trigger_value_e const state); + /** + * This version of 'addEvent...' family considers the angle duration of operationMode in this trigger + * For example, 0..180 for FOUR_STROKE_SYMMETRICAL_CRANK_SENSOR + */ + void addEventAngle(angle_t angle, trigger_wheel_e const channelIndex, trigger_value_e const state); + /* 0..720 angle range * Deprecated? */ @@ -254,6 +260,8 @@ public: */ angle_t getAngle(int phaseIndex) const; + angle_t getCycleDuration() const; + /** * index of synchronization event within TriggerWaveform * See findTriggerZeroEventIndex() @@ -283,9 +291,6 @@ private: * this is part of performance optimization */ operation_mode_e operationMode; - - - angle_t getCycleDuration() const; }; void setToothedWheelConfiguration(TriggerWaveform *s, int total, int skipped, operation_mode_e operationMode); diff --git a/firmware/controllers/trigger/decoders/trigger_universal.cpp b/firmware/controllers/trigger/decoders/trigger_universal.cpp index efd29d02c7..ac294ff383 100644 --- a/firmware/controllers/trigger/decoders/trigger_universal.cpp +++ b/firmware/controllers/trigger/decoders/trigger_universal.cpp @@ -48,8 +48,7 @@ void initializeSkippedToothTriggerWaveformExt(TriggerWaveform *s, int totalTeeth } -void configureOnePlusOne(TriggerWaveform *s, operation_mode_e operationMode) { - UNUSED(operationMode); +void configureOnePlusOne(TriggerWaveform *s) { s->initialize(FOUR_STROKE_CAM_SENSOR); s->addEvent720(180, T_PRIMARY, TV_RISE); @@ -62,8 +61,8 @@ void configureOnePlusOne(TriggerWaveform *s, operation_mode_e operationMode) { s->useOnlyPrimaryForSync = true; } -void configureOnePlus60_2(TriggerWaveform *s, operation_mode_e operationMode) { - UNUSED(operationMode); +// todo: open question if we need this trigger +void configureOnePlus60_2(TriggerWaveform *s) { s->initialize(FOUR_STROKE_CAM_SENSOR); int totalTeethCount = 60; @@ -81,8 +80,7 @@ void configureOnePlus60_2(TriggerWaveform *s, operation_mode_e operationMode) { s->useOnlyPrimaryForSync = true; } -void configure3_1_cam(TriggerWaveform *s, operation_mode_e operationMode) { - UNUSED(operationMode); +void configure3_1_cam(TriggerWaveform *s) { s->initialize(FOUR_STROKE_CAM_SENSOR); @@ -117,3 +115,26 @@ void configure3_1_cam(TriggerWaveform *s, operation_mode_e operationMode) { s->isSynchronizationNeeded = false; } + +void configureQuickStartSenderWheel(TriggerWaveform *s) { + s->initialize(FOUR_STROKE_CAM_SENSOR); + + s->useRiseEdge = false; + s->gapBothDirections = false; + + int offset = 2 * 20; + + s->setTriggerSynchronizationGap3(0, 2, 3); + + s->addEventAngle(offset + 2 * 0, T_PRIMARY, TV_RISE); + s->addEventAngle(offset + 2 * 70, T_PRIMARY, TV_FALL); + + s->addEventAngle(offset + 2 * 90, T_PRIMARY, TV_RISE); + s->addEventAngle(offset + 2 * 110, T_PRIMARY, TV_FALL); + + s->addEventAngle(offset + 2 * 180, T_PRIMARY, TV_RISE); + s->addEventAngle(offset + 2 * 200, T_PRIMARY, TV_FALL); + + s->addEventAngle(offset + 2 * 270, T_PRIMARY, TV_RISE); + s->addEventAngle(offset + 2 * 340, T_PRIMARY, TV_FALL); +} diff --git a/firmware/controllers/trigger/decoders/trigger_universal.h b/firmware/controllers/trigger/decoders/trigger_universal.h index b6c607115c..45c2385de8 100644 --- a/firmware/controllers/trigger/decoders/trigger_universal.h +++ b/firmware/controllers/trigger/decoders/trigger_universal.h @@ -6,9 +6,7 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ -#ifndef CONTROLLERS_TRIGGER_DECODERS_TRIGGER_UNIVERSAL_H_ -#define CONTROLLERS_TRIGGER_DECODERS_TRIGGER_UNIVERSAL_H_ - +#pragma once #include "trigger_structure.h" #define NO_LEFT_FILTER -1 @@ -22,9 +20,11 @@ void addSkippedToothTriggerEvents(trigger_wheel_e wheel, TriggerWaveform *s, void initializeSkippedToothTriggerWaveformExt(TriggerWaveform *s, int totalTeethCount, int skippedCount, operation_mode_e operationMode);; -void configureOnePlus60_2(TriggerWaveform *s, operation_mode_e operationMode); +void configureOnePlus60_2(TriggerWaveform *s); -void configure3_1_cam(TriggerWaveform *s, operation_mode_e operationMode); +// TT_3_1_CAM +void configure3_1_cam(TriggerWaveform *s); -void configureOnePlusOne(TriggerWaveform *s, operation_mode_e operationMode); -#endif /* CONTROLLERS_TRIGGER_DECODERS_TRIGGER_UNIVERSAL_H_ */ +void configureOnePlusOne(TriggerWaveform *s); +// TT_BOSCH_QUICK_START +void configureQuickStartSenderWheel(TriggerWaveform *s); diff --git a/firmware/controllers/trigger/trigger.mk b/firmware/controllers/trigger/trigger.mk index 9aaa261b2d..e387380cca 100644 --- a/firmware/controllers/trigger/trigger.mk +++ b/firmware/controllers/trigger/trigger.mk @@ -13,6 +13,7 @@ TRIGGER_DECODERS_SRC_CPP = \ $(CONTROLLERS_DIR)/trigger/decoders/trigger_gm.cpp \ $(CONTROLLERS_DIR)/trigger/decoders/trigger_honda.cpp \ $(CONTROLLERS_DIR)/trigger/decoders/trigger_rover.cpp \ + $(CONTROLLERS_DIR)/trigger/decoders/trigger_renix.cpp \ $(CONTROLLERS_DIR)/trigger/decoders/trigger_vw.cpp \ $(CONTROLLERS_DIR)/trigger/decoders/trigger_misc.cpp \ $(CONTROLLERS_DIR)/trigger/decoders/trigger_universal.cpp diff --git a/firmware/controllers/trigger/trigger_central.cpp b/firmware/controllers/trigger/trigger_central.cpp index 4fc972fe45..c6b7dc2c80 100644 --- a/firmware/controllers/trigger/trigger_central.cpp +++ b/firmware/controllers/trigger/trigger_central.cpp @@ -24,7 +24,7 @@ #include "trigger_simulator.h" #include "rpm_calculator.h" - +#include "tooth_logger.h" #include "perf_trace.h" #if EFI_PROD_CODE @@ -42,6 +42,11 @@ WaveChart waveChart; trigger_central_s::trigger_central_s() : hwEventCounters() { + static_assert(TRIGGER_TYPE_60_2 == TT_TOOTHED_WHEEL_60_2, "One we will have one source of this magic constant"); + static_assert(TRIGGER_TYPE_36_1 == TT_TOOTHED_WHEEL_36_1, "One we will have one source of this magic constant"); + + + } TriggerCentral::TriggerCentral() : trigger_central_s() { @@ -88,7 +93,7 @@ void addTriggerEventListener(ShaftPositionListener listener, const char *name, E #define miataNb2VVTRatioFrom (8.50 * 0.75) #define miataNb2VVTRatioTo (14) - +#define miataNbIndex (0) void hwHandleVvtCamSignal(trigger_value_e front, efitick_t nowNt DECLARE_ENGINE_PARAMETER_SUFFIX) { TriggerCentral *tc = &engine->triggerCentral; @@ -98,13 +103,36 @@ void hwHandleVvtCamSignal(trigger_value_e front, efitick_t nowNt DECLARE_ENGINE_ tc->vvtEventFallCounter++; } + if (!CONFIG(displayLogicLevelsInEngineSniffer)) { + addEngineSnifferEvent(PROTOCOL_VVT_NAME, front == TV_RISE ? PROTOCOL_ES_UP : PROTOCOL_ES_DOWN); + } - addEngineSnifferEvent(PROTOCOL_VVT_NAME, front == TV_RISE ? PROTOCOL_ES_UP : PROTOCOL_ES_DOWN); if (CONFIG(vvtCamSensorUseRise) ^ (front != TV_FALL)) { return; } + if (CONFIG(displayLogicLevelsInEngineSniffer)) { + if (CONFIG(vvtCamSensorUseRise)) { + // todo: unify TS composite logger code with console Engine Sniffer + // todo: better API to reduce copy/paste? +#if EFI_TOOTH_LOGGER + LogTriggerTooth(SHAFT_SECONDARY_RISING, nowNt PASS_ENGINE_PARAMETER_SUFFIX); + LogTriggerTooth(SHAFT_SECONDARY_FALLING, nowNt PASS_ENGINE_PARAMETER_SUFFIX); +#endif /* EFI_TOOTH_LOGGER */ + addEngineSnifferEvent(PROTOCOL_VVT_NAME, PROTOCOL_ES_UP); + addEngineSnifferEvent(PROTOCOL_VVT_NAME, PROTOCOL_ES_DOWN); + } else { +#if EFI_TOOTH_LOGGER + LogTriggerTooth(SHAFT_SECONDARY_FALLING, nowNt PASS_ENGINE_PARAMETER_SUFFIX); + LogTriggerTooth(SHAFT_SECONDARY_RISING, nowNt PASS_ENGINE_PARAMETER_SUFFIX); +#endif /* EFI_TOOTH_LOGGER */ + + addEngineSnifferEvent(PROTOCOL_VVT_NAME, PROTOCOL_ES_DOWN); + addEngineSnifferEvent(PROTOCOL_VVT_NAME, PROTOCOL_ES_UP); + } + } + floatus_t oneDegreeUs = engine->rpmCalculator.oneDegreeUs; if (cisnan(oneDegreeUs)) { // we are here if we are getting VVT position signals while engine is not running @@ -180,7 +208,7 @@ void hwHandleVvtCamSignal(trigger_value_e front, efitick_t nowNt DECLARE_ENGINE_ /** * NB2 is a symmetrical crank, there are four phases total */ - while (tc->triggerState.getTotalRevolutionCounter() % 4 != engineConfiguration->nbVvtIndex) { + while (tc->triggerState.getTotalRevolutionCounter() % 4 != miataNbIndex) { tc->triggerState.incrementTotalEventCounter(); } } @@ -194,9 +222,6 @@ int maxTriggerReentraint = 0; uint32_t triggerDuration; uint32_t triggerMaxDuration = 0; -static bool isInsideTriggerHandler = false; - - void hwHandleShaftSignal(trigger_event_e signal, efitick_t timestamp) { ScopePerf perf(PE::HandleShaftSignal, static_cast(signal)); @@ -204,7 +229,14 @@ void hwHandleShaftSignal(trigger_event_e signal, efitick_t timestamp) { // Log to the Tunerstudio tooth logger // We want to do this before anything else as we // actually want to capture any noise/jitter that may be occurring - LogTriggerTooth(signal, timestamp); + + bool logLogicState = CONFIG(displayLogicLevelsInEngineSniffer && engineConfiguration->useOnlyRisingEdgeForTrigger); + + if (!logLogicState) { + // we log physical state even if displayLogicLevelsInEngineSniffer if both fronts are used by decoder + LogTriggerTooth(signal, timestamp PASS_ENGINE_PARAMETER_SUFFIX); + } + #endif /* EFI_TOOTH_LOGGER */ // for effective noise filtering, we need both signal edges, @@ -214,16 +246,28 @@ void hwHandleShaftSignal(trigger_event_e signal, efitick_t timestamp) { return; } } + +#if EFI_TOOTH_LOGGER + if (logLogicState) { + LogTriggerTooth(signal, timestamp PASS_ENGINE_PARAMETER_SUFFIX); + if (signal == SHAFT_PRIMARY_RISING) { + LogTriggerTooth(SHAFT_PRIMARY_FALLING, timestamp PASS_ENGINE_PARAMETER_SUFFIX); + } else { + LogTriggerTooth(SHAFT_SECONDARY_FALLING, timestamp PASS_ENGINE_PARAMETER_SUFFIX); + } + } +#endif /* EFI_TOOTH_LOGGER */ + uint32_t triggerHandlerEntryTime = getTimeNowLowerNt(); - isInsideTriggerHandler = true; if (triggerReentraint > maxTriggerReentraint) maxTriggerReentraint = triggerReentraint; triggerReentraint++; + efiAssertVoid(CUSTOM_ERR_6636, getCurrentRemainingStack() > 128, "lowstck#8"); engine->triggerCentral.handleShaftSignal(signal, timestamp PASS_ENGINE_PARAMETER_SUFFIX); + triggerReentraint--; triggerDuration = getTimeNowLowerNt() - triggerHandlerEntryTime; - isInsideTriggerHandler = false; if (triggerDuration > triggerMaxDuration) triggerMaxDuration = triggerDuration; } @@ -399,8 +443,7 @@ void TriggerCentral::handleShaftSignal(trigger_event_e signal, efitick_t timesta } } -EXTERN_ENGINE -; +EXTERN_ENGINE; static void triggerShapeInfo(void) { #if EFI_PROD_CODE || EFI_SIMULATOR @@ -408,7 +451,7 @@ static void triggerShapeInfo(void) { scheduleMsg(logger, "useRise=%s", boolToString(TRIGGER_WAVEFORM(useRiseEdge))); scheduleMsg(logger, "gap from %.2f to %.2f", TRIGGER_WAVEFORM(syncronizationRatioFrom[0]), TRIGGER_WAVEFORM(syncronizationRatioTo[0])); - for (int i = 0; i < s->getSize(); i++) { + for (size_t i = 0; i < s->getSize(); i++) { scheduleMsg(logger, "event %d %.2f", i, s->eventAngles[i]); } #endif @@ -562,7 +605,7 @@ void triggerInfo(void) { boolToString(ts->isSynchronizationNeeded), boolToString(isTriggerDecoderError()), engine->triggerCentral.triggerState.totalTriggerErrorCounter, engine->triggerCentral.triggerState.orderingErrorCounter, engine->triggerCentral.triggerState.getTotalRevolutionCounter(), - boolToString(engineConfiguration->directSelfStimulation)); + boolToString(engine->directSelfStimulation)); if (TRIGGER_WAVEFORM(isSynchronizationNeeded)) { scheduleMsg(logger, "gap from %.2f to %.2f", TRIGGER_WAVEFORM(syncronizationRatioFrom[0]), TRIGGER_WAVEFORM(syncronizationRatioTo[0])); @@ -600,22 +643,7 @@ void triggerInfo(void) { scheduleMsg(logger, "primary logic input: %s", hwPortname(CONFIG(logicAnalyzerPins)[0])); scheduleMsg(logger, "secondary logic input: %s", hwPortname(CONFIG(logicAnalyzerPins)[1])); - scheduleMsg(logger, "zeroTestTime=%d maxSchedulingPrecisionLoss=%d", engine->m.zeroTestTime, maxSchedulingPrecisionLoss); - - scheduleMsg(logger, "advanceLookupTime=%d now=%d fuelCalcTime=%d", - engine->m.advanceLookupTime, *cyccnt, - engine->m.fuelCalcTime); - - scheduleMsg(logger, - "ignitionSchTime=%d injectonSchTime=%d", - engine->m.ignitionSchTime, - engine->m.injectonSchTime); - - scheduleMsg(logger, "mapTime=%d/hipTime=%d/rpmTime=%d/mainTriggerCallbackTime=%d", - engine->m.mapAveragingCbTime, - engine->m.hipCbTime, - engine->m.rpmCbTime, - engine->m.mainTriggerCallbackTime); + scheduleMsg(logger, "maxSchedulingPrecisionLoss=%d", maxSchedulingPrecisionLoss); #if EFI_CLOCK_LOCKS scheduleMsg(logger, "maxLockedDuration=%d / maxTriggerReentraint=%d", maxLockedDuration, maxTriggerReentraint); @@ -665,8 +693,7 @@ void onConfigurationChangeTriggerCallback(DECLARE_ENGINE_PARAMETER_SIGNATURE) { isConfigurationChanged(vvtMode) || isConfigurationChanged(vvtCamSensorUseRise) || isConfigurationChanged(vvtOffset) || - isConfigurationChanged(vvtDisplayInverted) || - isConfigurationChanged(nbVvtIndex); + isConfigurationChanged(vvtDisplayInverted); if (changed) { assertEngineReference(); diff --git a/firmware/controllers/trigger/trigger_decoder.cpp b/firmware/controllers/trigger/trigger_decoder.cpp index e896531167..f9acab3996 100644 --- a/firmware/controllers/trigger/trigger_decoder.cpp +++ b/firmware/controllers/trigger/trigger_decoder.cpp @@ -7,8 +7,8 @@ * * * enable trigger_details - * DBG_TRIGGER_SYNC = 16 - * set debug_mode 16 + * DBG_TRIGGER_COUNTERS = 5 + * set debug_mode 5 * * This file is part of rusEfi - see http://rusefi.com * @@ -104,8 +104,7 @@ TriggerStateWithRunningStatistics::TriggerStateWithRunningStatistics() : #if EFI_SHAFT_POSITION_INPUT -EXTERN_ENGINE -; +EXTERN_ENGINE; #if ! EFI_PROD_CODE bool printTriggerDebug = false; @@ -336,7 +335,7 @@ bool TriggerState::isEvenRevolution() const { bool TriggerState::validateEventCounters(TriggerWaveform *triggerShape) const { bool isDecodingError = false; for (int i = 0;i < PWM_PHASE_MAX_WAVE_PER_PWM;i++) { - isDecodingError |= currentCycle.eventCount[i] != triggerShape->expectedEventCount[i]; + isDecodingError |= (currentCycle.eventCount[i] != triggerShape->expectedEventCount[i]); } @@ -353,7 +352,7 @@ bool TriggerState::validateEventCounters(TriggerWaveform *triggerShape) const { } void TriggerState::onShaftSynchronization(const TriggerStateCallback triggerCycleCallback, - efitick_t nowNt, trigger_wheel_e triggerWheel, TriggerWaveform *triggerShape) { + efitick_t nowNt, TriggerWaveform *triggerShape) { if (triggerCycleCallback) { @@ -499,14 +498,13 @@ void TriggerState::decodeTriggerEvent(TriggerWaveform *triggerShape, const Trigg DISPLAY(DISPLAY_FIELD(vvtCamCounter)); if (triggerShape->isSynchronizationNeeded) { - // this is getting a little out of hand, any ideas? currentGap = 1.0 * toothDurations[0] / toothDurations[1]; - if (CONFIG(debugMode) == DBG_TRIGGER_SYNC) { + if (CONFIG(debugMode) == DBG_TRIGGER_COUNTERS) { #if EFI_TUNER_STUDIO - tsOutputChannels.debugFloatField1 = currentGap; - tsOutputChannels.debugFloatField2 = currentCycle.current_index; + tsOutputChannels.debugFloatField6 = currentGap; + tsOutputChannels.debugIntField3 = currentCycle.current_index; #endif /* EFI_TUNER_STUDIO */ } @@ -549,7 +547,8 @@ void TriggerState::decodeTriggerEvent(TriggerWaveform *triggerShape, const Trigg scheduleMsg(logger, "index=%d NaN gap, you have noise issues?", i); } else { - scheduleMsg(logger, "time=%d index=%d: gap=%.3f expected from %.3f to %.3f error=%s", + scheduleMsg(logger, "rpm=%d time=%d index=%d: gap=%.3f expected from %.3f to %.3f error=%s", + GET_RPM(), /* cast is needed to make sure we do not put 64 bit value to stack*/ (int)getTimeNowSeconds(), i, gap, @@ -629,7 +628,7 @@ void TriggerState::decodeTriggerEvent(TriggerWaveform *triggerShape, const Trigg nextTriggerEvent() ; - onShaftSynchronization(triggerCycleCallback, nowNt, triggerWheel, triggerShape); + onShaftSynchronization(triggerCycleCallback, nowNt, triggerShape); } else { /* if (!isSynchronizationPoint) */ nextTriggerEvent() diff --git a/firmware/controllers/trigger/trigger_decoder.h b/firmware/controllers/trigger/trigger_decoder.h index 9583a88222..94b0698c9e 100644 --- a/firmware/controllers/trigger/trigger_decoder.h +++ b/firmware/controllers/trigger/trigger_decoder.h @@ -74,7 +74,7 @@ public: bool validateEventCounters(TriggerWaveform *triggerShape) const; void onShaftSynchronization(const TriggerStateCallback triggerCycleCallback, - efitick_t nowNt, trigger_wheel_e triggerWheel, TriggerWaveform *triggerShape); + efitick_t nowNt, TriggerWaveform *triggerShape); bool isValidIndex(TriggerWaveform *triggerShape) const; diff --git a/firmware/controllers/trigger/trigger_emulator_algo.cpp b/firmware/controllers/trigger/trigger_emulator_algo.cpp index 086721bdd9..7befb710fa 100644 --- a/firmware/controllers/trigger/trigger_emulator_algo.cpp +++ b/firmware/controllers/trigger/trigger_emulator_algo.cpp @@ -35,14 +35,15 @@ bool needEvent(const int currentIndex, const int size, MultiChannelStateSequence #include "engine_configuration.h" #include "trigger_central.h" #include "trigger_simulator.h" - -#include "pwm_generator.h" +#include "settings.h" +#include "pwm_generator_logic.h" TriggerEmulatorHelper::TriggerEmulatorHelper() { } -EXTERN_ENGINE -; +EXTERN_ENGINE; + +static OutputPin emulatorOutputs[PWM_PHASE_MAX_WAVE_PER_PWM]; void TriggerEmulatorHelper::handleEmulatorCallback(PwmConfig *state, int stateIndex) { efitick_t stamp = getTimeNowNt(); @@ -50,22 +51,19 @@ void TriggerEmulatorHelper::handleEmulatorCallback(PwmConfig *state, int stateIn // todo: code duplication with TriggerStimulatorHelper::feedSimulatedEvent? MultiChannelStateSequence *multiChannelStateSequence = &state->multiChannelStateSequence; - if (needEvent(stateIndex, state->phaseCount, &state->multiChannelStateSequence, 0)) { - pin_state_t currentValue = multiChannelStateSequence->getChannelState(/*phaseIndex*/0, stateIndex); - hwHandleShaftSignal(currentValue ? SHAFT_PRIMARY_RISING : SHAFT_PRIMARY_FALLING, stamp); - } + for (size_t i = 0; i < efi::size(emulatorOutputs); i++) + { + if (needEvent(stateIndex, state->phaseCount, &state->multiChannelStateSequence, i)) { + pin_state_t currentValue = multiChannelStateSequence->getChannelState(/*phaseIndex*/i, stateIndex); + + constexpr trigger_event_e riseEvents[] = { SHAFT_PRIMARY_RISING, SHAFT_SECONDARY_RISING, SHAFT_3RD_RISING }; + constexpr trigger_event_e fallEvents[] = { SHAFT_PRIMARY_FALLING, SHAFT_SECONDARY_FALLING, SHAFT_3RD_FALLING }; - if (needEvent(stateIndex, state->phaseCount, &state->multiChannelStateSequence, 1)) { - pin_state_t currentValue = multiChannelStateSequence->getChannelState(/*phaseIndex*/1, stateIndex); - hwHandleShaftSignal(currentValue ? SHAFT_SECONDARY_RISING : SHAFT_SECONDARY_FALLING, stamp); - } + trigger_event_e event = (currentValue ? riseEvents : fallEvents)[i]; - if (needEvent(stateIndex, state->phaseCount, &state->multiChannelStateSequence, 2)) { - pin_state_t currentValue = multiChannelStateSequence->getChannelState(/*phaseIndex*/2, stateIndex); - hwHandleShaftSignal(currentValue ? SHAFT_3RD_RISING : SHAFT_3RD_FALLING, stamp); + hwHandleShaftSignal(event, stamp); + } } - - // print("hello %d\r\n", chTimeNow()); } /* @@ -132,6 +130,7 @@ static void updateTriggerWaveformIfNeeded(PwmConfig *state) { } static TriggerEmulatorHelper helper; +static bool hasStimPins = false; static void emulatorApplyPinState(int stateIndex, PwmConfig *state) /* pwm_gen_callback */ { if (stopEmulationAtIndex == stateIndex) { @@ -140,15 +139,21 @@ static void emulatorApplyPinState(int stateIndex, PwmConfig *state) /* pwm_gen_c if (!isEmulating) { return; } -#if EFI_PROD_CODE - applyPinState(stateIndex, state); -#endif /* EFI_PROD_CODE */ - if (engineConfiguration->directSelfStimulation) { + + if (engine->directSelfStimulation) { /** * this callback would invoke the input signal handlers directly */ helper.handleEmulatorCallback(state, stateIndex); } + +#if EFI_PROD_CODE + // Only set pins if they're configured - no need to waste the cycles otherwise + if (hasStimPins) { + applyPinState(stateIndex, state); + } +#endif /* EFI_PROD_CODE */ + } static void setEmulatorAtIndex(int index) { @@ -178,4 +183,36 @@ void initTriggerEmulatorLogic(Logging *sharedLogger DECLARE_ENGINE_PARAMETER_SUF addConsoleActionI("stop_stimulator_at_index", setEmulatorAtIndex); addConsoleAction("resume_stimulator", resumeStimulator); } + +void onConfigurationChangeRpmEmulatorCallback(engine_configuration_s *previousConfiguration) { + if (engineConfiguration->triggerSimulatorFrequency == + previousConfiguration->triggerSimulatorFrequency) { + return; + } + setTriggerEmulatorRPM(engineConfiguration->triggerSimulatorFrequency); +} + +void initTriggerEmulator(Logging *sharedLogger DECLARE_ENGINE_PARAMETER_SUFFIX) { + print("Emulating %s\r\n", getConfigurationName(engineConfiguration->engineType)); + + for (size_t i = 0; i < efi::size(emulatorOutputs); i++) + { + triggerSignal.outputPins[i] = &emulatorOutputs[i]; + + brain_pin_e pin = CONFIG(triggerSimulatorPins)[i]; + + // Only bother trying to set output pins if they're configured + if (pin != GPIO_UNASSIGNED) { + hasStimPins = true; + } + +#if EFI_PROD_CODE + triggerSignal.outputPins[i]->initPin("Trigger emulator", pin, + &CONFIG(triggerSimulatorPinModes)[i]); +#endif + } + + initTriggerEmulatorLogic(sharedLogger); +} + #endif /* EFI_EMULATE_POSITION_SENSORS */ diff --git a/firmware/controllers/trigger/trigger_emulator_algo.h b/firmware/controllers/trigger/trigger_emulator_algo.h index a143e93cc8..cd5c89c07f 100644 --- a/firmware/controllers/trigger/trigger_emulator_algo.h +++ b/firmware/controllers/trigger/trigger_emulator_algo.h @@ -8,7 +8,15 @@ #pragma once #include "engine.h" -#include "pwm_generator_logic.h" + +class Logging; +class PwmConfig; +class MultiChannelStateSequence; + +void initTriggerEmulator(Logging *sharedLogger DECLARE_ENGINE_PARAMETER_SUFFIX); +void setTriggerEmulatorRPM(int value DECLARE_ENGINE_PARAMETER_SUFFIX); +void onConfigurationChangeRpmEmulatorCallback(engine_configuration_s *previousConfiguration); + class TriggerEmulatorHelper { public: diff --git a/firmware/development/development.mk b/firmware/development/development.mk index 4ccc15e29a..b1421eacb0 100644 --- a/firmware/development/development.mk +++ b/firmware/development/development.mk @@ -3,8 +3,7 @@ DEVELOPMENT_DIR=$(PROJECT_DIR)/development DEV_SRC = $(DEVELOPMENT_DIR)/test/test.c \ $(DEVELOPMENT_DIR)/test/testbmk.c -DEV_SRC_CPP = $(DEVELOPMENT_DIR)/trigger_emulator.cpp \ - $(DEVELOPMENT_DIR)/hw_layer/poten.cpp \ +DEV_SRC_CPP = $(DEVELOPMENT_DIR)/hw_layer/poten.cpp \ $(DEVELOPMENT_DIR)/sensor_chart.cpp \ $(DEVELOPMENT_DIR)/rfi_perftest.cpp \ $(DEVELOPMENT_DIR)/engine_emulator.cpp \ diff --git a/firmware/development/engine_emulator.cpp b/firmware/development/engine_emulator.cpp index 5df8e39dee..eb994d1bbc 100644 --- a/firmware/development/engine_emulator.cpp +++ b/firmware/development/engine_emulator.cpp @@ -20,82 +20,10 @@ #include "pwm_generator_logic.h" #include "poten.h" -#include "trigger_emulator.h" - -extern bool hasFirmwareErrorFlag; - -static THD_WORKING_AREA(eeThreadStack, UTILITY_THREAD_STACK_SIZE); - -#define DIAG_PIN GPIOD_0 - -void setDiag(int value) { - print("Setting diag: %d\r\n", value); -// todo: convert to new api palWritePad(DIAG_PORT, DIAG_PIN, value); -} - -#define PERIOD 3000 +#include "trigger_emulator_algo.h" EXTERN_ENGINE; -static void emulate(void) { - print("Emulating...\r\n"); - setDiag(1); - chThdSleep(1); - - for (int i = 400; i <= 1300; i++) { - if (i % 50 != 0) - continue; - setTriggerEmulatorRPM(i PASS_ENGINE_PARAMETER_SUFFIX); - chThdSleepMilliseconds(PERIOD); - } - - setTriggerEmulatorRPM(0 PASS_ENGINE_PARAMETER_SUFFIX); - - setDiag(0); - chThdSleep(1); - print("Emulation DONE!\r\n"); -} - -static int flag = FALSE; - -static msg_t eeThread(void *arg) { - (void)arg; - chRegSetThreadName("Engine"); - - while (TRUE) { - while (!flag) - chThdSleepMilliseconds(200); - flag = FALSE; - emulate(); - } -#if defined __GNUC__ - return (msg_t)NULL; -#endif -} - -void startEmulator(void) { - flag = TRUE; -} - -//static void printAdvance(int rpm, int maf100) { -// float advance = getAdvance(rpm, maf100 / 100.0); -// print("advance for %d rpm %d maf100: %.2f\r\n", rpm, maf100, advance); -//} - -#if defined(EFI_ENGINE_STIMULATOR) -static void initECUstimulator(Engine *engine) { - efiSetPadMode("TEN", DIAG_PIN, PAL_MODE_OUTPUT_PUSHPULL); - - addConsoleActionI("diag", setDiag); - addConsoleAction("emu", startEmulator); -// addConsoleActionII("ad", printAdvance); - - setDiag(1); - - chThdCreateStatic(eeThreadStack, sizeof(eeThreadStack), NORMALPRIO, (tfunc_t)(void*) eeThread, engine); -} -#endif /* EFI_ENGINE_STIMULATOR */ - void initEngineEmulator(Logging *sharedLogger DECLARE_ENGINE_PARAMETER_SUFFIX) { if (hasFirmwareError()) return; @@ -104,6 +32,5 @@ void initEngineEmulator(Logging *sharedLogger DECLARE_ENGINE_PARAMETER_SUFFIX) { initPotentiometers(sharedLogger PASS_ENGINE_PARAMETER_SUFFIX); #endif /* EFI_POTENTIOMETER && HAL_USE_SPI*/ - //initECUstimulator(); initTriggerEmulator(sharedLogger PASS_ENGINE_PARAMETER_SUFFIX); } diff --git a/firmware/development/engine_emulator.h b/firmware/development/engine_emulator.h index b515c74819..a446a34e3a 100644 --- a/firmware/development/engine_emulator.h +++ b/firmware/development/engine_emulator.h @@ -5,10 +5,8 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ -#ifndef ENGINE_EMULATOR_H_ -#define ENGINE_EMULATOR_H_ +#pragma once #include "engine.h" void initEngineEmulator(Logging *sharedLogger DECLARE_ENGINE_PARAMETER_SUFFIX); -#endif /* ENGINE_EMULATOR_H_ */ diff --git a/firmware/development/engine_sniffer.cpp b/firmware/development/engine_sniffer.cpp index 931508eee9..7b850d1ab5 100644 --- a/firmware/development/engine_sniffer.cpp +++ b/firmware/development/engine_sniffer.cpp @@ -38,8 +38,7 @@ #define CHART_DELIMETER '!' -EXTERN_ENGINE -; +EXTERN_ENGINE; extern uint32_t maxLockedDuration; /** diff --git a/firmware/development/engine_sniffer.h b/firmware/development/engine_sniffer.h index e5775d894f..f53b6486cf 100644 --- a/firmware/development/engine_sniffer.h +++ b/firmware/development/engine_sniffer.h @@ -6,8 +6,7 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ -#ifndef WAVE_CHART_H_ -#define WAVE_CHART_H_ +#pragma once #include "global.h" @@ -48,4 +47,3 @@ void setChartSize(int newSize); #endif /* EFI_ENGINE_SNIFFER */ -#endif /* WAVE_CHART_H_ */ diff --git a/firmware/development/hw_layer/poten.h b/firmware/development/hw_layer/poten.h index 5e4b919df4..014395dd24 100644 --- a/firmware/development/hw_layer/poten.h +++ b/firmware/development/hw_layer/poten.h @@ -6,8 +6,7 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ -#ifndef POTEN_H_ -#define POTEN_H_ +#pragma once #include "global.h" @@ -26,4 +25,3 @@ void setPotResistance(Mcp42010Driver *driver, int channel, int resistance); #endif -#endif /* POTEN_H_ */ diff --git a/firmware/development/logic_analyzer.cpp b/firmware/development/logic_analyzer.cpp index 7a024e3b62..3cf7259b3a 100644 --- a/firmware/development/logic_analyzer.cpp +++ b/firmware/development/logic_analyzer.cpp @@ -37,7 +37,6 @@ EXTERN_ENGINE; #if EFI_ENGINE_SNIFFER extern WaveChart waveChart; #endif /* EFI_ENGINE_SNIFFER */ -extern bool hasFirmwareErrorFlag; /** * Difference between current 1st trigger event and previous 1st trigger event. diff --git a/firmware/development/perf_trace.h b/firmware/development/perf_trace.h index 98ca956ef0..431e7bc886 100644 --- a/firmware/development/perf_trace.h +++ b/firmware/development/perf_trace.h @@ -58,6 +58,8 @@ enum class PE : uint8_t { Temporary3, Temporary4, EngineSniffer, + PrepareIgnitionSchedule, + Hip9011IntHoldCallback, // enum_end_tag // The tag above is consumed by PerfTraceTool.java // please note that the tool requires a comma at the end of last value diff --git a/firmware/development/rfi_perftest.h b/firmware/development/rfi_perftest.h index 615eb65c20..6374df30fb 100644 --- a/firmware/development/rfi_perftest.h +++ b/firmware/development/rfi_perftest.h @@ -5,11 +5,8 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ -#ifndef RFI_PERFTEST_H_ -#define RFI_PERFTEST_H_ +#pragma once #include "global.h" void initTimePerfActions(Logging *sharedLogger); - -#endif /* RFI_PERFTEST_H_ */ diff --git a/firmware/development/trigger_emulator.cpp b/firmware/development/trigger_emulator.cpp deleted file mode 100644 index 30643018aa..0000000000 --- a/firmware/development/trigger_emulator.cpp +++ /dev/null @@ -1,65 +0,0 @@ -/** - * @file trigger_emulator.cpp - * @brief Position sensor(s) emulation code - * - * This file is mostly about initialization, the configuration is - * provided by the configureShaftPositionEmulatorShape method - * - * @date Dec 9, 2012 - * @author Andrey Belomutskiy, (c) 2012-2020 - */ - -#include "trigger_emulator.h" -#include "eficonsole.h" -#include "main_trigger_callback.h" -#include "io_pins.h" -#include "trigger_emulator_algo.h" -#include "trigger_central.h" -#include "settings.h" - -#if EFI_PROD_CODE -#include "pwm_generator.h" -#include "pin_repository.h" -#endif /* EFI_PROD_CODE */ - -extern PwmConfig triggerSignal; - -static OutputPin emulatorOutputs[3]; - -EXTERN_ENGINE; - -void onConfigurationChangeRpmEmulatorCallback(engine_configuration_s *previousConfiguration) { - if (engineConfiguration->triggerSimulatorFrequency == - previousConfiguration->triggerSimulatorFrequency) { - return; - } - setTriggerEmulatorRPM(engineConfiguration->triggerSimulatorFrequency); -} - -void initTriggerEmulator(Logging *sharedLogger DECLARE_ENGINE_PARAMETER_SUFFIX) { - - -#if EFI_EMULATE_POSITION_SENSORS - print("Emulating %s\r\n", getConfigurationName(engineConfiguration->engineType)); - - triggerSignal.outputPins[0] = &emulatorOutputs[0]; - triggerSignal.outputPins[1] = &emulatorOutputs[1]; - triggerSignal.outputPins[2] = &emulatorOutputs[2]; - -#if EFI_PROD_CODE - // todo: refactor, make this a loop - triggerSignal.outputPins[0]->initPin("trg emulator ch1", CONFIG(triggerSimulatorPins)[0], - &CONFIG(triggerSimulatorPinModes)[0]); - - triggerSignal.outputPins[1]->initPin("trg emulator ch2", CONFIG(triggerSimulatorPins)[1], - &CONFIG(triggerSimulatorPinModes)[1]); - - triggerSignal.outputPins[2]->initPin("trg emulator ch3", CONFIG(triggerSimulatorPins)[2], - &CONFIG(triggerSimulatorPinModes)[2]); -#endif /* EFI_PROD_CODE */ - - initTriggerEmulatorLogic(sharedLogger); -#else - print("No position sensor(s) emulation\r\n"); -#endif /* EFI_EMULATE_POSITION_SENSORS */ -} diff --git a/firmware/development/trigger_emulator.h b/firmware/development/trigger_emulator.h deleted file mode 100644 index 96264d26d1..0000000000 --- a/firmware/development/trigger_emulator.h +++ /dev/null @@ -1,21 +0,0 @@ -/** - * @file trigger_emulator.h - * @brief Position sensor(s) emulation header - * - * @date Dec 9, 2012 - * @author Andrey Belomutskiy, (c) 2012-2020 - */ - -#ifndef DIST_EMULATOR_H_ -#define DIST_EMULATOR_H_ - -#include "global.h" - -#include "trigger_structure.h" -#include "engine.h" - -void initTriggerEmulator(Logging *sharedLogger DECLARE_ENGINE_PARAMETER_SUFFIX); -void setTriggerEmulatorRPM(int value DECLARE_ENGINE_PARAMETER_SUFFIX); -void onConfigurationChangeRpmEmulatorCallback(engine_configuration_s *previousConfiguration); - -#endif /* DIST_EMULATOR_H_ */ diff --git a/firmware/gen_config.bat b/firmware/gen_config.bat index f1dc9d66c0..4be42cbce6 100644 --- a/firmware/gen_config.bat +++ b/firmware/gen_config.bat @@ -18,6 +18,7 @@ java -DSystemOut.name=gen_config ^ -ts_destination tunerstudio ^ -with_c_defines false ^ -initialize_to_zero false ^ + -tool gen_config.bat ^ -c_defines controllers\generated\rusefi_generated.h ^ -c_destination controllers\generated\engine_configuration_generated_structures.h ^ -c_fsio_constants controllers\generated\fsio_enums_generated.def ^ diff --git a/firmware/gen_config_board.bat b/firmware/gen_config_board.bat index d2389f9f59..6b7a4b882c 100644 --- a/firmware/gen_config_board.bat +++ b/firmware/gen_config_board.bat @@ -29,6 +29,7 @@ java -DSystemOut.name=gen_config_board ^ java -DSystemOut.name=gen_config_board ^ -jar ../java_tools/ConfigDefinition.jar ^ -definition integration\rusefi_config.txt ^ + -tool gen_config.bat ^ -ts_destination tunerstudio ^ -ts_output_name rusefi_%BOARDNAME%.ini ^ -prepend tunerstudio/%BOARDNAME%_prefix.txt ^ diff --git a/firmware/gen_trigger_images.bat b/firmware/gen_trigger_images.bat index fd5e2d7789..0ad6f55b7f 100644 --- a/firmware/gen_trigger_images.bat +++ b/firmware/gen_trigger_images.bat @@ -1,5 +1,6 @@ -rem This takes triggers.txt generated by unit_test binary and produces a bunch of .png files -rem these images are published at +rem This script reads triggers.txt generated by unit_test binary and produces a bunch of trigger shapes .png files +rem these images placed into unit__tests/triggers +rem and later manually published at https://rusefi.com/images/triggers/ cd ../unit_tests make diff --git a/firmware/hw_layer/AdcConfiguration.h b/firmware/hw_layer/AdcConfiguration.h index a9829c251f..44dca22aeb 100644 --- a/firmware/hw_layer/AdcConfiguration.h +++ b/firmware/hw_layer/AdcConfiguration.h @@ -20,7 +20,7 @@ class AdcDevice { public: explicit AdcDevice(ADCConversionGroup* hwConfig); void enableChannel(adc_channel_e hwChannelIndex); - void enableChannelAndPin(adc_channel_e hwChannelIndex); + void enableChannelAndPin(const char *msg, adc_channel_e hwChannelIndex); adc_channel_e getAdcHardwareIndexByInternalIndex(int index) const; int internalAdcIndexByHardwareIndex[20]; bool isHwUsed(adc_channel_e hwChannel) const; diff --git a/firmware/hw_layer/adc_inputs.cpp b/firmware/hw_layer/adc_inputs.cpp index 8854620f6f..0b5b69170d 100644 --- a/firmware/hw_layer/adc_inputs.cpp +++ b/firmware/hw_layer/adc_inputs.cpp @@ -42,10 +42,7 @@ #define ADC_BUF_DEPTH_SLOW 8 #define ADC_BUF_DEPTH_FAST 4 -//static Biquad biq[ADC_MAX_CHANNELS_COUNT]; - static adc_channel_mode_e adcHwChannelEnabled[HW_MAX_ADC_INDEX]; -static const char * adcHwChannelUsage[HW_MAX_ADC_INDEX]; EXTERN_ENGINE; @@ -72,16 +69,16 @@ AdcDevice::AdcDevice(ADCConversionGroup* hwConfig) { memset(internalAdcIndexByHardwareIndex, 0xFFFFFFFF, sizeof(internalAdcIndexByHardwareIndex)); } -#if !defined(PWM_FREQ_FAST) || !defined(PWM_PERIOD_FAST) +#if !defined(GPT_FREQ_FAST) || !defined(GPT_PERIOD_FAST) /** * 8000 RPM is 133Hz * If we want to sample MAP once per 5 degrees we need 133Hz * (360 / 5) = 9576Hz of fast ADC */ // todo: migrate to continues ADC mode? probably not - we cannot afford the callback in // todo: continues mode. todo: look into our options -#define PWM_FREQ_FAST 100000 /* PWM clock frequency. I wonder what does this setting mean? */ -#define PWM_PERIOD_FAST 10 /* PWM period (in PWM ticks). */ -#endif /* PWM_FREQ_FAST PWM_PERIOD_FAST */ +#define GPT_FREQ_FAST 100000 /* PWM clock frequency. I wonder what does this setting mean? */ +#define GPT_PERIOD_FAST 10 /* PWM period (in PWM ticks). */ +#endif /* GPT_FREQ_FAST GPT_PERIOD_FAST */ // is there a reason to have this configurable at runtime? #ifndef ADC_SLOW_DEVICE @@ -201,13 +198,9 @@ ADC_TwoSamplingDelay_5Cycles, // cr1 AdcDevice fastAdc(&adcgrpcfg_fast); -#if HAL_USE_PWM - -static void pwmpcb_fast(PWMDriver *pwmp) { - efiAssertVoid(CUSTOM_ERR_6659, getCurrentRemainingStack()> 32, "lwStAdcFast"); +#if HAL_USE_GPT +static void fast_adc_callback(GPTDriver*) { #if EFI_INTERNAL_ADC - (void) pwmp; - /* * Starts an asynchronous ADC conversion operation, the conversion * will be executed in parallel to the current PWM cycle and will @@ -231,7 +224,7 @@ static void pwmpcb_fast(PWMDriver *pwmp) { fastAdc.conversionCount++; #endif /* EFI_INTERNAL_ADC */ } -#endif /* HAL_USE_PWM */ +#endif /* HAL_USE_GPT */ float getMCUInternalTemperature(void) { #if defined(ADC_CHANNEL_SENSOR) @@ -272,20 +265,13 @@ int getInternalAdcValue(const char *msg, adc_channel_e hwChannel) { return slowAdc.getAdcValueByHwChannel(hwChannel); } -#if HAL_USE_PWM -static PWMConfig pwmcfg_fast = { PWM_FREQ_FAST, PWM_PERIOD_FAST, pwmpcb_fast, { { -PWM_OUTPUT_DISABLED, NULL }, { PWM_OUTPUT_DISABLED, NULL }, { -PWM_OUTPUT_DISABLED, NULL }, { PWM_OUTPUT_DISABLED, NULL } }, -/* HW dependent part.*/ -0, 0 }; -#endif /* HAL_USE_PWM */ - -static void initAdcPin(brain_pin_e pin, const char *msg) { - UNUSED(msg); - // todo: migrate to scheduleMsg if we want this back print("adc %s\r\n", msg); - - efiSetPadMode("adc input", pin, PAL_MODE_INPUT_ANALOG); -} +#if HAL_USE_GPT +static GPTConfig fast_adc_config = { + GPT_FREQ_FAST, + fast_adc_callback, + 0, 0 +}; +#endif /* HAL_USE_GPT */ const char * getAdcMode(adc_channel_e hwChannel) { if (slowAdc.isHwUsed(hwChannel)) { @@ -297,12 +283,6 @@ const char * getAdcMode(adc_channel_e hwChannel) { return "INACTIVE - need restart"; } -static void initAdcHwChannel(adc_channel_e hwChannel) { - brain_pin_e pin = getAdcChannelBrainPin("adc", hwChannel); - - initAdcPin(pin, "hw"); -} - int AdcDevice::size() const { return channelCount; } @@ -356,10 +336,11 @@ void AdcDevice::enableChannel(adc_channel_e hwChannel) { // todo: support for more then 12 channels? not sure how needed it would be } -void AdcDevice::enableChannelAndPin(adc_channel_e hwChannel) { +void AdcDevice::enableChannelAndPin(const char *msg, adc_channel_e hwChannel) { enableChannel(hwChannel); - initAdcHwChannel(hwChannel); + brain_pin_e pin = getAdcChannelBrainPin(msg, hwChannel); + efiSetPadMode(msg, pin, PAL_MODE_INPUT_ANALOG); } static void printAdcValue(int channel) { @@ -472,13 +453,10 @@ void addChannel(const char *name, adc_channel_e setting, adc_channel_mode_e mode return; } - if (adcHwChannelEnabled[setting] != ADC_OFF) { - getPinNameByAdcChannel(name, setting, errorMsgBuff); - firmwareError(CUSTOM_ERR_ADC_USED, "ADC mapping error: input %s for %s already used by %s?", errorMsgBuff, name, adcHwChannelUsage[setting]); - } - - adcHwChannelUsage[setting] = name; adcHwChannelEnabled[setting] = mode; + + AdcDevice& dev = (mode == ADC_SLOW) ? slowAdc : fastAdc; + dev.enableChannelAndPin(name, setting); } void removeChannel(const char *name, adc_channel_e setting) { @@ -491,7 +469,6 @@ void removeChannel(const char *name, adc_channel_e setting) { static void configureInputs(void) { memset(adcHwChannelEnabled, 0, sizeof(adcHwChannelEnabled)); - memset(adcHwChannelUsage, 0, sizeof(adcHwChannelUsage)); /** * order of analog channels here is totally random and has no meaning @@ -500,41 +477,42 @@ static void configureInputs(void) { */ addChannel("MAP", engineConfiguration->map.sensor.hwChannel, ADC_FAST); - if (hasMafSensor()) { - addChannel("MAF", engineConfiguration->mafAdcChannel, ADC_FAST); - } - addChannel("hip", engineConfiguration->hipOutputChannel, ADC_FAST); + addChannel("MAF", engineConfiguration->mafAdcChannel, ADC_FAST); - addChannel("baro", engineConfiguration->baroSensor.hwChannel, ADC_SLOW); + addChannel("HIP9011", engineConfiguration->hipOutputChannel, ADC_FAST); - addChannel("TPS1_1", engineConfiguration->tps1_1AdcChannel, ADC_SLOW); - addChannel("TPS1_2", engineConfiguration->tps1_2AdcChannel, ADC_SLOW); - addChannel("TPS2_1", engineConfiguration->tps2_1AdcChannel, ADC_SLOW); - addChannel("TPS2_2", engineConfiguration->tps2_2AdcChannel, ADC_SLOW); + addChannel("Baro Press", engineConfiguration->baroSensor.hwChannel, ADC_SLOW); - addChannel("fuel", engineConfiguration->fuelLevelSensor, ADC_SLOW); - addChannel("pPS", engineConfiguration->throttlePedalPositionAdcChannel, ADC_SLOW); + addChannel("TPS 1 Primary", engineConfiguration->tps1_1AdcChannel, ADC_SLOW); + addChannel("TPS 1 Secondary", engineConfiguration->tps1_2AdcChannel, ADC_SLOW); + addChannel("TPS 2 Primary", engineConfiguration->tps2_1AdcChannel, ADC_SLOW); + addChannel("TPS 2 Secondary", engineConfiguration->tps2_2AdcChannel, ADC_SLOW); + + addChannel("Fuel Level", engineConfiguration->fuelLevelSensor, ADC_SLOW); + addChannel("Acc Pedal", engineConfiguration->throttlePedalPositionAdcChannel, ADC_SLOW); addChannel("VBatt", engineConfiguration->vbattAdcChannel, ADC_SLOW); // not currently used addChannel("Vref", engineConfiguration->vRefAdcChannel, ADC_SLOW); addChannel("CLT", engineConfiguration->clt.adcChannel, ADC_SLOW); addChannel("IAT", engineConfiguration->iat.adcChannel, ADC_SLOW); - addChannel("AUXT#1", engineConfiguration->auxTempSensor1.adcChannel, ADC_SLOW); - addChannel("AUXT#2", engineConfiguration->auxTempSensor2.adcChannel, ADC_SLOW); - if (engineConfiguration->auxFastSensor1_adcChannel != EFI_ADC_0) { + addChannel("AUX Temp 1", engineConfiguration->auxTempSensor1.adcChannel, ADC_SLOW); + addChannel("AUX Temp 2", engineConfiguration->auxTempSensor2.adcChannel, ADC_SLOW); + if (engineConfiguration->auxFastSensor1_adcChannel != INCOMPATIBLE_CONFIG_CHANGE) { // allow EFI_ADC_0 next time we have an incompatible configuration change addChannel("AUXF#1", engineConfiguration->auxFastSensor1_adcChannel, ADC_FAST); } addChannel("AFR", engineConfiguration->afr.hwChannel, ADC_SLOW); - addChannel("OilP", engineConfiguration->oilPressure.hwChannel, ADC_SLOW); + addChannel("Oil Pressure", engineConfiguration->oilPressure.hwChannel, ADC_SLOW); addChannel("AC", engineConfiguration->acSwitchAdc, ADC_SLOW); - if (engineConfiguration->high_fuel_pressure_sensor_1 != INCOMPATIBLE_CONFIG_CHANGE) + if (engineConfiguration->high_fuel_pressure_sensor_1 != INCOMPATIBLE_CONFIG_CHANGE) { addChannel("HFP1", engineConfiguration->high_fuel_pressure_sensor_1, ADC_SLOW); - if (engineConfiguration->high_fuel_pressure_sensor_2 != INCOMPATIBLE_CONFIG_CHANGE) + } + if (engineConfiguration->high_fuel_pressure_sensor_2 != INCOMPATIBLE_CONFIG_CHANGE) { addChannel("HFP2", engineConfiguration->high_fuel_pressure_sensor_2, ADC_SLOW); + } if (CONFIG(isCJ125Enabled)) { - addChannel("cj125ur", engineConfiguration->cj125ur, ADC_SLOW); - addChannel("cj125ua", engineConfiguration->cj125ua, ADC_SLOW); + addChannel("CJ125 UR", engineConfiguration->cj125ur, ADC_SLOW); + addChannel("CJ125 UA", engineConfiguration->cj125ua, ADC_SLOW); } for (int i = 0; i < FSIO_ANALOG_INPUT_COUNT ; i++) { @@ -566,19 +544,6 @@ void initAdcInputs() { adcStart(&ADC_FAST_DEVICE, NULL); adcSTM32EnableTSVREFE(); // Internal temperature sensor - for (int adc = 0; adc < HW_MAX_ADC_INDEX; adc++) { - adc_channel_mode_e mode = adcHwChannelEnabled[adc]; - - /** - * in board test mode all currently enabled ADC channels are running in slow mode - */ - if (mode == ADC_SLOW) { - slowAdc.enableChannelAndPin((adc_channel_e) (ADC_CHANNEL_IN0 + adc)); - } else if (mode == ADC_FAST) { - fastAdc.enableChannelAndPin((adc_channel_e) (ADC_CHANNEL_IN0 + adc)); - } - } - #if defined(ADC_CHANNEL_SENSOR) // Internal temperature sensor, Available on ADC1 only slowAdc.enableChannel((adc_channel_e)ADC_CHANNEL_SENSOR); @@ -594,10 +559,10 @@ void initAdcInputs() { /* * Initializes the PWM driver. */ -#if HAL_USE_PWM - pwmStart(EFI_INTERNAL_FAST_ADC_PWM, &pwmcfg_fast); - pwmEnablePeriodicNotification(EFI_INTERNAL_FAST_ADC_PWM); -#endif /* HAL_USE_PWM */ +#if HAL_USE_GPT + gptStart(EFI_INTERNAL_FAST_ADC_GPT, &fast_adc_config); + gptStartContinuous(EFI_INTERNAL_FAST_ADC_GPT, GPT_PERIOD_FAST); +#endif /* HAL_USE_GPT */ } addConsoleActionI("adc", (VoidInt) printAdcValue); diff --git a/firmware/hw_layer/adc_subscription.cpp b/firmware/hw_layer/adc_subscription.cpp index 1cd912cce1..37a24eb62f 100644 --- a/firmware/hw_layer/adc_subscription.cpp +++ b/firmware/hw_layer/adc_subscription.cpp @@ -8,7 +8,15 @@ EXTERN_ENGINE; -#if !EFI_UNIT_TEST +#if EFI_UNIT_TEST + +void AdcSubscription::SubscribeSensor(FunctionalSensor &sensor, + adc_channel_e channel, + float voltsPerAdcVolt /*= 0.0f*/) +{ +} + +#else struct AdcSubscriptionEntry { FunctionalSensor *Sensor; diff --git a/firmware/hw_layer/algo/adc_math.h b/firmware/hw_layer/algo/adc_math.h index 0aaccab889..3e1bd72a95 100644 --- a/firmware/hw_layer/algo/adc_math.h +++ b/firmware/hw_layer/algo/adc_math.h @@ -8,8 +8,7 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ -#ifndef ADC_MATH_H_ -#define ADC_MATH_H_ +#pragma once #include "engine_configuration.h" #define ADC_MAX_VALUE 4095 @@ -22,4 +21,3 @@ float getVoltage(const char *msg, adc_channel_e channel DECLARE_ENGINE_PARAMETER float getVoltageDivided(const char *msg, adc_channel_e channel DECLARE_ENGINE_PARAMETER_SUFFIX); -#endif /* ADC_MATH_H_ */ diff --git a/firmware/hw_layer/cdm_ion_sense.h b/firmware/hw_layer/cdm_ion_sense.h index 2e4be711a6..d3d678794a 100644 --- a/firmware/hw_layer/cdm_ion_sense.h +++ b/firmware/hw_layer/cdm_ion_sense.h @@ -5,8 +5,7 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ -#ifndef HW_LAYER_CDM_ION_SENSE_H_ -#define HW_LAYER_CDM_ION_SENSE_H_ +#pragma once #include "global.h" @@ -38,4 +37,3 @@ void ionPostState(TunerStudioOutputChannels *tsOutputChannels); void cdmIonInit(void); int getCurrentCdmValue(int currentRevolution); -#endif /* HW_LAYER_CDM_ION_SENSE_H_ */ diff --git a/firmware/hw_layer/digital_input_icu.cpp b/firmware/hw_layer/digital_input_icu.cpp index 238a828abc..f21370088f 100644 --- a/firmware/hw_layer/digital_input_icu.cpp +++ b/firmware/hw_layer/digital_input_icu.cpp @@ -150,8 +150,6 @@ icuchannel_t getInputCaptureChannel(brain_pin_e hwPin) { * (that's the kind of event you need for shaft position sensor) * ChibiOS limitation is that only channels #1 and #2 could be used for input capture * - * TODO: migrate slow ADC to software timer so that TIM8 is also available for input capture - * todo: https://github.com/rusefi/rusefi/issues/630 ? * @return NULL if pin could not be used for ICU */ //Nullable diff --git a/firmware/hw_layer/drivers/can/can_hw.cpp b/firmware/hw_layer/drivers/can/can_hw.cpp index 9133266841..6145c15e2f 100644 --- a/firmware/hw_layer/drivers/can/can_hw.cpp +++ b/firmware/hw_layer/drivers/can/can_hw.cpp @@ -22,8 +22,7 @@ #include "mpu_util.h" #include "engine.h" -EXTERN_ENGINE -; +EXTERN_ENGINE; static int canReadCounter = 0; static int canWriteOk = 0; @@ -70,41 +69,6 @@ static const CANConfig canConfig1000 = { CAN_MCR_ABOM | CAN_MCR_AWUM | CAN_MCR_TXFP, CAN_BTR_1k0 }; -CANTxFrame txmsg; - -void setTxBit(int offset, int index) { - txmsg.data8[offset] = txmsg.data8[offset] | (1 << index); -} - -void commonTxInit(int eid) { - memset(&txmsg, 0, sizeof(txmsg)); - txmsg.IDE = CAN_IDE_STD; - txmsg.EID = eid; - txmsg.RTR = CAN_RTR_DATA; - txmsg.DLC = 8; -} - -/** - * send CAN message from txmsg buffer - */ -void sendCanMessage(int size) { - CANDriver *device = detectCanDevice(CONFIG(canRxPin), - CONFIG(canTxPin)); - if (device == NULL) { - warning(CUSTOM_ERR_CAN_CONFIGURATION, "CAN configuration issue"); - return; - } - txmsg.DLC = size; - - // 100 ms timeout - msg_t result = canTransmit(device, CAN_ANY_MAILBOX, &txmsg, TIME_MS2I(100)); - if (result == MSG_OK) { - canWriteOk++; - } else { - canWriteNotOk++; - } -} - class CanRead final : public ThreadController<256> { public: CanRead() @@ -113,7 +77,7 @@ public: } void ThreadTask() override { - CANDriver* device = detectCanDevice(CONFIG(canRxPin), CONFIG(canTxPin)); + CANDriver* device = detectCanDevice(CONFIG_OVERRIDE(canRxPin), CONFIG_OVERRIDE(canTxPin)); if (!device) { warning(CUSTOM_ERR_CAN_CONFIGURATION, "CAN configuration issue"); @@ -131,7 +95,7 @@ public: // Process the message canReadCounter++; - processCanRxMessage(m_buffer, &logger); + processCanRxMessage(m_buffer, &logger, getTimeNowNt()); } } @@ -149,8 +113,12 @@ static void canInfo(void) { return; } - scheduleMsg(&logger, "CAN TX %s", hwPortname(CONFIG(canTxPin))); - scheduleMsg(&logger, "CAN RX %s", hwPortname(CONFIG(canRxPin))); +#if EFI_CANBUS_SLAVE + scheduleMsg(&logger, "CAN SLAVE MODE"); +#endif + + scheduleMsg(&logger, "CAN TX %s", hwPortname(CONFIG_OVERRIDE(canTxPin))); + scheduleMsg(&logger, "CAN RX %s", hwPortname(CONFIG_OVERRIDE(canRxPin))); scheduleMsg(&logger, "type=%d canReadEnabled=%s canWriteEnabled=%s period=%d", engineConfiguration->canNbcType, boolToString(engineConfiguration->canReadEnabled), boolToString(engineConfiguration->canWriteEnabled), engineConfiguration->canSleepPeriodMs); @@ -183,16 +151,16 @@ void stopCanPins(DECLARE_ENGINE_PARAMETER_SIGNATURE) { } void startCanPins(DECLARE_ENGINE_PARAMETER_SIGNATURE) { - efiSetPadMode("CAN TX", CONFIG(canTxPin), PAL_MODE_ALTERNATE(EFI_CAN_TX_AF)); - efiSetPadMode("CAN RX", CONFIG(canRxPin), PAL_MODE_ALTERNATE(EFI_CAN_RX_AF)); + efiSetPadMode("CAN TX", CONFIG_OVERRIDE(canTxPin), PAL_MODE_ALTERNATE(EFI_CAN_TX_AF)); + efiSetPadMode("CAN RX", CONFIG_OVERRIDE(canRxPin), PAL_MODE_ALTERNATE(EFI_CAN_RX_AF)); } void initCan(void) { addConsoleAction("caninfo", canInfo); isCanEnabled = - (CONFIG(canTxPin) != GPIO_UNASSIGNED) && // both pins are set... - (CONFIG(canRxPin) != GPIO_UNASSIGNED) && + (CONFIG_OVERRIDE(canTxPin) != GPIO_UNASSIGNED) && // both pins are set... + (CONFIG_OVERRIDE(canRxPin) != GPIO_UNASSIGNED) && (CONFIG(canWriteEnabled) || CONFIG(canReadEnabled)) ; // ...and either read or write is enabled // nothing to do if we aren't enabled... @@ -201,13 +169,13 @@ void initCan(void) { } // Validate pins - if (!isValidCanTxPin(CONFIG(canTxPin))) { - firmwareError(CUSTOM_OBD_70, "invalid CAN TX %s", hwPortname(CONFIG(canTxPin))); + if (!isValidCanTxPin(CONFIG_OVERRIDE(canTxPin))) { + firmwareError(CUSTOM_OBD_70, "invalid CAN TX %s", hwPortname(CONFIG_OVERRIDE(canTxPin))); return; } - if (!isValidCanRxPin(CONFIG(canRxPin))) { - firmwareError(CUSTOM_OBD_70, "invalid CAN RX %s", hwPortname(CONFIG(canRxPin))); + if (!isValidCanRxPin(CONFIG_OVERRIDE(canRxPin))) { + firmwareError(CUSTOM_OBD_70, "invalid CAN RX %s", hwPortname(CONFIG_OVERRIDE(canRxPin))); return; } @@ -222,8 +190,8 @@ void initCan(void) { // Plumb CAN device to tx system CanTxMessage::setDevice(detectCanDevice( - CONFIG(canRxPin), - CONFIG(canTxPin) + CONFIG_OVERRIDE(canRxPin), + CONFIG_OVERRIDE(canTxPin) )); // fire up threads, as necessary diff --git a/firmware/hw_layer/drivers/can/can_hw.h b/firmware/hw_layer/drivers/can/can_hw.h index e524327695..3d5038d191 100644 --- a/firmware/hw_layer/drivers/can/can_hw.h +++ b/firmware/hw_layer/drivers/can/can_hw.h @@ -13,10 +13,8 @@ #endif /* EFI_TUNER_STUDIO */ void initCan(void); -void commonTxInit(int eid); -void sendCanMessage(int size = 8); void setCanType(int type); -void setTxBit(int offset, int index); +void setCanVss(int type); #if EFI_CAN_SUPPORT void stopCanPins(DECLARE_ENGINE_PARAMETER_SIGNATURE); diff --git a/firmware/hw_layer/drivers/can/can_msg_tx.cpp b/firmware/hw_layer/drivers/can/can_msg_tx.cpp index a316f2f9ff..4ed20e37b2 100644 --- a/firmware/hw_layer/drivers/can/can_msg_tx.cpp +++ b/firmware/hw_layer/drivers/can/can_msg_tx.cpp @@ -12,7 +12,10 @@ #if EFI_CAN_SUPPORT #include "can_msg_tx.h" +#include "engine_configuration.h" +EXTERN_CONFIG +extern LoggingWithStorage sharedLogger; /*static*/ CANDriver* CanTxMessage::s_device = nullptr; @@ -20,11 +23,11 @@ s_device = device; } -CanTxMessage::CanTxMessage(uint32_t eid) { +CanTxMessage::CanTxMessage(uint32_t eid, uint8_t dlc) { m_frame.IDE = CAN_IDE_STD; m_frame.EID = eid; m_frame.RTR = CAN_RTR_DATA; - m_frame.DLC = 8; + m_frame.DLC = dlc; memset(m_frame.data8, 0, sizeof(m_frame.data8)); } @@ -36,6 +39,14 @@ CanTxMessage::~CanTxMessage() { return; } + if (CONFIG(debugMode) == DBG_CAN) { + scheduleMsg(&sharedLogger, "Sending CAN message: SID %x/%x %x %x %x %x %x %x %x %x", m_frame.SID, m_frame.DLC, + m_frame.data8[0], m_frame.data8[1], + m_frame.data8[2], m_frame.data8[3], + m_frame.data8[4], m_frame.data8[5], + m_frame.data8[6], m_frame.data8[7]); + } + // 100 ms timeout canTransmit(device, CAN_ANY_MAILBOX, &m_frame, TIME_MS2I(100)); } diff --git a/firmware/hw_layer/drivers/can/can_msg_tx.h b/firmware/hw_layer/drivers/can/can_msg_tx.h index 178b1dc9af..00ed7da8a5 100644 --- a/firmware/hw_layer/drivers/can/can_msg_tx.h +++ b/firmware/hw_layer/drivers/can/can_msg_tx.h @@ -28,7 +28,7 @@ public: /** * Create a new CAN message, with the specified extended ID. */ - CanTxMessage(uint32_t eid); + CanTxMessage(uint32_t eid, uint8_t dlc = 8); /** * Destruction of an instance of CanTxMessage will transmit the message over the wire. @@ -93,5 +93,7 @@ template void transmitStruct(uint32_t eid) { CanTxTyped frame(eid); + // Destruction of an instance of CanTxMessage will transmit the message over the wire. + // see CanTxMessage::~CanTxMessage() populateFrame(frame.get()); } diff --git a/firmware/hw_layer/drivers/gpio/core.c b/firmware/hw_layer/drivers/gpio/core.c index 2dbbcefe8e..2aa1e5de9f 100644 --- a/firmware/hw_layer/drivers/gpio/core.c +++ b/firmware/hw_layer/drivers/gpio/core.c @@ -8,6 +8,7 @@ #include "global.h" #include "gpio/gpio_ext.h" +#include "smart_gpio.h" #define STRING2(x) #x #define STRING(x) STRING2(x) diff --git a/firmware/hw_layer/drivers/gpio/gpio_ext.h b/firmware/hw_layer/drivers/gpio/gpio_ext.h index 4d6b4eb927..d98e14f5f0 100644 --- a/firmware/hw_layer/drivers/gpio/gpio_ext.h +++ b/firmware/hw_layer/drivers/gpio/gpio_ext.h @@ -7,12 +7,11 @@ * @author Andrey Gusakov, (c) 2019 */ -#ifndef GPIO_EXT_H_ -#define GPIO_EXT_H_ +#pragma once #if EFI_PROD_CODE #include "board.h" -#endif +#endif /* EFI_PROD_CODE */ #include "rusefi_enums.h" @@ -61,5 +60,3 @@ int gpiochips_get_total_pins(void); #ifdef __cplusplus } #endif - -#endif /* GPIO_EXT_H_ */ diff --git a/firmware/hw_layer/drivers/gpio/mc33972.c b/firmware/hw_layer/drivers/gpio/mc33972.c index 5f53f69454..0141fe458a 100644 --- a/firmware/hw_layer/drivers/gpio/mc33972.c +++ b/firmware/hw_layer/drivers/gpio/mc33972.c @@ -261,7 +261,7 @@ static THD_FUNCTION(mc33972_driver_thread, p) /* Driver exported functions. */ /*==========================================================================*/ -int mc33972_readPad(void *data, unsigned int pin) { +static int mc33972_readPad(void *data, unsigned int pin) { struct mc33972_priv *chip; if ((pin >= MC33972_INPUTS) || (data == NULL)) @@ -273,7 +273,7 @@ int mc33972_readPad(void *data, unsigned int pin) { return !!(chip->i_state & FLAG_PIN(pin)); } -brain_pin_diag_e mc33972_getDiag(void *data, unsigned int pin) { +static brain_pin_diag_e mc33972_getDiag(void *data, unsigned int pin) { brain_pin_diag_e diag = PIN_OK; struct mc33972_priv *chip; @@ -289,7 +289,7 @@ brain_pin_diag_e mc33972_getDiag(void *data, unsigned int pin) { return diag; } -int mc33972_init(void * data) +static int mc33972_init(void * data) { int ret; struct mc33972_priv *chip; @@ -311,7 +311,7 @@ int mc33972_init(void * data) return 0; } -int mc33972_deinit(void *data) +static int mc33972_deinit(void *data) { (void)data; diff --git a/firmware/hw_layer/drivers/gpio/tle6240.c b/firmware/hw_layer/drivers/gpio/tle6240.c index 2e4207c39e..708a5a6c60 100644 --- a/firmware/hw_layer/drivers/gpio/tle6240.c +++ b/firmware/hw_layer/drivers/gpio/tle6240.c @@ -376,7 +376,7 @@ static THD_FUNCTION(tle6240_driver_thread, p) /* Driver exported functions. */ /*==========================================================================*/ -int tle6240_writePad(void *data, unsigned int pin, int value) +static int tle6240_writePad(void *data, unsigned int pin, int value) { struct tle6240_priv *chip; @@ -409,7 +409,7 @@ int tle6240_writePad(void *data, unsigned int pin, int value) return 0; } -brain_pin_diag_e tle6240_getDiag(void *data, unsigned int pin) +static brain_pin_diag_e tle6240_getDiag(void *data, unsigned int pin) { int val; brain_pin_diag_e diag; @@ -434,7 +434,7 @@ brain_pin_diag_e tle6240_getDiag(void *data, unsigned int pin) return diag; } -int tle6240_init(void * data) +static int tle6240_init(void * data) { int ret; struct tle6240_priv *chip; @@ -456,7 +456,7 @@ int tle6240_init(void * data) return 0; } -int tle6240_deinit(void *data) +static int tle6240_deinit(void *data) { (void)data; diff --git a/firmware/hw_layer/drivers/gpio/tle8888.c b/firmware/hw_layer/drivers/gpio/tle8888.c index 49cf72ab44..ccbbf66b94 100644 --- a/firmware/hw_layer/drivers/gpio/tle8888.c +++ b/firmware/hw_layer/drivers/gpio/tle8888.c @@ -62,6 +62,7 @@ typedef enum { TLE8888_FAILED } tle8888_drv_state; +// tle8888_mode_e #define MODE_MANUAL 0x02 #define MODE_HALL 0x03 @@ -511,12 +512,8 @@ int startupConfiguration(struct tle8888_priv *chip) { /* enable outputs */ tle8888_spi_rw(chip, CMD_OE_SET, NULL); - if (cfg->hallMode) { - /** - * By default "auto detection mode for VR sensor signals" is used - * We know that for short Hall signals like Miata NB2 crank sensor this does not work well above certain RPM. - */ - tle8888_spi_rw(chip, CMD_VRSCONFIG1(MODE_MANUAL << 2), NULL); + if (cfg->mode > 0) { + tle8888_spi_rw(chip, CMD_VRSCONFIG1(cfg->mode << 2), NULL); } return 0; } diff --git a/firmware/hw_layer/drivers/gpio/tle8888.h b/firmware/hw_layer/drivers/gpio/tle8888.h index 4a00c3b835..82813abc42 100644 --- a/firmware/hw_layer/drivers/gpio/tle8888.h +++ b/firmware/hw_layer/drivers/gpio/tle8888.h @@ -50,7 +50,7 @@ struct tle8888_config { /* ...used to drive output (starts from 1, as in DS, coders gonna hate) */ int output; } direct_io[TLE8888_DIRECT_MISC]; - bool hallMode; + tle8888_mode_e mode; }; #ifdef __cplusplus diff --git a/firmware/hw_layer/flash.h b/firmware/hw_layer/flash_int.h similarity index 80% rename from firmware/hw_layer/flash.h rename to firmware/hw_layer/flash_int.h index 91e3494b7e..8b658c00aa 100644 --- a/firmware/hw_layer/flash.h +++ b/firmware/hw_layer/flash_int.h @@ -1,5 +1,5 @@ /** - * @file flash.h + * @file flash_int.h * */ @@ -69,28 +69,6 @@ size_t flashSectorSize(flashsector_t sector); uintptr_t getFlashAddrFirstCopy(void); uintptr_t getFlashAddrSecondCopy(void); -/** - * @brief Get the beginning address of @p sector. - * @param sector Sector to retrieve the beginning address of. - * @return First address (inclusive) of @p sector. - */ -flashaddr_t flashSectorBegin(flashsector_t sector); - -/** - * @brief Get the end address of @p sector. - * @param sector Sector to retrieve the end address of. - * @return End address (exclusive) of @p sector (i.e. beginning address of the next sector). - */ -flashaddr_t flashSectorEnd(flashsector_t sector); - -/** - * @brief Get the sector containing @p address. - * @warning @p address must be in the flash addresses range. - * @param address Address to be searched for. - * @return Sector containing @p address. - */ -flashsector_t flashSectorAt(flashaddr_t address); - /** * @brief Erase the flash @p sector. * @details The sector is checked for errors after erase. @@ -101,7 +79,7 @@ flashsector_t flashSectorAt(flashaddr_t address); * @return FLASH_RETURN_BAD_FLASH Flash cell error. * @return FLASH_RETURN_NO_PERMISSION Access denied. */ -int flashSectorErase(flashsector_t sector); +int intFlashSectorErase(flashsector_t sector); /** * @brief Erase the sectors containing the span of @p size bytes starting at @p address. @@ -117,7 +95,7 @@ int flashSectorErase(flashsector_t sector); * @return FLASH_RETURN_BAD_FLASH Flash cell error. * @return FLASH_RETURN_NO_PERMISSION Access denied. */ -int flashErase(flashaddr_t address, size_t size); +int intFlashErase(flashaddr_t address, size_t size); /** * @brief Check if the @p size bytes of flash memory starting at @p address are erased. @@ -127,7 +105,7 @@ int flashErase(flashaddr_t address, size_t size); * @return TRUE Memory is already erased. * @return FALSE Memory is not erased. */ -bool flashIsErased(flashaddr_t address, size_t size); +bool intFlashIsErased(flashaddr_t address, size_t size); /** * @brief Check if the data in @p buffer are identical to the one in flash memory. @@ -137,7 +115,7 @@ bool flashIsErased(flashaddr_t address, size_t size); * @return TRUE if the flash memory and the buffer contain identical data. * @return FALSE if the flash memory and the buffer don't contain identical data. */ -bool flashCompare(flashaddr_t address, const char* buffer, size_t size); +bool intFlashCompare(flashaddr_t address, const char* buffer, size_t size); /** * @brief Copy data from the flash memory to a @p buffer. @@ -147,7 +125,7 @@ bool flashCompare(flashaddr_t address, const char* buffer, size_t size); * @param size Size of the data to be copied in bytes. * @return FLASH_RETURN_SUCCESS if successfully copied. */ -int flashRead(flashaddr_t address, char* buffer, size_t size); +int intFlashRead(flashaddr_t address, char* buffer, size_t size); /** * @brief Copy data from a @p buffer to the flash memory. @@ -159,7 +137,7 @@ int flashRead(flashaddr_t address, char* buffer, size_t size); * @return FLASH_RETURN_SUCCESS No error. * @return FLASH_RETURN_NO_PERMISSION Access denied. */ -int flashWrite(flashaddr_t address, const char* buffer, size_t size); +int intFlashWrite(flashaddr_t address, const char* buffer, size_t size); #ifdef __cplusplus } diff --git a/firmware/hw_layer/hardware.cpp b/firmware/hw_layer/hardware.cpp index 6c6e17a241..cbef286ff2 100644 --- a/firmware/hw_layer/hardware.cpp +++ b/firmware/hw_layer/hardware.cpp @@ -18,7 +18,7 @@ #include "hardware.h" #include "rtc_helper.h" #include "os_util.h" -#include "injector_central.h" +#include "bench_test.h" #include "vehicle_speed.h" #include "yaw_rate_sensor.h" #include "pin_repository.h" @@ -61,24 +61,14 @@ #include "flash_main.h" #endif -EXTERN_ENGINE -; -extern bool hasFirmwareErrorFlag; +#if EFI_CAN_SUPPORT +#include "can_vss.h" +#endif + +EXTERN_ENGINE; static mutex_t spiMtx; -/** - * this depends on patch to chdebug.c -+extern int maxNesting; - ch.dbg.isr_cnt++; -+ if (ch.dbg.isr_cnt > maxNesting) -+ maxNesting = ch.dbg.isr_cnt; - port_unlock_from_isr(); - * - */ -// todo: rename this to 'rusefiMaxISRNesting' one day -int maxNesting = 0; - #if HAL_USE_SPI extern bool isSpiInitialized[5]; @@ -267,8 +257,9 @@ void turnOnHardware(Logging *sharedLogger) { void stopSpi(spi_device_e device) { #if HAL_USE_SPI - if (!isSpiInitialized[device]) + if (!isSpiInitialized[device]) { return; // not turned on + } isSpiInitialized[device] = false; brain_pin_markUnused(getSckPin(device)); brain_pin_markUnused(getMisoPin(device)); @@ -321,17 +312,21 @@ void applyNewHardwareSettings(void) { stopAuxPins(); #endif /* EFI_AUX_PID */ - if (isConfigurationChanged(is_enabled_spi_1)) + if (isConfigurationChanged(is_enabled_spi_1)) { stopSpi(SPI_DEVICE_1); + } - if (isConfigurationChanged(is_enabled_spi_2)) + if (isConfigurationChanged(is_enabled_spi_2)) { stopSpi(SPI_DEVICE_2); + } - if (isConfigurationChanged(is_enabled_spi_3)) + if (isConfigurationChanged(is_enabled_spi_3)) { stopSpi(SPI_DEVICE_3); + } - if (isConfigurationChanged(is_enabled_spi_4)) + if (isConfigurationChanged(is_enabled_spi_4)) { stopSpi(SPI_DEVICE_4); + } #if EFI_HD44780_LCD stopHD44780_pins(); @@ -340,8 +335,13 @@ void applyNewHardwareSettings(void) { #if EFI_BOOST_CONTROL stopBoostPin(); #endif - if (isPinOrModeChanged(clutchUpPin, clutchUpPinMode)) + if (isPinOrModeChanged(clutchUpPin, clutchUpPinMode)) { brain_pin_markUnused(activeConfiguration.clutchUpPin); + } + + if (isPinOrModeChanged(startStopButtonPin, startStopButtonMode)) { + brain_pin_markUnused(activeConfiguration.startStopButtonPin); + } enginePins.unregisterPins(); @@ -577,6 +577,10 @@ void initHardware(Logging *l) { initVehicleSpeed(sharedLogger); #endif +#if EFI_CAN_SUPPORT + initCanVssSupport(sharedLogger); +#endif + #if EFI_CDM_INTEGRATION cdmIonInit(); #endif diff --git a/firmware/hw_layer/hip9011.cpp b/firmware/hw_layer/hip9011.cpp index a63b9d608a..1a847dfd68 100644 --- a/firmware/hw_layer/hip9011.cpp +++ b/firmware/hw_layer/hip9011.cpp @@ -42,6 +42,7 @@ #include "hip9011_lookup.h" #include "hip9011.h" #include "adc_inputs.h" +#include "perf_trace.h" #include "engine_controller.h" @@ -55,7 +56,6 @@ static NamedOutputPin intHold(PROTOCOL_HIP_NAME); extern uint32_t lastExecutionCount; -extern EnginePins enginePins; uint32_t hipLastExecutionCount; @@ -132,9 +132,7 @@ void Hip9011Hardware::sendCommand(unsigned char command) { spiStartExchangeI(driver, 1, tx_buff, rx_buff); } -EXTERN_ENGINE -; - +EXTERN_ENGINE; static char hipPinNameBuffer[16]; @@ -175,9 +173,7 @@ static void showHipInfo(void) { getPinNameByAdcChannel("hip", engineConfiguration->hipOutputChannel, pinNameBuffer), hipValueMax, CONFIG(useTpicAdvancedMode)); - scheduleMsg(logger, "mosi=%s", hwPortname(getMosiPin(engineConfiguration->hip9011SpiDevice))); - scheduleMsg(logger, "miso=%s", hwPortname(getMisoPin(engineConfiguration->hip9011SpiDevice))); - scheduleMsg(logger, "sck=%s", hwPortname(getSckPin(engineConfiguration->hip9011SpiDevice))); + printSpiConfig(logger, "hip9011", CONFIG(hip9011SpiDevice)); #endif /* EFI_PROD_CODE */ scheduleMsg(logger, "start %.2f end %.2f", engineConfiguration->knockDetectionWindowStart, @@ -253,7 +249,8 @@ static void intHoldCallback(trigger_event_e ckpEventType, uint32_t index, efitic // this callback is invoked on interrupt thread if (index != 0) return; - engine->m.beforeHipCb = getTimeNowLowerNt(); + + ScopePerf perf(PE::Hip9011IntHoldCallback); int rpm = GET_RPM_VALUE; if (!isValidRpm(rpm)) @@ -268,7 +265,6 @@ static void intHoldCallback(trigger_event_e ckpEventType, uint32_t index, efitic #endif /* EFI_PROD_CODE */ scheduleByAngle(&endTimer[structIndex], edgeTimestamp, engineConfiguration->knockDetectionWindowEnd, &endIntegration); - engine->m.hipCbTime = getTimeNowLowerNt() - engine->m.beforeHipCb; } void setMaxKnockSubDeg(int value) { diff --git a/firmware/hw_layer/hw_layer.mk b/firmware/hw_layer/hw_layer.mk index fdf7c72178..ada8b876c0 100644 --- a/firmware/hw_layer/hw_layer.mk +++ b/firmware/hw_layer/hw_layer.mk @@ -24,7 +24,6 @@ HW_LAYER_EMS_CPP = $(HW_LAYER_EGT_CPP) \ $(PROJECT_DIR)/hw_layer/lcd/lcd_HD44780.cpp \ $(PROJECT_DIR)/hw_layer/adc_inputs.cpp \ $(PROJECT_DIR)/hw_layer/adc_subscription.cpp \ - $(PROJECT_DIR)/hw_layer/pwm_generator.cpp \ $(PROJECT_DIR)/hw_layer/trigger_input.cpp \ $(PROJECT_DIR)/hw_layer/trigger_input_icu.cpp \ $(PROJECT_DIR)/hw_layer/trigger_input_exti.cpp \ diff --git a/firmware/hw_layer/io_pins.cpp b/firmware/hw_layer/io_pins.cpp index d220c373c7..cf093dff47 100644 --- a/firmware/hw_layer/io_pins.cpp +++ b/firmware/hw_layer/io_pins.cpp @@ -28,8 +28,6 @@ EXTERN_ENGINE; static LoggingWithStorage logger("io_pins"); -extern EnginePins enginePins; - bool efiReadPin(brain_pin_e pin) { if (brain_pin_is_onchip(pin)) return palReadPad(getHwPort("readPin", pin), getHwPin("readPin", pin)); diff --git a/firmware/hw_layer/lcd/lcd_HD44780.h b/firmware/hw_layer/lcd/lcd_HD44780.h index 467671f539..77a0931163 100644 --- a/firmware/hw_layer/lcd/lcd_HD44780.h +++ b/firmware/hw_layer/lcd/lcd_HD44780.h @@ -5,8 +5,7 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ -#ifndef LCD_HD44780_H_ -#define LCD_HD44780_H_ +#pragma once #ifdef __cplusplus extern "C" @@ -28,4 +27,3 @@ void lcdShowPanicMessage(char *message); } #endif /* __cplusplus */ -#endif /* LCD_HD44780_H_ */ diff --git a/firmware/hw_layer/mc33816.cpp b/firmware/hw_layer/mc33816.cpp index ba55c7c788..24e49e82a7 100644 --- a/firmware/hw_layer/mc33816.cpp +++ b/firmware/hw_layer/mc33816.cpp @@ -16,6 +16,7 @@ #if EFI_MC33816 #include "mc33816.h" +#include "mc33816_memory_map.h" #include "engine_configuration.h" #include "efi_gpio.h" #include "hardware.h" @@ -28,6 +29,9 @@ static OutputPin chipSelect; static OutputPin resetB; static OutputPin driven; +static bool flag0before = false; +static bool flag0after = false; + static unsigned short mcChipId; static Logging* logger; @@ -44,12 +48,29 @@ static SPIConfig spiCfg = { .circular = false, static SPIDriver *driver; - -static void showStats() { - scheduleMsg(logger, "MC %d", mcChipId); +static bool validateChipId() { + return (mcChipId >> 8) == 0x9D; } -// Mostly unused +static void showStats() { + // x9D is product code or something, and 43 is the revision? + scheduleMsg(logger, "MC %x %s", mcChipId, validateChipId() ? "hooray!" : "not hooray :("); + + if (CONFIG(mc33816_flag0) != GPIO_UNASSIGNED) { + scheduleMsg(logger, "flag0 before %d after %d", flag0before, flag0after); + + scheduleMsg(logger, "flag0 right now %d", efiReadPin(CONFIG(mc33816_flag0))); + + } else { + scheduleMsg(logger, "No flag0 pin selected"); + } + scheduleMsg(logger, "MC voltage %d", CONFIG(mc33_hvolt)); +} + +static void mcRestart(); + + +// Receive 16bits unsigned short recv_16bit_spi() { unsigned short ret; //spiSelect(driver); @@ -74,14 +95,6 @@ static void spi_writew(unsigned short param) { //spiUnselect(driver); } -static unsigned short readId() { - spiSelect(driver); - spi_writew(0xBAA1); - unsigned short ID = recv_16bit_spi(); - spiUnselect(driver); - return ID; -} - static void setup_spi() { spiSelect(driver); // Select Channel command @@ -98,6 +111,84 @@ static void setup_spi() { spiUnselect(driver); } +static unsigned short readId() { + spiSelect(driver); + spi_writew(0xBAA1); + unsigned short ID = recv_16bit_spi(); + spiUnselect(driver); + return ID; +} + +// Read a single word in Data RAM +unsigned short mcReadDram(MC33816Mem addr) { + unsigned short readValue; + spiSelect(driver); + // Select Channel command, Common Page + spi_writew(0x7FE1); + spi_writew(0x0004); + // read (MSB=1) at data ram x9 (SCV_I_Hold), and 1 word + spi_writew((0x8000 | addr << 5) + 1); + readValue = recv_16bit_spi(); + + spiUnselect(driver); + return readValue; +} + +// Update a single word in Data RAM +void mcUpdateDram(MC33816Mem addr, unsigned short data) { + spiSelect(driver); + // Select Channel command, Common Page + spi_writew(0x7FE1); + spi_writew(0x0004); + // write (MSB=0) at data ram x9 (SCV_I_Hold), and 1 word + spi_writew((addr << 5) + 1); + spi_writew(data); + + spiUnselect(driver); +} + +void setBoostVoltage(float volts) +{ + // Sanity checks, Datasheet says not too high, nor too low + if(volts > 65.0f) { + firmwareError(OBD_PCM_Processor_Fault, "DI Boost voltage setpoint too high: %.1f", volts); + return; + } + if(volts < 10.0f) { + firmwareError(OBD_PCM_Processor_Fault, "DI Boost voltage setpoint too low: %.1f", volts); + return; + } + // There's a 1/32 divider on the input, then the DAC's output is 9.77mV per LSB. (1 / 32) / 0.00977 = 3.199 counts per volt. + unsigned short data = volts * 3.2; + mcUpdateDram(MC33816Mem::Vboost_high, data+1); + mcUpdateDram(MC33816Mem::Vboost_low, data-1); + // Remember to strobe driven!! +} + +static bool check_flash() { + spiSelect(driver); + + // ch1 + // read (MSB=1) at location, and 1 word + spi_writew((0x8000 | 0x100 << 5) + 1); + if (!(recv_16bit_spi() & (1<<5))) { + spiUnselect(driver); + return false; + } + + // ch2 + // read (MSB=1) at location, and 1 word + spi_writew((0x8000 | 0x120 << 5) + 1); + + if (!(recv_16bit_spi() & (1<<5))) { + spiUnselect(driver); + return false; + } + + spiUnselect(driver); + return true; +} + static void enable_flash() { spiSelect(driver); spi_writew(0x2001); //ch1 @@ -267,27 +358,25 @@ void initMc33816(Logging *sharedLogger) { logger = sharedLogger; // - // see setTest33816EngineConfiguration - // - // default spi3mosiPin PB5 - // default spi3misoPin PB4 - // default spi3sckPin PB3 - // ideally disable isSdCardEnabled since it's on SPI3 - - // uncomment this to hard-code something -/* fixing continues integration - hiding these values - CONFIG(mc33816_cs) = GPIOD_7; - CONFIG(mc33816_rstb) = GPIOD_5; - CONFIG(mc33816_driven) = GPIOD_6; -*/ - // and more to add... + // see setTest33816EngineConfiguration for default configuration + // Pins if (CONFIG(mc33816_cs) == GPIO_UNASSIGNED) return; + if (CONFIG(mc33816_rstb) == GPIO_UNASSIGNED) + return; + if (CONFIG(mc33816_driven) == GPIO_UNASSIGNED) + return; + if (CONFIG(mc33816_flag0) != GPIO_UNASSIGNED) { + efiSetPadMode("mc33816 flag0", CONFIG(mc33816_flag0), getInputMode(PI_DEFAULT)); + } + + chipSelect.initPin("mc33 CS", engineConfiguration->mc33816_cs /*, &engineConfiguration->csPinMode*/); // Initialize the chip via ResetB resetB.initPin("mc33 RESTB", engineConfiguration->mc33816_rstb); + // High Voltage via DRIVEN + driven.initPin("mc33 DRIVEN", engineConfiguration->mc33816_driven); - chipSelect.initPin("mc33 CS", engineConfiguration->mc33816_cs /*, &engineConfiguration->csPinMode*/); spiCfg.ssport = getHwPort("hip", CONFIG(mc33816_cs)); spiCfg.sspad = getHwPin("hip", CONFIG(mc33816_cs)); @@ -304,8 +393,21 @@ void initMc33816(Logging *sharedLogger) { spiStart(driver, &spiCfg); addConsoleAction("mc33_stats", showStats); + addConsoleAction("mc33_restart", mcRestart); //addConsoleActionI("mc33_send", sendWord); + mcRestart(); +} + +static void mcRestart() { + flag0before = false; + flag0after = false; + + scheduleMsg(logger, "MC Restart"); + showStats(); + + driven.setValue(0); // ensure driven is off + // Does starting turn this high to begin with?? spiUnselect(driver); @@ -314,39 +416,48 @@ void initMc33816(Logging *sharedLogger) { chThdSleepMilliseconds(10); resetB.setValue(1); chThdSleepMilliseconds(10); + if (CONFIG(mc33816_flag0) != GPIO_UNASSIGNED) { + flag0before = efiReadPin(CONFIG(mc33816_flag0)); + } + setup_spi(); mcChipId = readId(); + if (!validateChipId()) { + firmwareError(OBD_PCM_Processor_Fault, "No comm with MC33"); + return; + } + download_RAM(CODE_RAM1); // transfers code RAM1 download_RAM(CODE_RAM2); // transfers code RAM2 download_RAM(DATA_RAM); // transfers data RAM + /** + * current configuration of REG_MAIN would toggle flag0 from LOW to HIGH + */ download_register(REG_MAIN); // download main register configurations + if (CONFIG(mc33816_flag0) != GPIO_UNASSIGNED) { + flag0after = efiReadPin(CONFIG(mc33816_flag0)); + if (flag0before || !flag0after) { + firmwareError(OBD_PCM_Processor_Fault, "MC33 flag0 transition no buena"); + + return; + } + } + download_register(REG_CH1); // download channel 1 register configurations download_register(REG_CH2); // download channel 2 register configurations download_register(REG_IO); // download IO register configurations download_register(REG_DIAG); // download diag register configuration + // Finished downloading, let's run the code enable_flash(); - //driven.setValue(1); // driven = HV -} - -void update_scv(unsigned short current) -{ - // Update a single word in Data RAM - spiSelect(driver); - // Select Channel command - spi_writew(0x7FE1); - // Common Page - spi_writew(0x0004); - // write (MSB=0) at data ram x9 (SCV_I_Hold), and 1 word - spi_writew((9 << 5) + 1); - spi_writew(current); - spiUnselect(driver); - - // Strobe it to reload the value - //GPIO_ClearPinsOutput(GPIOE, 1< 0, "not positive deltaTimeUs"); + efiAssertVoid(CUSTOM_DELTA_NOT_POSITIVE, deltaTimeUs > 0, "not positive deltaTimeUs"); if (deltaTimeUs >= TOO_FAR_INTO_FUTURE_US) { // we are trying to set callback for too far into the future. This does not look right at all firmwareError(CUSTOM_ERR_TIMER_OVERFLOW, "setHardwareUsTimer() too far: %d", deltaTimeUs); - // let's make this look special and NOT toggle enginePins.debugSetTimer return; } @@ -94,39 +88,32 @@ void setHardwareUsTimer(int32_t deltaTimeUs) { } if (GPTDEVICE.state != GPT_READY) { firmwareError(CUSTOM_HW_TIMER, "HW timer state %d/%d", GPTDEVICE.state, setHwTimerCounter); - // let's make this look special and NOT toggle enginePins.debugSetTimer return; } if (hasFirmwareError()) { - // let's make this look special and NOT toggle enginePins.debugSetTimer return; } gptStartOneShotI(&GPTDEVICE, deltaTimeUs); lastSetTimerTimeNt = getTimeNowNt(); lastSetTimerValue = deltaTimeUs; - isTimerPending = TRUE; + isTimerPending = true; timerRestartCounter++; - enginePins.debugSetTimer.setValue(0); } +void globalTimerCallback(); + static void hwTimerCallback(GPTDriver *gptp) { (void)gptp; - enginePins.debugTimerCallback.setValue(1); timerCallbackCounter++; - if (globalTimerCallback == NULL) { - firmwareError(CUSTOM_ERR_NULL_TIMER_CALLBACK, "NULL globalTimerCallback"); - return; - } isTimerPending = false; uint32_t before = getTimeNowLowerNt(); - globalTimerCallback(NULL); + globalTimerCallback(); uint32_t precisionCallbackDuration = getTimeNowLowerNt() - before; if (precisionCallbackDuration > maxPrecisionCallbackDuration) { maxPrecisionCallbackDuration = precisionCallbackDuration; } - enginePins.debugTimerCallback.setValue(0); } class MicrosecondTimerWatchdogController : public PeriodicTimerController { @@ -205,7 +192,6 @@ static void validateHardwareTimer() { } void initMicrosecondTimer(void) { - gptStart(&GPTDEVICE, &gpt5cfg); efiAssertVoid(CUSTOM_ERR_TIMER_STATE, GPTDEVICE.state == GPT_READY, "hw state"); hwStarted = true; diff --git a/firmware/hw_layer/mmc_card.cpp b/firmware/hw_layer/mmc_card.cpp index 776762d88a..1a44f7d157 100644 --- a/firmware/hw_layer/mmc_card.cpp +++ b/firmware/hw_layer/mmc_card.cpp @@ -274,7 +274,6 @@ static void listDirectory(const char *path) { scheduleMsg(&logger, LS_RESPONSE); - int i = strlen(path); for (int count = 0;count < FILE_LIST_MAX_COUNT;) { FILINFO fno; diff --git a/firmware/hw_layer/mmc_card.h b/firmware/hw_layer/mmc_card.h index 7c35d8ca6b..affa1da67c 100644 --- a/firmware/hw_layer/mmc_card.h +++ b/firmware/hw_layer/mmc_card.h @@ -7,8 +7,7 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ -#ifndef MMC_CARD_H_ -#define MMC_CARD_H_ +#pragma once #ifdef __cplusplus extern "C" @@ -25,4 +24,3 @@ void readLogFileContent(char *buffer, short fileId, short offset, short length); } #endif /* __cplusplus */ -#endif /* MMC_CARD_H_ */ diff --git a/firmware/hw_layer/neo6m.h b/firmware/hw_layer/neo6m.h index da26342620..e21d1be952 100644 --- a/firmware/hw_layer/neo6m.h +++ b/firmware/hw_layer/neo6m.h @@ -7,8 +7,7 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ -#ifndef NEO6M_H_ -#define NEO6M_H_ +#pragma once #ifdef __cplusplus extern "C" @@ -21,5 +20,3 @@ float getCurrentSpeed(void); #ifdef __cplusplus } #endif /* __cplusplus */ - -#endif /* NEO6M_H_ */ diff --git a/firmware/hw_layer/pin_repository.cpp b/firmware/hw_layer/pin_repository.cpp index 680ea2291f..d58e120af9 100644 --- a/firmware/hw_layer/pin_repository.cpp +++ b/firmware/hw_layer/pin_repository.cpp @@ -16,11 +16,8 @@ #include "eficonsole.h" #include "memstreams.h" #include "drivers/gpio/gpio_ext.h" -#include "tle8888.h" - -#ifndef BOARD_EXT_PINREPOPINS - #define BOARD_EXT_PINREPOPINS 0 -#endif +#include "smart_gpio.h" +#include "hardware.h" static bool initialized = false; @@ -36,6 +33,25 @@ static int brainPin_to_index(brain_pin_e brainPin) index = brainPin - GPIOA_0; + if ((unsigned)index < getNumBrainPins()) + return index; + + /* gpiochips magic: skip gates for absent chips */ +#ifdef TLE8888_PIN_1 + if ((brainPin >= TLE8888_PIN_1) && (BOARD_TLE8888_COUNT == 0)) + index -= (TLE8888_PIN_28 -TLE8888_PIN_1 + 1); +#endif + +#ifdef MC33972_PIN_1 + if ((brainPin >= MC33972_PIN_1) && (BOARD_MC33972_COUNT == 0)) + index -= (MC33972_PIN_22 - MC33972_PIN_1 + 1); +#endif + +#ifdef TLE6240_PIN_1 + if ((brainPin >= TLE6240_PIN_1) && (BOARD_TLE6240_COUNT == 0)) + index -= (TLE6240_PIN_16 - TLE6240_PIN_1 + 1); +#endif + /* if index outside array boundary */ if ((unsigned)index >= getNumBrainPins() + BOARD_EXT_PINREPOPINS) return -1; @@ -43,9 +59,31 @@ static int brainPin_to_index(brain_pin_e brainPin) return index; } -static brain_pin_e index_to_brainPin(int i) +static brain_pin_e index_to_brainPin(unsigned int i) { - return (brain_pin_e)((int)GPIOA_0 + i); + brain_pin_e brainPin = (brain_pin_e)((int)GPIOA_0 + i); + + /* on-chip pins */ + if (i < getNumBrainPins()) + return brainPin; + + /* gpiochips magic: skip absent chips */ +#ifdef TLE6240_PIN_1 + if (BOARD_TLE6240_COUNT == 0) + brainPin += (TLE6240_PIN_16 - TLE6240_PIN_1 + 1); +#endif + +#ifdef MC33972_PIN_1 + if (BOARD_MC33972_COUNT == 0) + brainPin += (MC33972_PIN_22 - MC33972_PIN_1 + 1); +#endif + +#ifdef TLE8888_PIN_1 + if (BOARD_TLE8888_COUNT == 0) + brainPin += (TLE8888_PIN_28 -TLE8888_PIN_1 + 1); +#endif + + return brainPin; } PinRepository::PinRepository() { @@ -53,6 +91,7 @@ PinRepository::PinRepository() { static PinRepository instance; +#if (BOARD_TLE8888_COUNT > 0) /* DEBUG */ extern "C" { extern void tle8888_read_reg(uint16_t reg, uint16_t *val); @@ -72,6 +111,7 @@ void tle8888_dump_regs(void) scheduleMsg(&logger, "%02x: %02x", response, data); } } +#endif static void reportPins(void) { for (unsigned int i = 0; i < getNumBrainPins(); i++) { @@ -135,6 +175,12 @@ static void reportPins(void) { static MemoryStream portNameStream; static char portNameBuffer[20]; +void printSpiConfig(Logging *logging, const char *msg, spi_device_e device) { + scheduleMsg(logging, "%s %s mosi=%s", msg, getSpi_device_e(device), hwPortname(getMosiPin(device))); + scheduleMsg(logging, "%s %s miso=%s", msg, getSpi_device_e(device), hwPortname(getMisoPin(device))); + scheduleMsg(logging, "%s %s sck=%s", msg, getSpi_device_e(device), hwPortname(getSckPin(device))); +} + const char *hwPortname(brain_pin_e brainPin) { if (brainPin == GPIO_INVALID) { return "INVALID"; @@ -231,7 +277,7 @@ bool brain_pin_markUsed(brain_pin_e brainPin, const char *msg) { * connected, so the warning is never displayed on the console and that's quite a problem! */ // warning(OBD_PCM_Processor_Fault, "brain pin %d req by %s used by %s", brainPin, msg, getBrainUsedPin(index)); - firmwareError(CUSTOM_ERR_PIN_ALREADY_USED_1, "brain pin %s req by %s used by %s", hwPortname(brainPin), msg, getBrainUsedPin(index)); + firmwareError(CUSTOM_ERR_PIN_ALREADY_USED_1, "Pin \"%s\" required by \"%s\" but is used by \"%s\"", hwPortname(brainPin), msg, getBrainUsedPin(index)); return true; } diff --git a/firmware/hw_layer/pin_repository.h b/firmware/hw_layer/pin_repository.h index c5b3d2bd69..5312dec00a 100644 --- a/firmware/hw_layer/pin_repository.h +++ b/firmware/hw_layer/pin_repository.h @@ -8,8 +8,7 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ -#ifndef PIN_REPOSITORY_H_ -#define PIN_REPOSITORY_H_ +#pragma once #include "global.h" #include "io_pins.h" @@ -57,4 +56,3 @@ void initBrainUsedPins(void); const char* & getBrainUsedPin(unsigned int idx); #endif -#endif /* PIN_REPOSITORY_H_ */ diff --git a/firmware/hw_layer/ports/kinetis/flash.c b/firmware/hw_layer/ports/kinetis/flash_int.c similarity index 93% rename from firmware/hw_layer/ports/kinetis/flash.c rename to firmware/hw_layer/ports/kinetis/flash_int.c index 1e9d908aaf..86f8350941 100644 --- a/firmware/hw_layer/ports/kinetis/flash.c +++ b/firmware/hw_layer/ports/kinetis/flash_int.c @@ -1,6 +1,6 @@ /** * - * @file flash.c + * @file flash_int.c * @brief Lower-level code for Kinetis related to internal flash memory * @author andreika */ @@ -9,7 +9,7 @@ #if EFI_INTERNAL_FLASH -#include "flash.h" +#include "flash_int.h" #include "fsl_ftfx_flexnvm.h" #include @@ -112,7 +112,7 @@ static int alignToWord(int v) { return (v + FSL_FEATURE_FLASH_FLEX_NVM_SECTOR_CMD_ADDRESS_ALIGMENT - 1) & ~(FSL_FEATURE_FLASH_FLEX_NVM_SECTOR_CMD_ADDRESS_ALIGMENT - 1); } -int flashErase(flashaddr_t address, size_t size) { +int intFlashErase(flashaddr_t address, size_t size) { if (!flashUnlock()) return FLASH_RETURN_NO_PERMISSION; @@ -130,7 +130,7 @@ int flashErase(flashaddr_t address, size_t size) { return -(int)status; } -int flashWrite(flashaddr_t address, const char* buffer, size_t size) { +int intFlashWrite(flashaddr_t address, const char* buffer, size_t size) { if (!flashUnlock()) return FLASH_RETURN_NO_PERMISSION; @@ -150,7 +150,7 @@ int flashWrite(flashaddr_t address, const char* buffer, size_t size) { return -(int)status; } -bool flashIsErased(flashaddr_t address, size_t size) { +bool intFlashIsErased(flashaddr_t address, size_t size) { /* Check for default set bits in the flash memory * For efficiency, compare flashdata_t values as much as possible, * then, fallback to byte per byte comparison. */ @@ -170,7 +170,7 @@ bool flashIsErased(flashaddr_t address, size_t size) { return TRUE; } -bool flashCompare(flashaddr_t address, const char* buffer, size_t size) { +bool intFlashCompare(flashaddr_t address, const char* buffer, size_t size) { #if 0 uint32_t failAddr = 0, failDat = 0; status_t status = FLEXNVM_DflashVerifyProgram(&flashCfg, address, size, (const uint8_t *)buffer, @@ -197,7 +197,7 @@ bool flashCompare(flashaddr_t address, const char* buffer, size_t size) { return TRUE; } -int flashRead(flashaddr_t address, char* buffer, size_t size) { +int intFlashRead(flashaddr_t address, char* buffer, size_t size) { memcpy(buffer, (char*) address, size); return FLASH_RETURN_SUCCESS; } diff --git a/firmware/hw_layer/ports/kinetis/hw_ports.mk b/firmware/hw_layer/ports/kinetis/hw_ports.mk index 7438697eef..c2292919a4 100644 --- a/firmware/hw_layer/ports/kinetis/hw_ports.mk +++ b/firmware/hw_layer/ports/kinetis/hw_ports.mk @@ -2,7 +2,7 @@ ifeq ($(KINETIS_CONTRIB),) KINETIS_CONTRIB = $(CHIBIOS_CONTRIB) endif -HW_LAYER_EMS += $(PROJECT_DIR)/hw_layer/ports/kinetis/flash.c \ +HW_LAYER_EMS += $(PROJECT_DIR)/hw_layer/ports/kinetis/flash_int.c \ $(KINETIS_CONTRIB)/os/hal/ports/KINETIS/KE1xF/fsl/fsl_ftfx_flexnvm.c \ $(KINETIS_CONTRIB)/os/hal/ports/KINETIS/KE1xF/fsl/fsl_ftfx_controller.c diff --git a/firmware/hw_layer/ports/kinetis/mpu_util.cpp b/firmware/hw_layer/ports/kinetis/mpu_util.cpp index 185404e4c0..a0307592d2 100644 --- a/firmware/hw_layer/ports/kinetis/mpu_util.cpp +++ b/firmware/hw_layer/ports/kinetis/mpu_util.cpp @@ -11,7 +11,7 @@ #if EFI_PROD_CODE #include "mpu_util.h" -#include "flash.h" +#include "flash_int.h" #include "engine.h" #include "pin_repository.h" #include "os_util.h" diff --git a/firmware/hw_layer/ports/stm32/flash.c b/firmware/hw_layer/ports/stm32/flash_int.c similarity index 80% rename from firmware/hw_layer/ports/stm32/flash.c rename to firmware/hw_layer/ports/stm32/flash_int.c index 999210952a..76954d4d74 100644 --- a/firmware/hw_layer/ports/stm32/flash.c +++ b/firmware/hw_layer/ports/stm32/flash_int.c @@ -3,7 +3,7 @@ * http://www.chibios.com/forum/viewtopic.php?f=8&t=820 * https://github.com/tegesoft/flash-stm32f407 * - * @file flash_main.c + * @file flash_int.c * @brief Lower-level code related to internal flash memory */ @@ -12,10 +12,10 @@ #if EFI_INTERNAL_FLASH -#include "flash.h" +#include "flash_int.h" #include -flashaddr_t flashSectorBegin(flashsector_t sector) { +flashaddr_t intFlashSectorBegin(flashsector_t sector) { flashaddr_t address = FLASH_BASE; while (sector > 0) { --sector; @@ -24,13 +24,13 @@ flashaddr_t flashSectorBegin(flashsector_t sector) { return address; } -flashaddr_t flashSectorEnd(flashsector_t sector) { - return flashSectorBegin(sector + 1); +flashaddr_t intFlashSectorEnd(flashsector_t sector) { + return intFlashSectorBegin(sector + 1); } -flashsector_t flashSectorAt(flashaddr_t address) { +flashsector_t intFlashSectorAt(flashaddr_t address) { flashsector_t sector = 0; - while (address >= flashSectorEnd(sector)) + while (address >= intFlashSectorEnd(sector)) ++sector; return sector; } @@ -38,14 +38,14 @@ flashsector_t flashSectorAt(flashaddr_t address) { /** * @brief Wait for the flash operation to finish. */ -#define flashWaitWhileBusy() { while (FLASH->SR & FLASH_SR_BSY) {} } +#define intFlashWaitWhileBusy() { while (FLASH->SR & FLASH_SR_BSY) {} } /** * @brief Unlock the flash memory for write access. * @return HAL_SUCCESS Unlock was successful. * @return HAL_FAILED Unlock failed. */ -static bool flashUnlock(void) { +static bool intFlashUnlock(void) { /* Check if unlock is really needed */ if (!(FLASH->CR & FLASH_CR_LOCK)) return HAL_SUCCESS; @@ -63,15 +63,15 @@ static bool flashUnlock(void) { /** * @brief Lock the flash memory for write access. */ -#define flashLock() { FLASH->CR |= FLASH_CR_LOCK; } +#define intFlashLock() { FLASH->CR |= FLASH_CR_LOCK; } -int flashSectorErase(flashsector_t sector) { +int intFlashSectorErase(flashsector_t sector) { /* Unlock flash for write access */ - if (flashUnlock() == HAL_FAILED) + if (intFlashUnlock() == HAL_FAILED) return FLASH_RETURN_NO_PERMISSION; /* Wait for any busy flags. */ - flashWaitWhileBusy(); + intFlashWaitWhileBusy(); /* Setup parallelism before any program/erase */ FLASH->CR &= ~FLASH_CR_PSIZE_MASK; @@ -108,30 +108,30 @@ int flashSectorErase(flashsector_t sector) { FLASH->CR |= FLASH_CR_STRT; /* Wait until it's finished. */ - flashWaitWhileBusy(); + intFlashWaitWhileBusy(); /* Sector erase flag does not clear automatically. */ FLASH->CR &= ~FLASH_CR_SER; /* Lock flash again */ - flashLock() + intFlashLock() ; /* Check deleted sector for errors */ - if (flashIsErased(flashSectorBegin(sector), flashSectorSize(sector)) == FALSE) + if (intFlashIsErased(intFlashSectorBegin(sector), flashSectorSize(sector)) == FALSE) return FLASH_RETURN_BAD_FLASH; /* Sector is not empty despite the erase cycle! */ /* Successfully deleted sector */ return FLASH_RETURN_SUCCESS; } -int flashErase(flashaddr_t address, size_t size) { +int intFlashErase(flashaddr_t address, size_t size) { while (size > 0) { - flashsector_t sector = flashSectorAt(address); - int err = flashSectorErase(sector); + flashsector_t sector = intFlashSectorAt(address); + int err = intFlashSectorErase(sector); if (err != FLASH_RETURN_SUCCESS) return err; - address = flashSectorEnd(sector); + address = intFlashSectorEnd(sector); size_t sector_size = flashSectorSize(sector); if (sector_size >= size) break; @@ -141,7 +141,7 @@ int flashErase(flashaddr_t address, size_t size) { return FLASH_RETURN_SUCCESS; } -bool flashIsErased(flashaddr_t address, size_t size) { +bool intFlashIsErased(flashaddr_t address, size_t size) { /* Check for default set bits in the flash memory * For efficiency, compare flashdata_t values as much as possible, * then, fallback to byte per byte comparison. */ @@ -161,7 +161,7 @@ bool flashIsErased(flashaddr_t address, size_t size) { return TRUE; } -bool flashCompare(flashaddr_t address, const char* buffer, size_t size) { +bool intFlashCompare(flashaddr_t address, const char* buffer, size_t size) { /* For efficiency, compare flashdata_t values as much as possible, * then, fallback to byte per byte comparison. */ while (size >= sizeof(flashdata_t)) { @@ -182,12 +182,12 @@ bool flashCompare(flashaddr_t address, const char* buffer, size_t size) { return TRUE; } -int flashRead(flashaddr_t address, char* buffer, size_t size) { +int intFlashRead(flashaddr_t address, char* buffer, size_t size) { memcpy(buffer, (char*) address, size); return FLASH_RETURN_SUCCESS; } -static void flashWriteData(flashaddr_t address, const flashdata_t data) { +static void intFlashWriteData(flashaddr_t address, const flashdata_t data) { /* Enter flash programming mode */ FLASH->CR |= FLASH_CR_PG; @@ -201,19 +201,19 @@ static void flashWriteData(flashaddr_t address, const flashdata_t data) { #endif /* Wait for completion */ - flashWaitWhileBusy(); + intFlashWaitWhileBusy(); /* Exit flash programming mode */ FLASH->CR &= ~FLASH_CR_PG; } -int flashWrite(flashaddr_t address, const char* buffer, size_t size) { +int intFlashWrite(flashaddr_t address, const char* buffer, size_t size) { /* Unlock flash for write access */ - if (flashUnlock() == HAL_FAILED) + if (intFlashUnlock() == HAL_FAILED) return FLASH_RETURN_NO_PERMISSION; /* Wait for any busy flags */ - flashWaitWhileBusy(); + intFlashWaitWhileBusy(); /* Setup parallelism before any program/erase */ FLASH->CR &= ~FLASH_CR_PSIZE_MASK; @@ -241,7 +241,7 @@ int flashWrite(flashaddr_t address, const char* buffer, size_t size) { memcpy((char*) &tmp + alignOffset, buffer, chunkSize); /* Write the new data in flash */ - flashWriteData(alignedFlashAddress, tmp); + intFlashWriteData(alignedFlashAddress, tmp); /* Advance */ address += chunkSize; @@ -254,7 +254,7 @@ int flashWrite(flashaddr_t address, const char* buffer, size_t size) { * copied requires special treatment. */ while (size >= sizeof(flashdata_t)) { // print("flash write size=%d\r\n", size); - flashWriteData(address, *(const flashdata_t*) buffer); + intFlashWriteData(address, *(const flashdata_t*) buffer); address += sizeof(flashdata_t); buffer += sizeof(flashdata_t); size -= sizeof(flashdata_t); @@ -267,11 +267,11 @@ int flashWrite(flashaddr_t address, const char* buffer, size_t size) { if (size > 0) { flashdata_t tmp = *(volatile flashdata_t*) address; memcpy(&tmp, buffer, size); - flashWriteData(address, tmp); + intFlashWriteData(address, tmp); } /* Lock flash again */ - flashLock() + intFlashLock() ; return FLASH_RETURN_SUCCESS; diff --git a/firmware/hw_layer/ports/stm32/stm32_pins.cpp b/firmware/hw_layer/ports/stm32/stm32_pins.cpp index 4b96a862e1..a93e4c42c8 100644 --- a/firmware/hw_layer/ports/stm32/stm32_pins.cpp +++ b/firmware/hw_layer/ports/stm32/stm32_pins.cpp @@ -9,6 +9,9 @@ #include "global.h" #include "engine.h" #include "efi_gpio.h" +#include "pin_repository.h" +#include "io_pins.h" +#include "smart_gpio.h" #if EFI_GPIO_HARDWARE @@ -44,8 +47,6 @@ static ioportid_t ports[] = {GPIOA, // todo: move this into PinRepository class static const char *PIN_USED[PIN_REPO_SIZE + BOARD_EXT_PINREPOPINS]; -#include "pin_repository.h" -#include "io_pins.h" extern ioportid_t PORTS[]; diff --git a/firmware/hw_layer/ports/stm32/stm32f4/hw_ports.mk b/firmware/hw_layer/ports/stm32/stm32f4/hw_ports.mk index 554bf86c1c..7294832f51 100644 --- a/firmware/hw_layer/ports/stm32/stm32f4/hw_ports.mk +++ b/firmware/hw_layer/ports/stm32/stm32f4/hw_ports.mk @@ -1,4 +1,4 @@ -HW_LAYER_EMS += $(PROJECT_DIR)/hw_layer/ports/stm32/flash.c \ +HW_LAYER_EMS += $(PROJECT_DIR)/hw_layer/ports/stm32/flash_int.c \ $(PROJECT_DIR)/hw_layer/ports/stm32/stm32f4/stm32f4xx_hal_flash.c \ $(PROJECT_DIR)/hw_layer/ports/stm32/stm32f4/stm32f4xx_hal_flash_ex.c diff --git a/firmware/hw_layer/ports/stm32/stm32f4/mpu_util.cpp b/firmware/hw_layer/ports/stm32/stm32f4/mpu_util.cpp index 88983eb2e7..827d8fc889 100644 --- a/firmware/hw_layer/ports/stm32/stm32f4/mpu_util.cpp +++ b/firmware/hw_layer/ports/stm32/stm32f4/mpu_util.cpp @@ -10,7 +10,7 @@ #if EFI_PROD_CODE #include "mpu_util.h" -#include "flash.h" +#include "flash_int.h" #include "engine.h" #include "pin_repository.h" #include "stm32f4xx_hal_flash.h" diff --git a/firmware/hw_layer/ports/stm32/stm32f4/stm32f4xx_hal_flash.h b/firmware/hw_layer/ports/stm32/stm32f4/stm32f4xx_hal_flash.h index 346839e668..1781075c3f 100644 --- a/firmware/hw_layer/ports/stm32/stm32f4/stm32f4xx_hal_flash.h +++ b/firmware/hw_layer/ports/stm32/stm32f4/stm32f4xx_hal_flash.h @@ -132,7 +132,12 @@ typedef struct * @{ */ #define FLASH_FLAG_EOP FLASH_SR_EOP /*!< FLASH End of Operation flag */ +/* migrate to updated header */ +#ifdef FLASH_SR_OPERR +#define FLASH_FLAG_OPERR FLASH_SR_OPERR /*!< FLASH operation Error flag */ +#else #define FLASH_FLAG_OPERR FLASH_SR_SOP /*!< FLASH operation Error flag */ +#endif #define FLASH_FLAG_WRPERR FLASH_SR_WRPERR /*!< FLASH Write protected error flag */ #define FLASH_FLAG_PGAERR FLASH_SR_PGAERR /*!< FLASH Programming Alignment error flag */ #define FLASH_FLAG_PGPERR FLASH_SR_PGPERR /*!< FLASH Programming Parallelism error flag */ diff --git a/firmware/hw_layer/ports/stm32/stm32f7/hw_ports.mk b/firmware/hw_layer/ports/stm32/stm32f7/hw_ports.mk index 05c5bb2ab5..93ffca3e4a 100644 --- a/firmware/hw_layer/ports/stm32/stm32f7/hw_ports.mk +++ b/firmware/hw_layer/ports/stm32/stm32f7/hw_ports.mk @@ -1,4 +1,4 @@ -HW_LAYER_EMS += $(PROJECT_DIR)/hw_layer/ports/stm32/flash.c \ +HW_LAYER_EMS += $(PROJECT_DIR)/hw_layer/ports/stm32/flash_int.c \ $(PROJECT_DIR)/hw_layer/ports/stm32/stm32f7/stm32f7xx_hal_flash.c \ $(PROJECT_DIR)/hw_layer/ports/stm32/stm32f7/stm32f7xx_hal_flash_ex.c diff --git a/firmware/hw_layer/ports/stm32/stm32f7/mpu_util.cpp b/firmware/hw_layer/ports/stm32/stm32f7/mpu_util.cpp index f6f412bc50..8c09f376e2 100644 --- a/firmware/hw_layer/ports/stm32/stm32f7/mpu_util.cpp +++ b/firmware/hw_layer/ports/stm32/stm32f7/mpu_util.cpp @@ -7,7 +7,7 @@ #include "global.h" #include "mpu_util.h" -#include "flash.h" +#include "flash_int.h" #include "engine.h" #include "pin_repository.h" #include "stm32f7xx_hal_flash.h" diff --git a/firmware/hw_layer/pwm_generator.cpp b/firmware/hw_layer/pwm_generator.cpp deleted file mode 100644 index ca4babecbd..0000000000 --- a/firmware/hw_layer/pwm_generator.cpp +++ /dev/null @@ -1,25 +0,0 @@ -/** - * @file pwm_generator.cpp - * @brief software PWM generator - * - * Software PWM implementation. Considering how low all frequencies are, we can totally afford a couple of float multiplications. - * By generating PWM programmatically we are saving the timers for better purposes. This implementation also supports generating - * synchronized waves as needed for example to emulate dual Hall-effect crankshaft position sensors. - * - * - * @date May 28, 2013 - * @author Andrey Belomutskiy, (c) 2012-2020 - * - */ - -#include "global.h" - -#if EFI_PROD_CODE || EFI_SIMULATOR -#include "pwm_generator.h" -#include "pin_repository.h" -#include "datalogging.h" - -void initPwmGenerator(void) { -} - -#endif diff --git a/firmware/hw_layer/pwm_generator.h b/firmware/hw_layer/pwm_generator.h deleted file mode 100644 index 47c07129a0..0000000000 --- a/firmware/hw_layer/pwm_generator.h +++ /dev/null @@ -1,24 +0,0 @@ -/** - * @file pwm_generator.h - * - * @date May 28, 2013 - * @author Andrey Belomutskiy, (c) 2012-2020 - */ - -#pragma once - -#include "global.h" -#include "pwm_generator_logic.h" - -#define DEBUG_PWM FALSE - -#include "efi_gpio.h" - -void initPwmGenerator(void); - -/** - * default implementation of pwm_gen_callback which simply toggles the pins - * - */ -void applyPinState(int stateIndex, PwmConfig* state) /* pwm_gen_callback */; - diff --git a/firmware/hw_layer/sensors/accelerometer.h b/firmware/hw_layer/sensors/accelerometer.h index 032d3f6f33..6e38c176b1 100644 --- a/firmware/hw_layer/sensors/accelerometer.h +++ b/firmware/hw_layer/sensors/accelerometer.h @@ -5,10 +5,8 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ -#ifndef HW_LAYER_ACCELEROMETER_H_ -#define HW_LAYER_ACCELEROMETER_H_ +#pragma once -#include "global.h" #include "engine.h" void configureAccelerometerPins(DECLARE_ENGINE_PARAMETER_SIGNATURE); @@ -24,4 +22,3 @@ float getLongitudinalAcceleration(DECLARE_ENGINE_PARAMETER_SIGNATURE); */ float getTransverseAcceleration(DECLARE_ENGINE_PARAMETER_SIGNATURE); -#endif /* HW_LAYER_ACCELEROMETER_H_ */ diff --git a/firmware/hw_layer/sensors/cj125.cpp b/firmware/hw_layer/sensors/cj125.cpp index 78577c8d53..87d8da0d5b 100644 --- a/firmware/hw_layer/sensors/cj125.cpp +++ b/firmware/hw_layer/sensors/cj125.cpp @@ -1,6 +1,10 @@ /* * @file CJ125.cpp * + * https://github.com/rusefi/rusefi/tree/master/hardware/CJ125_board + * + * https://github.com/rusefi/hw_modular/tree/master/cj125_Module + * * @date: Jun 24, 2016 * @author Andrey Belomutskiy, (c) 2012-2020 * @@ -8,22 +12,22 @@ #include "engine.h" #include "cj125.h" -#include "pwm_generator.h" +#include "pwm_generator_logic.h" #include "rpm_calculator.h" -#if EFI_CJ125 && HAL_USE_SPI +EXTERN_ENGINE; + +#if EFI_CJ125 #include "adc_inputs.h" -#if EFI_PROD_CODE +#if HAL_USE_SPI #include "mpu_util.h" -#endif +#endif /* HAL_USE_SPI */ //#define CJ125_DEBUG //#define CJ125_DEBUG_SPI -EXTERN_ENGINE; - #include "hardware.h" #include "backup_ram.h" #include "pin_repository.h" @@ -35,7 +39,11 @@ static uint8_t rx_buff[1] NO_CACHE; static CJ125 globalInstance; +#if ! EFI_UNIT_TEST static THD_WORKING_AREA(cj125ThreadStack, UTILITY_THREAD_STACK_SIZE); +#endif /* EFI_UNIT_TEST */ + +#if HAL_USE_SPI static SPIDriver *driver; @@ -51,6 +59,8 @@ static SPIConfig cj125spicfg = { SPI_CR2_8BIT_MODE }; +#endif /* HAL_USE_SPI */ + static volatile int lastSlowAdcCounter = 0; // LSU conversion tables. See cj125_sensor_type_e @@ -104,9 +114,11 @@ static void cjWriteRegister(uint8_t regAddr, uint8_t regValue) { scheduleMsg(logger, "cjWriteRegister: addr=%d value=%d", regAddr, regValue); #endif /* CJ125_DEBUG_SPI */ // todo: extract 'sendSync' method? +#if HAL_USE_SPI spiSelect(driver); spiSend(driver, 2, tx_buff); spiUnselect(driver); +#endif /* HAL_USE_SPI */ } static float getUr() { @@ -154,10 +166,26 @@ static uint32_t get16bitFromVoltage(float v) { return (uint32_t)(v * CJ125_VOLTAGE_TO_16BIT_FACTOR); } -static void cjPrintData(void) { -#ifdef CJ125_DEBUG - scheduleMsg(logger, "cj125: state=%d diag=0x%x (vUa=%.3f vUr=%.3f) (vUaCal=%.3f vUrCal=%.3f)", state, globalInstance.diag, vUa, vUr, globalInstance.vUaCal, globalInstance.vUrCal); -#endif +static void cjPrintState() { + scheduleMsg(logger, "cj125: state=%d diag=0x%x (vUa=%.3f vUr=%.3f) (vUaCal=%.3f vUrCal=%.3f)", + globalInstance.state, globalInstance.diag, + globalInstance.vUa, globalInstance.vUr, + globalInstance.vUaCal, globalInstance.vUrCal); +} + +static void cjInfo() { + cjPrintState(); +#if HAL_USE_SPI + printSpiConfig(logger, "cj125", CONFIG(cj125SpiDevice)); +#endif /* HAL_USE_SPI */ +} + +static void cjPrintData() { +#if ! EFI_UNIT_TEST + if (engineConfiguration->isCJ125Verbose) { + cjPrintState(); + } +#endif /* EFI_UNIT_TEST */ } static void cjPrintErrorCode(cj125_error_e errCode) { @@ -202,34 +230,39 @@ static void cjUpdateAnalogValues() { #if EFI_PROD_CODE // todo: some solution for testing waitForSlowAdc(lastSlowAdcCounter); -#endif +#endif /* EFI_PROD_CODE */ + globalInstance.vUr = getUr(); globalInstance.vUa = getUa(); #if EFI_PROD_CODE // todo: some solution for testing lastSlowAdcCounter = getSlowAdcCounter(); -#endif +#endif /* EFI_PROD_CODE */ } -static void cjCalibrate(void) { - globalInstance.cjIdentify(); +void cjCalibrate(void) { + globalInstance.calibrate(); +} + +void CJ125::calibrate(void) { + cjIdentify(); scheduleMsg(logger, "cj125: Starting calibration..."); - globalInstance.cjSetMode(CJ125_MODE_CALIBRATION); + cjSetMode(CJ125_MODE_CALIBRATION); int init1 = cjReadRegister(INIT_REG1_RD); // check if our command has been accepted if (init1 != CJ125_INIT1_CALBRT) { scheduleMsg(logger, "cj125: Calibration error (init1=0x%02x)! Failed!", init1); - globalInstance.cjSetMode(CJ125_MODE_NORMAL_17); + cjSetMode(CJ125_MODE_NORMAL_17); return; } #if EFI_PROD_CODE // todo: some testing solution // wait for the start of the calibration chThdSleepMilliseconds(CJ125_CALIBRATION_DELAY); -#endif - globalInstance.vUaCal = 0.0f; - globalInstance.vUrCal = 0.0f; +#endif /* EFI_PROD_CODE */ + vUaCal = 0.0f; + vUrCal = 0.0f; // wait for some more ADC samples for (int i = 0; i < CJ125_CALIBRATE_NUM_SAMPLES; i++) { cjUpdateAnalogValues(); @@ -241,33 +274,33 @@ static void cjCalibrate(void) { } #endif /* EFI_TUNER_STUDIO */ - globalInstance.vUaCal += globalInstance.vUa; - globalInstance.vUrCal += globalInstance.vUr; + vUaCal += vUa; + vUrCal += vUr; } // find average - globalInstance.vUaCal /= (float)CJ125_CALIBRATE_NUM_SAMPLES; - globalInstance.vUrCal /= (float)CJ125_CALIBRATE_NUM_SAMPLES; + vUaCal /= (float)CJ125_CALIBRATE_NUM_SAMPLES; + vUrCal /= (float)CJ125_CALIBRATE_NUM_SAMPLES; // restore normal mode - globalInstance.cjSetMode(CJ125_MODE_NORMAL_17); + cjSetMode(CJ125_MODE_NORMAL_17); #if EFI_PROD_CODE // todo: testing solution chThdSleepMilliseconds(CJ125_CALIBRATION_DELAY); #endif // check if everything is ok - globalInstance.diag = cjReadRegister(DIAG_REG_RD); + diag = cjReadRegister(DIAG_REG_RD); cjUpdateAnalogValues(); cjPrintData(); // store new calibration data - uint32_t storedLambda = get16bitFromVoltage(globalInstance.vUaCal); - uint32_t storedHeater = get16bitFromVoltage(globalInstance.vUrCal); + uint32_t storedLambda = get16bitFromVoltage(vUaCal); + uint32_t storedHeater = get16bitFromVoltage(vUrCal); scheduleMsg(logger, "cj125: Done! Saving calibration data (%d %d).", storedLambda, storedHeater); #if EFI_PROD_CODE backupRamSave(BACKUP_CJ125_CALIBRATION_LAMBDA, storedLambda); backupRamSave(BACKUP_CJ125_CALIBRATION_HEATER, storedHeater); #endif /* EFI_PROD_CODE */ - globalInstance.state = CJ125_IDLE; + state = CJ125_IDLE; } static void cjStart(DECLARE_ENGINE_PARAMETER_SIGNATURE) { @@ -288,7 +321,7 @@ static void cjStart(DECLARE_ENGINE_PARAMETER_SIGNATURE) { #endif // if no calibration, try to calibrate now and store new values if (storedLambda == 0 || storedHeater == 0) { - cjCalibrate(); + globalInstance.calibrate(); } else { scheduleMsg(logger, "cj125: Loading stored calibration data (%d %d)", storedLambda, storedHeater); globalInstance.vUaCal = getVoltageFrom16bit(storedLambda); @@ -315,45 +348,26 @@ void CJ125::setError(cj125_error_e errCode DECLARE_ENGINE_PARAMETER_SUFFIX) { cjWriteRegister(INIT_REG2_WR, CJ125_INIT2_RESET); } -// engineConfiguration->spi2SckMode = PAL_STM32_OTYPE_OPENDRAIN; // 4 -// engineConfiguration->spi2MosiMode = PAL_STM32_OTYPE_OPENDRAIN; // 4 -// engineConfiguration->spi2MisoMode = PAL_STM32_PUDR_PULLUP; // 32 -// CONFIG(cj125CsPin) = GPIOA_15; -// engineConfiguration->cj125CsPinMode = OM_OPENDRAIN; - -void cj125defaultPinout(DECLARE_ENGINE_PARAMETER_SIGNATURE) { - engineConfiguration->cj125ua = EFI_ADC_13; // PC3 - engineConfiguration->cj125ur = EFI_ADC_4; // PA4 - CONFIG(wboHeaterPin) = GPIOC_13; - - CONFIG(isCJ125Enabled) = false; - - CONFIG(spi2mosiPin) = GPIOB_15; - CONFIG(spi2misoPin) = GPIOB_14; - CONFIG(spi2sckPin) = GPIOB_13; - - CONFIG(cj125CsPin) = GPIOB_0; - CONFIG(isCJ125Enabled) = true; - CONFIG(is_enabled_spi_2) = true; -} - -static void cjStartSpi(DECLARE_ENGINE_PARAMETER_SIGNATURE) { +static bool cjStartSpi(DECLARE_ENGINE_PARAMETER_SIGNATURE) { +#if HAL_USE_SPI globalInstance.cj125Cs.initPin("cj125 CS", CONFIG(cj125CsPin), &engineConfiguration->cj125CsPinMode); // Idle CS pin - SPI CS is high when idle globalInstance.cj125Cs.setValue(true); - cj125spicfg.cr1 += getSpiPrescaler(_150KHz, engineConfiguration->cj125SpiDevice); + cj125spicfg.cr1 += getSpiPrescaler(_150KHz, CONFIG(cj125SpiDevice)); cj125spicfg.ssport = getHwPort("cj125", CONFIG(cj125CsPin)); cj125spicfg.sspad = getHwPin("cj125", CONFIG(cj125CsPin)); driver = getSpiDevice(engineConfiguration->cj125SpiDevice); if (driver == NULL) { // error already reported - return; + return false; } - scheduleMsg(logger, "cj125: Starting SPI driver"); + scheduleMsg(logger, "cj125: Starting SPI driver %s", getSpi_device_e(engineConfiguration->cj125SpiDevice)); spiStart(driver, &cj125spicfg); +#endif /* HAL_USE_SPI */ + return true; } /** @@ -372,7 +386,7 @@ static bool cj125periodic(CJ125 *instance DECLARE_ENGINE_PARAMETER_SUFFIX) { } if (instance->state == CJ125_CALIBRATION) { - cjCalibrate(); + globalInstance.calibrate(); // Start normal operation instance->state = CJ125_INIT; globalInstance.cjSetMode(CJ125_MODE_NORMAL_17); @@ -451,6 +465,8 @@ static bool cj125periodic(CJ125 *instance DECLARE_ENGINE_PARAMETER_SUFFIX) { return false; } +#if ! EFI_UNIT_TEST + static msg_t cjThread(void) { chRegSetThreadName("cj125"); @@ -466,7 +482,6 @@ static msg_t cjThread(void) return -1; } -#if ! EFI_UNIT_TEST static bool cjCheckConfig(void) { if (!CONFIG(isCJ125Enabled)) { scheduleMsg(logger, "cj125 is disabled. Failed!"); @@ -486,10 +501,13 @@ static void cjStartCalibration(void) { globalInstance.state = CJ125_CALIBRATION; } -static void cjStartTest(void) { +static void cjRestart(void) { if (!cjCheckConfig()) return; globalInstance.state = CJ125_INIT; + globalInstance.errorCode = CJ125_NO_ERROR; + cjInfo(); + cjStart(PASS_ENGINE_PARAMETER_SIGNATURE); } #endif /* EFI_UNIT_TEST */ @@ -522,7 +540,7 @@ float cjGetAfr(DECLARE_ENGINE_PARAMETER_SIGNATURE) { return globalInstance.lambda * CJ125_STOICH_RATIO; } -bool cjHasAfrSensor(DECLARE_ENGINE_PARAMETER_SIGNATURE) { +bool cjHasAfrSensor(DECLARE_CONFIG_PARAMETER_SIGNATURE) { if (!CONFIG(isCJ125Enabled)) return false; return globalInstance.isValidState(); @@ -568,11 +586,8 @@ void initCJ125(Logging *sharedLogger DECLARE_ENGINE_PARAMETER_SUFFIX) { } globalInstance.cjInitPid(PASS_ENGINE_PARAMETER_SIGNATURE); - cjStartSpi(PASS_ENGINE_PARAMETER_SIGNATURE); - if (driver == NULL) { - // error already reported + if (!cjStartSpi(PASS_ENGINE_PARAMETER_SIGNATURE)) return; - } scheduleMsg(logger, "cj125: Starting heater control"); globalInstance.StartHeaterControl((pwm_gen_callback*)applyPinState PASS_ENGINE_PARAMETER_SUFFIX); cjStart(PASS_ENGINE_PARAMETER_SIGNATURE); @@ -583,10 +598,36 @@ void initCJ125(Logging *sharedLogger DECLARE_ENGINE_PARAMETER_SUFFIX) { addConsoleActionI("cj125_set_init2", cjSetInit2); #endif /* CJ125_DEBUG */ - addConsoleAction("cj125", cjStartTest); +#if ! EFI_UNIT_TEST + addConsoleAction("cj125_info", cjInfo); + addConsoleAction("cj125_restart", cjRestart); addConsoleAction("cj125_calibrate", cjStartCalibration); chThdCreateStatic(cj125ThreadStack, sizeof(cj125ThreadStack), LOWPRIO, (tfunc_t)(void*) cjThread, NULL); +#endif /* ! EFI_UNIT_TEST */ } #endif /* EFI_CJ125 && HAL_USE_SPI */ + +#if EFI_CJ125 +// engineConfiguration->spi2SckMode = PAL_STM32_OTYPE_OPENDRAIN; // 4 +// engineConfiguration->spi2MosiMode = PAL_STM32_OTYPE_OPENDRAIN; // 4 +// engineConfiguration->spi2MisoMode = PAL_STM32_PUDR_PULLUP; // 32 +// CONFIG(cj125CsPin) = GPIOA_15; +// engineConfiguration->cj125CsPinMode = OM_OPENDRAIN; + +void cj125defaultPinout(DECLARE_CONFIG_PARAMETER_SIGNATURE) { + engineConfiguration->cj125ua = EFI_ADC_13; // PC3 + engineConfiguration->cj125ur = EFI_ADC_4; // PA4 + CONFIG(wboHeaterPin) = GPIOC_13; + + CONFIG(spi2mosiPin) = GPIOB_15; + CONFIG(spi2misoPin) = GPIOB_14; + CONFIG(spi2sckPin) = GPIOB_13; + + CONFIG(cj125CsPin) = GPIOB_0; + CONFIG(isCJ125Enabled) = true; + CONFIG(is_enabled_spi_2) = true; + CONFIG(cj125SpiDevice) = SPI_DEVICE_2; +} +#endif /* EFI_CJ125 */ diff --git a/firmware/hw_layer/sensors/cj125.h b/firmware/hw_layer/sensors/cj125.h index 8c5a4560cd..0e3a7f8de6 100644 --- a/firmware/hw_layer/sensors/cj125.h +++ b/firmware/hw_layer/sensors/cj125.h @@ -5,8 +5,7 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ -#ifndef HW_LAYER_SENSORS_CJ125_H_ -#define HW_LAYER_SENSORS_CJ125_H_ +#pragma once #include "cj125_logic.h" @@ -105,8 +104,7 @@ void cjPostState(TunerStudioOutputChannels *tsOutputChannels); void initCJ125(Logging *shared DECLARE_ENGINE_PARAMETER_SUFFIX); +void cjCalibrate(void); float cjGetAfr(DECLARE_ENGINE_PARAMETER_SIGNATURE); -bool cjHasAfrSensor(DECLARE_ENGINE_PARAMETER_SIGNATURE); -void cj125defaultPinout(); - -#endif /* HW_LAYER_SENSORS_CJ125_H_ */ +bool cjHasAfrSensor(DECLARE_CONFIG_PARAMETER_SIGNATURE); +void cj125defaultPinout(DECLARE_CONFIG_PARAMETER_SIGNATURE); diff --git a/firmware/hw_layer/sensors/cj125_logic.cpp b/firmware/hw_layer/sensors/cj125_logic.cpp index fa2332b9ad..bc129337c3 100644 --- a/firmware/hw_layer/sensors/cj125_logic.cpp +++ b/firmware/hw_layer/sensors/cj125_logic.cpp @@ -11,6 +11,8 @@ EXTERN_ENGINE; +#define LOW_VOLTAGE "Low Voltage" + CJ125::CJ125() : wboHeaterControl("wbo"), heaterPid(&heaterPidConfig) { } @@ -48,6 +50,20 @@ void CJ125::StartHeaterControl(pwm_gen_callback *stateChangeCallback DECLARE_ENG SetIdleHeater(PASS_ENGINE_PARAMETER_SIGNATURE); } +static void printDiagCode(Logging * logging, const char *msg, int code, const char *code1message) { + switch(code & 0x3) { + case 0: + scheduleMsg(logging, "%s Short to GND", msg); + return; + case 1: + scheduleMsg(logging, "%s %s", msg, code1message); + return; + case 2: + scheduleMsg(logging, "%s Short to Vbatt", msg); + return; + } +} + /** * @return true in case of positive SPI identification * false in case of unexpected SPI response @@ -78,11 +94,14 @@ bool CJ125::cjIdentify(void) { state = CJ125_ERROR; return false; } -#if 0 - if (diag != CJ125_DIAG_NORM) { - scheduleMsg(logger, "cj125: Diag error!"); + if (diag == CJ125_DIAG_NORM) { + scheduleMsg(logger, "cj125: Looks great!"); + } else { + printDiagCode(logger, "VM", diag, LOW_VOLTAGE); + printDiagCode(logger, "UN", diag >> 2, LOW_VOLTAGE); + printDiagCode(logger, "IA", diag >> 4, LOW_VOLTAGE); + printDiagCode(logger, "HR", diag >> 6, "open load"); } -#endif return true; } diff --git a/firmware/hw_layer/sensors/cj125_logic.h b/firmware/hw_layer/sensors/cj125_logic.h index 5bd2a192a8..fb5c3360e6 100644 --- a/firmware/hw_layer/sensors/cj125_logic.h +++ b/firmware/hw_layer/sensors/cj125_logic.h @@ -5,8 +5,7 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ -#ifndef HW_LAYER_SENSORS_CJ125_LOGIC_H_ -#define HW_LAYER_SENSORS_CJ125_LOGIC_H_ +#pragma once #include "engine_configuration.h" #include "pwm_generator_logic.h" @@ -55,8 +54,8 @@ public: class CJ125 { public: CJ125(); - Cj125SpiStream *spi = NULL; - Logging *logger = NULL; + Cj125SpiStream *spi = nullptr; + Logging *logger = nullptr; SimplePwm wboHeaterControl; @@ -78,11 +77,15 @@ public: volatile float lambda = 1.0f; // Current values + // lambda volatile float vUa = 0.0f; + // heater volatile float vUr = 0.0f; // Calibration values + // lambda volatile float vUaCal = 0.0f; + // header volatile float vUrCal = 0.0f; OutputPin wboHeaterPin; @@ -99,6 +102,7 @@ public: void SetIdleHeater(DECLARE_ENGINE_PARAMETER_SIGNATURE); void StartHeaterControl(pwm_gen_callback *stateChangeCallback DECLARE_ENGINE_PARAMETER_SUFFIX); bool cjIdentify(void); + void calibrate(); void cjSetMode(cj125_mode_e m); bool isValidState() const; void cjInitPid(DECLARE_ENGINE_PARAMETER_SIGNATURE); @@ -149,4 +153,3 @@ public: #define CJ125_PID_LSU49_P (8.0f) #define CJ125_PID_LSU49_I (0.003f) -#endif /* HW_LAYER_SENSORS_CJ125_LOGIC_H_ */ diff --git a/firmware/hw_layer/sensors/joystick.cpp b/firmware/hw_layer/sensors/joystick.cpp index acaec71775..9c72411725 100644 --- a/firmware/hw_layer/sensors/joystick.cpp +++ b/firmware/hw_layer/sensors/joystick.cpp @@ -20,8 +20,7 @@ #include "pin_repository.h" #include "digital_input_exti.h" -EXTERN_ENGINE -; +EXTERN_ENGINE; static int joyTotal = 0; static int joyCenter; diff --git a/firmware/hw_layer/smart_gpio.cpp b/firmware/hw_layer/smart_gpio.cpp index 343ad17038..8a2f119861 100644 --- a/firmware/hw_layer/smart_gpio.cpp +++ b/firmware/hw_layer/smart_gpio.cpp @@ -15,10 +15,6 @@ #include "mpu_util.h" #include "gpio_ext.h" #include "pin_repository.h" -#include "drivers/gpio/tle6240.h" -#include "drivers/gpio/mc33972.h" -#include "drivers/gpio/mc33810.h" -#include "drivers/gpio/tle8888.h" EXTERN_CONFIG; static OutputPin tle8888Cs; @@ -135,7 +131,7 @@ struct tle8888_config tle8888_cfg = { [3] = {.port = NULL, .pad = 0, .output = 12}, */ }, - .hallMode = false, + .mode = TL_AUTO, }; #endif @@ -182,7 +178,7 @@ void initSmartGpio() { tle8888_cfg.spi_config.sspad = getHwPin("tle8888 CS", engineConfiguration->tle8888_cs); tle8888_cfg.spi_bus = getSpiDevice(engineConfiguration->tle8888spiDevice); - tle8888_cfg.hallMode = engineConfiguration->useTLE8888_hall_mode; + tle8888_cfg.mode = engineConfiguration->tle8888mode; /* spi_bus == null checked in _add function */ ret = tle8888_add(0, &tle8888_cfg); diff --git a/firmware/hw_layer/smart_gpio.h b/firmware/hw_layer/smart_gpio.h index afec2e1364..024c6738a9 100644 --- a/firmware/hw_layer/smart_gpio.h +++ b/firmware/hw_layer/smart_gpio.h @@ -5,8 +5,24 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ -#ifndef HW_LAYER_SMART_GPIO_H_ -#define HW_LAYER_SMART_GPIO_H_ +#pragma once + +#if EFI_PROD_CODE + #include "drivers/gpio/mc33810.h" + #include "drivers/gpio/tle6240.h" + #include "drivers/gpio/mc33972.h" + #include "drivers/gpio/tle8888.h" + #define BOARD_EXT_PINREPOPINS (BOARD_TLE6240_COUNT * TLE6240_OUTPUTS + BOARD_MC33972_COUNT * MC33972_INPUTS + BOARD_TLE8888_COUNT * TLE8888_OUTPUTS) + +#else /* EFI_PROD_CODE */ + #define BOARD_EXT_PINREPOPINS 0 +#endif /* EFI_PROD_CODE */ + +#if EFI_UNIT_TEST + #define BOARD_EXT_GPIOCHIPS 3 +#else + #define BOARD_EXT_GPIOCHIPS (BOARD_TLE6240_COUNT + BOARD_MC33972_COUNT + BOARD_TLE8888_COUNT) +#endif /* TLE6240 pins go right after on chips */ #define TLE6240_PIN(n) ((brain_pin_e)((int)BRAIN_PIN_LAST_ONCHIP + 1 + (n))) @@ -14,7 +30,6 @@ #define MC33972_PIN(n) ((brain_pin_e)((int)BRAIN_PIN_LAST_ONCHIP + 1 + 16 + (n))) void initSmartGpio(void); -void startSmartCsPins(); -void stopSmartCsPins(); +void startSmartCsPins(void); +void stopSmartCsPins(void); -#endif /* HW_LAYER_SMART_GPIO_H_ */ diff --git a/firmware/hw_layer/stepper.cpp b/firmware/hw_layer/stepper.cpp index d1bceab345..3e4e76803b 100644 --- a/firmware/hw_layer/stepper.cpp +++ b/firmware/hw_layer/stepper.cpp @@ -13,9 +13,9 @@ #if EFI_PROD_CODE || EFI_SIMULATOR #include "stepper.h" #include "pin_repository.h" -#include "tps.h" #include "engine_controller.h" #include "adc_inputs.h" +#include "sensor.h" EXTERN_ENGINE; @@ -55,10 +55,11 @@ void StepperMotor::ThreadTask() { bool isRunning = false; #endif /* EFI_SHAFT_POSITION_INPUT */ // now check if stepper motor re-initialization is requested - if the throttle pedal is pressed at startup - bool forceStepperParking = !isRunning && getTPS(PASS_ENGINE_PARAMETER_SIGNATURE) > STEPPER_PARKING_TPS; + auto tpsPos = Sensor::get(SensorType::DriverThrottleIntent).value_or(0); + bool forceStepperParking = !isRunning && tpsPos > STEPPER_PARKING_TPS; if (CONFIG(stepperForceParkingEveryRestart)) forceStepperParking = true; - scheduleMsg(logger, "Stepper: savedStepperPos=%d forceStepperParking=%d (tps=%.2f)", m_currentPosition, (forceStepperParking ? 1 : 0), getTPS(PASS_ENGINE_PARAMETER_SIGNATURE)); + scheduleMsg(logger, "Stepper: savedStepperPos=%d forceStepperParking=%d (tps=%.2f)", m_currentPosition, (forceStepperParking ? 1 : 0), tpsPos); if (m_currentPosition < 0 || forceStepperParking) { // reset saved value @@ -174,13 +175,13 @@ void StepDirectionStepper::initialize(brain_pin_e stepPin, brain_pin_e direction setReactionTime(reactionTime); this->directionPinMode = directionPinMode; - this->directionPin.initPin("stepper dir", directionPin, &this->directionPinMode); + this->directionPin.initPin("Stepper DIR", directionPin, &this->directionPinMode); this->stepPinMode = OM_DEFAULT; // todo: do we need configurable stepPinMode? - this->stepPin.initPin("stepper step", stepPin, &this->stepPinMode); + this->stepPin.initPin("Stepper step", stepPin, &this->stepPinMode); this->enablePinMode = enablePinMode; - this->enablePin.initPin("stepper enable", enablePin, &this->enablePinMode); + this->enablePin.initPin("Stepper EN", enablePin, &this->enablePinMode); // All pins must be 0 for correct hardware startup (e.g. stepper auto-disabling circuit etc.). this->enablePin.setValue(true); // disable stepper diff --git a/firmware/hw_layer/stepper.h b/firmware/hw_layer/stepper.h index 8f997a117b..128afc6dc6 100644 --- a/firmware/hw_layer/stepper.h +++ b/firmware/hw_layer/stepper.h @@ -4,8 +4,8 @@ * @date Dec 24, 2014 * @author Andrey Belomutskiy, (c) 2012-2020 */ -#ifndef STEPPER_H_ -#define STEPPER_H_ + +#pragma once #include "global.h" #include "efi_gpio.h" @@ -76,4 +76,3 @@ private: int m_targetPosition = 0; }; -#endif /* STEPPER_H_ */ diff --git a/firmware/hw_layer/trigger_input.cpp b/firmware/hw_layer/trigger_input.cpp index 24bfdaec6b..c08cfa5918 100644 --- a/firmware/hw_layer/trigger_input.cpp +++ b/firmware/hw_layer/trigger_input.cpp @@ -139,14 +139,14 @@ void stopTriggerInputPins(void) { void startTriggerInputPins(void) { for (int i = 0; i < TRIGGER_SUPPORTED_CHANNELS; i++) { if (isConfigurationChanged(triggerInputPins[i])) { - const char * msg = (i == 0 ? "trigger#1" : (i == 1 ? "trigger#2" : "trigger#3")); + const char * msg = (i == 0 ? "Trigger #1" : (i == 1 ? "Trigger #2" : "Trigger #3")); turnOnTriggerInputPin(msg, i, true); } } for (int i = 0; i < CAM_INPUTS_COUNT; i++) { if (isConfigurationChanged(camInputs[i])) { - turnOnTriggerInputPin("cam", i, false); + turnOnTriggerInputPin("Cam", i, false); } } diff --git a/firmware/hw_layer/trigger_input.h b/firmware/hw_layer/trigger_input.h index 3a83f46f6b..bc2714b0d5 100644 --- a/firmware/hw_layer/trigger_input.h +++ b/firmware/hw_layer/trigger_input.h @@ -6,8 +6,7 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ -#ifndef CRANK_INPUT_H_ -#define CRANK_INPUT_H_ +#pragma once #include "engine.h" #include "pin_repository.h" @@ -20,5 +19,3 @@ void turnOnTriggerInputPins(Logging *sharedLogger); void applyNewTriggerInputPins(void); void startTriggerInputPins(void); void stopTriggerInputPins(void); - -#endif /* CRANK_INPUT_H_ */ diff --git a/firmware/hw_layer/trigger_input_comp.cpp b/firmware/hw_layer/trigger_input_comp.cpp index 1158a4eaaa..f454ce18fd 100644 --- a/firmware/hw_layer/trigger_input_comp.cpp +++ b/firmware/hw_layer/trigger_input_comp.cpp @@ -16,11 +16,8 @@ #include "trigger_input.h" #include "digital_input_icu.h" +EXTERN_ENGINE; -extern bool hasFirmwareErrorFlag; - -EXTERN_ENGINE -; static Logging *logger; static volatile int centeredDacValue = 127; diff --git a/firmware/hw_layer/trigger_input_exti.cpp b/firmware/hw_layer/trigger_input_exti.cpp index d4512f0652..981446029f 100644 --- a/firmware/hw_layer/trigger_input_exti.cpp +++ b/firmware/hw_layer/trigger_input_exti.cpp @@ -21,8 +21,6 @@ #error "PAL_USE_CALLBACKS should be enabled to use HAL_TRIGGER_USE_PAL" #endif -extern bool hasFirmwareErrorFlag; - static Logging *logger; EXTERN_ENGINE; diff --git a/firmware/hw_layer/trigger_input_icu.cpp b/firmware/hw_layer/trigger_input_icu.cpp index f40fee228f..d3abca5554 100644 --- a/firmware/hw_layer/trigger_input_icu.cpp +++ b/firmware/hw_layer/trigger_input_icu.cpp @@ -21,19 +21,31 @@ int icuFallingCallbackCounter = 0; #include "trigger_input.h" #include "digital_input_icu.h" +#include "tooth_logger.h" EXTERN_ENGINE; -extern bool hasFirmwareErrorFlag; - static Logging *logger; static void vvtRisingCallback(void *) { - hwHandleVvtCamSignal(TV_RISE, getTimeNowNt()); + efitick_t now = getTimeNowNt(); +#if EFI_TOOTH_LOGGER + if (!CONFIG(displayLogicLevelsInEngineSniffer)) { + // real physical fronts go into engine sniffer + LogTriggerTooth(SHAFT_SECONDARY_RISING, now); + } +#endif /* EFI_TOOTH_LOGGER */ + hwHandleVvtCamSignal(TV_RISE, now); } static void vvtFallingCallback(void *) { - hwHandleVvtCamSignal(TV_FALL, getTimeNowNt()); + efitick_t now = getTimeNowNt(); +#if EFI_TOOTH_LOGGER + if (!CONFIG(displayLogicLevelsInEngineSniffer)) { + LogTriggerTooth(SHAFT_SECONDARY_FALLING, now); + } +#endif /* EFI_TOOTH_LOGGER */ + hwHandleVvtCamSignal(TV_FALL, now); } /** @@ -91,7 +103,7 @@ int icuTriggerTurnOnInputPin(const char *msg, int index, bool isTriggerShaft) { return -1; } - digital_input_s* input = startDigitalCapture("trigger", brainPin); + digital_input_s* input = startDigitalCapture(msg, brainPin); if (input == NULL) { /* error already reported */ return -1; @@ -110,7 +122,6 @@ int icuTriggerTurnOnInputPin(const char *msg, int index, bool isTriggerShaft) { } void icuTriggerTurnOffInputPin(brain_pin_e brainPin) { - stopDigitalCapture("trigger", brainPin); } diff --git a/firmware/hw_layer/vehicle_speed.cpp b/firmware/hw_layer/vehicle_speed.cpp index 2fc76af6a3..40e02ad9c2 100644 --- a/firmware/hw_layer/vehicle_speed.cpp +++ b/firmware/hw_layer/vehicle_speed.cpp @@ -12,9 +12,9 @@ #include "engine.h" #include "digital_input_icu.h" #include "pin_repository.h" +#include "can_vss.h" -EXTERN_ENGINE -; +EXTERN_ENGINE; static Logging *logger; @@ -34,6 +34,11 @@ void setMockVehicleSpeed(float speedKPH) { float getVehicleSpeed(void) { if (mockVehicleSpeed != DEFAULT_MOCK_SPEED) return mockVehicleSpeed; +#if EFI_CAN_SUPPORT + if (CONFIG(enableCanVss)) { + return getVehicleCanSpeed(); + } +#endif /* EFI_CAN_SUPPORT */ if (!hasVehicleSpeedSensor()) return 0; efitick_t nowNt = getTimeNowNt(); @@ -87,7 +92,8 @@ void initVehicleSpeed(Logging *l) { #else /* EFI_VEHICLE_SPEED */ float getVehicleSpeed(void) { + // no VSS support - return 0; + return 0; } #endif /* EFI_VEHICLE_SPEED */ diff --git a/firmware/hw_layer/vehicle_speed.h b/firmware/hw_layer/vehicle_speed.h index 504020d670..d0e84aae07 100644 --- a/firmware/hw_layer/vehicle_speed.h +++ b/firmware/hw_layer/vehicle_speed.h @@ -5,8 +5,7 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ -#ifndef HW_LAYER_VEHICLE_SPEED_H_ -#define HW_LAYER_VEHICLE_SPEED_H_ +#pragma once #include "global.h" @@ -19,5 +18,3 @@ void setMockVehicleSpeed(float speedKPH); bool hasVehicleSpeedSensor(); void stopVSSPins(void); void startVSSPins(void); - -#endif /* HW_LAYER_VEHICLE_SPEED_H_ */ diff --git a/firmware/init/init.h b/firmware/init/init.h index ec8ae1bdfd..52be0bbfd4 100644 --- a/firmware/init/init.h +++ b/firmware/init/init.h @@ -4,11 +4,27 @@ #pragma once +#include "globalaccess.h" + +class Logging; + // Call this once at startup to initialize, configure, and subscribe sensors -void initSensors(); +void initNewSensors(Logging* logger DECLARE_ENGINE_PARAMETER_SUFFIX); // Call this whenever the configuration may have changed, so any sensors // can be reconfigured with the new settings. // Note: this may not be necessarily possible for all sensors, so some may // do nothing when this is called. -void reconfigureSensors(); +void reconfigureSensors(DECLARE_ENGINE_PARAMETER_SIGNATURE); + +// Internal init functions for individual systems +// Sensor init/config +void initTps(DECLARE_ENGINE_PARAMETER_SIGNATURE); +void initOilPressure(DECLARE_ENGINE_PARAMETER_SIGNATURE); +void initNewThermistors(DECLARE_ENGINE_PARAMETER_SIGNATURE); +void initCanSensors(DECLARE_ENGINE_PARAMETER_SIGNATURE); + +// Sensor reconfiguration +void reconfigureTps(DECLARE_ENGINE_PARAMETER_SIGNATURE); +void reconfigureThermistors(DECLARE_ENGINE_PARAMETER_SIGNATURE); +void reconfigureOilPressure(DECLARE_ENGINE_PARAMETER_SIGNATURE); diff --git a/firmware/init/init.mk b/firmware/init/init.mk index 84b74474d7..5505760c6b 100644 --- a/firmware/init/init.mk +++ b/firmware/init/init.mk @@ -1,4 +1,6 @@ INIT_SRC_CPP = $(PROJECT_DIR)/init/sensor/init_sensors.cpp \ $(PROJECT_DIR)/init/sensor/init_oil_pressure.cpp \ - $(PROJECT_DIR)/init/sensor/init_tps.cpp + $(PROJECT_DIR)/init/sensor/init_tps.cpp \ + $(PROJECT_DIR)/init/sensor/init_can_sensors.cpp \ + $(PROJECT_DIR)/init/sensor/init_thermistors.cpp \ diff --git a/firmware/init/sensor/init_can_sensors.cpp b/firmware/init/sensor/init_can_sensors.cpp new file mode 100644 index 0000000000..07863c47c4 --- /dev/null +++ b/firmware/init/sensor/init_can_sensors.cpp @@ -0,0 +1,28 @@ +/** + * @file init_can_sensors.cpp + * + * @date March 31, 2020 + * @author Matthew Kennedy, (c) 2020 + */ + +#include "global.h" + +#if EFI_CAN_SUPPORT +#include "can_sensor.h" +#include "can.h" + +CanSensor canPedalSensor( + CAN_DEFAULT_BASE + CAN_PEDAL_TPS_OFFSET, /*offset =*/ 0, + SensorType::AcceleratorPedal, MS2NT(100) +); + +void initCanSensors() { +#if EFI_CANBUS_SLAVE + registerCanSensor(canPedalSensor); + + if (!canPedalSensor.Register()) { + firmwareError(CUSTOM_INVALID_TPS_SETTING, "Duplicate registration for pedal sensor"); + } +#endif // EFI_CANBUS_SLAVE +} +#endif // EFI_CAN_SUPPORT diff --git a/firmware/init/sensor/init_oil_pressure.cpp b/firmware/init/sensor/init_oil_pressure.cpp index cbc6905723..25f3ae8ea7 100644 --- a/firmware/init/sensor/init_oil_pressure.cpp +++ b/firmware/init/sensor/init_oil_pressure.cpp @@ -1,3 +1,4 @@ +#include "init.h" #include "adc_subscription.h" #include "engine.h" #include "error_handling.h" @@ -13,8 +14,7 @@ EXTERN_ENGINE; LinearFunc oilpSensorFunc; FunctionalSensor oilpSensor(SensorType::OilPressure, /* timeout = */ MS2NT(50)); -void configureOilPressure(LinearFunc func, const oil_pressure_config_s& cfg) -{ +void configureOilPressure(LinearFunc& func, const oil_pressure_config_s& cfg) { float val1 = cfg.value1; float val2 = cfg.value2; @@ -26,9 +26,9 @@ void configureOilPressure(LinearFunc func, const oil_pressure_config_s& cfg) func.configure(cfg.v1, val1, cfg.v2, val2, /*minOutput*/ -5, greaterOutput); } -void initOilPressure() { +void initOilPressure(DECLARE_ENGINE_PARAMETER_SIGNATURE) { // Only register if we have a sensor - auto channel = engineConfiguration->oilPressure.hwChannel; + auto channel = CONFIG(oilPressure.hwChannel); if (channel == EFI_ADC_NONE) { return; } @@ -44,6 +44,6 @@ void initOilPressure() { } } -void reconfigureOilPressure() { +void reconfigureOilPressure(DECLARE_ENGINE_PARAMETER_SIGNATURE) { configureOilPressure(oilpSensorFunc, CONFIG(oilPressure)); } diff --git a/firmware/init/sensor/init_sensors.cpp b/firmware/init/sensor/init_sensors.cpp index 10c4e15d89..fe113446e8 100644 --- a/firmware/init/sensor/init_sensors.cpp +++ b/firmware/init/sensor/init_sensors.cpp @@ -2,35 +2,44 @@ * @file init_sensorss.cpp */ -#include "cli_registry.h" #include "init.h" +#include "cli_registry.h" #include "sensor.h" -static void initSensorCli(); +static void initSensorCli(Logging* logger); -// Sensor init/config -void initTps(); -void initOilPressure(); +void initNewSensors(Logging* logger DECLARE_ENGINE_PARAMETER_SUFFIX) { +#if EFI_CAN_SUPPORT + initCanSensors(); +#endif -void initSensors() { - initTps(); - initOilPressure(); + initTps(PASS_ENGINE_PARAMETER_SIGNATURE); + initOilPressure(PASS_ENGINE_PARAMETER_SIGNATURE); + initNewThermistors(PASS_ENGINE_PARAMETER_SIGNATURE); // Init CLI functionality for sensors (mocking) - initSensorCli(); + initSensorCli(logger); } -// Sensor reconfiguration -void reconfigureTps(); -void reconfigureOilPressure(); - -void reconfigureSensors() { - reconfigureTps(); - reconfigureOilPressure(); +void reconfigureSensors(DECLARE_ENGINE_PARAMETER_SIGNATURE) { + reconfigureTps(PASS_ENGINE_PARAMETER_SIGNATURE); + reconfigureOilPressure(PASS_ENGINE_PARAMETER_SIGNATURE); + reconfigureThermistors(PASS_ENGINE_PARAMETER_SIGNATURE); } +static Logging* s_logger; + // Mocking/testing helpers -static void initSensorCli() { +static void initSensorCli(Logging* logger) { + s_logger = logger; + addConsoleActionIF("set_sensor_mock", Sensor::setMockValue); addConsoleAction("reset_sensor_mocks", Sensor::resetAllMocks); + addConsoleAction("show_sensors", []() { Sensor::showAllSensorInfo(s_logger); }); + addConsoleActionI("show_sensor", + [](int idx) { + if (auto s = Sensor::getSensorOfType(static_cast(idx))) { + s->showAllSensorInfo(s_logger); + } + }); } diff --git a/firmware/init/sensor/init_thermistors.cpp b/firmware/init/sensor/init_thermistors.cpp new file mode 100644 index 0000000000..65eed4f2f0 --- /dev/null +++ b/firmware/init/sensor/init_thermistors.cpp @@ -0,0 +1,113 @@ +#include "adc_subscription.h" +#include "engine.h" +#include "error_handling.h" +#include "global.h" +#include "functional_sensor.h" +#include "func_chain.h" +#include "linear_func.h" +#include "resistance_func.h" +#include "thermistor_func.h" + +EXTERN_ENGINE; + +using resist = ResistanceFunc; +using therm = ThermistorFunc; + +// Each one could be either linear or thermistor +struct FuncPair { + LinearFunc linear; + FuncChain thermistor; +}; + +static CCM_OPTIONAL FunctionalSensor clt(SensorType::Clt, MS2NT(10)); +static CCM_OPTIONAL FunctionalSensor iat(SensorType::Iat, MS2NT(10)); +static CCM_OPTIONAL FunctionalSensor aux1(SensorType::AuxTemp1, MS2NT(10)); +static CCM_OPTIONAL FunctionalSensor aux2(SensorType::AuxTemp2, MS2NT(10)); + +static FuncPair fclt, fiat, faux1, faux2; + +static SensorConverter& configureTempSensorFunction(thermistor_conf_s& cfg, FuncPair& p, bool isLinear) { + if (isLinear) { + p.linear.configure(cfg.resistance_1, cfg.tempC_1, cfg.resistance_2, cfg.tempC_2, -50, 250); + + return p.linear; + } else /* sensor is thermistor */ { + p.thermistor.get().configure(5.0f, cfg.bias_resistor); + p.thermistor.get().configure(cfg); + + return p.thermistor; + } +} + +void configTherm(FunctionalSensor &sensor, + FuncPair &p, + ThermistorConf &config, + bool isLinear) { + // Configure the conversion function for this sensor + sensor.setFunction(configureTempSensorFunction(config.config, p, isLinear)); +} + +static void configureTempSensor(FunctionalSensor &sensor, + FuncPair &p, + ThermistorConf &config, + bool isLinear) { + auto channel = config.adcChannel; + + // Only register if we have a sensor + if (channel == EFI_ADC_NONE) { + return; + } + + configTherm(sensor, p, config, isLinear); + + AdcSubscription::SubscribeSensor(sensor, channel); + + // Register & subscribe + if (!sensor.Register()) { + // uhh? + } +} + +void initNewThermistors(DECLARE_ENGINE_PARAMETER_SIGNATURE) { + configureTempSensor(clt, + fclt, + CONFIG(clt), + CONFIG(useLinearCltSensor)); + + configureTempSensor(iat, + fiat, + CONFIG(iat), + CONFIG(useLinearIatSensor)); + + configureTempSensor(aux1, + faux1, + CONFIG(auxTempSensor1), + false); + + configureTempSensor(aux2, + faux2, + CONFIG(auxTempSensor2), + false); +} + +void reconfigureThermistors(DECLARE_ENGINE_PARAMETER_SIGNATURE) { + configTherm(clt, + fclt, + CONFIG(clt), + CONFIG(useLinearCltSensor)); + + configTherm(iat, + fiat, + CONFIG(iat), + CONFIG(useLinearIatSensor)); + + configTherm(aux1, + faux1, + CONFIG(auxTempSensor1), + false); + + configTherm(aux2, + faux2, + CONFIG(auxTempSensor2), + false); +} diff --git a/firmware/init/sensor/init_tps.cpp b/firmware/init/sensor/init_tps.cpp index d8e57a95ca..e737e4a0ff 100644 --- a/firmware/init/sensor/init_tps.cpp +++ b/firmware/init/sensor/init_tps.cpp @@ -3,53 +3,78 @@ #include "error_handling.h" #include "global.h" #include "functional_sensor.h" +#include "proxy_sensor.h" #include "linear_func.h" #include "tps.h" EXTERN_ENGINE; -LinearFunc tpsFunc1p; -//LinearFunc tpsFunc1s; -LinearFunc tpsFunc2p; -//LinearFunc tpsFunc2s; +LinearFunc tpsFunc1p(TPS_TS_CONVERSION); +//LinearFunc tpsFunc1s(TPS_TS_CONVERSION); +LinearFunc tpsFunc2p(TPS_TS_CONVERSION); +//LinearFunc tpsFunc2s(TPS_TS_CONVERSION); FunctionalSensor tpsSens1p(SensorType::Tps1, MS2NT(10)); //FunctionalSensor tpsSens1s(SensorType::Tps1Secondary, MS2NT(10)); FunctionalSensor tpsSens2p(SensorType::Tps2, MS2NT(10)); //FunctionalSensor tpsSens2s(SensorType::Tps2Secondary, MS2NT(10)); -static void configureTps(LinearFunc& func, float closed, float open) { +LinearFunc pedalFunc; +FunctionalSensor pedalSensor(SensorType::AcceleratorPedal, MS2NT(10)); + +// This sensor indicates the driver's throttle intent - Pedal if we have one, TPS if not. +ProxySensor driverIntent(SensorType::DriverThrottleIntent); + +static void configureTps(LinearFunc& func, float closed, float open, float min, float max) { func.configure( - closed / TPS_TS_CONVERSION, 0, - open / TPS_TS_CONVERSION, 100, - CONFIG(tpsErrorDetectionTooLow), - CONFIG(tpsErrorDetectionTooHigh) + closed, 0, + open, 100, + min, max ); } -static void initTpsFunc(LinearFunc& func, FunctionalSensor& sensor, adc_channel_e channel, float closed, float open) { +static void initTpsFunc(LinearFunc& func, FunctionalSensor& sensor, adc_channel_e channel, float closed, float open, float min, float max) { // Only register if we have a sensor if (channel == EFI_ADC_NONE) { return; } - configureTps(func, closed, open); + configureTps(func, closed, open, min, max); sensor.setFunction(func); AdcSubscription::SubscribeSensor(sensor, channel); if (!sensor.Register()) { - firmwareError(CUSTOM_INVALID_TPS_SETTING, "Duplicate TPS registration for TPS sensor"); + firmwareError(CUSTOM_INVALID_TPS_SETTING, "Duplicate registration for sensor \"%s\"", sensor.getSensorName()); } } -void initTps() { - initTpsFunc(tpsFunc1p, tpsSens1p, CONFIG(tps1_1AdcChannel), CONFIG(tpsMin), CONFIG(tpsMax)); - initTpsFunc(tpsFunc2p, tpsSens2p, CONFIG(tps2_1AdcChannel), CONFIG(tps2Min), CONFIG(tps2Max)); +void initTps(DECLARE_ENGINE_PARAMETER_SIGNATURE) { + float min = CONFIG(tpsErrorDetectionTooLow); + float max = CONFIG(tpsErrorDetectionTooHigh); + + initTpsFunc(tpsFunc1p, tpsSens1p, CONFIG(tps1_1AdcChannel), CONFIG(tpsMin), CONFIG(tpsMax), min, max); + initTpsFunc(tpsFunc2p, tpsSens2p, CONFIG(tps2_1AdcChannel), CONFIG(tps2Min), CONFIG(tps2Max), min, max); + initTpsFunc(pedalFunc, pedalSensor, CONFIG(throttlePedalPositionAdcChannel), CONFIG(throttlePedalUpVoltage), CONFIG(throttlePedalWOTVoltage), min, max); + + // Route the pedal or TPS to driverIntent as appropriate + if (CONFIG(throttlePedalPositionAdcChannel) != EFI_ADC_NONE) { + driverIntent.setProxiedSensor(SensorType::AcceleratorPedal); + } else { + driverIntent.setProxiedSensor(SensorType::Tps1); + } + + if (!driverIntent.Register()) { + firmwareError(CUSTOM_INVALID_TPS_SETTING, "Duplicate registration for driver acc intent sensor"); + } } -void reconfigureTps() { - configureTps(tpsFunc1p, CONFIG(tpsMin), CONFIG(tpsMax)); - configureTps(tpsFunc2p, CONFIG(tps2Min), CONFIG(tps2Max)); +void reconfigureTps(DECLARE_ENGINE_PARAMETER_SIGNATURE) { + float min = CONFIG(tpsErrorDetectionTooLow); + float max = CONFIG(tpsErrorDetectionTooHigh); + + configureTps(tpsFunc1p, CONFIG(tpsMin), CONFIG(tpsMax), min, max); + configureTps(tpsFunc2p, CONFIG(tps2Min), CONFIG(tps2Max), min, max); + configureTps(pedalFunc, CONFIG(throttlePedalUpVoltage), CONFIG(throttlePedalWOTVoltage), min, max); } diff --git a/firmware/integration/engine_state.txt b/firmware/integration/engine_state.txt index daafa7f63e..e5dc984de2 100644 --- a/firmware/integration/engine_state.txt +++ b/firmware/integration/engine_state.txt @@ -55,7 +55,6 @@ float tpsVoltageBoard float baroCorrection; bit isCrankingState -bit hasEtbPedalPositionSensor; bit isAutomaticIdle struct cranking_fuel_s @@ -105,6 +104,6 @@ percent_t etbFeedForward; floatms_t sparkDwell;ignition dwell duration in ms\nSee also dwellAngle angle_t dwellAngle;ignition dwell duration as crankshaft angle\nNAN if engine is stopped\nSee also sparkDwell angle_t cltTimingCorrection - + ! engine_state2_s end_struct diff --git a/firmware/integration/rusefi_config.txt b/firmware/integration/rusefi_config.txt index 6f900801cc..cbc654ba07 100644 --- a/firmware/integration/rusefi_config.txt +++ b/firmware/integration/rusefi_config.txt @@ -23,13 +23,13 @@ ! type name;comment -#define TS_SIGNATURE "rusEFI v1.2020.3" +#define TS_SIGNATURE "rusEFI v1.2020.4" ! ! this is here so that rusEfi console can access it, too ! [IMPORTANT] every time TS_OUTPUT_SIZE is changed make sure to increment TS_SIGNATURE above ! -#define TS_OUTPUT_SIZE 240 +#define TS_OUTPUT_SIZE 244 ! ! this is used to confirm that firmware and TunerStudio are using the same rusefi.ini version @@ -58,7 +58,6 @@ struct persistent_config_s struct_no_prefix engine_configuration_s -! todo there is still a spot where this 200 is hard-coded #define LE_COMMAND_LENGTH 200 ! see 'blockingFactor' in rusefi.ini @@ -74,6 +73,17 @@ struct_no_prefix engine_configuration_s #define ETB_BIAS_CURVE_LENGTH 8 +#define TRIGGER_TYPE_60_2 8 +#define TRIGGER_TYPE_36_1 9 + +#define TOOTH_PACKET_COUNT 1000 +#define TOOTH_PACKET_SIZE 2 +#define TOOTH_DATA_LENGTH @@TOOTH_PACKET_SIZE@@*@@TOOTH_PACKET_COUNT@@ + +#define COMPOSITE_PACKET_COUNT 500 +#define COMPOSITE_PACKET_SIZE 5 +#define COMPOSITE_DATA_LENGTH @@COMPOSITE_PACKET_SIZE@@*@@COMPOSITE_PACKET_COUNT@@ + #define MAP_ANGLE_SIZE 8 #define MAP_WINDOW_SIZE 8 @@ -125,6 +135,10 @@ struct_no_prefix engine_configuration_s #define BOOST_LOAD_COUNT 8 #define PEDAL_TO_TPS_SIZE 8 +#define STFT_CELL_COUNT 4 + +#define CAN_DEFAULT_BASE 0x200 + ! ! all the xxx_PACKING_xxx constants are about persisting tables in compact for, for example packing RPM with 50 increment in a byte @@ -138,6 +152,7 @@ struct_no_prefix engine_configuration_s #define PACK_MULT_PRESSURE 30 #define PACK_MULT_PERCENT 100 #define PACK_MULT_TEMPERATURE 100 +#define PACK_ADD_TEMPERATURE 40 #define PACK_MULT_MS 300 #define PACK_MULT_AFR 1000 #define PACK_MULT_ANGLE 50 @@ -149,12 +164,20 @@ struct_no_prefix engine_configuration_s #define FSIO_CURVE_8 8 #define FSIO_CURVE_16 16 +#define FSIO_METHOD_FSIO_SETTING "fsio_setting" +#define FSIO_METHOD_FSIO_TABLE "fsio_table" +#define FSIO_METHOD_FSIO_ANALOG_INPUT "fsio_analog_input" +#define FSIO_METHOD_FSIO_DIGITAL_INPUT "fsio_digital_input" + #define TPS_TPS_ACCEL_TABLE 8 #define MAP_ACCEL_TAPER 8 #define BARO_CORR_SIZE 4 #define MAF_DECODING_COUNT 256 +#define AFTERSTART_HOLD_CURVE_SIZE 8 +#define AFTERSTART_DECAY_CURVE_SIZE 8 +#define AFTERSTART_ENRICH_CURVE_SIZE 8 custom fuel_table_t 4*@@FUEL_RPM_COUNT@@x@@FUEL_LOAD_COUNT@@ array, F32, @OFFSET@, [@@FUEL_RPM_COUNT@@x@@FUEL_LOAD_COUNT@@],"ms", 1, 0, 0.0, 500.0, 2 custom ve_table_t 4*@@FUEL_RPM_COUNT@@x@@FUEL_LOAD_COUNT@@ array, F32, @OFFSET@, [@@FUEL_RPM_COUNT@@x@@FUEL_LOAD_COUNT@@],"%", 1, 0, 0, 999.0, 2 @@ -172,10 +195,36 @@ custom ignition_table_t 4*@@IGN_RPM_COUNT@@x@@IGN_LOAD_COUNT@@ array, F32, @ custom ignition_tps_table_t 2*@@IGN_RPM_COUNT@@x@@IGN_TPS_COUNT@@ array, S16, @OFFSET@, [@@IGN_RPM_COUNT@@x@@IGN_TPS_COUNT@@],"deg", 0.01, 0, -20, 90, 2 custom angle_table_t 4*@@IGN_RPM_COUNT@@x@@IGN_LOAD_COUNT@@ array, F32, @OFFSET@, [@@IGN_RPM_COUNT@@x@@IGN_LOAD_COUNT@@],"deg", 1, 0, -720, 720, 2 -custom pedal_to_tps_t @@PEDAL_TO_TPS_SIZE@@x@@PEDAL_TO_TPS_SIZE@@ array, U08, @OFFSET@, [@@PEDAL_TO_TPS_SIZE@@x@@PEDAL_TO_TPS_SIZE@@],"deg", 1, 0, -720, 720, 2 +custom pedal_to_tps_t @@PEDAL_TO_TPS_SIZE@@x@@PEDAL_TO_TPS_SIZE@@ array, U08, @OFFSET@, [@@PEDAL_TO_TPS_SIZE@@x@@PEDAL_TO_TPS_SIZE@@],"%", 1, 0, 0, 100, 0 custom iac_pid_mult_t @@IAC_PID_MULT_SIZE@@x@@IAC_PID_MULT_SIZE@@ array, U08, @OFFSET@, [@@IAC_PID_MULT_SIZE@@x@@IAC_PID_MULT_SIZE@@],"%", 1, 0, 0, 999, 2 custom boost_table_t @@BOOST_RPM_COUNT@@x@@BOOST_LOAD_COUNT@@ array, U08, @OFFSET@, [@@BOOST_RPM_COUNT@@x@@BOOST_LOAD_COUNT@@],"", @@LOAD_1_BYTE_PACKING_MULT@@, 0 , 0, 3000, 0 + +#define GPPWM_LOAD_COUNT 8 +#define GPPWM_RPM_COUNT 8 + +custom gppwm_table_t @@GPPWM_RPM_COUNT@@x@@GPPWM_LOAD_COUNT@@ array, U08, @OFFSET@, [@@GPPWM_RPM_COUNT@@x@@GPPWM_LOAD_COUNT@@], "duty", 1, 0, 0, 100, 0 + +struct stft_cell_cfg_s + int8_t maxAdd;; "%", 1, 0, 0, 25, 0 + int8_t maxRemove;; "%", 1, 0, -25, 0, 0 + uint16_t timeConstant;; "sec", 0.1, 0, 0.1, 100, 2 +end_struct + +struct stft_s + uint8_t maxIdleRegionRpm;+Below this RPM, the idle region is active;"RPM", @@RPM_1_BYTE_PACKING_MULT@@, 0, 0.0, 12000.0, 0 + uint8_t maxOverrunLoad;+Below this engine load, the overrun region is active; "load", 1, 0, 0.0, 250, 0 + uint8_t minPowerLoad;+Above this engine load, the power region is active; "load", 1, 0, 0.0, 250, 0 + uint8_t deadband;+When close to correct AFR, pause correction. This can improve stability by not changing the adjustment if the error is extremely small, but is not required.; "%", 0.1, 0, 0, 3, 1 + + int8_t minClt;+Below this temperature, correction is disabled.;"C", 1, 0, -20, 100, 0 + uint8_t minAfr;+Below this AFR, correction is paused;"afr", 0.1, 0, 10, 20, 1 + uint8_t maxAfr;+Above this AFR, correction is paused;"afr", 0.1, 0, 10, 20, 1 + uint8_t startupDelay;+Delay after starting the engine before beginning closed loop correction.;"seconds", 1, 0, 0, 250, 0 + + stft_cell_cfg_s[STFT_CELL_COUNT iterate] cellCfgs; +end_struct + struct pid_s float pFactor;;"", 1, 0, -10000, 10000, 4 float iFactor;;"", 1, 0, -10000, 10000, 4 @@ -194,15 +243,12 @@ float baseFuel;+Base duration of the fuel injection during cranking, this is mod int16_t rpm;+This sets the RPM limit below which the ECU will use cranking fuel and ignition logic, typically this is around 350-450rpm. \nset cranking_rpm X;"RPM", 1, 0, 0, 3000, 0 end_struct -#define debug_mode_e_enum "Alternator PID", "TPS acceleration enrichment", "INVALID", "Idle Control", "Engine Load accl enrich", "Trigger Counters", "FSIO_ADC", "AUX_PID_1", "VVT input", "Cranking", "Timing", "Closed-loop fuel corr PID", "VSS", "SD card", "sr5", "Knock", "Trigger Sync", "Electronic Throttle", "Executor", "Bench Test / TS commands", "Aux Valves", "Analog inputs #1", "INSTANT_RPM", "FSIO_EXPRESSION", "Status", "CJ125", "CAN", "MAP", "Metrics", "ETB#2", "Ion Sense", "TLE8888", "Analog inputs #2", "Dwell Metric", "Aux Temperature", "ETB Logic", "Boost Control" +#define debug_mode_e_enum "Alternator PID", "TPS acceleration enrichment", "INVALID", "Idle Control", "Engine Load accl enrich", "Trigger Counters", "FSIO_ADC", "AUX_PID_1", "VVT input", "Cranking", "Timing", "Closed-loop fuel corr PID", "VSS", "SD card", "sr5", "Knock", "mode16", "Electronic Throttle", "Executor", "Bench Test / TS commands", "Aux Valves", "Analog inputs #1", "INSTANT_RPM", "FSIO_EXPRESSION", "Status", "CJ125", "CAN", "MAP", "Metrics", "ETB#2", "Ion Sense", "TLE8888", "Analog inputs #2", "Dwell Metric", "INVALID", "ETB Logic", "Boost Control", "Start/Stop", "Launch", "ETB Autotune", "Mode40" custom debug_mode_e 4 bits, U32, @OFFSET@, [0:7], @@debug_mode_e_enum@@ #define vvt_mode_e_enum "First half", "Second half", "2GZ", "Miata NB2", "mode4", "mode5", "mode6", "mode7" custom vvt_mode_e 4 bits, U32, @OFFSET@, [0:7], @@vvt_mode_e_enum@@ -#define can_device_mode_e_enum "v0", "v1" -custom can_device_mode_e 4 bits, U32, @OFFSET@, [0:7], @@can_device_mode_e_enum@@ - #define mass_storage_e_enum "Auto", "Always", "Never" custom mass_storage_e 4 bits, U32, @OFFSET@, [0:7], @@mass_storage_e_enum@@ @@ -247,6 +293,25 @@ struct spi_pins end_struct +#define gppwm_channel_e_enum "TPS", "MAP", "CLT", "IAT" +custom gppwm_channel_e 1 bits, U08, @OFFSET@, [0:1], @@gppwm_channel_e_enum@@ + +struct gppwm_channel + output_pin_e pin;+Select a pin to use for PWM or on-off output.; + uint8_t dutyIfError;+If an error (with a sensor, etc) is detected, this value is used instead of reading from the table.\nThis should be a safe value for whatever hardware is connected to prevent damage.;"%", 1, 0, 0, 100, 0 + uint16_t pwmFrequency;+Select a frequency to run PWM at.\nSet this to 0hz to enable on-off mode.;"hz", 1, 0, 0, 500, 0 + + uint8_t onAboveDuty;+In on-off mode, turn the output on when the table value is above this duty.;"%", 1, 0, 0, 100, 0 + uint8_t offBelowDuty;+In on-off mode, turn the output off when the table value is below this duty.;"%", 1, 0, 0, 100, 0 + + gppwm_channel_e loadAxis;+Selects the load axis to use for the table.; + uint8_t[1] pad; + + uint8_t[GPPWM_LOAD_COUNT] loadBins;;"load", 1, 0, 0.0, 250, 0 + uint8_t[GPPWM_RPM_COUNT] rpmBins;;"RPM", @@RPM_1_BYTE_PACKING_MULT@@, 0, 0.0, 12000.0, 0 + gppwm_table_t table; +end_struct + custom air_pressure_sensor_type_e 4 bits, U32, @OFFSET@, [0:7] "Custom", "DENSO183", "MPX4250", "HONDA3BAR", "NEON_2003", "22012AA090", "3 Bar", "MPX4100", "Toyota 89420-02010", "MPX4250A", "INVALID" ! ! lower 16 values are used on stm32 rusEfi, values above 16 are related to Kinetis work in progress @@ -309,19 +374,11 @@ float[VBAT_INJECTOR_CURVE_SIZE] battLagCorr;ms delay between injector open and c end_struct -struct bi_quard_s - float a0;;"v", 1, 0, -1000, 1000, 9 - float a1;;"v", 1, 0, -1000, 1000, 9 - float a2;;"v", 1, 0, -1000, 1000, 9 - float b1;;"v", 1, 0, -1000, 1000, 9 - float b2;;"v", 1, 0, -1000, 1000, 9 - -end_struct injector_s injector -bit directSelfStimulation;+Should trigger emulator push data right into trigger handling logic, eliminating the need for physical jumper wires?\nSee also triggerSimulatorPins\nPS: Funny name, right? :) +bit unused76b0; bit activateAuxPid1; bit isVerboseAuxPid1; bit activateAuxPid2; @@ -330,14 +387,14 @@ bit activateAuxPid3; bit isVerboseAuxPid3; bit activateAuxPid4; bit isVerboseAuxPid4; -bit useBiQuadAnalogFiltering; +bit isCJ125Verbose;enable cj125verbose/disable cj125verbose bit cj125isUaDivided;+Is your UA CJ125 output wired to MCU via resistor divider? bit cj125isLsu49; -bit etb_use_two_wires; +bit etb_use_two_wires;+TLE7209 uses two-wire mode. TLE9201 and VNH2SP30 do NOT use two wire mode. bit isDoubleSolenoidIdle; bit showSdCardWarning; bit cj125isUrDivided;+Is your UR CJ125 output wired to MCU via resistor divider?\nLooks like 3v range should be enough, divider generally not needed. -bit useTLE8888_hall_mode; +bit issue_294_unused; bit useTLE8888_cranking_hack; bit useInstantRpmForIdle; bit absoluteFuelPressure;+If your fuel regulator does not have vacuum line @@ -345,7 +402,7 @@ bit launchControlEnabled; bit rollingLaunchEnabled; bit antiLagEnabled; bit useRunningMathForCranking,Fuel Map,Fixed; -bit issue_294_25; +bit displayLogicLevelsInEngineSniffer; bit issue_294_26; bit issue_294_27; bit issue_294_28; @@ -439,7 +496,7 @@ float fsio_visible fanOffTemperature;+Cooling fan turn-off temperature threshold float vehicleSpeedCoef;+This coefficient translates vehicle speed input frequency (in Hz) into vehicle speed, km/h;"coef", 1, 0, 0.01, 2000.0, 2 -custom can_nbc_e 4 bits, U32, @OFFSET@, [0:7], "BMW", "FIAT", "VAG" , "MAZDA RX8" +custom can_nbc_e 4 bits, U32, @OFFSET@, [0:7], "None", "FIAT", "VAG" , "MAZDA RX8", "BMW", "W202" can_nbc_e canNbcType;set can_mode X int canSleepPeriodMs;CANbus thread period, ms;"ms", 1, 0, 0, 1000.0, 2 @@ -460,7 +517,7 @@ log_format_e logFormat; adc_channel_e tps1_1AdcChannel;First throttle body, first sensor. See also pedalPositionAdcChannel adc_channel_e vbattAdcChannel;+This is the processor input pin that the battery voltage circuit is connected to, if you are unsure of what pin to use, check the schematic that corresponds to your PCB. adc_channel_e fuelLevelSensor;+This is the processor pin that your fuel level sensor in connected to. This is a non standard input so will need to be user defined. - adc_channel_e tps2_1AdcChannel;Second throttle body position sensor, single channel so far + adc_channel_e tps2_1AdcChannel;Second throttle body position sensor, single channel so far\nset_analog_input_pin tps2 X int overrideCrankingIgnition; int sensorChartFrequency;;"index", 1, 0, 0, 300, 0 ; size 4 @@ -470,13 +527,13 @@ struct trigger_config_s @brief Trigger wheel(s) configuration custom bool32_t 4 bits, U32, @OFFSET@, [0:0], "false", "true" -#define trigger_type_e_enum "custom toothed wheel", "Ford Aspire", "Dodge Neon 1995", "Miata NA", "Miata NB", "GM_7X", "Cooper R50", "Mazda SOHC 4", "60/2", "36/1", "Honda 4+24+1", "Mitsubishi", "Honda 4+24", "Honda 1+4+24", "Dodge Neon 2003", "Mazda DOHC 1+4", "1+1", "1+60/2", "Single Tooth", "Dodge Ram 1+16", "60/2 VW", "Honda 1+24", "Dodge Stratus", "36_2_2_2", "Nissan Primera", "2JZ", "Rover K", "GM LS 24", "Honda CBR 600", "2JZ_1_12", "Honda CBR 600 custom", "3/1 skipped" , "Dodge Neon 2003 crank", "Miata VVT", "trg34", "trg35", "Subaru 7+6", "Jeep 18-2-2-2", "WIP", "Dodge Neon 1995 crank only", "Jeep XJ 4 cyl", "FiatIAQ_P8", "Mazda Z5", "trg43", "trg44", "trg45", "INVALID" +#define trigger_type_e_enum "custom toothed wheel", "Ford Aspire", "Dodge Neon 1995", "Miata NA", "Miata NB", "GM_7X", "Cooper R50", "Mazda SOHC 4", "60/2", "36/1", "Honda 4+24+1", "Mitsubishi", "Honda 4+24", "Honda 1+4+24", "Dodge Neon 2003", "Mazda DOHC 1+4", "1+1", "1+60/2", "Single Tooth", "Dodge Ram 1+16", "60/2 VW", "Honda 1+24", "Dodge Stratus", "36_2_2_2", "Nissan Primera", "2JZ", "Rover K", "GM LS 24", "Honda CBR 600", "2JZ_1_12", "Honda CBR 600 custom", "3/1 skipped" , "Dodge Neon 2003 crank", "Miata VVT", "trg34", "trg35", "Subaru 7+6", "Jeep 18-2-2-2", "WIP", "Dodge Neon 1995 crank only", "Jeep XJ 4 cyl", "FiatIAQ_P8", "Mazda Z5", "trg43", "Renix 44-2-2", "Renix 66-2-2-2", "Honda K 12+1", "trg47", "trg48", "INVALID" custom trigger_type_e 4 bits, U32, @OFFSET@, [0:7], @@trigger_type_e_enum@@ trigger_type_e type;set trigger_type X - bit unusedTriggerBit0; - bit unusedTriggerBit1; + bit todoRemoveMeOneDay0; + bit todoRemoveMeOneDay1; bit useOnlyFirstChannel;+This option could be used if your second trigger channel is broken int customTotalToothCount;;"number", 1, 0.0, 0, 500.0, 0 @@ -495,7 +552,7 @@ custom spi_device_e 1 bits,U32, @OFFSET@, [0:7], "Off", "SPI1", "SPI2", "SPI3" float globalFuelCorrection;set global_fuel_correction X;"coef", 1, 0.0, 0, 1000.0, 2 float adcVcc;; "volts", 1, 0.0, 0, 6.0, 3 - float maxKnockSubDeg;maximum total number of degrees to subtract from ignition advance\nwhen knocking + float maxKnockSubDeg;maximum total number of degrees to subtract from ignition advance\nwhen knocking;"Deg", 1, 0, 0, 100, 0 brain_input_pin_e[CAM_INPUTS_COUNT iterate] camInputs;+Camshaft input could be used either just for engine phase detection if your trigger shape does not include cam sensor as 'primary' channel, or it could be used for Variable Valve timing on one of the camshafts.\nTODO #660 struct afr_sensor_s @@ -509,7 +566,7 @@ end_struct afr_sensor_s afr -adc_channel_e throttlePedalPositionAdcChannel;Electronic throttle pedal position input\nFirst channel\nSee also tps1_1AdcChannel +adc_channel_e throttlePedalPositionAdcChannel;Electronic throttle pedal position input\nFirst channel\nSee also tps1_1AdcChannel\nset_analog_input_pin pps X brain_pin_e tle6240_cs; pin_output_mode_e tle6240_csPinMode; @@ -531,7 +588,7 @@ struct etb_io brain_pin_e directionPin1; brain_pin_e directionPin2; brain_pin_e controlPin1; - pin_output_mode_e controlPinMode; + brain_pin_e disablePin; end_struct idle_hardware_s idle; @@ -574,8 +631,8 @@ switch_input_pin_e clutchDownPin;some cars have a switch to indicate that clutch brain_pin_e[DIGIPOT_COUNT iterate] digitalPotentiometerChipSelect; pin_output_mode_e electronicThrottlePin1Mode; - brain_pin_e wboHeaterPin; - brain_pin_e cj125CsPin; + brain_pin_e wboHeaterPin;set_cj125_heater_pin XXX + brain_pin_e cj125CsPin;set_cj125_cs_pin XXX spi_device_e max31855spiDevice; brain_pin_e debugTriggerSync; @@ -606,11 +663,11 @@ custom adc_channel_mode_e 4 bits, U32, @OFFSET@, [0:7], "Off", "Slow", "Fas output_pin_e mainRelayPin; brain_pin_e sdCardCsPin; - brain_pin_e canTxPin; - brain_pin_e canRxPin; + brain_pin_e canTxPin;set_can_tx_pin X + brain_pin_e canRxPin;set_can_rx_pin X pin_input_mode_e throttlePedalUpPinMode; - brain_pin_e debugTimerCallback + uint8_t unused711; int idleThreadPeriodMs; int consoleLoopPeriodMs; @@ -620,7 +677,7 @@ pin_input_mode_e throttlePedalUpPinMode; uint32_t tunerStudioSerialSpeed;;"BPs", 1, 0, 0,1000000, 0 - can_device_mode_e canDeviceMode; + int anUnused4Bytes; brain_pin_e[TRIGGER_SIMULATOR_PIN_COUNT iterate] triggerSimulatorPins;Each rusEfi piece can provide synthetic trigger signal for external ECU. Sometimes these wires are routed back into trigger inputs of the same rusEfi board.\nSee also directSelfStimulation which is different. pin_output_mode_e[TRIGGER_SIMULATOR_PIN_COUNT iterate] triggerSimulatorPinModes; @@ -643,9 +700,9 @@ bit is_enabled_spi_2 bit useTpicAdvancedMode; bit useLcdScreen; bit verboseTLE8888; - bit enableVerboseCanTx; + bit enableVerboseCanTx;enable can_broadcast/disable can_broadcast bit onOffAlternatorLogic; +This will cause the alternator to be operated in a basic on or off mode, this is the simplest alternator control. - bit isCJ125Enabled + bit isCJ125Enabled;enable cj125/disable cj125 bit vvtCamSensorUseRise;+Use rise or fall signal front bit measureMapOnlyInOneCylinder;+Useful for individual intakes bit stepperForceParkingEveryRestart @@ -672,7 +729,8 @@ pin_output_mode_e hip9011IntHoldPinMode; ! 536870911 = 2^29-1, the maximum valid extended ID uint32_t verboseCanBaseAddress;;"", 1, 0, 0, 536870911, 0 - int unrealisticRpmThreashold; + uint8_t mc33_hvolt;;"v", 1, 0, 0, 100, 0 + uint8_t[3] unusedHere; pin_output_mode_e[FSIO_COMMAND_COUNT iterate] gpioPinModes; @@ -683,7 +741,7 @@ pin_output_mode_e hip9011IntHoldPinMode; custom uart_device_e 1 bits,U32, @OFFSET@, [0:7], "Off", "UART1", "UART2", "UART3" int16_t sdCardPeriodMs;+SD card logging period, in milliseconds;"ms", 1, 0, 0, 30000, 0 - brain_pin_e debugSetTimer + uint8_t unused806 brain_pin_e debugMapAveraging; output_pin_e starterRelayDisablePin; pin_output_mode_e starterRelayDisableMode;On some vehicles we can disable starter once engine is already running @@ -693,8 +751,9 @@ custom uart_device_e 1 bits,U32, @OFFSET@, [0:7], "Off", "UART1", "UART2", "UA int mapMinBufferLength;;"count", 1, 0, 0, 24, 0 int16_t idlePidDeactivationTpsThreshold;;"%", 1, 0, 0, 100.0, 0 int16_t stepperParkingExtraSteps;;"%", 1, 0, 0, 3000.0, 0 - float unusedmiataNb2VVTRatioFrom;This magic property is specific to Mazda Miata NB2;"value", 1, 0, 0, 1000, 5 - float unusedmiataNb2VVTRatioTo;This magic property is specific to Mazda Miata NB2;"value", 1, 0, 0, 1000, 5 + float unusedAntilagTimeout; + int16_t antiLagRpmTreshold; + int16_t startCrankingDuration;Maximum time to crank starter;"Seconds", 1, 0, 0, 30, 0 brain_pin_e triggerErrorPin;+This pin is used for debugging - snap a logic analyzer on it and see if it's ever high pin_output_mode_e triggerErrorPinMode; @@ -739,12 +798,15 @@ sensor_chart_e sensorChartMode;+rusEfi console Sensor Sniffer mode #define maf_sensor_type_e_enum "v0", "v1", "v2", "v3" custom maf_sensor_type_e 4 bits, S32, @OFFSET@, [0:7], @@maf_sensor_type_e_enum@@ -! todo: keep moving all these fields at the end of board_configuration_s below 'board_configuration_s bc' -! end of board_configuration_s maf_sensor_type_e mafSensorType; - custom le_formula_t 200 string, ASCII, @OFFSET@, 200 +#define CRITICAL_PREFIX "CRITICAL" +! same length used for critical and soft error messages +#define ERROR_BUFFER_SIZE 120 + + custom error_message_t @@ERROR_BUFFER_SIZE@@ string, ASCII, @OFFSET@, @@ERROR_BUFFER_SIZE@@ + custom le_formula_t @@LE_COMMAND_LENGTH@@ string, ASCII, @OFFSET@, @@LE_COMMAND_LENGTH@@ brain_pin_e[FSIO_COMMAND_COUNT iterate] fsioDigitalInputs;todo:not finished\nThese input pins allow us to pull toggle buttons state; brain_input_pin_e vehicleSpeedSensorInputPin; @@ -758,12 +820,12 @@ custom maf_sensor_type_e 4 bits, S32, @OFFSET@, [0:7], @@maf_sensor_type_e_enum@ bit todoClutchDownPinInverted bit useHbridges bit multisparkEnable - bit unusedBit_251_4 - bit unusedBit_251_5 - bit unusedBit_251_6 - bit unusedBit_251_7 - bit unusedBit_251_8 - bit unusedBit_251_9 + bit enableLaunchRetard + bit enableLaunchBoost + bit launchDisableBySpeed + bit enableCanVss + bit enableInnovateLC2 + bit showHumanReadableWarning bit unusedBit_251_10 bit unusedBit_251_11 bit unusedBit_251_12 @@ -812,8 +874,13 @@ custom maf_sensor_type_e 4 bits, S32, @OFFSET@, [0:7], @@maf_sensor_type_e_enum@ int launchFuelAdded;+Extra Fuel Added;"%", 1, 0, 0, 100.0, 0 int launchBoostDuty;+Duty Cycle for the Boost Solenoid;"%", 1, 0, 0, 100.0, 0 int hardCutRpmRange;+RPM Range for Hard Cut;"rpm", 1, 0, 0, 3000.0, 2 + int launchAdvanceRpmRange; + int launchTpsTreshold; + float launchActivateDelay; - int[103] unusedAtOldBoardConfigurationEnd; + stft_s stft + + int[94] unusedAtOldBoardConfigurationEnd; bit vvtDisplayInverted bit fuelClosedLoopCorrectionEnabled;+Enables lambda sensor closed loop feedback for fuelling. @@ -823,8 +890,8 @@ custom maf_sensor_type_e 4 bits, S32, @OFFSET@, [0:7], @@maf_sensor_type_e_enum@ bit isEngineChartEnabled;+This options enables data for 'engine sniffer' tab in console, which comes at some CPU price bit silentTriggerError;+Sometimes we have a performance issue while printing error bit useLinearCltSensor - bit canReadEnabled - bit canWriteEnabled + bit canReadEnabled;enable can_read/disable can_read + bit canWriteEnabled;enable can_write/disable can_write bit useLinearIatSensor bit useFSIO16ForTimingAdjustment;+See fsioTimingAdjustment bit tachPulseDurationAsDutyCycle @@ -944,9 +1011,9 @@ custom pin_mode_e 1 bits, U08, @OFFSET@, [0:7], @@pin_mode_e_enum@@ float alternator_antiwindupFreq;; "x", 1, 0.0, -1000000, 1000000, 4 int16_t tps2Min;Closed throttle#2. todo: extract these two fields into a structure\nSee also tps2_1AdcChannel\nset tps2_min X;"ADC", 1, 0, 0, 1023, 0 int16_t tps2Max;Full throttle#2. tpsMax value as 10 bit ADC value. Not Voltage!\nSee also tps1_1AdcChannel\nset tps2_max X;"ADC", 1, 0, 0, 1023, 0 - output_pin_e starterControlPin;See also startStopButton + output_pin_e starterControlPin;See also startStopButtonPin pin_input_mode_e startStopButtonMode; - uint8_t[1] unusedFormerWarmupAfrPid; + brain_pin_e mc33816_flag0; uint8_t tachPulsePerRev;;"Pulse", 1, 0, 1.0, 255.0, 0 ! todo: mapErrorDetectionIdleTooLow? 30kPa is usually lowest on idle @@ -987,9 +1054,9 @@ int16_t tps2Max;Full throttle#2. tpsMax value as 10 bit ADC value. Not Voltage!\ int16_t iacByTpsTaper;+Extra IAC, in percent between 0 and 100, tapered between zero and idle deactivation TPS value;"percent", 1, 0, 0, 500, 0 - brain_pin_e unusedErrorPin; + brain_pin_e auxSerialTxPin;set_aux_tx_pin X; brain_pin_e warningLedPin; - brain_pin_e unused1234234; + brain_pin_e auxSerialRxPin;set_aux_rx_pin X; brain_pin_e LIS302DLCsPin; @@ -1012,7 +1079,9 @@ int16_t tps2Max;Full throttle#2. tpsMax value as 10 bit ADC value. Not Voltage!\ float slowAdcAlpha;+ExpAverage alpha coefficient;"coeff", 1, 0, 0, 200, 3 debug_mode_e debugMode;+See http://rusefi.com/s/debugmode\n\nset debug_mode X - uint32_t[9] unused_former_warmup_target_afr; + uint32_t auxSerialSpeed;;"BPs", 1, 0, 0,1000000, 0 + + uint32_t[8] unused_former_warmup_target_afr; float boostCutPressure;kPa value at which we need to cut fuel and spark, 0 if not enabled;"kPa", 1, 0, 0, 500, 0 @@ -1045,14 +1114,17 @@ float[MAP_ACCEL_TAPER] mapAccelTaperMult;;"mult", 1, 0, 0.0, 300, float[NARROW_BAND_WIDE_BAND_CONVERSION_SIZE] narrowToWideOxygenBins;Narrow Band WBO Approximation;"V", 1, 0, -10.0, 10.0, 3 float[NARROW_BAND_WIDE_BAND_CONVERSION_SIZE] narrowToWideOxygen;;"ratio", 1, 0, -40.0, 40.0, 2 vvt_mode_e vvtMode;set vvt_mode X - bi_quard_s biQuad; + uint8_t[20] unusedOldBiquad float[CLT_TIMING_CURVE_SIZE] cltTimingBins;CLT-based timing correction;"C", 1, 0, -100.0, 250.0, 1 float[CLT_TIMING_CURVE_SIZE] cltTimingExtra;;"degree", 1, 0, -400.0, 400.0, 0 - int nbVvtIndex;;"index", 1, 0, 0, 4.0, 0 +custom tle8888_mode_e 1 bits, U08, @OFFSET@, [0:7], "Auto", "SemiAuto", "Manual", "Hall" +tle8888_mode_e tle8888mode; + + uint8_t[3] unusedSomethingWasHere; float autoTuneCltThreshold; float autoTuneTpsRocThreshold; float autoTuneTpsQuietPeriod; - float postCrankingTargetClt;;"C", 1, 0, 0, 100, 0 + float unused2432; float postCrankingFactor;Fuel multiplier taper, see also postCrankingDurationSec;"mult", 1, 0, 0, 100, 4 float postCrankingDurationSec;See also postCrankingFactor;"seconds", 1, 0, 0, 100, 2 ThermistorConf auxTempSensor1;todo: finish implementation #332 @@ -1195,13 +1267,26 @@ uint8_t[4] unusuedsw; uint8_t[IAC_PID_MULT_SIZE] iacPidMultLoadBins;;"Load", 1, 0.0, 0, 500.0, 2 uint8_t[IAC_PID_MULT_SIZE] iacPidMultRpmBins;;"RPM", @@RPM_1_BYTE_PACKING_MULT@@, 0, 0.0, 12000.0, 0 - int[527] mainUnusedEnd; + custom can_vss_nbc_e 4 bits, U32, @OFFSET@, [0:7], "BMW_e46", "W202" + can_vss_nbc_e canVssNbcType;set can_vss X + + gppwm_channel[4 iterate] gppwm; + + int[376] mainUnusedEnd; ! end of engine_configuration_s end_struct engine_configuration_s engineConfiguration; +error_message_t warning_message; + +float[AFTERSTART_HOLD_CURVE_SIZE] afterstartCoolantBins;;"C", 1, 0, -100.0, 250.0, 0 +float[AFTERSTART_HOLD_CURVE_SIZE] afterstartHoldTime;;"Seconds", 1, 0, 0, 100, 1 +float[AFTERSTART_ENRICH_CURVE_SIZE] afterstartEnrich;;"%", 1, 0, 0, 600, 1 +float[AFTERSTART_DECAY_CURVE_SIZE] afterstartDecayTime;;"Seconds", 1, 0, 0, 100, 1 + + boost_table_t boostTableOpenLoop; uint8_t[BOOST_LOAD_COUNT] boostMapBins;;"", @@LOAD_1_BYTE_PACKING_MULT@@, 0, 0, 600.0, 1 uint8_t[BOOST_RPM_COUNT] boostRpmBins;;"RPM", @@RPM_1_BYTE_PACKING_MULT@@, 0, 0.0, 12000.0, 0 @@ -1297,7 +1382,6 @@ end_struct #define MOCK_IAT_COMMAND "mock_iat_voltage" #define MOCK_CLT_COMMAND "mock_clt_voltage" #define MOCK_MAP_COMMAND "mock_map_voltage" -#define MOCK_TPS_COMMAND "mock_tps_voltage" #define MOCK_AFR_COMMAND "mock_afr_voltage" #define MOCK_MAF_COMMAND "mock_maf_voltage" ! Pedal Position Sensor @@ -1458,4 +1542,9 @@ end_struct #define ts_show_egt true #define ts_show_gps true #define ts_show_analog_divider true -#define ts_show_spi true \ No newline at end of file +#define ts_show_spi true +#define ts_show_sd_card true +#define ts_show_can_pins true +#define ts_show_tunerstudio_port true +#define ts_show_trigger_comparator false +#define ts_show_auxserial_pins true \ No newline at end of file diff --git a/firmware/integration/trigger_central.txt b/firmware/integration/trigger_central.txt index 05eb294328..21592f1b9b 100644 --- a/firmware/integration/trigger_central.txt +++ b/firmware/integration/trigger_central.txt @@ -2,7 +2,7 @@ struct_no_prefix define_constructor trigger_central_s - int[HW_EVENT_TYPES iterate] hwEventCounters; + int[HW_EVENT_TYPES iterate] hwEventCounters;Counter of hardware events since ECU start int vvtCamCounter diff --git a/firmware/os_access.h b/firmware/os_access.h index 39487685b0..36406f7606 100644 --- a/firmware/os_access.h +++ b/firmware/os_access.h @@ -7,8 +7,7 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ -#ifndef OS_ACCESS_H_ -#define OS_ACCESS_H_ +#pragma once #ifdef __cplusplus extern "C" @@ -32,5 +31,3 @@ extern "C" EXTERNC int getRemainingStack(thread_t *otp); #define HAS_OS_ACCESS - -#endif /* OS_ACCESS_H_ */ diff --git a/firmware/rusefi.cpp b/firmware/rusefi.cpp index 3beb411559..599a746a7f 100644 --- a/firmware/rusefi.cpp +++ b/firmware/rusefi.cpp @@ -137,12 +137,9 @@ bool main_loop_started = false; static char panicMessage[200]; -extern bool hasFirmwareErrorFlag; - static virtual_timer_t resetTimer; -EXTERN_ENGINE -; +EXTERN_ENGINE; // todo: move this into a hw-specific file void rebootNow(void) { diff --git a/firmware/svnversion.h b/firmware/svnversion.h index 84ea22fcd0..f257575487 100644 --- a/firmware/svnversion.h +++ b/firmware/svnversion.h @@ -1,12 +1,12 @@ // This file was generated by Version2Header -// Fri Feb 21 19:49:57 EST 2020 +// Fri Apr 24 12:30:26 EDT 2020 #ifndef GIT_HASH -#define GIT_HASH "6038dc203b9b03878ec076c11fa7f770d1aa8e26" +#define GIT_HASH "24ecb69e28eec77f5722fcafcf17b14464a10bca" #endif #ifndef VCS_VERSION -#define VCS_VERSION "21586" +#define VCS_VERSION "22343" #endif diff --git a/firmware/tunerstudio/readme.md b/firmware/tunerstudio/readme.md index fb438291a3..a0b5be09e3 100644 --- a/firmware/tunerstudio/readme.md +++ b/firmware/tunerstudio/readme.md @@ -22,3 +22,8 @@ line - here you will see all top level menus defined with internal IDs and visib The combined file is generated by ConfigDefinition.jar tool. On Windows this may be run with ```gen_config.bat```. + + +Q: how do I offer my changes to TS project? + +A: please PR only rusefi.input. Once merged, gen_config.bat would be executed automatically and results would be pushed by automation. \ No newline at end of file diff --git a/firmware/tunerstudio/rusefi.ini b/firmware/tunerstudio/rusefi.ini index cc6dd9a965..d2a0b58174 100644 --- a/firmware/tunerstudio/rusefi.ini +++ b/firmware/tunerstudio/rusefi.ini @@ -40,11 +40,14 @@ enable2ndByteCanID = false ; settingOption = DEFAULT, "Speed Density" ; DEFAULT will be over looked and this will fall into the #else block of the statement. +[MegaTune] + ; https://rusefi.com/forum/viewtopic.php?p=36201#p36201 + signature = "rusEFI v1.2020.4" [TunerStudio] queryCommand = "S" versionInfo = "V" ; firmwave version for title bar. - signature = "rusEFI v1.2020.3" ; signature is expected to be 7 or more characters. + signature = "rusEFI v1.2020.4" ; signature is expected to be 7 or more characters. [Constants] ; new packet serial format with CRC @@ -66,6 +69,7 @@ enable2ndByteCanID = false ; we have current pageSize or (pageSize + 8) here? ; crc32CheckCommand = "k\x00\x00\x00\x00\x36\xB8" + retrieveConfigError = "e" ;communication settings pageActivationDelay = 500 ; Milliseconds delay after burn command. See https://sourceforge.net/p/rusefi/tickets/77/ @@ -85,7 +89,7 @@ enable2ndByteCanID = false ; see PAGE_0_SIZE in C source code ; CONFIG_DEFINITION_START -; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on integration\rusefi_config.txt Fri Mar 20 19:58:49 EDT 2020 +; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.bat integration\rusefi_config.txt Sun Apr 26 14:16:11 EDT 2020 pageSize = 20000 page = 1 @@ -94,7 +98,7 @@ page = 1 injector_flow = scalar, F32, 8, "cm3/min", 1, 0, 0, 99999, 2 injector_battLagCorrBins = array, F32, 12, [8], "volts", 1, 0, 0.0, 20.0, 2 injector_battLagCorr = array, F32, 44, [8], "ms", 1, 0, 0.0, 50.0, 2 - directSelfStimulation = bits, U32, 76, [0:0], "false", "true" + unused76b0 = bits, U32, 76, [0:0], "false", "true" activateAuxPid1 = bits, U32, 76, [1:1], "false", "true" isVerboseAuxPid1 = bits, U32, 76, [2:2], "false", "true" activateAuxPid2 = bits, U32, 76, [3:3], "false", "true" @@ -103,14 +107,14 @@ page = 1 isVerboseAuxPid3 = bits, U32, 76, [6:6], "false", "true" activateAuxPid4 = bits, U32, 76, [7:7], "false", "true" isVerboseAuxPid4 = bits, U32, 76, [8:8], "false", "true" - useBiQuadAnalogFiltering= bits, U32, 76, [9:9], "false", "true" + isCJ125Verbose = bits, U32, 76, [9:9], "false", "true" cj125isUaDivided = bits, U32, 76, [10:10], "false", "true" cj125isLsu49 = bits, U32, 76, [11:11], "false", "true" etb_use_two_wires = bits, U32, 76, [12:12], "false", "true" isDoubleSolenoidIdle = bits, U32, 76, [13:13], "false", "true" showSdCardWarning = bits, U32, 76, [14:14], "false", "true" cj125isUrDivided = bits, U32, 76, [15:15], "false", "true" - useTLE8888_hall_mode = bits, U32, 76, [16:16], "false", "true" + issue_294_unused = bits, U32, 76, [16:16], "false", "true" useTLE8888_cranking_hack= bits, U32, 76, [17:17], "false", "true" useInstantRpmForIdle = bits, U32, 76, [18:18], "false", "true" absoluteFuelPressure = bits, U32, 76, [19:19], "false", "true" @@ -118,7 +122,7 @@ page = 1 rollingLaunchEnabled = bits, U32, 76, [21:21], "false", "true" antiLagEnabled = bits, U32, 76, [22:22], "false", "true" useRunningMathForCranking= bits, U32, 76, [23:23], "Fixed", "Fuel Map" - issue_294_25 = bits, U32, 76, [24:24], "false", "true" + displayLogicLevelsInEngineSniffer= bits, U32, 76, [24:24], "false", "true" issue_294_26 = bits, U32, 76, [25:25], "false", "true" issue_294_27 = bits, U32, 76, [26:26], "false", "true" issue_294_28 = bits, U32, 76, [27:27], "false", "true" @@ -190,7 +194,7 @@ page = 1 fanOnTemperature = scalar, F32, 468, "*C", 1, 0, 0, 1000.0, 0 fanOffTemperature = scalar, F32, 472, "*C", 1, 0, 0, 1000.0, 0 vehicleSpeedCoef = scalar, F32, 476, "coef", 1, 0, 0.01, 2000.0, 2 - canNbcType = bits, U32, 480, [0:7], "BMW", "FIAT", "VAG" , "MAZDA RX8" + canNbcType = bits, U32, 480, [0:7], "None", "FIAT", "VAG" , "MAZDA RX8", "BMW", "W202" canSleepPeriodMs = scalar, S32, 484, "ms", 1, 0, 0, 1000.0, 2 ambiguousOperationMode = bits, U32, 488, [0:7], "INVALID", "4 stroke without cam sensor", "4 stroke with cam sensor", "2 stroke", "4 stroke with symmetrical crank (requires VVT input)", "INVALID", "INVALID", "INVALID" displayMode = bits, U32, 492, [0:7], "none", "hd44780", "hd44780 over pcf8574", "INVALID" @@ -204,9 +208,9 @@ page = 1 tps2_1AdcChannel = bits, U08, 515, [0:7] "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PB0", "PB1", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "Disabled", "PB12", "PB13", "PC14", "PC15", "PC16", "PC17", "PD3", "PD4", "PE2", "PE6", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" ;no TS info - skipping overrideCrankingIgnition offset 516 sensorChartFrequency = scalar, S32, 520, "index", 1, 0, 0, 300, 0 ; size 4 - trigger_type = bits, U32, 524, [0:7], "custom toothed wheel", "Ford Aspire", "Dodge Neon 1995", "Miata NA", "Miata NB", "GM_7X", "Cooper R50", "Mazda SOHC 4", "60/2", "36/1", "Honda 4+24+1", "Mitsubishi", "Honda 4+24", "Honda 1+4+24", "Dodge Neon 2003", "Mazda DOHC 1+4", "1+1", "1+60/2", "Single Tooth", "Dodge Ram 1+16", "60/2 VW", "Honda 1+24", "Dodge Stratus", "36_2_2_2", "Nissan Primera", "2JZ", "Rover K", "GM LS 24", "Honda CBR 600", "2JZ_1_12", "Honda CBR 600 custom", "3/1 skipped" , "Dodge Neon 2003 crank", "Miata VVT", "trg34", "trg35", "Subaru 7+6", "Jeep 18-2-2-2", "WIP", "Dodge Neon 1995 crank only", "Jeep XJ 4 cyl", "FiatIAQ_P8", "Mazda Z5", "trg43", "trg44", "trg45", "INVALID" - trigger_unusedTriggerBit0= bits, U32, 528, [0:0], "false", "true" - trigger_unusedTriggerBit1= bits, U32, 528, [1:1], "false", "true" + trigger_type = bits, U32, 524, [0:7], "custom toothed wheel", "Ford Aspire", "Dodge Neon 1995", "Miata NA", "Miata NB", "GM_7X", "Cooper R50", "Mazda SOHC 4", "60/2", "36/1", "Honda 4+24+1", "Mitsubishi", "Honda 4+24", "Honda 1+4+24", "Dodge Neon 2003", "Mazda DOHC 1+4", "1+1", "1+60/2", "Single Tooth", "Dodge Ram 1+16", "60/2 VW", "Honda 1+24", "Dodge Stratus", "36_2_2_2", "Nissan Primera", "2JZ", "Rover K", "GM LS 24", "Honda CBR 600", "2JZ_1_12", "Honda CBR 600 custom", "3/1 skipped" , "Dodge Neon 2003 crank", "Miata VVT", "trg34", "trg35", "Subaru 7+6", "Jeep 18-2-2-2", "WIP", "Dodge Neon 1995 crank only", "Jeep XJ 4 cyl", "FiatIAQ_P8", "Mazda Z5", "trg43", "Renix 44-2-2", "Renix 66-2-2-2", "Honda K 12+1", "trg47", "trg48", "INVALID" + trigger_todoRemoveMeOneDay0= bits, U32, 528, [0:0], "false", "true" + trigger_todoRemoveMeOneDay1= bits, U32, 528, [1:1], "false", "true" trigger_useOnlyFirstChannel= bits, U32, 528, [2:2], "false", "true" trigger_unusedBit_4_3 = bits, U32, 528, [3:3], "false", "true" trigger_unusedBit_4_4 = bits, U32, 528, [4:4], "false", "true" @@ -245,7 +249,7 @@ page = 1 mafAdcChannel = bits, U08, 543, [0:7] "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PB0", "PB1", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "Disabled", "PB12", "PB13", "PC14", "PC15", "PC16", "PC17", "PD3", "PD4", "PE2", "PE6", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" globalFuelCorrection = scalar, F32, 544, "coef", 1, 0.0, 0, 1000.0, 2 adcVcc = scalar, F32, 548, "volts", 1, 0.0, 0, 6.0, 3 -;no TS info - skipping maxKnockSubDeg offset 552 + maxKnockSubDeg = scalar, F32, 552, "Deg", 1, 0, 0, 100, 0 camInputs1 = bits, U08, 556, [0:7], "NONE", "INVALID", "INVALID", "PA1", "PA2", "PA3", "INVALID", "PA5", "PA6", "PA7", "PA8", "PA9", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "PA15", "INVALID", "INVALID", "INVALID", "PB3", "PB4", "PB5", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "PC6", "PC7", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "PE5", "PE6", "INVALID", "INVALID", "PE9", "INVALID", "PE11", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" camInputs2 = bits, U08, 557, [0:7], "NONE", "INVALID", "INVALID", "PA1", "PA2", "PA3", "INVALID", "PA5", "PA6", "PA7", "PA8", "PA9", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "PA15", "INVALID", "INVALID", "INVALID", "PB3", "PB4", "PB5", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "PC6", "PC7", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "PE5", "PE6", "INVALID", "INVALID", "PE9", "INVALID", "PE11", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" camInputs3 = bits, U08, 558, [0:7], "NONE", "INVALID", "INVALID", "PA1", "PA2", "PA3", "INVALID", "PA5", "PA6", "PA7", "PA8", "PA9", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "PA15", "INVALID", "INVALID", "INVALID", "PB3", "PB4", "PB5", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "PC6", "PC7", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "PE5", "PE6", "INVALID", "INVALID", "PE9", "INVALID", "PE11", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" @@ -349,13 +353,13 @@ page = 1 canTxPin = bits, U08, 708, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" canRxPin = bits, U08, 709, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" throttlePedalUpPinMode = scalar, U08, 710, "todo", 1, 0, 0, 20, 1 - debugTimerCallback = bits, U08, 711, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" +;no TS info - skipping unused711 offset 711 ;no TS info - skipping idleThreadPeriodMs offset 712 ;no TS info - skipping consoleLoopPeriodMs offset 716 ;no TS info - skipping lcdThreadPeriodMs offset 720 ;no TS info - skipping generalPeriodicThreadPeriodMs offset 724 tunerStudioSerialSpeed = scalar, U32, 728, "BPs", 1, 0, 0,1000000, 0 - canDeviceMode = bits, U32, 732, [0:7], "v0", "v1" +;no TS info - skipping anUnused4Bytes offset 732 triggerSimulatorPins1 = bits, U08, 736, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" triggerSimulatorPins2 = bits, U08, 737, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" triggerSimulatorPins3 = bits, U08, 738, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" @@ -405,7 +409,8 @@ page = 1 hip9011IntHoldPin = bits, U08, 754, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" hip9011IntHoldPinMode = bits, U08, 755, [0:7], "default", "default inverted", "open collector", "open collector inverted" verboseCanBaseAddress = scalar, U32, 756, "", 1, 0, 0, 536870911, 0 -;no TS info - skipping unrealisticRpmThreashold offset 760 + mc33_hvolt = scalar, U08, 760, "v", 1, 0, 0, 100, 0 +;no TS info - skipping unusedHere offset 761 gpioPinModes1 = bits, U08, 764, [0:7], "default", "default inverted", "open collector", "open collector inverted" gpioPinModes2 = bits, U08, 765, [0:7], "default", "default inverted", "open collector", "open collector inverted" gpioPinModes3 = bits, U08, 766, [0:7], "default", "default inverted", "open collector", "open collector inverted" @@ -447,7 +452,7 @@ page = 1 max31855_cs7 = bits, U08, 802, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" max31855_cs8 = bits, U08, 803, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" sdCardPeriodMs = scalar, S16, 804, "ms", 1, 0, 0, 30000, 0 - debugSetTimer = bits, U08, 806, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" +;no TS info - skipping unused806 offset 806 debugMapAveraging = bits, U08, 807, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" starterRelayDisablePin = bits, U08, 808, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","TLE6240_1", "TLE6240_2", "TLE6240_3", "TLE6240_4", "TLE6240_5", "TLE6240_6", "TLE6240_7", "TLE6240_8", "TLE6240_9", "TLE6240_10", "TLE6240_11", "TLE6240_12", "TLE6240_13", "TLE6240_14", "TLE6240_15", "TLE6240_16", "MC33972_1", "MC33972_2", "MC33972_3", "MC33972_4", "MC33972_5", "MC33972_6", "MC33972_7", "MC33972_8", "MC33972_9", "MC33972_10", "MC33972_11", "MC33972_12", "MC33972_13", "MC33972_14", "MC33972_15", "MC33972_16", "MC33972_17", "MC33972_18", "MC33972_19", "MC33972_20", "MC33972_21", "MC33972_22", "TLE8888_1", "TLE8888_2", "TLE8888_3", "TLE8888_4", "TLE8888_5", "TLE8888_6", "TLE8888_7", "TLE8888_8", "TLE8888_9", "TLE8888_10", "TLE8888_11", "TLE8888_12", "TLE8888_13", "TLE8888_14", "TLE8888_15", "TLE8888_16", "TLE8888_17", "TLE8888_18", "TLE8888_19", "TLE8888_20", "TLE8888_21", "TLE8888_22", "TLE8888_23", "TLE8888_24", "TLE8888_25", "TLE8888_26", "TLE8888_27", "TLE8888_28", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" starterRelayDisableMode = bits, U08, 809, [0:7], "default", "default inverted", "open collector", "open collector inverted" @@ -456,8 +461,9 @@ page = 1 mapMinBufferLength = scalar, S32, 812, "count", 1, 0, 0, 24, 0 idlePidDeactivationTpsThreshold = scalar, S16, 816, "%", 1, 0, 0, 100.0, 0 stepperParkingExtraSteps = scalar, S16, 818, "%", 1, 0, 0, 3000.0, 0 - unusedmiataNb2VVTRatioFrom = scalar, F32, 820, "value", 1, 0, 0, 1000, 5 - unusedmiataNb2VVTRatioTo = scalar, F32, 824, "value", 1, 0, 0, 1000, 5 +;no TS info - skipping unusedAntilagTimeout offset 820 +;no TS info - skipping antiLagRpmTreshold offset 824 + startCrankingDuration = scalar, S16, 826, "Seconds", 1, 0, 0, 30, 0 triggerErrorPin = bits, U08, 828, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" triggerErrorPinMode = bits, U08, 829, [0:7], "default", "default inverted", "open collector", "open collector inverted" acRelayPin = bits, U08, 830, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","TLE6240_1", "TLE6240_2", "TLE6240_3", "TLE6240_4", "TLE6240_5", "TLE6240_6", "TLE6240_7", "TLE6240_8", "TLE6240_9", "TLE6240_10", "TLE6240_11", "TLE6240_12", "TLE6240_13", "TLE6240_14", "TLE6240_15", "TLE6240_16", "MC33972_1", "MC33972_2", "MC33972_3", "MC33972_4", "MC33972_5", "MC33972_6", "MC33972_7", "MC33972_8", "MC33972_9", "MC33972_10", "MC33972_11", "MC33972_12", "MC33972_13", "MC33972_14", "MC33972_15", "MC33972_16", "MC33972_17", "MC33972_18", "MC33972_19", "MC33972_20", "MC33972_21", "MC33972_22", "TLE8888_1", "TLE8888_2", "TLE8888_3", "TLE8888_4", "TLE8888_5", "TLE8888_6", "TLE8888_7", "TLE8888_8", "TLE8888_9", "TLE8888_10", "TLE8888_11", "TLE8888_12", "TLE8888_13", "TLE8888_14", "TLE8888_15", "TLE8888_16", "TLE8888_17", "TLE8888_18", "TLE8888_19", "TLE8888_20", "TLE8888_21", "TLE8888_22", "TLE8888_23", "TLE8888_24", "TLE8888_25", "TLE8888_26", "TLE8888_27", "TLE8888_28", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" @@ -539,12 +545,12 @@ page = 1 todoClutchDownPinInverted= bits, U32, 976, [1:1], "false", "true" useHbridges = bits, U32, 976, [2:2], "false", "true" multisparkEnable = bits, U32, 976, [3:3], "false", "true" - unusedBit_251_4 = bits, U32, 976, [4:4], "false", "true" - unusedBit_251_5 = bits, U32, 976, [5:5], "false", "true" - unusedBit_251_6 = bits, U32, 976, [6:6], "false", "true" - unusedBit_251_7 = bits, U32, 976, [7:7], "false", "true" - unusedBit_251_8 = bits, U32, 976, [8:8], "false", "true" - unusedBit_251_9 = bits, U32, 976, [9:9], "false", "true" + enableLaunchRetard = bits, U32, 976, [4:4], "false", "true" + enableLaunchBoost = bits, U32, 976, [5:5], "false", "true" + launchDisableBySpeed = bits, U32, 976, [6:6], "false", "true" + enableCanVss = bits, U32, 976, [7:7], "false", "true" + enableInnovateLC2 = bits, U32, 976, [8:8], "false", "true" + showHumanReadableWarning= bits, U32, 976, [9:9], "false", "true" unusedBit_251_10 = bits, U32, 976, [10:10], "false", "true" unusedBit_251_11 = bits, U32, 976, [11:11], "false", "true" unusedBit_251_12 = bits, U32, 976, [12:12], "false", "true" @@ -565,16 +571,16 @@ page = 1 unusedBit_251_27 = bits, U32, 976, [27:27], "false", "true" unusedBit_251_28 = bits, U32, 976, [28:28], "false", "true" unusedBit_251_29 = bits, U32, 976, [29:29], "false", "true" - unusedBit_280_30 = bits, U32, 976, [30:30], "false", "true" - unusedBit_280_31 = bits, U32, 976, [31:31], "false", "true" + unusedBit_282_30 = bits, U32, 976, [30:30], "false", "true" + unusedBit_282_31 = bits, U32, 976, [31:31], "false", "true" etbIo1_directionPin1 = bits, U08, 980, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" etbIo1_directionPin2 = bits, U08, 981, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" etbIo1_controlPin1 = bits, U08, 982, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" - etbIo1_controlPinMode = bits, U08, 983, [0:7], "default", "default inverted", "open collector", "open collector inverted" + etbIo1_disablePin = bits, U08, 983, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" etbIo2_directionPin1 = bits, U08, 984, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" etbIo2_directionPin2 = bits, U08, 985, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" etbIo2_controlPin1 = bits, U08, 986, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" - etbIo2_controlPinMode = bits, U08, 987, [0:7], "default", "default inverted", "open collector", "open collector inverted" + etbIo2_disablePin = bits, U08, 987, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" boostControlPin = bits, U08, 988, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","TLE6240_1", "TLE6240_2", "TLE6240_3", "TLE6240_4", "TLE6240_5", "TLE6240_6", "TLE6240_7", "TLE6240_8", "TLE6240_9", "TLE6240_10", "TLE6240_11", "TLE6240_12", "TLE6240_13", "TLE6240_14", "TLE6240_15", "TLE6240_16", "MC33972_1", "MC33972_2", "MC33972_3", "MC33972_4", "MC33972_5", "MC33972_6", "MC33972_7", "MC33972_8", "MC33972_9", "MC33972_10", "MC33972_11", "MC33972_12", "MC33972_13", "MC33972_14", "MC33972_15", "MC33972_16", "MC33972_17", "MC33972_18", "MC33972_19", "MC33972_20", "MC33972_21", "MC33972_22", "TLE8888_1", "TLE8888_2", "TLE8888_3", "TLE8888_4", "TLE8888_5", "TLE8888_6", "TLE8888_7", "TLE8888_8", "TLE8888_9", "TLE8888_10", "TLE8888_11", "TLE8888_12", "TLE8888_13", "TLE8888_14", "TLE8888_15", "TLE8888_16", "TLE8888_17", "TLE8888_18", "TLE8888_19", "TLE8888_20", "TLE8888_21", "TLE8888_22", "TLE8888_23", "TLE8888_24", "TLE8888_25", "TLE8888_26", "TLE8888_27", "TLE8888_28", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" boostControlPinMode = bits, U08, 989, [0:7], "default", "default inverted", "open collector", "open collector inverted" antiLagActivatePin = bits, U08, 990, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" @@ -596,7 +602,30 @@ page = 1 launchFuelAdded = scalar, S32, 1040, "%", 1, 0, 0, 100.0, 0 launchBoostDuty = scalar, S32, 1044, "%", 1, 0, 0, 100.0, 0 hardCutRpmRange = scalar, S32, 1048, "rpm", 1, 0, 0, 3000.0, 2 -;no TS info - skipping unusedAtOldBoardConfigurationEnd offset 1052 +;no TS info - skipping launchAdvanceRpmRange offset 1052 +;no TS info - skipping launchTpsTreshold offset 1056 +;no TS info - skipping launchActivateDelay offset 1060 + stft_maxIdleRegionRpm = scalar, U08, 1064, "RPM", 50, 0, 0.0, 12000.0, 0 + stft_maxOverrunLoad = scalar, U08, 1065, "load", 1, 0, 0.0, 250, 0 + stft_minPowerLoad = scalar, U08, 1066, "load", 1, 0, 0.0, 250, 0 + stft_deadband = scalar, U08, 1067, "%", 0.1, 0, 0, 3, 1 + stft_minClt = scalar, S08, 1068, "C", 1, 0, -20, 100, 0 + stft_minAfr = scalar, U08, 1069, "afr", 0.1, 0, 10, 20, 1 + stft_maxAfr = scalar, U08, 1070, "afr", 0.1, 0, 10, 20, 1 + stft_startupDelay = scalar, U08, 1071, "seconds", 1, 0, 0, 250, 0 + stft_cellCfgs1_maxAdd = scalar, S08, 1072, "%", 1, 0, 0, 25, 0 + stft_cellCfgs1_maxRemove = scalar, S08, 1073, "%", 1, 0, -25, 0, 0 + stft_cellCfgs1_timeConstant = scalar, U16, 1074, "sec", 0.1, 0, 0.1, 100, 2 + stft_cellCfgs2_maxAdd = scalar, S08, 1076, "%", 1, 0, 0, 25, 0 + stft_cellCfgs2_maxRemove = scalar, S08, 1077, "%", 1, 0, -25, 0, 0 + stft_cellCfgs2_timeConstant = scalar, U16, 1078, "sec", 0.1, 0, 0.1, 100, 2 + stft_cellCfgs3_maxAdd = scalar, S08, 1080, "%", 1, 0, 0, 25, 0 + stft_cellCfgs3_maxRemove = scalar, S08, 1081, "%", 1, 0, -25, 0, 0 + stft_cellCfgs3_timeConstant = scalar, U16, 1082, "sec", 0.1, 0, 0.1, 100, 2 + stft_cellCfgs4_maxAdd = scalar, S08, 1084, "%", 1, 0, 0, 25, 0 + stft_cellCfgs4_maxRemove = scalar, S08, 1085, "%", 1, 0, -25, 0, 0 + stft_cellCfgs4_timeConstant = scalar, U16, 1086, "sec", 0.1, 0, 0.1, 100, 2 +;no TS info - skipping unusedAtOldBoardConfigurationEnd offset 1088 vvtDisplayInverted = bits, U32, 1464, [0:0], "false", "true" fuelClosedLoopCorrectionEnabled= bits, U32, 1464, [1:1], "false", "true" isVerboseIAC = bits, U32, 1464, [2:2], "false", "true" @@ -726,7 +755,7 @@ page = 1 tps2Max = scalar, S16, 1770, "ADC", 1, 0, 0, 1023, 0 starterControlPin = bits, U08, 1772, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","TLE6240_1", "TLE6240_2", "TLE6240_3", "TLE6240_4", "TLE6240_5", "TLE6240_6", "TLE6240_7", "TLE6240_8", "TLE6240_9", "TLE6240_10", "TLE6240_11", "TLE6240_12", "TLE6240_13", "TLE6240_14", "TLE6240_15", "TLE6240_16", "MC33972_1", "MC33972_2", "MC33972_3", "MC33972_4", "MC33972_5", "MC33972_6", "MC33972_7", "MC33972_8", "MC33972_9", "MC33972_10", "MC33972_11", "MC33972_12", "MC33972_13", "MC33972_14", "MC33972_15", "MC33972_16", "MC33972_17", "MC33972_18", "MC33972_19", "MC33972_20", "MC33972_21", "MC33972_22", "TLE8888_1", "TLE8888_2", "TLE8888_3", "TLE8888_4", "TLE8888_5", "TLE8888_6", "TLE8888_7", "TLE8888_8", "TLE8888_9", "TLE8888_10", "TLE8888_11", "TLE8888_12", "TLE8888_13", "TLE8888_14", "TLE8888_15", "TLE8888_16", "TLE8888_17", "TLE8888_18", "TLE8888_19", "TLE8888_20", "TLE8888_21", "TLE8888_22", "TLE8888_23", "TLE8888_24", "TLE8888_25", "TLE8888_26", "TLE8888_27", "TLE8888_28", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" startStopButtonMode = scalar, U08, 1773, "todo", 1, 0, 0, 20, 1 -;no TS info - skipping unusedFormerWarmupAfrPid offset 1774 + mc33816_flag0 = bits, U08, 1774, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" tachPulsePerRev = scalar, U08, 1775, "Pulse", 1, 0, 1.0, 255.0, 0 mapErrorDetectionTooLow = scalar, F32, 1776, "kPa", 1, 0, -100.0, 100.0, 2 mapErrorDetectionTooHigh = scalar, F32, 1780, "kPa", 1, 0, -100.0, 800.0, 2 @@ -761,9 +790,9 @@ page = 1 startOfCrankingPrimingPulse = scalar, F32, 2032, "ms", 1, 0, 0, 200, 1 afterCrankingIACtaperDuration = scalar, S16, 2036, "cycles", 1, 0, 0, 5000, 0 iacByTpsTaper = scalar, S16, 2038, "percent", 1, 0, 0, 500, 0 - unusedErrorPin = bits, U08, 2040, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" + auxSerialTxPin = bits, U08, 2040, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" warningLedPin = bits, U08, 2041, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" - unused1234234 = bits, U08, 2042, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" + auxSerialRxPin = bits, U08, 2042, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" LIS302DLCsPin = bits, U08, 2043, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" tpsAccelLength = scalar, S32, 2044, "cycles", 1, 0, 1, 200, 0 tpsAccelEnrichmentThreshold = scalar, F32, 2048, "roc", 1, 0, 0, 200, 3 @@ -777,8 +806,9 @@ page = 1 tpsDecelEnleanmentThreshold = scalar, F32, 2080, "roc", 1, 0, 0, 200, 3 tpsDecelEnleanmentMultiplier = scalar, F32, 2084, "coeff", 1, 0, 0, 200, 3 slowAdcAlpha = scalar, F32, 2088, "coeff", 1, 0, 0, 200, 3 - debugMode = bits, U32, 2092, [0:7], "Alternator PID", "TPS acceleration enrichment", "INVALID", "Idle Control", "Engine Load accl enrich", "Trigger Counters", "FSIO_ADC", "AUX_PID_1", "VVT input", "Cranking", "Timing", "Closed-loop fuel corr PID", "VSS", "SD card", "sr5", "Knock", "Trigger Sync", "Electronic Throttle", "Executor", "Bench Test / TS commands", "Aux Valves", "Analog inputs #1", "INSTANT_RPM", "FSIO_EXPRESSION", "Status", "CJ125", "CAN", "MAP", "Metrics", "ETB#2", "Ion Sense", "TLE8888", "Analog inputs #2", "Dwell Metric", "Aux Temperature", "ETB Logic", "Boost Control" -;no TS info - skipping unused_former_warmup_target_afr offset 2096 + debugMode = bits, U32, 2092, [0:7], "Alternator PID", "TPS acceleration enrichment", "INVALID", "Idle Control", "Engine Load accl enrich", "Trigger Counters", "FSIO_ADC", "AUX_PID_1", "VVT input", "Cranking", "Timing", "Closed-loop fuel corr PID", "VSS", "SD card", "sr5", "Knock", "mode16", "Electronic Throttle", "Executor", "Bench Test / TS commands", "Aux Valves", "Analog inputs #1", "INSTANT_RPM", "FSIO_EXPRESSION", "Status", "CJ125", "CAN", "MAP", "Metrics", "ETB#2", "Ion Sense", "TLE8888", "Analog inputs #2", "Dwell Metric", "INVALID", "ETB Logic", "Boost Control", "Start/Stop", "Launch", "ETB Autotune", "Mode40" + auxSerialSpeed = scalar, U32, 2096, "BPs", 1, 0, 0,1000000, 0 +;no TS info - skipping unused_former_warmup_target_afr offset 2100 boostCutPressure = scalar, F32, 2132, "kPa", 1, 0, 0, 500, 0 mapAccelTaperBins = array, F32, 2136, [8], "counter", 1, 0, 0.0, 300, 0 mapAccelTaperMult = array, F32, 2168, [8], "mult", 1, 0, 0.0, 300, 2 @@ -812,18 +842,15 @@ page = 1 narrowToWideOxygenBins = array, F32, 2264, [8], "V", 1, 0, -10.0, 10.0, 3 narrowToWideOxygen = array, F32, 2296, [8], "ratio", 1, 0, -40.0, 40.0, 2 vvtMode = bits, U32, 2328, [0:7], "First half", "Second half", "2GZ", "Miata NB2", "mode4", "mode5", "mode6", "mode7" - biQuad_a0 = scalar, F32, 2332, "v", 1, 0, -1000, 1000, 9 - biQuad_a1 = scalar, F32, 2336, "v", 1, 0, -1000, 1000, 9 - biQuad_a2 = scalar, F32, 2340, "v", 1, 0, -1000, 1000, 9 - biQuad_b1 = scalar, F32, 2344, "v", 1, 0, -1000, 1000, 9 - biQuad_b2 = scalar, F32, 2348, "v", 1, 0, -1000, 1000, 9 +;no TS info - skipping unusedOldBiquad offset 2332 cltTimingBins = array, F32, 2352, [8], "C", 1, 0, -100.0, 250.0, 1 cltTimingExtra = array, F32, 2384, [8], "degree", 1, 0, -400.0, 400.0, 0 - nbVvtIndex = scalar, S32, 2416, "index", 1, 0, 0, 4.0, 0 + tle8888mode = bits, U08, 2416, [0:7], "Auto", "SemiAuto", "Manual", "Hall" +;no TS info - skipping unusedSomethingWasHere offset 2417 ;no TS info - skipping autoTuneCltThreshold offset 2420 ;no TS info - skipping autoTuneTpsRocThreshold offset 2424 ;no TS info - skipping autoTuneTpsQuietPeriod offset 2428 - postCrankingTargetClt = scalar, F32, 2432, "C", 1, 0, 0, 100, 0 +;no TS info - skipping unused2432 offset 2432 postCrankingFactor = scalar, F32, 2436, "mult", 1, 0, 0, 100, 4 postCrankingDurationSec = scalar, F32, 2440, "seconds", 1, 0, 0, 100, 2 auxTempSensor1_tempC_1 = scalar, F32, 2444, "*C", 1, 0, -40, 200, 1 @@ -1010,13 +1037,59 @@ page = 1 iacPidMultTable = array, U08, 4060, [8x8],"%", 1, 0, 0, 999, 2 iacPidMultLoadBins = array, U08, 4124, [8], "Load", 1, 0.0, 0, 500.0, 2 iacPidMultRpmBins = array, U08, 4132, [8], "RPM", 50, 0, 0.0, 12000.0, 0 -;no TS info - skipping mainUnusedEnd offset 4140 + canVssNbcType = bits, U32, 4140, [0:7], "BMW_e46", "W202" + gppwm1_pin = bits, U08, 4144, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","TLE6240_1", "TLE6240_2", "TLE6240_3", "TLE6240_4", "TLE6240_5", "TLE6240_6", "TLE6240_7", "TLE6240_8", "TLE6240_9", "TLE6240_10", "TLE6240_11", "TLE6240_12", "TLE6240_13", "TLE6240_14", "TLE6240_15", "TLE6240_16", "MC33972_1", "MC33972_2", "MC33972_3", "MC33972_4", "MC33972_5", "MC33972_6", "MC33972_7", "MC33972_8", "MC33972_9", "MC33972_10", "MC33972_11", "MC33972_12", "MC33972_13", "MC33972_14", "MC33972_15", "MC33972_16", "MC33972_17", "MC33972_18", "MC33972_19", "MC33972_20", "MC33972_21", "MC33972_22", "TLE8888_1", "TLE8888_2", "TLE8888_3", "TLE8888_4", "TLE8888_5", "TLE8888_6", "TLE8888_7", "TLE8888_8", "TLE8888_9", "TLE8888_10", "TLE8888_11", "TLE8888_12", "TLE8888_13", "TLE8888_14", "TLE8888_15", "TLE8888_16", "TLE8888_17", "TLE8888_18", "TLE8888_19", "TLE8888_20", "TLE8888_21", "TLE8888_22", "TLE8888_23", "TLE8888_24", "TLE8888_25", "TLE8888_26", "TLE8888_27", "TLE8888_28", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" + gppwm1_dutyIfError = scalar, U08, 4145, "%", 1, 0, 0, 100, 0 + gppwm1_pwmFrequency = scalar, U16, 4146, "hz", 1, 0, 0, 500, 0 + gppwm1_onAboveDuty = scalar, U08, 4148, "%", 1, 0, 0, 100, 0 + gppwm1_offBelowDuty = scalar, U08, 4149, "%", 1, 0, 0, 100, 0 + gppwm1_loadAxis = bits, U08, 4150, [0:1], "TPS", "MAP", "CLT", "IAT" +;no TS info - skipping gppwm1_pad offset 4151 + gppwm1_loadBins = array, U08, 4152, [8], "load", 1, 0, 0.0, 250, 0 + gppwm1_rpmBins = array, U08, 4160, [8], "RPM", 50, 0, 0.0, 12000.0, 0 + gppwm1_table = array, U08, 4168, [8x8], "duty", 1, 0, 0, 100, 0 + gppwm2_pin = bits, U08, 4232, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","TLE6240_1", "TLE6240_2", "TLE6240_3", "TLE6240_4", "TLE6240_5", "TLE6240_6", "TLE6240_7", "TLE6240_8", "TLE6240_9", "TLE6240_10", "TLE6240_11", "TLE6240_12", "TLE6240_13", "TLE6240_14", "TLE6240_15", "TLE6240_16", "MC33972_1", "MC33972_2", "MC33972_3", "MC33972_4", "MC33972_5", "MC33972_6", "MC33972_7", "MC33972_8", "MC33972_9", "MC33972_10", "MC33972_11", "MC33972_12", "MC33972_13", "MC33972_14", "MC33972_15", "MC33972_16", "MC33972_17", "MC33972_18", "MC33972_19", "MC33972_20", "MC33972_21", "MC33972_22", "TLE8888_1", "TLE8888_2", "TLE8888_3", "TLE8888_4", "TLE8888_5", "TLE8888_6", "TLE8888_7", "TLE8888_8", "TLE8888_9", "TLE8888_10", "TLE8888_11", "TLE8888_12", "TLE8888_13", "TLE8888_14", "TLE8888_15", "TLE8888_16", "TLE8888_17", "TLE8888_18", "TLE8888_19", "TLE8888_20", "TLE8888_21", "TLE8888_22", "TLE8888_23", "TLE8888_24", "TLE8888_25", "TLE8888_26", "TLE8888_27", "TLE8888_28", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" + gppwm2_dutyIfError = scalar, U08, 4233, "%", 1, 0, 0, 100, 0 + gppwm2_pwmFrequency = scalar, U16, 4234, "hz", 1, 0, 0, 500, 0 + gppwm2_onAboveDuty = scalar, U08, 4236, "%", 1, 0, 0, 100, 0 + gppwm2_offBelowDuty = scalar, U08, 4237, "%", 1, 0, 0, 100, 0 + gppwm2_loadAxis = bits, U08, 4238, [0:1], "TPS", "MAP", "CLT", "IAT" +;no TS info - skipping gppwm2_pad offset 4239 + gppwm2_loadBins = array, U08, 4240, [8], "load", 1, 0, 0.0, 250, 0 + gppwm2_rpmBins = array, U08, 4248, [8], "RPM", 50, 0, 0.0, 12000.0, 0 + gppwm2_table = array, U08, 4256, [8x8], "duty", 1, 0, 0, 100, 0 + gppwm3_pin = bits, U08, 4320, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","TLE6240_1", "TLE6240_2", "TLE6240_3", "TLE6240_4", "TLE6240_5", "TLE6240_6", "TLE6240_7", "TLE6240_8", "TLE6240_9", "TLE6240_10", "TLE6240_11", "TLE6240_12", "TLE6240_13", "TLE6240_14", "TLE6240_15", "TLE6240_16", "MC33972_1", "MC33972_2", "MC33972_3", "MC33972_4", "MC33972_5", "MC33972_6", "MC33972_7", "MC33972_8", "MC33972_9", "MC33972_10", "MC33972_11", "MC33972_12", "MC33972_13", "MC33972_14", "MC33972_15", "MC33972_16", "MC33972_17", "MC33972_18", "MC33972_19", "MC33972_20", "MC33972_21", "MC33972_22", "TLE8888_1", "TLE8888_2", "TLE8888_3", "TLE8888_4", "TLE8888_5", "TLE8888_6", "TLE8888_7", "TLE8888_8", "TLE8888_9", "TLE8888_10", "TLE8888_11", "TLE8888_12", "TLE8888_13", "TLE8888_14", "TLE8888_15", "TLE8888_16", "TLE8888_17", "TLE8888_18", "TLE8888_19", "TLE8888_20", "TLE8888_21", "TLE8888_22", "TLE8888_23", "TLE8888_24", "TLE8888_25", "TLE8888_26", "TLE8888_27", "TLE8888_28", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" + gppwm3_dutyIfError = scalar, U08, 4321, "%", 1, 0, 0, 100, 0 + gppwm3_pwmFrequency = scalar, U16, 4322, "hz", 1, 0, 0, 500, 0 + gppwm3_onAboveDuty = scalar, U08, 4324, "%", 1, 0, 0, 100, 0 + gppwm3_offBelowDuty = scalar, U08, 4325, "%", 1, 0, 0, 100, 0 + gppwm3_loadAxis = bits, U08, 4326, [0:1], "TPS", "MAP", "CLT", "IAT" +;no TS info - skipping gppwm3_pad offset 4327 + gppwm3_loadBins = array, U08, 4328, [8], "load", 1, 0, 0.0, 250, 0 + gppwm3_rpmBins = array, U08, 4336, [8], "RPM", 50, 0, 0.0, 12000.0, 0 + gppwm3_table = array, U08, 4344, [8x8], "duty", 1, 0, 0, 100, 0 + gppwm4_pin = bits, U08, 4408, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","TLE6240_1", "TLE6240_2", "TLE6240_3", "TLE6240_4", "TLE6240_5", "TLE6240_6", "TLE6240_7", "TLE6240_8", "TLE6240_9", "TLE6240_10", "TLE6240_11", "TLE6240_12", "TLE6240_13", "TLE6240_14", "TLE6240_15", "TLE6240_16", "MC33972_1", "MC33972_2", "MC33972_3", "MC33972_4", "MC33972_5", "MC33972_6", "MC33972_7", "MC33972_8", "MC33972_9", "MC33972_10", "MC33972_11", "MC33972_12", "MC33972_13", "MC33972_14", "MC33972_15", "MC33972_16", "MC33972_17", "MC33972_18", "MC33972_19", "MC33972_20", "MC33972_21", "MC33972_22", "TLE8888_1", "TLE8888_2", "TLE8888_3", "TLE8888_4", "TLE8888_5", "TLE8888_6", "TLE8888_7", "TLE8888_8", "TLE8888_9", "TLE8888_10", "TLE8888_11", "TLE8888_12", "TLE8888_13", "TLE8888_14", "TLE8888_15", "TLE8888_16", "TLE8888_17", "TLE8888_18", "TLE8888_19", "TLE8888_20", "TLE8888_21", "TLE8888_22", "TLE8888_23", "TLE8888_24", "TLE8888_25", "TLE8888_26", "TLE8888_27", "TLE8888_28", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" + gppwm4_dutyIfError = scalar, U08, 4409, "%", 1, 0, 0, 100, 0 + gppwm4_pwmFrequency = scalar, U16, 4410, "hz", 1, 0, 0, 500, 0 + gppwm4_onAboveDuty = scalar, U08, 4412, "%", 1, 0, 0, 100, 0 + gppwm4_offBelowDuty = scalar, U08, 4413, "%", 1, 0, 0, 100, 0 + gppwm4_loadAxis = bits, U08, 4414, [0:1], "TPS", "MAP", "CLT", "IAT" +;no TS info - skipping gppwm4_pad offset 4415 + gppwm4_loadBins = array, U08, 4416, [8], "load", 1, 0, 0.0, 250, 0 + gppwm4_rpmBins = array, U08, 4424, [8], "RPM", 50, 0, 0.0, 12000.0, 0 + gppwm4_table = array, U08, 4432, [8x8], "duty", 1, 0, 0, 100, 0 +;no TS info - skipping mainUnusedEnd offset 4496 + warning_message = string, ASCII, 6000, 120 + afterstartCoolantBins = array, F32, 6120, [8], "C", 1, 0, -100.0, 250.0, 0 + afterstartHoldTime = array, F32, 6152, [8], "Seconds", 1, 0, 0, 100, 1 + afterstartEnrich = array, F32, 6184, [8], "%", 1, 0, 0, 600, 1 + afterstartDecayTime = array, F32, 6216, [8], "Seconds", 1, 0, 0, 100, 1 boostTableOpenLoop = array, U08, 6248, [8x8],"", 2, 0 , 0, 3000, 0 boostMapBins = array, U08, 6312, [8], "", 2, 0, 0, 600.0, 1 boostRpmBins = array, U08, 6320, [8], "RPM", 50, 0, 0.0, 12000.0, 0 boostTableClosedLoop = array, U08, 6328, [8x8],"", 2, 0 , 0, 3000, 0 boostTpsBins = array, U08, 6392, [8], "%", 2, 0.0, 0, 100.0, 2 - pedalToTpsTable = array, U08, 6400, [8x8],"deg", 1, 0, -720, 720, 2 + pedalToTpsTable = array, U08, 6400, [8x8],"%", 1, 0, 0, 100, 0 pedalToTpsPedalBins = array, U08, 6464, [8], "%", 1, 0, 0.0, 120.0, 0 pedalToTpsRpmBins = array, U08, 6472, [8], "RPM", 50, 0, 0.0, 12000.0, 0 cltCrankingCorrBins = array, F32, 6480, [8], "C", 1, 0, -100.0, 250.0, 2 @@ -1091,8 +1164,8 @@ page = 1 ; total TS size = 20000 [SettingContextHelp] injector_flow = "This is your injector flow at the fuel pressure used in the vehicle. cc/min, cubic centimetre per minute\nBy the way, g/s = 0.125997881 * (lb/hr)\ng/s = 0.125997881 * (cc/min)/10.5\ng/s = 0.0119997981 * cc/min" - directSelfStimulation = "Should trigger emulator push data right into trigger handling logic, eliminating the need for physical jumper wires?\nSee also triggerSimulatorPins\nPS: Funny name, right? :)" cj125isUaDivided = "Is your UA CJ125 output wired to MCU via resistor divider?" + etb_use_two_wires = "TLE7209 uses two-wire mode. TLE9201 and VNH2SP30 do NOT use two wire mode." cj125isUrDivided = "Is your UR CJ125 output wired to MCU via resistor divider?\nLooks like 3v range should be enough, divider generally not needed." absoluteFuelPressure = "If your fuel regulator does not have vacuum line" tpsErrorDetectionTooLow = "TPS error detection, what TPS % value is unrealistically low" @@ -1150,6 +1223,14 @@ page = 1 launchFuelAdded = "Extra Fuel Added" launchBoostDuty = "Duty Cycle for the Boost Solenoid" hardCutRpmRange = "RPM Range for Hard Cut" + stft_maxIdleRegionRpm = "Below this RPM, the idle region is active" + stft_maxOverrunLoad = "Below this engine load, the overrun region is active" + stft_minPowerLoad = "Above this engine load, the power region is active" + stft_deadband = "When close to correct AFR, pause correction. This can improve stability by not changing the adjustment if the error is extremely small, but is not required." + stft_minClt = "Below this temperature, correction is disabled." + stft_minAfr = "Below this AFR, correction is paused" + stft_maxAfr = "Above this AFR, correction is paused" + stft_startupDelay = "Delay after starting the engine before beginning closed loop correction." fuelClosedLoopCorrectionEnabled = "Enables lambda sensor closed loop feedback for fuelling." isVerboseIAC = "Print details into rusEfi console" isVerboseETB = "Prints ETB details to rusEFI console" @@ -1218,6 +1299,30 @@ page = 1 triggerCompHystMin = "Trigger comparator hysteresis voltage (Min)" triggerCompHystMax = "Trigger comparator hysteresis voltage (Max)" triggerCompSensorSatRpm = "VR-sensor saturation RPM" + gppwm1_pin = "Select a pin to use for PWM or on-off output." + gppwm1_dutyIfError = "If an error (with a sensor, etc) is detected, this value is used instead of reading from the table.\nThis should be a safe value for whatever hardware is connected to prevent damage." + gppwm1_pwmFrequency = "Select a frequency to run PWM at.\nSet this to 0hz to enable on-off mode." + gppwm1_onAboveDuty = "In on-off mode, turn the output on when the table value is above this duty." + gppwm1_offBelowDuty = "In on-off mode, turn the output off when the table value is below this duty." + gppwm1_loadAxis = "Selects the load axis to use for the table." + gppwm2_pin = "Select a pin to use for PWM or on-off output." + gppwm2_dutyIfError = "If an error (with a sensor, etc) is detected, this value is used instead of reading from the table.\nThis should be a safe value for whatever hardware is connected to prevent damage." + gppwm2_pwmFrequency = "Select a frequency to run PWM at.\nSet this to 0hz to enable on-off mode." + gppwm2_onAboveDuty = "In on-off mode, turn the output on when the table value is above this duty." + gppwm2_offBelowDuty = "In on-off mode, turn the output off when the table value is below this duty." + gppwm2_loadAxis = "Selects the load axis to use for the table." + gppwm3_pin = "Select a pin to use for PWM or on-off output." + gppwm3_dutyIfError = "If an error (with a sensor, etc) is detected, this value is used instead of reading from the table.\nThis should be a safe value for whatever hardware is connected to prevent damage." + gppwm3_pwmFrequency = "Select a frequency to run PWM at.\nSet this to 0hz to enable on-off mode." + gppwm3_onAboveDuty = "In on-off mode, turn the output on when the table value is above this duty." + gppwm3_offBelowDuty = "In on-off mode, turn the output off when the table value is below this duty." + gppwm3_loadAxis = "Selects the load axis to use for the table." + gppwm4_pin = "Select a pin to use for PWM or on-off output." + gppwm4_dutyIfError = "If an error (with a sensor, etc) is detected, this value is used instead of reading from the table.\nThis should be a safe value for whatever hardware is connected to prevent damage." + gppwm4_pwmFrequency = "Select a frequency to run PWM at.\nSet this to 0hz to enable on-off mode." + gppwm4_onAboveDuty = "In on-off mode, turn the output on when the table value is above this duty." + gppwm4_offBelowDuty = "In on-off mode, turn the output off when the table value is below this duty." + gppwm4_loadAxis = "Selects the load axis to use for the table." ; CONFIG_DEFINITION_END @@ -1240,20 +1345,39 @@ page = 1 [LoggerDefinition] ; valid logger types: composite, tooth, trigger, csv - loggerDef = compositeLogger, "Primary Trigger Logger", tooth +; loggerDef = compositeLogger, "Primary Trigger Logger", tooth + loggerDef = compositeLogger, "Trigger Logger", composite startCommand = "l\x01" stopCommand = "l\x02" dataReadCommand = "L" dataReadTimeout = 10000 ; time in ms dataReadyCondition = { toothLogReady } + continuousRead = true + ; each packet is 5 and we have 500 of those + dataLength = 2500 +;tooth ; recordDef = headerLen, footerLen, recordLen - recordDef = 0, 0, 2; in bytes, the recordLen is for each record, currently limited to 4 bytes +; recordDef = 0, 0, 5 ; uint16 that stores 1/100 second - recordField = toothTime, "tooth", 0, 16, 0.01, "ms" +; recordField = toothTime, "tooth", 0, 16, 0.01, "ms" + + ; recordDef = headerLen, footerLen, recordLen + recordDef = 0, 0, 5 + + ; these names are hard-coded inside TS + recordField = priLevel, "PriLevel", 0, 1, 1.0, "Flag" + recordField = secLevel, "SecLevel", 1, 1, 1.0, "Flag" + recordField = trigger, "Trigger", 2, 1, 1.0, "Flag" + recordField = sync, "Sync", 3, 1, 1.0, "Flag" + recordField = time, "Time", 8, 32, 0.01, "ms" + + ; it seems that TS also needs to know the diff.size of a tooth + calcField = toothTime, "ToothTime", "ms", { time - pastValue(time, 1) } + [VeAnalyze] ; tableName, lambdaTargetTableName, lambdaChannel, egoCorrectionChannel, activeCondition @@ -1267,11 +1391,7 @@ page = 1 ; filter = Name, "DisplayName", outputChannel, operator, defaultVal, userAdjustable filter = minRPMFilter, "Minimum RPM", RPMValue, < , 500, , true -#if CELSIUS filter = minCltFilter, "Minimum CLT", coolant, < , 60, , true -#else - filter = minCltFilter, "Minimum CLT", coolant, < , 160, , true -#endif filter = deltaTps, "dTPS", deltaTps > , 50, , true @@ -1293,7 +1413,7 @@ fileVersion = { 20200310 } ochGetCommand = "O%2o%2c" ; see TS_OUTPUT_SIZE in console source code - ochBlockSize = 240 + ochBlockSize = 244 ; ; see TunerStudioOutputChannels struct @@ -1325,6 +1445,7 @@ fileVersion = { 20200310 } ind_isTriggerError = bits, U32, 0, [23:23], "true", "false"; ind_hasFatalError=bits, U32, 0, [24:24], "true", "false"; ind_isWarnNow =bits, U32, 0, [25:25], "true", "false"; + ind_pedal_error =bits, U32, 0, [26:26], "true", "false"; ; RPM, vss RPMValue = scalar, U16, 4, "RPM", 1, 0.00000 @@ -1334,16 +1455,8 @@ fileVersion = { 20200310 } ; temperatures internalMcuTemperature = scalar,S08, 11, "deg C", 1, 0 -#if CELSIUS coolant = scalar, S16, 12, "deg C",{1/100}, 0.0 -#else - coolant = scalar, S16, 12, "deg F",{9/(5 * 100)}, 17.77777 -#endif -#if CELSIUS intake = scalar, S16, 14, "deg C",{1/100}, 0.0 -#else - intake = scalar, S16, 14, "deg F",{9/(5 * 100)}, 17.77777 -#endif ; todo: aux1 ; todo: aux2 @@ -1418,55 +1531,66 @@ fileVersion = { 20200310 } knockLevel = scalar, F32, 108, "Volts", 1, 0 ; Mode, firmware, protocol, run time - timeSeconds = scalar, U32, 112, "sec", 1, 0.0 +; TS requires 'seconds' name since it has special internal meaning + seconds = scalar, U32, 112, "sec", 1, 0.0 engineMode = scalar, U32, 116, "em", 1, 0.0; firmwareVersion = scalar, U32, 120,"version_f", 1, 0 firmwareTsVersion=scalar, U32, 124,"version_p", 1, 0 +; calibation helpers + calibrationValue = scalar, F32, 128, "", 1, 0 + calibrationMode = scalar, U08, 132, "", 1, 0 + ; 3 bytes padding1 + ; Errors - totalTriggerErrorCounter=scalar,U32, 128,"counter", 1, 0 - ; orderingErrorCounter 132 - warningCounter = scalar, U16, 136, "count", 1, 0 - lastErrorCode = scalar, U16, 138, "error", 1, 0 - recentErrorCode0= scalar, U16, 140, "error", 1, 0 - recentErrorCode1= scalar, U16, 142, "error", 1, 0 - recentErrorCode2= scalar, U16, 144, "error", 1, 0 - recentErrorCode3= scalar, U16, 146, "error", 1, 0 - recentErrorCode4= scalar, U16, 148, "error", 1, 0 - recentErrorCode5= scalar, U16, 150, "error", 1, 0 - recentErrorCode6= scalar, U16, 152, "error", 1, 0 - recentErrorCode7= scalar, U16, 154, "error", 1, 0 + totalTriggerErrorCounter=scalar,U32, 136,"counter", 1, 0 + ; orderingErrorCounter 140 + warningCounter = scalar, U16, 144, "count", 1, 0 + lastErrorCode = scalar, U16, 146, "error", 1, 0 + recentErrorCode0= scalar, U16, 148, "error", 1, 0 + recentErrorCode1= scalar, U16, 150, "error", 1, 0 + recentErrorCode2= scalar, U16, 152, "error", 1, 0 + recentErrorCode3= scalar, U16, 154, "error", 1, 0 + recentErrorCode4= scalar, U16, 156, "error", 1, 0 + recentErrorCode5= scalar, U16, 158, "error", 1, 0 + recentErrorCode6= scalar, U16, 160, "error", 1, 0 + recentErrorCode7= scalar, U16, 162, "error", 1, 0 ; Debug - debugFloatField1= scalar, F32, 156, "val", 1, 0.0 - debugFloatField2= scalar, F32, 160, "val", 1, 0.0 - debugFloatField3= scalar, F32, 164, "val", 1, 0.0 - debugFloatField4= scalar, F32, 168, "val", 1, 0.0 - debugFloatField5= scalar, F32, 172, "val", 1, 0.0 - debugFloatField6= scalar, F32, 176, "val", 1, 0.0 - debugFloatField7= scalar, F32, 180, "val", 1, 0.0 - debugIntField1 = scalar, S32, 184, "val", 1, 0.0 - debugIntField2 = scalar, S32, 188, "val", 1, 0.0 - debugIntField3 = scalar, S32, 192, "val", 1, 0.0 - debugIntField4 = scalar, S16, 196, "val", 1, 0.0 - debugIntField5 = scalar, S16, 198, "val", 1, 0.0 + debugFloatField1= scalar, F32, 164, "val", 1, 0.0 + debugFloatField2= scalar, F32, 168, "val", 1, 0.0 + debugFloatField3= scalar, F32, 172, "val", 1, 0.0 + debugFloatField4= scalar, F32, 176, "val", 1, 0.0 + debugFloatField5= scalar, F32, 180, "val", 1, 0.0 + debugFloatField6= scalar, F32, 184, "val", 1, 0.0 + debugFloatField7= scalar, F32, 188, "val", 1, 0.0 + debugIntField1 = scalar, S32, 192, "val", 1, 0.0 + debugIntField2 = scalar, S32, 196, "val", 1, 0.0 + debugIntField3 = scalar, S32, 200, "val", 1, 0.0 + debugIntField4 = scalar, S16, 204, "val", 1, 0.0 + debugIntField5 = scalar, S16, 206, "val", 1, 0.0 ; Accel - accelerationX = scalar, S16, 200, "G", 0.01, 0 - accelerationY = scalar, S16, 202, "G", 0.01, 0 + accelerationX = scalar, S16, 208, "G", 0.01, 0 + accelerationY = scalar, S16, 210, "G", 0.01, 0 ; egt - egt1 = scalar, S16, 204, "deg C", 1, 0 - egt2 = scalar, S16, 206, "deg C", 1, 0 - egt3 = scalar, S16, 208, "deg C", 1, 0 - egt4 = scalar, S16, 210, "deg C", 1, 0 - egt5 = scalar, S16, 212, "deg C", 1, 0 - egt6 = scalar, S16, 214, "deg C", 1, 0 - egt7 = scalar, S16, 216, "deg C", 1, 0 - egt8 = scalar, S16, 218, "deg C", 1, 0 -; - TPS2Value = scalar, S16, 220, "%",{1/100}, 0 + egt1 = scalar, S16, 212, "deg C", 1, 0 + egt2 = scalar, S16, 214, "deg C", 1, 0 + egt3 = scalar, S16, 216, "deg C", 1, 0 + egt4 = scalar, S16, 218, "deg C", 1, 0 + egt5 = scalar, S16, 220, "deg C", 1, 0 + egt6 = scalar, S16, 222, "deg C", 1, 0 + egt7 = scalar, S16, 224, "deg C", 1, 0 + egt8 = scalar, S16, 226, "deg C", 1, 0 + TPS2Value = scalar, S16, 228, "%",{1/100}, 0 + + rawTps1Primary = scalar, U16, 230, "V",{1/1000}, 0.0 + rawPpsPrimary = scalar, U16, 232, "V",{1/1000}, 0.0 + rawClt = scalar, U16, 234, "V",{1/1000}, 0.0 + rawIat = scalar, U16, 236, "V",{1/1000}, 0.0 + rawOilPressure = scalar, U16, 238, "V",{1/1000}, 0.0 ; ; see TunerStudioOutputChannels struct @@ -1483,6 +1607,12 @@ fileVersion = { 20200310 } time = { timeNow } ; engineLoad = { fuleAlgorithm == 0 ? MAF : TPS } + ; These "synthetic" channels provide the Y-axis (load) value for gen purp PWM table's Y axes + gppwm1_load = {(gppwm1_loadAxis == 0) ? TPSValue : ((gppwm1_loadAxis == 1) ? MAPValue : ((gppwm1_loadAxis == 2) ? coolant : intake))} + gppwm2_load = {(gppwm2_loadAxis == 0) ? TPSValue : ((gppwm2_loadAxis == 1) ? MAPValue : ((gppwm2_loadAxis == 2) ? coolant : intake))} + gppwm3_load = {(gppwm3_loadAxis == 0) ? TPSValue : ((gppwm3_loadAxis == 1) ? MAPValue : ((gppwm3_loadAxis == 2) ? coolant : intake))} + gppwm4_load = {(gppwm4_loadAxis == 0) ? TPSValue : ((gppwm4_loadAxis == 1) ? MAPValue : ((gppwm4_loadAxis == 2) ? coolant : intake))} + [PcVariables] wueAfrTargetOffset = array, S16, [ 16], ":1", 0.1, 0.0, -3.0, 3.0, 1; wueAnalRecommend = array, U08, [ 16], "%", 1.00, 0.0, 100, 255.00, 0 @@ -1491,24 +1621,89 @@ fileVersion = { 20200310 } enableLogDebugChannels = bits, U08, [0:0], "Yes", "No" enableLogErrorList = bits, U08, [0:0], "Yes", "No" -; 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 -; Alternator TPS Acceleration Warmup-Pid Idle Engine Load Acc Trigger Counters ETB PID TLE8888 Boost - debugFieldF1List = bits, U08, [0:7], "Controller Output", "From TPS", "", "Controller Output", "", "Channel 1 Rise Counter", "", "", "", "", "", "", "", "", "", "", "", "ETB Controller Output", "", "", "df1", "df1", "22df1", "", "", "", "", "", "", "", "", "", "", "", "", "", "Open Loop Duty", "" - debugFieldF2List = bits, U08, [0:7], "I-Term", "To TPS", "", "I-Term", "", "Channel 2 Rise Counter", "", "", "", "", "", "", "", "", "", "", "", "ETB I-Term", "", "", "df2", "df2", "22df2", "", "", "", "", "", "", "", "", "", "", "", "", "", "Closed Loop Duty","" - debugFieldF3List = bits, U08, [0:7], "Previous Error", "Current TPS<>TPS", "", "", "", "Channel 3 Rise Counter", "", "", "", "", "", "", "", "", "", "", "", "ETB Previous Error", "", "", "df3", "df3", "22df3", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" - debugFieldF4List = bits, U08, [0:7], "I Gain", "Extra Fuel", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "ETB df4", "", "", "df4", "df4", "22df4", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" - debugFieldF5List = bits, U08, [0:7], "D Gain", "df5", "df5", "df5", "df5", "df5", "df5", "", "", "", "", "", "", "", "", "", "", "ETB df5", "df5", "df5", "df5", "df5", "22df5", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" - debugFieldF6List = bits, U08, [0:7], "D Term", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "ETB df6", "", "", "df6", "df6", "22df6", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" - debugFieldF7List = bits, U08, [0:7], "Max-Value", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "ETB df7", "", "", "df7", "df7", "22df7", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" - - debugFieldI1List = bits, U08, [0:7], "P-Gain", "", "", "", "", "Channel 2 Fall Counter", "", "", "", "", "", "", "", "", "", "", "", "ETB P-Gain", "", "", "di1", "di1", "22", "", "", "", "", "", "", "", "", "SPI Counter", "", "", "", "", "", "" - debugFieldI2List = bits, U08, [0:7], "Offset", "", "", "", "", "Channel 3 Fall Counter", "", "", "", "", "", "", "", "", "", "", "", "ETB di2", "", "", "di2", "di2", "22", "", "", "", "", "", "", "", "", "Latest Transmit","", "", "", "", "", "" - debugFieldI3List = bits, U08, [0:7], "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "ETB di3", "", "", "di3", "di3", "22", "", "", "", "", "", "", "", "", "Latest Received","", "", "", "", "", "" - debugFieldI4List = bits, U08, [0:7], "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "ETB di4", "", "", "di4", "di4", "22", "", "", "", "", "", "", "", "", "Init Count", "", "", "", "", "", "" - debugFieldI5List = bits, U08, [0:7], "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "di5", "di5", "ETB di5", "di5", "di5", "di5", "di5", "22di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5" +; wall of debug mode :) +; https://rusefi.com/wiki/index.php?title=Manual:Debug_fields +; 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 +; Alternator TPS Acceleration Warmup-Pid Idle Engine Load Acc Trigger Counters VVT Cranking Ignition Timing ETB PID CJ125 CAN TLE8888 Boost Start Launcher ETB Autotune + debugFieldF1List = bits, U08, [0:7], "Controller Output", "From TPS", "", "Controller Output", "Idle output", "Channel 1 Rise Counter", "", "", "", "", "Ign IAT Corr", "", "", "", "", "", "", "ETB Controller Output", "", "", "df1", "df1", "22df1", "", "23:df1", "CJ125: output", "", "", "", "", "", "", "", "", "", "", "Boost Open Loop Duty", "S unused" "", "Osc Amplitude" + debugFieldF2List = bits, U08, [0:7], "I-Term", "To TPS", "", "I-Term", "Idle df2", "Channel 2 Rise Counter", "", "", "", "", "Ign CLT Corr", "", "", "", "", "", "", "ETB I-Term", "", "", "df2", "df2", "22df2", "", "23:df2", "CJ125: i-term", "", "", "", "", "", "", "", "", "", "", "Boost Closed Loop Duty","S unused" "", "Duty Amplitude" + debugFieldF3List = bits, U08, [0:7], "Previous Error", "Current TPS<>TPS", "", "", "Idle df3", "ICU sum", "", "", "", "", "Ign FSIO Adj", "", "", "", "", "", "", "ETB err", "", "", "df3", "df3", "22df3", "", "23:df3", "CJ125: err", "", "", "", "", "", "", "", "", "", "", "", "S unused" "", "Tu" + debugFieldF4List = bits, U08, [0:7], "I Gain", "Extra Fuel", "", "", "Idle df4", "VVT rise", "", "", "", "", "Ign PID Adj", "", "", "", "", "", "", "ETB I setting", "", "", "df4", "df4", "22df4", "", "23:df4", "CJ125: UA", "", "", "", "", "", "", "", "", "", "", "", "S unused" "", "Ku" + debugFieldF5List = bits, U08, [0:7], "D Gain", "df5", "df5", "df5", "Idle df5", "VVT fall", "df5", "", "", "", "", "", "", "", "", "", "", "ETB D setting", "df5", "df5", "df5", "df5", "22df5", "", "23:df5", "CJ125: UR", "", "", "", "", "", "", "", "", "", "", "", "S unused" "", "Kp" + debugFieldF6List = bits, U08, [0:7], "D Term", "", "", "", "Idle df6", "Current Gap", "", "", "", "", "", "", "", "", "", "", "", "ETB df6", "", "", "df6", "df6", "22df6", "", "23:df6", "cj: f7", "", "", "", "", "", "", "", "", "", "", "", "S unused" "", "Ki" + debugFieldF7List = bits, U08, [0:7], "Max-Value", "", "", "", "Idle df7", "", "", "", "", "", "", "", "", "", "", "", "", "ETB df7", "", "", "df7", "df7", "22df7", "", "23:df7", "cj: f7", "", "", "", "", "", "", "", "", "", "", "", "S unused" "", "Kd" + debugFieldI1List = bits, U08, [0:7], "P-Gain", "", "", "", "Idle di1", "Channel 1 Fall Counter", "", "", "", "", "Multispark Count", "", "", "", "", "", "", "ETB P-Gain", "", "", "di1", "di1", "22di1", "", "23:di1", "CJ125: state", "read count","", "", "", "", "SPI Counter", "", "", "", "", "", "Start Count" "", "" + debugFieldI2List = bits, U08, [0:7], "Offset", "", "", "", "Idle di2", "Channel 2 Fall Counter", "", "", "", "", "", "", "", "", "", "", "", "ETB di2", "", "", "di2", "di2", "22di2", "", "23:di2", "", "", "", "", "", "", "Latest Transmit","", "", "", "", "", "S unused" "", "" + debugFieldI3List = bits, U08, [0:7], "", "", "", "", "Idle di3", "Cycle Index", "", "", "", "", "", "", "", "", "", "", "", "ETB di3", "", "", "di3", "di3", "22di3", "", "23:di3", "", "", "", "", "", "", "Latest Received","", "", "", "", "", "S unused" "", "" + debugFieldI4List = bits, U08, [0:7], "", "", "", "", "Idle di4", "Cycle Cnt 1", "", "", "", "", "", "", "", "", "", "", "", "ETB di4", "", "", "di4", "di4", "22di4", "", "23:di4", "", "", "", "", "", "", "Init Count", "", "", "", "", "", "S unused" "", "" + debugFieldI5List = bits, U08, [0:7], "", "", "", "", "Idle di5", "Cycle Cnt 2", "", "", "", "", "", "", "", "", "", "di5", "di5", "ETB di5", "di5", "di5", "di5", "di5", "22di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "S di5" "", "" + [ConstantsExtensions] + ; defaultValue is used to provide TunerStudio with a value to use in the case of + ; the constant not yet being initialized. This is primarily important if the + ; constant is used as a variable in the ini. + ; defaultValue = constantName, value; defaultValue = wueAfrTargetOffset, -1.5 -1.4 -1.15 -0.95 -0.775 -0.65 -0.5625 -0.5 -0.4375 -0.375 -0.3125 -0.25 -0.1875 -0.125 -0.0625 0 + + requiresPowerCycle = warningLedPin + requiresPowerCycle = runningLedPin + requiresPowerCycle = binarySerialTxPin + requiresPowerCycle = binarySerialRxPin + + requiresPowerCycle = etb_use_two_wires + requiresPowerCycle = etbFreq + + requiresPowerCycle = idle_solenoidFrequency + requiresPowerCycle = boostPwmFrequency + requiresPowerCycle = alternatorPwmFrequency + requiresPowerCycle = auxPidFrequency1 + requiresPowerCycle = auxPidFrequency2 + requiresPowerCycle = auxPidFrequency3 + requiresPowerCycle = auxPidFrequency4 + + requiresPowerCycle = fsioOutputPins1 + requiresPowerCycle = fsioOutputPins2 + requiresPowerCycle = fsioOutputPins3 + requiresPowerCycle = fsioOutputPins4 + requiresPowerCycle = fsioOutputPins5 + requiresPowerCycle = fsioOutputPins6 + requiresPowerCycle = fsioOutputPins7 + requiresPowerCycle = fsioOutputPins8 + requiresPowerCycle = fsioOutputPins9 + requiresPowerCycle = fsioOutputPins10 + requiresPowerCycle = fsioOutputPins11 + requiresPowerCycle = fsioOutputPins12 + requiresPowerCycle = fsioOutputPins13 + requiresPowerCycle = fsioOutputPins14 + requiresPowerCycle = fsioOutputPins15 + requiresPowerCycle = fsioOutputPins16 + + requiresPowerCycle = fsioFrequency1 + requiresPowerCycle = fsioFrequency2 + requiresPowerCycle = fsioFrequency3 + requiresPowerCycle = fsioFrequency4 + requiresPowerCycle = fsioFrequency5 + requiresPowerCycle = fsioFrequency6 + requiresPowerCycle = fsioFrequency7 + requiresPowerCycle = fsioFrequency8 + requiresPowerCycle = fsioFrequency9 + requiresPowerCycle = fsioFrequency10 + requiresPowerCycle = fsioFrequency11 + requiresPowerCycle = fsioFrequency12 + requiresPowerCycle = fsioFrequency13 + requiresPowerCycle = fsioFrequency14 + requiresPowerCycle = fsioFrequency15 + requiresPowerCycle = fsioFrequency16 + + requiresPowerCycle = fsioAdc1 + requiresPowerCycle = fsioAdc2 + requiresPowerCycle = fsioAdc3 + requiresPowerCycle = fsioAdc4 + + readOnly = warning_message + + [CurveEditor] ; xAxis = leftValue, rightValue, step ; yAxis = bottomValue, topValue, step @@ -1607,11 +1802,7 @@ fileVersion = { 20200310 } curve = iatFuelCorrCurve, "Intake air temperature fuel Multiplier" columnLabel = "Coolant", "Multiplier" -#if CELSIUS xAxis = -40, 120, 10 -#else - xAxis = -40, 250, 10 -#endif yAxis = 0, 2, 11 xBins = iatFuelCorrBins, intake yBins = iatFuelCorr @@ -1619,11 +1810,7 @@ fileVersion = { 20200310 } curve = cltTimingCorrCurve, "Warmup timing correction" columnLabel = "Coolant", "Extra" -#if CELSIUS xAxis = -40, 120, 10 -#else - xAxis = -40, 250, 10 -#endif yAxis = 0, 50, 10 xBins = cltTimingBins, coolant yBins = cltTimingExtra @@ -1631,11 +1818,7 @@ fileVersion = { 20200310 } curve = cltFuelCorrCurve, "Warmup fuel manual Multiplier" columnLabel = "Coolant", "Multiplier" -#if CELSIUS xAxis = -40, 100, 10 -#else - xAxis = -40, 210, 10 -#endif yAxis = 0, 3, 10 xBins = cltFuelCorrBins, coolant yBins = cltFuelCorr @@ -1643,11 +1826,7 @@ fileVersion = { 20200310 } curve = crankingCltCurve, "Cranking Coolant Temperature Multiplier" columnLabel = "Coolant", "Multiplier" -#if CELSIUS xAxis = -40, 100, 10 -#else - xAxis = -40, 210, 10 -#endif yAxis = 0, 3, 10 xBins = crankingFuelBins, coolant yBins = crankingFuelCoef @@ -1655,8 +1834,8 @@ fileVersion = { 20200310 } curve = etbTpsBiasCurve, "Electronic TB Bias Curve" columnLabel = "TPS", "duty bias" - xAxis = 0, 100, 10 - yAxis = 0, 100, 10 + xAxis = 0, 50, 11 + yAxis = -40, 40, 9 xBins = etbBiasBins, TPSValue yBins = etbBiasValues gauge = TPSGauge @@ -1679,11 +1858,7 @@ fileVersion = { 20200310 } curve = cltIdleCurve, "Warmup Idle multiplier" columnLabel = "Coolant", "Multiplier" -#if CELSIUS xAxis = -40, 120, 10 -#else - xAxis = -40, 250, 10 -#endif yAxis = 0, 3, 10 xBins = cltIdleCorrBins, coolant yBins = cltIdleCorr @@ -1691,11 +1866,7 @@ fileVersion = { 20200310 } curve = iacCoastingCurve, "Coasting IAC Position for Auto-Idle" columnLabel = "Coolant", "Multiplier" -#if CELSIUS xAxis = -40, 120, 10 -#else - xAxis = -40, 250, 10 -#endif yAxis = 0, 100, 10 xBins = iacCoastingBins, coolant yBins = iacCoasting @@ -1703,11 +1874,7 @@ fileVersion = { 20200310 } curve = cltCrankingCurve, "Cranking Idle Air multiplier" columnLabel = "Coolant", "Multiplier" -#if CELSIUS xAxis = -40, 120, 10 -#else - xAxis = -40, 250, 10 -#endif yAxis = 0, 3, 10 xBins = cltCrankingCorrBins, coolant yBins = cltCrankingCorr @@ -1715,11 +1882,7 @@ fileVersion = { 20200310 } curve = cltIdleRPMCurve, "Idle Target RPM" columnLabel = "Coolant", "RPM" -#if CELSIUS xAxis = -40, 120, 10 -#else - xAxis = -40, 250, 10 -#endif yAxis = 0, 8000, 10 xBins = cltIdleRpmBins, coolant yBins = cltIdleRpm, RPMValue @@ -1751,11 +1914,7 @@ fileVersion = { 20200310 } curve = wueAfrTargetOffsetCurve, "AFR Target Temperature Adjustment" columnLabel = "Coolant", "AFR Offset" -#if CELSIUS xAxis = -40, 200, 9 -#else - xAxis = -40, 400, 9 -#endif yAxis = -3, 1, 5 xBins = cltFuelCorrBins, coolant yBins = wueAfrTargetOffset @@ -1763,11 +1922,7 @@ fileVersion = { 20200310 } curve = wueAnalyzer_warmup_curve, "Warmup Enrichment" columnLabel = "Coolant", "Current WUE", "Coolant", "Corrected" -#if CELSIUS xAxis = -40, 200, 9 -#else - xAxis = -40, 400, 9 -#endif yAxis = 90, 500, 6 xBins = cltFuelCorrBins, coolant yBins = cltFuelCorr @@ -1945,6 +2100,30 @@ fileVersion = { 20200310 } gridOrient = 250, 0, 340 ; Space 123 rotation of grid in degrees. upDownLabel = "(Later)", "(Sooner)" + table = gppwm1Tbl, gppwm1Map, "", 1 + xyLabels = "RPM", "" + xBins = gppwm1_rpmBins, RPMValue + yBins = gppwm1_loadBins, gppwm1_load + zBins = gppwm1_table + + table = gppwm2Tbl, gppwm2Map, "", 1 + xyLabels = "RPM", "" + xBins = gppwm2_rpmBins, RPMValue + yBins = gppwm2_loadBins, gppwm2_load + zBins = gppwm2_table + + table = gppwm3Tbl, gppwm3Map, "", 1 + xyLabels = "RPM", "" + xBins = gppwm3_rpmBins, RPMValue + yBins = gppwm3_loadBins, gppwm3_load + zBins = gppwm3_table + + table = gppwm4Tbl, gppwm4Map, "", 1 + xyLabels = "RPM", "" + xBins = gppwm4_rpmBins, RPMValue + yBins = gppwm4_loadBins, gppwm4_load + zBins = gppwm4_table + [GaugeConfigurations] gaugeCategory = Sensors - Extra 2 @@ -1975,7 +2154,7 @@ gaugeCategory = ECU Status recentErrorCode6Gauge = recentErrorCode6, "Error#7", "", 0, 18000, 0, 0, 18000, 18000, 0, 0 recentErrorCode7Gauge = recentErrorCode7, "Error#8", "", 0, 18000, 0, 0, 18000, 18000, 0, 0 firmwareVersionGauge = firmwareVersion , "ECU Software Version", "%", 0, 100, 0, 0, 100, 100, 0, 0 - timeSecondsGauge = timeSeconds, "Uptime", "sec", 0, 100, 0, 0, 100, 100, 0, 0 + timeSecondsGauge = seconds, "Uptime", "sec", 0, 100, 0, 0, 100, 100, 0, 0 gaugeCategory = Debug @@ -1995,16 +2174,8 @@ gaugeCategory = Debug gaugeCategory = Sensors - Basic RPMGauge = RPMValue, "RPM - engine speed", "RPM", 0, 15000, 200, 500, 6000, 6000, 0, 0 -#if CELSIUS CLTGauge = coolant, "Coolant temp", "deg C", -40, 140, -15, 1, 95, 110, 1, 1 -#else - CLTGauge = coolant, "Coolant temp", "deg F", -40, 285, 5, 35, 205, 230, 1, 1 -#endif -#if CELSIUS IATGauge = intake, "Intake air temp", "deg C", -40, 140, -15, 1, 95, 110, 1, 1 -#else - IATGauge = intake, "Intake air temp", "deg F", -40, 285, 5, 35, 205, 230, 1, 1 -#endif afr1Gauge = AFRValue, "Air fuel ratio", "", 10, 19.4, 12, 13, 15, 16, 2, 2 MAFGauge = MAFValue, "Mass air flow", "v", 0, 5, 0, 1, 3, 4, 1, 1 VBattGauge = VBatt, "Battery voltage", "V", 8, 21, 9, 10, 17, 19, 1, 1 @@ -2037,11 +2208,7 @@ gaugeCategory = Acceleration Enrichment gaugeCategory = Fueling ;Name Var Title Units Lo Hi LoD LoW HiW HiD vd ld -#if CELSIUS tChargeGauge = tCharge, "fuel: Estimated charge temperature", "deg C", -40, 140, -15, 1, 95, 110, 1, 1 -#else - tChargeGauge = tCharge, "fuel: Estimated charge temperature", "deg F", -40, 285, 5, 35, 205, 230, 1, 1 -#endif baroCorrectionGauge = baroCorrection,"fuel: Barometric pressure correction", "ratio", 0.5, 1.5, 0.6, 0.7, 1.3, 1.4, 1, 1 crankingFuelGauge = crankingFuelMs, "fuel: cranking", "mSec", 0, 25.5, 1.0, 1.2, 20, 25, 3, 1 iatCorrectionGauge = iatCorrection, "fuel: IAT correction", "mult", 0, 3, 0, 0, 3, 3, 2, 2 @@ -2065,6 +2232,12 @@ gaugeCategory = Throttle Body (incl. ETB) etbErrorGauge = etb1Error, "ETB position error", "%", -20, 20, -10, -5, 5, 10, 2, 0 etbDutyCycleGauge = etb1DutyCycle, "ETB duty cycle", "%", -100, 100, -75, -50, 50, 75, 0, 0 +gaugeCategory = Sensors - Raw + rawTps1PrimaryGauge = rawTps1Primary, "Raw TPS 1 Primary", "volts", 0, 5, 0, 0, 5, 5, 3, 0 + rawPpsPrimaryGauge = rawPpsPrimary , "Raw Pedal Primary", "volts", 0, 5, 0, 0, 5, 5, 3, 0 + rawCltGauge = rawClt , "Raw CLT", "volts", 0, 5, 0, 0, 5, 5, 3, 0 + rawIatGauge = rawIat , "Raw IAT", "volts", 0, 5, 0, 0, 5, 5, 3, 0 + rawOilPressureGauge = rawOilPressure, "Raw Oil Pressure", "volts", 0, 5, 0, 0, 5, 5, 3, 0 [WueAnalyze] @@ -2098,11 +2271,10 @@ gaugeCategory = Throttle Body (incl. ETB) ; 1 2 3 4 ; 5 6 7 8 - ; currently a minimum of 6 gauges must be on the dash, this appears to be an old not needed limitation. next release 1 will work. gauge1 = RPMGauge gauge2 = CLTGauge gauge3 = TPSGauge - gauge4 = MAFGauge + gauge4 = MAPGauge gauge5 = afr1Gauge gauge6 = VBattGauge gauge7 = dwellGauge @@ -2112,36 +2284,45 @@ gaugeCategory = Throttle Body (incl. ETB) ; = expression, off-label, on-label, off-bg, off-fg, on-bg, on-fg ; important status - indicator = { ind_hasFatalError }, "", "FATAL ERROR", green, black, red, black - indicator = { firmwareTsVersion == fileVersion }, "WRONG VERSION", "version", red, black, green, black - indicator = { ind_isWarnNow }, "", "warn", green, black, red, black - indicator = { ind_check_engine }, "ok", "Check engine", green, black, red, black - indicator = { isIgnitionEnabledIndicator}, "no ignition", "ignition", red, black, green, black - indicator = { ind_injection_enabled}, "no injection", "injection", red, black, green, black - indicator = { ind_isTriggerError}, "ok", "trg err", green, black, red, black + indicator = { ind_hasFatalError }, "", "CRITICAL ERROR", white, black, red, black + indicator = { firmwareTsVersion == fileVersion }, "WRONG VERSION", "version ok", red, black, white, black + indicator = { ind_isWarnNow }, "", "WARNING", white, black, yellow, black + indicator = { ind_check_engine }, "", "Check Engine", white, black, red, black + indicator = { isIgnitionEnabledIndicator}, "no ignition", "ignition", yellow, black, white, black + indicator = { ind_injection_enabled}, "no injection", "injection", yellow, black, white, black + indicator = { ind_isTriggerError}, "trigger ok", "trigger err", white, black, red, black + ; this is required so that the "config error" feature works in TS + ; don't change this line - TS is looking for an indicator with particular text/styling + ; you don't even have to show it by default + indicator = { ind_hasFatalError }, "Config Error", "Config Error", white, black, red, black ; minor info - indicator = { ind_fan}, "no fan", "fan", white, black, green, black - indicator = { isCylinderCleanupActivated}, "no cyl cleanup", "cyl cleanup", white, black, green, black + indicator = { ind_fan}, "fan off", "fan on", white, black, green, black + indicator = { isCylinderCleanupActivated}, "no cyl cleanup", "cyl cleanup", white, black, yellow, black indicator = { needBurn }, "config ok", "unsaved changes", white, black, yellow, black indicator = { hasSdCard}, "no SD", "with SD", white, black, green, black - indicator = { ind_fuel_pump}, "no pump", "pump", white, black, green, black + indicator = { ind_fuel_pump}, "pump off", "pump on", white, black, green, black indicator = { clutchUpState }, "clutch", "cltch Up", white, black, red, black indicator = { clutchDownState }, "clutch", "cltch Down", white, black, yellow, black indicator = { brakePedalIndicator }, "brake", "brake down", white, black, red, black - indicator = { acSwitchIndicator }, "AC on", "AC off", yellow, black, white, black + indicator = { acSwitchIndicator }, "AC off", "AC on", white, black, blue, white ; error codes indicator = { ind_tps_error}, "tps", "tps error", white, black, red, black indicator = { ind_clt_error}, "clt", "clt error", white, black, red, black indicator = { ind_iat_error}, "iat", "iat error", white, black, red, black indicator = { ind_map_error}, "map", "map error", white, black, red, black + indicator = { ind_pedal_error}, "pedal", "pedal error", white, black, red, black indicator = { knockEverIndicator }, "", "Knock recently", white, black, red, black indicator = { knockNowIndicator }, "no knock", "Knock NOW", white, black, red, black +[KeyActions] + showPanel = spi, spiFunction + showPanel = con, connection + [Datalog] ; Channel Label Type Format entry = time, "Time", float, "%.3f" @@ -2295,7 +2476,7 @@ menuDialog = main # Digital outputs subMenu = mainRelay, "Main relay" subMenu = starterRelay, "Starter Disable relay" - subMenu = fuelPump, "Fuel rail" + subMenu = fuelPump, "Fuel pump & rail" subMenu = fanSetting, "Fan" subMenu = tachSettings, "Tachometer" subMenu = malfunction, "Check engine light" @@ -2308,14 +2489,14 @@ menuDialog = main subMenu = std_separator # Targets & closed loop - subMenu = afrTableTbl, "Target AFR", 0, {isInjectionEnabled == 1 && fuelAlgorithm == LM_SPEED_DENSITY} + subMenu = afrTableTbl, "Target AFR", 0, {isInjectionEnabled == 1 && (fuelAlgorithm == LM_SPEED_DENSITY || fuelAlgorithm == LM_REAL_MAF)} subMenu = fuelClosedLoopDialog, "Closed loop correction", 0, {isInjectionEnabled == 1} subMenu = coastingFuelCutControl, "Deceleration fuel cutoff (DFCO)", 0, {isInjectionEnabled == 1} subMenu = std_separator # Fuel table/VE - subMenu = fuelTableDialog, "Fuel table", 0, {isInjectionEnabled == 1 && fuelAlgorithm != LM_SPEED_DENSITY} - subMenu = veTableDialog, "VE", 0, {isInjectionEnabled == 1 && fuelAlgorithm == LM_SPEED_DENSITY} + subMenu = fuelTableDialog, "Fuel table", 0, {isInjectionEnabled == 1 && fuelAlgorithm != LM_SPEED_DENSITY && fuelAlgorithm != LM_REAL_MAF} + subMenu = veTableDialog, "VE", 0, {isInjectionEnabled == 1 && (fuelAlgorithm == LM_SPEED_DENSITY || fuelAlgorithm == LM_REAL_MAF)} subMenu = injPhaseTableTbl, "Injection phase", 0, {isInjectionEnabled == 1} subMenu = std_separator @@ -2381,7 +2562,14 @@ menuDialog = main menu = "&Advanced" subMenu = boostDialog, "Boost Control" subMenu = boostPidDialog, "Closed Loop Boost", { boostType == 1 } - subMenu = std_separator + + subMenu = std_separator + subMenu = gppwm1, "General Purpose PWM 1" + subMenu = gppwm2, "General Purpose PWM 2" + subMenu = gppwm3, "General Purpose PWM 3" + subMenu = gppwm4, "General Purpose PWM 4" + + subMenu = std_separator subMenu = fsioInputsDialog, "FSIO inputs" subMenu = auxPidDialog, "Aux PID" subMenu = fsioOutputsDialog, "FSIO outputs" @@ -2450,6 +2638,8 @@ menuDialog = main subMenu = std_separator subMenu = connection, "Connection" + subMenu = tle8888, "TLE8888" + subMenu = allPins1, "Full pinout 1/2" subMenu = allPins2, "Full pinout 2/2" subMenu = std_separator @@ -2458,6 +2648,7 @@ menuDialog = main # EXPERIMENTAL FEATURES subMenu = parkingLot, "Experimental/Broken" subMenu = multisparkSettings, "Multispark", 0, {isIgnitionEnabled == 1} + subMenu = mc33Dialog, "GDI Dreams" subMenu = std_separator subMenu = hipFunction, "HIP9011 settings (knock sensor) (alpha version)" @@ -2475,6 +2666,10 @@ menuDialog = main subMenu = std_separator + menu = "Help" + subMenu = helpGeneral, "rusEfi Info" + + [ControllerCommands] ; commandName = command1, command2, commandn... ; command in standard ini format, a command name can be assigned to 1 to n commands that will be executed in order. @@ -2535,6 +2730,9 @@ cmd_calibrate_pedal_down = "w\x00\x14\x00\x07" cmd_tle8888_init = "w\x00\x14\x00\x08" cmd_test_ac_relay = "w\x00\x14\x00\x09" cmd_write_config = "w\x00\x14\x00\x0A" +cmd_test_starter_relay = "w\x00\x14\x00\x0B" +cmd_etb_autotune = "w\x00\x14\x00\x0C" +cmd_enable_self_stim = "w\x00\x14\x00\x0D" cmd_test_radiator_fan = "w\x00\x15\x00\x01" cmd_test_check_engine_light = "w\x00\x16\x00\x01" @@ -2672,6 +2870,7 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" field = "!Reminder that 4-stroke cycle is 720 degrees" field = "!For well-known trigger types use '0' trigger angle offset" field = "Trigger Angle Offset", globalTriggerAngleOffset + field = "Display only interesting", displayLogicLevelsInEngineSniffer field = "#Custom Trigger" field = "total Tooth Count", trigger_customTotalToothCount, {trigger_type == 0} field = "skipped Tooth Count", trigger_customSkippedToothCount, {trigger_type == 0} @@ -2682,7 +2881,6 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" field = "VVT use rise front", vvtCamSensorUseRise, {trigger_type != 80} field = "VVT position display offset", vvtOffset field = "VVT display inverted", vvtDisplayInverted - field = "nbVvtIndex", nbVvtIndex field = "print verbose sync details to console",verboseTriggerSynchDetails field = "Do not print messages in case of sync error", silentTriggerError field = "Enable noise filtering", useNoiselessTriggerDecoder, {trigger_type == 8 || trigger_type == 9} @@ -2802,11 +3000,27 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" field = "TPS low value detection threshold", tpsErrorDetectionTooLow, {tps1_1AdcChannel != 16} field = "TPS high value detection threshold", tpsErrorDetectionTooHigh, {tps1_1AdcChannel != 16} - dialog = pedalSensor, "Accelerator pedal" + dialog = pedalSensorLeft, "Accelerator pedal" field = "Accelerator position sensor", throttlePedalPositionAdcChannel + field = "Up voltage", throttlePedalUpVoltage + field = "Down (WOT) voltage", throttlePedalWOTVoltage field = "Accelerator position 2nd sensor", throttlePedalPositionSecondAdcChannel - field = "Up voltage", throttlePedalUpVoltage - field = "Down (WOT) voltage", throttlePedalWOTVoltage + + dialog = pedalGauges + gauge = pedalPositionGauge + gauge = rawPpsPrimaryGauge + + dialog = pedalSensor, "Accelerator pedal", border + panel = pedalSensorLeft, West + panel = pedalGauges, East + + dialog = mc33Dialog, "GDI Dreams" + field = mc33816_cs, mc33816_cs + field = mc33816_rstb, mc33816_rstb + field = mc33816_flag0, mc33816_flag0 + field = "mc33972 SPI", mc33972spiDevice + field = mc33_hvolt, mc33_hvolt + ; Sensor Inputs dialog = otherSensorInputs, "Other Sensor Inputs" @@ -2833,8 +3047,11 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" field = "Secondary channel", triggerInputPins2, { trigger_type != 0 && trigger_type != 8 && trigger_type != 9 && trigger_type != 18 && trigger_type != 20} field = "Invert Secondary", invertSecondaryTriggerSignal, { trigger_type != 0 && trigger_type != 8 && trigger_type != 9 && trigger_type != 18 && trigger_type != 20} field = "Cam Sync/VVT input", camInputs1 - panel = triggerInputComparator - + +; +; allXXX sections allows a quick overview of used I/O in order to address conflicts mostly, not really to +; configure the features. +; dialog = allPinsSensors, "Sensors" field = "Throttle pedal Position Channel", throttlePedalPositionAdcChannel field = "Primary input channel", triggerInputPins1 @@ -2862,16 +3079,18 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" dialog = allPins1_1 field = mc33816_cs, mc33816_cs field = mc33816_rstb, mc33816_rstb + field = mc33816_flag0, mc33816_flag0 + field = "trigger stimulator pin #1", triggerSimulatorPins1 + field = "trigger stimulator pin #2", triggerSimulatorPins2 + field = "trigger stimulator pin #2", triggerSimulatorPins3 field = high_fuel_pressure_sensor_1, high_fuel_pressure_sensor_1 field = high_fuel_pressure_sensor_2, high_fuel_pressure_sensor_2 field = mc33816_driven, mc33816_driven field = mc33816spiDevice, mc33816spiDevice field = "Warning Led", warningLedPin - ; field = "Fatal Error Led", fatalErrorPin field = "tle6240_cs", tle6240_cs field = "tle6240 SPI", tle6240spiDevice field = "mc33972_cs", mc33972_cs - field = "mc33972 SPI", mc33972spiDevice panel = allPinsSensors dialog = allPins1_2 @@ -2881,32 +3100,27 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" field = "Idle Solenoid Pin", idle_solenoidPin field = "Second Idle Solenoid Pin", secondSolenoidPin field = "Idle Stepper Dir", idle_stepperDirectionPin - field = "Idle Stepper Dir Mode", stepperDirectionPinMode field = "Idle Stepper Step", idle_stepperStepPin field = "Idle Stepper Enable", stepperEnablePin field = "Fuel Pump Pin", fuelPumpPin - field = "Fuel Pump Pin Mode", fuelPumpPinMode field = "ETB#1 Dir #1", etbIo1_directionPin1 field = "ETB#1 Dir #2", etbIo1_directionPin2 field = "ETB#1 Control #1", etbIo1_controlPin1 - field = "etb1_controlPinMode", etbIo1_controlPinMode + field = "ETB#1 Disable", etbIo1_disablePin field = "ETB#2 Dir #1", etbIo2_directionPin1 field = "ETB#2 Dir #2", etbIo2_directionPin2 field = "ETB#2 Control #1", etbIo2_controlPin1 - field = "SD CS Pin", sdCardCsPin + field = "ETB#2 Disable", etbIo2_disablePin + field = "SD CS Pin", sdCardCsPin field = "MIL / Check Engine Pin", malfunctionIndicatorPin - field = "MIL / Check Engine Pin Mode", malfunctionIndicatorPinMode field = "Aux Pin #1", auxPidPins1 field = "Aux Pin #2", auxPidPins2 field = "Aux Pin #3", auxPidPins3 field = "Aux Pin #4", auxPidPins4 field = "test557pin", test557pin field = "Fan Pin", fanPin - field = "Fan Pin Mode", fanPinMode field = "Main Relay Pin", mainRelayPin - field = "Main Relay Mode", mainRelayPinMode - field = "Starter Relay Pin", starterRelayPin - field = "Starter Relay Mode", starterRelayPinMode + field = "Starter Relay Pin", starterRelayDisablePin field = "aux valve #1", auxValves1 field = "aux valve #2", auxValves2 @@ -2972,9 +3186,12 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" field = "output #16", fsioOutputPins16 dialog = allPins2_3 + field = "LCD E pin", HD44780_e + field = "LCD D4 pin", HD44780_db4 + field = "LCD D5 pin", HD44780_db5 + field = "LCD D6 pin", HD44780_db6 + field = "LCD D7 pin", HD44780_db7 field = "Debug Trigger Sync", debugTriggerSync - field = "Debug Timer Callback", debugTimerCallback - field = "Debug Set Timer", debugSetTimer field = "Aux Fast Analog", auxFastSensor1_adcChannel dialog = allPins1_3 @@ -2984,31 +3201,32 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" field = "FSIO ADC #4", fsioAdc4 field = "GPS RX", gps_rx_pin field = "GPS TX", gps_tx_pin - field = "CAN RX pin", canRxPin - field = "CAN TX pin", canTxPin - field = "SPI1 MOSI", spi1mosiPin, {is_enabled_spi_1 == 1} - field = "SPI1 MISO", spi1misoPin, {is_enabled_spi_1 == 1} - field = "SPI1 SCK", spi1sckPin, {is_enabled_spi_1 == 1} - field = "SPI2 MOSI", spi2mosiPin, {is_enabled_spi_2 == 1} - field = "SPI2 MISO", spi2misoPin, {is_enabled_spi_2 == 1} - field = "SPI2 SCK", spi2sckPin, {is_enabled_spi_2 == 1} - field = "SPI3 MOSI", spi3mosiPin, {is_enabled_spi_3 == 1} - field = "SPI3 MISO", spi3misoPin, {is_enabled_spi_3 == 1} - field = "SPI3 SCK", spi3sckPin, {is_enabled_spi_3 == 1} + field = "CAN RX pin", canRxPin + field = "CAN TX pin", canTxPin + field = "SPI1 MOSI", spi1mosiPin, {is_enabled_spi_1 == 1} + field = "SPI1 MISO", spi1misoPin, {is_enabled_spi_1 == 1} + field = "SPI1 SCK", spi1sckPin, {is_enabled_spi_1 == 1} + field = "SPI2 MOSI", spi2mosiPin, {is_enabled_spi_2 == 1} + field = "SPI2 MISO", spi2misoPin, {is_enabled_spi_2 == 1} + field = "SPI2 SCK", spi2sckPin, {is_enabled_spi_2 == 1} + field = "SPI3 MOSI", spi3mosiPin, {is_enabled_spi_3 == 1} + field = "SPI3 MISO", spi3misoPin, {is_enabled_spi_3 == 1} + field = "SPI3 SCK", spi3sckPin, {is_enabled_spi_3 == 1} field = "hip9011CsPin", hip9011CsPin field = "LIS302DLCsPin", LIS302DLCsPin field = "MIL / Check Engine", malfunctionIndicatorPin field = "Saab CDM knock", cdmInputPin field = "comm status light", communicationLedPin field = "running status light", runningLedPin - field = "TLE8888 Chip Select", tle8888_cs - field = "TLE8888 CS Mode", tle8888_csPinMode - field = "TLE 8888 spi", tle8888spiDevice + field = "TLE8888 Chip Select", tle8888_cs + field = "TLE 8888 spi", tle8888spiDevice field = "servo#1", servoOutputPins1 field = "servo#2", servoOutputPins2 field = "servo#3", servoOutputPins3 field = "servo#4", servoOutputPins4 field = "servo#5", servoOutputPins5 + field = "AUX Serial TX", auxSerialTxPin + field = "AUX Serial RX", auxSerialRxPin dialog = allPins1_1_and_2, "", xAxis @@ -3142,9 +3360,10 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" field = "Heater pin", o2heaterPin dialog = egoSettings, "", yAxis - panel = egoSettings_IO, {enableAemXSeries == 0} - panel = egoSettings_sensor, {afr_hwChannel != 16 && enableAemXSeries == 0} + panel = egoSettings_IO + panel = egoSettings_sensor, {afr_hwChannel != 16 && enableAemXSeries == 0 && !auxSerialRxPin && !auxSerialTxPin} field = "Enable AEM X-Series CANbus", enableAemXSeries, { canReadEnabled } + field = "Enable Innovate LC-2 Serial", enableInnovateLC2, { auxSerialRxPin && auxSerialTxPin } ; Engine->EGT inputs dialog = egtInputs, "EGT inputs" @@ -3171,9 +3390,11 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" field = "No1 Direction #1", etbIo1_directionPin1 field = "No1 Direction #2", etbIo1_directionPin2 field = "No1 Control #1", etbIo1_controlPin1, { etb_use_two_wires == 0 } + field = "No1 Disable", etbIo1_disablePin field = "No2 Direction #1", etbIo2_directionPin1 field = "No2 Direction #2", etbIo2_directionPin2 field = "No2 Control #1", etbIo2_controlPin1, { etb_use_two_wires == 0} + field = "No2 Disable", etbIo2_disablePin dialog = idleStepperHw, "Stepper Hardware" field = "Idle Stepper Step Pin", idle_stepperStepPin @@ -3258,27 +3479,33 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" field = "On temperature", fanOnTemperature field = "Off temperature", fanOffTemperature - dialog = fuelPump, "Fuel Rail" + dialog = fuelPumpConfig, "Fuel Pump" field = "Pin", fuelPumpPin field = "Pin mode", fuelPumpPinMode field = "Prime duration", startUpFuelPumpDuration + + dialog = fuelRailConfig, "Fuel Rail" field = "Absolute Fuel Pressure", absoluteFuelPressure field = "Fuel Rail pressure", fuelRailPressure, {absoluteFuelPressure == 1} + dialog = fuelPump, "" + panel = fuelPumpConfig + panel = fuelRailConfig + + ; Controller->Actuator Outputs dialog = mainRelay, "Main relay output" field = "Pin", mainRelayPin field = "Pin mode", mainRelayPinMode dialog = starterRelay, "Starter relay output" - field = "Pin", starterRelayPin - field = "Pin mode", starterRelayPinMode + field = "Pin", starterRelayDisablePin + field = "Pin mode", starterRelayDisableMode dialog = statusLeds, "Status LEDs" field = "Running status LED", runningLedPin field = "TS communication status LED", communicationLedPin field = "Trigger error LED", triggerErrorPin - ; field = "Fatal Error Led", fatalErrorPin ; Engine->MIL Settings dialog = malfunction, "Check Engine Settings" @@ -3404,34 +3631,40 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" field = "Min", alternatorControl_minValue, {isAlternatorControlEnabled == 1 && onOffAlternatorLogic == 0} field = "Max", alternatorControl_maxValue, {isAlternatorControlEnabled == 1 && onOffAlternatorLogic == 0} field = "#% duty = Pterm + Iterm + Dterm + offset%" - field = "Start/Stop Button Pin", startStopButtonPin - field = "Start/Stop Button Mode", startStopButtonMode + dialog = startStopDialog, "Start/Stop Button" + field = "Start/Stop Button Pin", startStopButtonPin + field = "Start/Stop Button Mode", startStopButtonMode + field = "Starter Control", starterControlPin, {startStopButtonPin != 0} + field = "Start cranking maximum time", startCrankingDuration, {startStopButtonPin != 0} dialog = energySystems, "Battery and Alternator Settings", yAxis panel = batteryDialog panel = alternator - - dialog = speedSensorLeft + panel = startStopDialog + + dialog = speedSensorAnalog field = "Input pin", vehicleSpeedSensorInputPin field = "revolution to speed mult", vehicleSpeedCoef + dialog = speedSensorCan + field = "Vss Car Type", canVssNbcType, { enableCanVss } + + dialog = speedSensorLeft, "Speed sensor config", yAxis + panel = speedSensorCan, { enableCanVss } + panel = speedSensorAnalog, { enableCanVss == 0 } + field = "Enable CANbus VSS values", enableCanVss, { canReadEnabled } + dialog = speedSensor, "Speed sensor", xAxis panel = speedSensorLeft gauge = VSSGauge - + ; Engine->Other inputs dialog = analogInputSettings, "Analog Input Settings" field = "!ECU reboot needed to apply these settings" field = "Use fixed baro corr from MAP", useFixedBaroCorrFromMap field = "Analog divider ratio", analogInputDividerCoefficient - field = "Use BiQuad averaging", useBiQuadAnalogFiltering - field = "Smoothing factor", slowAdcAlpha, {useBiQuadAnalogFiltering == 0} - field = "Bi_Q a0", biQuad_a0, {useBiQuadAnalogFiltering == 1} - field = "Bi_Q a1", biQuad_a1, {useBiQuadAnalogFiltering == 1} - field = "Bi_Q a2", biQuad_a2, {useBiQuadAnalogFiltering == 1} - field = "Bi_Q b1", biQuad_b1, {useBiQuadAnalogFiltering == 1} - field = "Bi_Q b2", biQuad_b2, {useBiQuadAnalogFiltering == 1} + field = "Smoothing factor", slowAdcAlpha dialog = tachSettings, "Tachometer output" field = "!See also dizzySparkOutputPin" @@ -3459,8 +3692,13 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" field = "Enable rusEfi CAN data", enableVerboseCanTx field = "rusEfi CAN data base address", verboseCanBaseAddress field = "Can Sleep Period", canSleepPeriodMs - field = "RX pin", canRxPin - field = "TX pin", canTxPin + field = "RX pin", canRxPin + field = "TX pin", canTxPin + + dialog = auxSerial, "AUX Serial" + field = "RX pin", auxSerialRxPin + field = "TX pin", auxSerialTxPin + field = "Serial Baud Rate", auxSerialSpeed dialog = sdCard, "SD Card Logger" field = "SdCard", isSdCardEnabled @@ -3487,19 +3725,19 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" field = "D7 pin", HD44780_db7 dialog = tle8888, "TLE8888", yAxis - field = "TLE8888 Chip Select", tle8888_cs - field = "TLE8888 SPI", tle8888spiDevice - field = "useTLE8888_hall_mode", useTLE8888_hall_mode + field = "TLE8888 Chip Select", tle8888_cs + field = "TLE8888 SPI", tle8888spiDevice + field = "Mode", tle8888mode field = "useTLE8888 cranking reset hack", useTLE8888_cranking_hack commandButton = "Reinit", cmd_tle8888_init dialog = connection, "", yAxis field = "ADC vRef voltage", adcVcc - panel = tsPort + panel = tsPort panel = canBus - panel = sdCard + panel = auxSerial + panel = sdCard panel = gpsReceiver - panel = tle8888 dialog = joystickPanel, "Joystick" field = "joustick center button", joystickCenterPin @@ -3522,6 +3760,8 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" dialog = debugging, "Debug" field = "!https://rusefi.com/s/debugmode" field = "Debug mode", debugMode + field = "Warning Text", warning_message + field = "showHumanReadableWarning (affects Burn)", showHumanReadableWarning dialog = limits, "Limits" @@ -3627,7 +3867,7 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" field = "aux valve #1", auxValves1 field = "aux valve #2", auxValves2 field = "Start/Stop Button", startStopButtonPin - field = "" + field = "External Knock", externalKnockSenseAdc dialog = fsioFrequency, "Frequency" field = "freq #1", fsioFrequency1 @@ -3676,6 +3916,7 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" dialog = fsioFormulas, "FSIO Formulas" field = "!FSIO uses Reverse Polish Notation. Please read http://rusefi.com/s/fsio" + field = "#fsioinfo command in rusEfi console could be useful while troubleshooting those" field = "#1", fsioFormulas1 field = "#2", fsioFormulas2 field = "#3", fsioFormulas3 @@ -3772,43 +4013,37 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" field = "pFactor", etb_pFactor, {throttlePedalPositionAdcChannel != 16} field = "iFactor", etb_iFactor, {throttlePedalPositionAdcChannel != 16} field = "dFactor", etb_dFactor, {throttlePedalPositionAdcChannel != 16} - field = "offset", etb_offset, {throttlePedalPositionAdcChannel != 16} field = "control period", etb_periodMs, {throttlePedalPositionAdcChannel != 16} field = "pid min", etb_minValue, {throttlePedalPositionAdcChannel != 16} field = "pid max", etb_maxValue, {throttlePedalPositionAdcChannel != 16} field = "iTermMin", etb_iTermMin, {throttlePedalPositionAdcChannel != 16} field = "iTermMax", etb_iTermMax, {throttlePedalPositionAdcChannel != 16} + dialog = etbIdleDialog, "ETB Idle" + field = "use ETB for idle", useETBforIdleControl + field = "ETB idle maximum angle", etbIdleThrottleRange dialog = etbDialogLeft field = "https://rusefi.com/s/etb" field = "Detailed status in console", isVerboseETB field = "Pause ETB control", pauseEtbControl - field = "Throttle Pedal Up", throttlePedalUpVoltage - field = "Throttle Pedal Wide Open", throttlePedalWOTVoltage field = etbCalibrationOnStart, etbCalibrationOnStart - field = "TPS#2 min", tps2Min, { tps2_1AdcChannel != 16 } - field = "TPS#2 max", tps2Max, { tps2_1AdcChannel != 16 } ; we need the term about stepper idle in here, because there's a bug in TS that you can't have different visibility ; criteria for the same panel when used in multiple places panel = hbridgeHardware, { throttlePedalPositionAdcChannel != 16 || useStepperIdle && useHbridges } - panel = etbPidDialog + + dialog = etbAutotune, "PID Autotune" + field = "!Set debug mode below to 'ETB Autotune' to show results" + field = "Debug mode", debugMode + commandButton = "ETB PID Autotune", cmd_etb_autotune dialog = etbDialogRight - field = "!https://rusefi.com/s/debugmode" - field = "Neutral Position", etbNeutralPosition - field = "Debug mode", debugMode - field = "use ETB for idle", useETBforIdleControl - field = "ETB idle maximum angle", etbIdleThrottleRange - field = "Press buttons to calibrate sensors" - field = "You would have to remove air filter to move throttle manually" - commandButton = "TPS#1 closed position", cmd_calibrate_tps_1_closed - commandButton = "TPS#1 wide open position", cmd_calibrate_tps_1_wot - field = "Not many vehicles have two throttle bodies but some do" - commandButton = "TPS#2 closed position", cmd_calibrate_tps_2_closed - commandButton = "TPS#2 wide open position", cmd_calibrate_tps_2_wot - commandButton = "Pedal Up", cmd_calibrate_pedal_up - commandButton = "Pedal Down", cmd_calibrate_pedal_down + panel = etbIdleDialog + panel = etbPidDialog + panel = etbAutotune + + ; Neutral position handling not yet implemented! + ;field = "Neutral Position", etbNeutralPosition dialog = etbDialog, "Electronic Throttle Body (beta)", border topicHelp = "etbHelp" @@ -3837,12 +4072,13 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" commandButton = "Injector #8", cmd_test_inj8 dialog = testMisc, "Misc" - commandButton = "Come To Pit", cmd_call_from_pit +; commandButton = "Come To Pit", cmd_call_from_pit commandButton = "Fuel Pump", cmd_test_fuel_pump commandButton = "Radiator Fan", cmd_test_radiator_fan commandButton = "Check Engine", cmd_test_check_engine_light commandButton = "Idle Air Valve", cmd_test_idle_valve commandButton = "A/C Relay", cmd_test_ac_relay + commandButton = "Starter Relay", cmd_test_starter_relay commandButton = "Stop Engine", cmd_stop_engine commandButton = "Write Config", cmd_write_config commandButton = "Reset ECU", cmd_reset_controller @@ -3868,7 +4104,7 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" ; Board->ECU stimulator dialog = ecuStimulator, "ECU stimulator" field = "Trigger Simulator", triggerSimulatorFrequency - field = "self-stimulation", directSelfStimulation + commandButton = "Enable Internal Trigger Simulation", cmd_enable_self_stim field = "" field = "digipot spi", digitalPotentiometerSpiDevice field = "digipot CS #0", digitalPotentiometerChipSelect1 @@ -3945,7 +4181,94 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" field = "Ignition Math Logic @", ignMathCalculateAtIndex field = "MAP Averaging Logic @", mapAveragingSchedulingAtIndex - field = "Target temperature", postCrankingTargetClt + + help = helpGeneral, "rusEfi General Help" + webHelp = "http://www.rusefi.com/" + text = "" + + dialog = gppwm1left, "" + field = "Pin", gppwm1_pin + field = "" + field = "Set frequency to 0hz for on-off mode" + field = "Frequency", gppwm1_pwmFrequency, {gppwm1_pin != 0} + field = "" + field = "On above duty", gppwm1_onAboveDuty, {gppwm1_pin != 0 && gppwm1_pwmFrequency == 0} + field = "Off below duty", gppwm1_offBelowDuty, {gppwm1_pin != 0 && gppwm1_pwmFrequency == 0} + field = "Duty if error", gppwm1_dutyIfError, {gppwm1_pin != 0} + field = "" + field = "Load Axis", gppwm1_loadAxis, {gppwm1_pin != 0} + field = "" + field = "" + field = "" + field = "" + field = "" + + dialog = gppwm1, "General Purpose PWM 1", xAxis + panel = gppwm1left + panel = gppwm1Tbl, {gppwm1_pin != 0} + + dialog = gppwm2left, "" + field = "Pin", gppwm2_pin + field = "" + field = "Set frequency to 0hz for on-off mode" + field = "Frequency", gppwm2_pwmFrequency, {gppwm2_pin != 0} + field = "" + field = "On above duty", gppwm2_onAboveDuty, {gppwm2_pin != 0 && gppwm2_pwmFrequency == 0} + field = "Off below duty", gppwm2_offBelowDuty, {gppwm2_pin != 0 && gppwm2_pwmFrequency == 0} + field = "Duty if error", gppwm2_dutyIfError, {gppwm2_pin != 0} + field = "" + field = "Load Axis", gppwm2_loadAxis, {gppwm2_pin != 0} + field = "" + field = "" + field = "" + field = "" + field = "" + + dialog = gppwm2, "General Purpose PWM 2", xAxis + panel = gppwm2left + panel = gppwm2Tbl, {gppwm2_pin != 0} + + dialog = gppwm3left, "" + field = "Pin", gppwm3_pin + field = "" + field = "Set frequency to 0hz for on-off mode" + field = "Frequency", gppwm3_pwmFrequency, {gppwm3_pin != 0} + field = "" + field = "On above duty", gppwm3_onAboveDuty, {gppwm3_pin != 0 && gppwm3_pwmFrequency == 0} + field = "Off below duty", gppwm3_offBelowDuty, {gppwm3_pin != 0 && gppwm3_pwmFrequency == 0} + field = "Duty if error", gppwm3_dutyIfError, {gppwm3_pin != 0} + field = "" + field = "Load Axis", gppwm3_loadAxis, {gppwm3_pin != 0} + field = "" + field = "" + field = "" + field = "" + field = "" + + dialog = gppwm3, "General Purpose PWM 3", xAxis + panel = gppwm3left + panel = gppwm3Tbl, {gppwm3_pin != 0} + + dialog = gppwm4left, "" + field = "Pin", gppwm4_pin + field = "" + field = "Set frequency to 0hz for on-off mode" + field = "Frequency", gppwm4_pwmFrequency, {gppwm4_pin != 0} + field = "" + field = "On above duty", gppwm4_onAboveDuty, {gppwm4_pin != 0 && gppwm4_pwmFrequency == 0} + field = "Off below duty", gppwm4_offBelowDuty, {gppwm4_pin != 0 && gppwm4_pwmFrequency == 0} + field = "Duty if error", gppwm4_dutyIfError, {gppwm4_pin != 0} + field = "" + field = "Load Axis", gppwm4_loadAxis, {gppwm4_pin != 0} + field = "" + field = "" + field = "" + field = "" + field = "" + + dialog = gppwm4, "General Purpose PWM 4", xAxis + panel = gppwm4left + panel = gppwm4Tbl, {gppwm4_pin != 0} [Tools] ;addTool = toolName, PanelName diff --git a/firmware/tunerstudio/rusefi.input b/firmware/tunerstudio/rusefi.input index eb38a5bdb4..7aa7ba1cbb 100644 --- a/firmware/tunerstudio/rusefi.input +++ b/firmware/tunerstudio/rusefi.input @@ -40,6 +40,9 @@ enable2ndByteCanID = false ; settingOption = DEFAULT, "Speed Density" ; DEFAULT will be over looked and this will fall into the #else block of the statement. +[MegaTune] + ; https://rusefi.com/forum/viewtopic.php?p=36201#p36201 + signature = @@TS_SIGNATURE@@ [TunerStudio] queryCommand = "S" @@ -66,6 +69,7 @@ enable2ndByteCanID = false ; we have current pageSize or (pageSize + 8) here? ; crc32CheckCommand = "k\x00\x00\x00\x00\x36\xB8" + retrieveConfigError = "e" ;communication settings pageActivationDelay = 500 ; Milliseconds delay after burn command. See https://sourceforge.net/p/rusefi/tickets/77/ @@ -108,20 +112,39 @@ enable2ndByteCanID = false [LoggerDefinition] ; valid logger types: composite, tooth, trigger, csv - loggerDef = compositeLogger, "Primary Trigger Logger", tooth +; loggerDef = compositeLogger, "Primary Trigger Logger", tooth + loggerDef = compositeLogger, "Trigger Logger", composite startCommand = "l\x01" stopCommand = "l\x02" dataReadCommand = "L" dataReadTimeout = 10000 ; time in ms dataReadyCondition = { toothLogReady } + continuousRead = true + ; each packet is @@COMPOSITE_PACKET_SIZE@@ and we have @@COMPOSITE_PACKET_COUNT@@ of those + dataLength = @@COMPOSITE_DATA_LENGTH@@ +;tooth ; recordDef = headerLen, footerLen, recordLen - recordDef = 0, 0, 2; in bytes, the recordLen is for each record, currently limited to 4 bytes +; recordDef = 0, 0, @@COMPOSITE_PACKET_SIZE@@ ; uint16 that stores 1/100 second - recordField = toothTime, "tooth", 0, 16, 0.01, "ms" +; recordField = toothTime, "tooth", 0, 16, 0.01, "ms" + + ; recordDef = headerLen, footerLen, recordLen + recordDef = 0, 0, @@COMPOSITE_PACKET_SIZE@@ + + ; these names are hard-coded inside TS + recordField = priLevel, "PriLevel", 0, 1, 1.0, "Flag" + recordField = secLevel, "SecLevel", 1, 1, 1.0, "Flag" + recordField = trigger, "Trigger", 2, 1, 1.0, "Flag" + recordField = sync, "Sync", 3, 1, 1.0, "Flag" + recordField = time, "Time", 8, 32, 0.01, "ms" + + ; it seems that TS also needs to know the diff.size of a tooth + calcField = toothTime, "ToothTime", "ms", { time - pastValue(time, 1) } + [VeAnalyze] ; tableName, lambdaTargetTableName, lambdaChannel, egoCorrectionChannel, activeCondition @@ -135,11 +158,7 @@ enable2ndByteCanID = false ; filter = Name, "DisplayName", outputChannel, operator, defaultVal, userAdjustable filter = minRPMFilter, "Minimum RPM", RPMValue, < , 500, , true -#if CELSIUS filter = minCltFilter, "Minimum CLT", coolant, < , 60, , true -#else - filter = minCltFilter, "Minimum CLT", coolant, < , 160, , true -#endif filter = deltaTps, "dTPS", deltaTps > , 50, , true @@ -193,6 +212,7 @@ fileVersion = { @@TS_FILE_VERSION@@ } ind_isTriggerError = bits, U32, 0, [23:23], "true", "false"; ind_hasFatalError=bits, U32, 0, [24:24], "true", "false"; ind_isWarnNow =bits, U32, 0, [25:25], "true", "false"; + ind_pedal_error =bits, U32, 0, [26:26], "true", "false"; ; RPM, vss RPMValue = scalar, U16, 4, "RPM", 1, 0.00000 @@ -202,16 +222,8 @@ fileVersion = { @@TS_FILE_VERSION@@ } ; temperatures internalMcuTemperature = scalar,S08, 11, "deg C", 1, 0 -#if CELSIUS coolant = scalar, S16, 12, "deg C",{1/@@PACK_MULT_TEMPERATURE@@}, 0.0 -#else - coolant = scalar, S16, 12, "deg F",{9/(5 * @@PACK_MULT_TEMPERATURE@@)}, 17.77777 -#endif -#if CELSIUS intake = scalar, S16, 14, "deg C",{1/@@PACK_MULT_TEMPERATURE@@}, 0.0 -#else - intake = scalar, S16, 14, "deg F",{9/(5 * @@PACK_MULT_TEMPERATURE@@)}, 17.77777 -#endif ; todo: aux1 ; todo: aux2 @@ -286,55 +298,66 @@ fileVersion = { @@TS_FILE_VERSION@@ } knockLevel = scalar, F32, 108, "Volts", 1, 0 ; Mode, firmware, protocol, run time - timeSeconds = scalar, U32, 112, "sec", 1, 0.0 +; TS requires 'seconds' name since it has special internal meaning + seconds = scalar, U32, 112, "sec", 1, 0.0 engineMode = scalar, U32, 116, "em", 1, 0.0; firmwareVersion = scalar, U32, 120,"version_f", 1, 0 firmwareTsVersion=scalar, U32, 124,"version_p", 1, 0 +; calibation helpers + calibrationValue = scalar, F32, 128, "", 1, 0 + calibrationMode = scalar, U08, 132, "", 1, 0 + ; 3 bytes padding1 + ; Errors - totalTriggerErrorCounter=scalar,U32, 128,"counter", 1, 0 - ; orderingErrorCounter 132 - warningCounter = scalar, U16, 136, "count", 1, 0 - lastErrorCode = scalar, U16, 138, "error", 1, 0 - recentErrorCode0= scalar, U16, 140, "error", 1, 0 - recentErrorCode1= scalar, U16, 142, "error", 1, 0 - recentErrorCode2= scalar, U16, 144, "error", 1, 0 - recentErrorCode3= scalar, U16, 146, "error", 1, 0 - recentErrorCode4= scalar, U16, 148, "error", 1, 0 - recentErrorCode5= scalar, U16, 150, "error", 1, 0 - recentErrorCode6= scalar, U16, 152, "error", 1, 0 - recentErrorCode7= scalar, U16, 154, "error", 1, 0 + totalTriggerErrorCounter=scalar,U32, 136,"counter", 1, 0 + ; orderingErrorCounter 140 + warningCounter = scalar, U16, 144, "count", 1, 0 + lastErrorCode = scalar, U16, 146, "error", 1, 0 + recentErrorCode0= scalar, U16, 148, "error", 1, 0 + recentErrorCode1= scalar, U16, 150, "error", 1, 0 + recentErrorCode2= scalar, U16, 152, "error", 1, 0 + recentErrorCode3= scalar, U16, 154, "error", 1, 0 + recentErrorCode4= scalar, U16, 156, "error", 1, 0 + recentErrorCode5= scalar, U16, 158, "error", 1, 0 + recentErrorCode6= scalar, U16, 160, "error", 1, 0 + recentErrorCode7= scalar, U16, 162, "error", 1, 0 ; Debug - debugFloatField1= scalar, F32, 156, "val", 1, 0.0 - debugFloatField2= scalar, F32, 160, "val", 1, 0.0 - debugFloatField3= scalar, F32, 164, "val", 1, 0.0 - debugFloatField4= scalar, F32, 168, "val", 1, 0.0 - debugFloatField5= scalar, F32, 172, "val", 1, 0.0 - debugFloatField6= scalar, F32, 176, "val", 1, 0.0 - debugFloatField7= scalar, F32, 180, "val", 1, 0.0 - debugIntField1 = scalar, S32, 184, "val", 1, 0.0 - debugIntField2 = scalar, S32, 188, "val", 1, 0.0 - debugIntField3 = scalar, S32, 192, "val", 1, 0.0 - debugIntField4 = scalar, S16, 196, "val", 1, 0.0 - debugIntField5 = scalar, S16, 198, "val", 1, 0.0 + debugFloatField1= scalar, F32, 164, "val", 1, 0.0 + debugFloatField2= scalar, F32, 168, "val", 1, 0.0 + debugFloatField3= scalar, F32, 172, "val", 1, 0.0 + debugFloatField4= scalar, F32, 176, "val", 1, 0.0 + debugFloatField5= scalar, F32, 180, "val", 1, 0.0 + debugFloatField6= scalar, F32, 184, "val", 1, 0.0 + debugFloatField7= scalar, F32, 188, "val", 1, 0.0 + debugIntField1 = scalar, S32, 192, "val", 1, 0.0 + debugIntField2 = scalar, S32, 196, "val", 1, 0.0 + debugIntField3 = scalar, S32, 200, "val", 1, 0.0 + debugIntField4 = scalar, S16, 204, "val", 1, 0.0 + debugIntField5 = scalar, S16, 206, "val", 1, 0.0 ; Accel - accelerationX = scalar, S16, 200, "G", 0.01, 0 - accelerationY = scalar, S16, 202, "G", 0.01, 0 + accelerationX = scalar, S16, 208, "G", 0.01, 0 + accelerationY = scalar, S16, 210, "G", 0.01, 0 ; egt - egt1 = scalar, S16, 204, "deg C", 1, 0 - egt2 = scalar, S16, 206, "deg C", 1, 0 - egt3 = scalar, S16, 208, "deg C", 1, 0 - egt4 = scalar, S16, 210, "deg C", 1, 0 - egt5 = scalar, S16, 212, "deg C", 1, 0 - egt6 = scalar, S16, 214, "deg C", 1, 0 - egt7 = scalar, S16, 216, "deg C", 1, 0 - egt8 = scalar, S16, 218, "deg C", 1, 0 -; - TPS2Value = scalar, S16, 220, "%",{1/@@PACK_MULT_PERCENT@@}, 0 + egt1 = scalar, S16, 212, "deg C", 1, 0 + egt2 = scalar, S16, 214, "deg C", 1, 0 + egt3 = scalar, S16, 216, "deg C", 1, 0 + egt4 = scalar, S16, 218, "deg C", 1, 0 + egt5 = scalar, S16, 220, "deg C", 1, 0 + egt6 = scalar, S16, 222, "deg C", 1, 0 + egt7 = scalar, S16, 224, "deg C", 1, 0 + egt8 = scalar, S16, 226, "deg C", 1, 0 + TPS2Value = scalar, S16, 228, "%",{1/@@PACK_MULT_PERCENT@@}, 0 + + rawTps1Primary = scalar, U16, 230, "V",{1/@@PACK_MULT_VOLTAGE@@}, 0.0 + rawPpsPrimary = scalar, U16, 232, "V",{1/@@PACK_MULT_VOLTAGE@@}, 0.0 + rawClt = scalar, U16, 234, "V",{1/@@PACK_MULT_VOLTAGE@@}, 0.0 + rawIat = scalar, U16, 236, "V",{1/@@PACK_MULT_VOLTAGE@@}, 0.0 + rawOilPressure = scalar, U16, 238, "V",{1/@@PACK_MULT_VOLTAGE@@}, 0.0 ; ; see TunerStudioOutputChannels struct @@ -351,6 +374,12 @@ fileVersion = { @@TS_FILE_VERSION@@ } time = { timeNow } ; engineLoad = { fuleAlgorithm == 0 ? MAF : TPS } + ; These "synthetic" channels provide the Y-axis (load) value for gen purp PWM table's Y axes + gppwm1_load = {(gppwm1_loadAxis == 0) ? TPSValue : ((gppwm1_loadAxis == 1) ? MAPValue : ((gppwm1_loadAxis == 2) ? coolant : intake))} + gppwm2_load = {(gppwm2_loadAxis == 0) ? TPSValue : ((gppwm2_loadAxis == 1) ? MAPValue : ((gppwm2_loadAxis == 2) ? coolant : intake))} + gppwm3_load = {(gppwm3_loadAxis == 0) ? TPSValue : ((gppwm3_loadAxis == 1) ? MAPValue : ((gppwm3_loadAxis == 2) ? coolant : intake))} + gppwm4_load = {(gppwm4_loadAxis == 0) ? TPSValue : ((gppwm4_loadAxis == 1) ? MAPValue : ((gppwm4_loadAxis == 2) ? coolant : intake))} + [PcVariables] wueAfrTargetOffset = array, S16, [ 16], ":1", 0.1, 0.0, -3.0, 3.0, 1; wueAnalRecommend = array, U08, [ 16], "%", 1.00, 0.0, 100, 255.00, 0 @@ -359,24 +388,89 @@ fileVersion = { @@TS_FILE_VERSION@@ } enableLogDebugChannels = bits, U08, [0:0], "Yes", "No" enableLogErrorList = bits, U08, [0:0], "Yes", "No" -; 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 -; Alternator TPS Acceleration Warmup-Pid Idle Engine Load Acc Trigger Counters ETB PID TLE8888 Boost - debugFieldF1List = bits, U08, [0:7], "Controller Output", "From TPS", "", "Controller Output", "", "Channel 1 Rise Counter", "", "", "", "", "", "", "", "", "", "", "", "ETB Controller Output", "", "", "df1", "df1", "22df1", "", "", "", "", "", "", "", "", "", "", "", "", "", "Open Loop Duty", "" - debugFieldF2List = bits, U08, [0:7], "I-Term", "To TPS", "", "I-Term", "", "Channel 2 Rise Counter", "", "", "", "", "", "", "", "", "", "", "", "ETB I-Term", "", "", "df2", "df2", "22df2", "", "", "", "", "", "", "", "", "", "", "", "", "", "Closed Loop Duty","" - debugFieldF3List = bits, U08, [0:7], "Previous Error", "Current TPS<>TPS", "", "", "", "Channel 3 Rise Counter", "", "", "", "", "", "", "", "", "", "", "", "ETB Previous Error", "", "", "df3", "df3", "22df3", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" - debugFieldF4List = bits, U08, [0:7], "I Gain", "Extra Fuel", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "ETB df4", "", "", "df4", "df4", "22df4", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" - debugFieldF5List = bits, U08, [0:7], "D Gain", "df5", "df5", "df5", "df5", "df5", "df5", "", "", "", "", "", "", "", "", "", "", "ETB df5", "df5", "df5", "df5", "df5", "22df5", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" - debugFieldF6List = bits, U08, [0:7], "D Term", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "ETB df6", "", "", "df6", "df6", "22df6", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" - debugFieldF7List = bits, U08, [0:7], "Max-Value", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "ETB df7", "", "", "df7", "df7", "22df7", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" - - debugFieldI1List = bits, U08, [0:7], "P-Gain", "", "", "", "", "Channel 2 Fall Counter", "", "", "", "", "", "", "", "", "", "", "", "ETB P-Gain", "", "", "di1", "di1", "22", "", "", "", "", "", "", "", "", "SPI Counter", "", "", "", "", "", "" - debugFieldI2List = bits, U08, [0:7], "Offset", "", "", "", "", "Channel 3 Fall Counter", "", "", "", "", "", "", "", "", "", "", "", "ETB di2", "", "", "di2", "di2", "22", "", "", "", "", "", "", "", "", "Latest Transmit","", "", "", "", "", "" - debugFieldI3List = bits, U08, [0:7], "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "ETB di3", "", "", "di3", "di3", "22", "", "", "", "", "", "", "", "", "Latest Received","", "", "", "", "", "" - debugFieldI4List = bits, U08, [0:7], "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "ETB di4", "", "", "di4", "di4", "22", "", "", "", "", "", "", "", "", "Init Count", "", "", "", "", "", "" - debugFieldI5List = bits, U08, [0:7], "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "di5", "di5", "ETB di5", "di5", "di5", "di5", "di5", "22di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5" +; wall of debug mode :) +; https://rusefi.com/wiki/index.php?title=Manual:Debug_fields +; 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 +; Alternator TPS Acceleration Warmup-Pid Idle Engine Load Acc Trigger Counters VVT Cranking Ignition Timing ETB PID CJ125 CAN TLE8888 Boost Start Launcher ETB Autotune + debugFieldF1List = bits, U08, [0:7], "Controller Output", "From TPS", "", "Controller Output", "Idle output", "Channel 1 Rise Counter", "", "", "", "", "Ign IAT Corr", "", "", "", "", "", "", "ETB Controller Output", "", "", "df1", "df1", "22df1", "", "23:df1", "CJ125: output", "", "", "", "", "", "", "", "", "", "", "Boost Open Loop Duty", "S unused" "", "Osc Amplitude" + debugFieldF2List = bits, U08, [0:7], "I-Term", "To TPS", "", "I-Term", "Idle df2", "Channel 2 Rise Counter", "", "", "", "", "Ign CLT Corr", "", "", "", "", "", "", "ETB I-Term", "", "", "df2", "df2", "22df2", "", "23:df2", "CJ125: i-term", "", "", "", "", "", "", "", "", "", "", "Boost Closed Loop Duty","S unused" "", "Duty Amplitude" + debugFieldF3List = bits, U08, [0:7], "Previous Error", "Current TPS<>TPS", "", "", "Idle df3", "ICU sum", "", "", "", "", "Ign FSIO Adj", "", "", "", "", "", "", "ETB err", "", "", "df3", "df3", "22df3", "", "23:df3", "CJ125: err", "", "", "", "", "", "", "", "", "", "", "", "S unused" "", "Tu" + debugFieldF4List = bits, U08, [0:7], "I Gain", "Extra Fuel", "", "", "Idle df4", "VVT rise", "", "", "", "", "Ign PID Adj", "", "", "", "", "", "", "ETB I setting", "", "", "df4", "df4", "22df4", "", "23:df4", "CJ125: UA", "", "", "", "", "", "", "", "", "", "", "", "S unused" "", "Ku" + debugFieldF5List = bits, U08, [0:7], "D Gain", "df5", "df5", "df5", "Idle df5", "VVT fall", "df5", "", "", "", "", "", "", "", "", "", "", "ETB D setting", "df5", "df5", "df5", "df5", "22df5", "", "23:df5", "CJ125: UR", "", "", "", "", "", "", "", "", "", "", "", "S unused" "", "Kp" + debugFieldF6List = bits, U08, [0:7], "D Term", "", "", "", "Idle df6", "Current Gap", "", "", "", "", "", "", "", "", "", "", "", "ETB df6", "", "", "df6", "df6", "22df6", "", "23:df6", "cj: f7", "", "", "", "", "", "", "", "", "", "", "", "S unused" "", "Ki" + debugFieldF7List = bits, U08, [0:7], "Max-Value", "", "", "", "Idle df7", "", "", "", "", "", "", "", "", "", "", "", "", "ETB df7", "", "", "df7", "df7", "22df7", "", "23:df7", "cj: f7", "", "", "", "", "", "", "", "", "", "", "", "S unused" "", "Kd" + debugFieldI1List = bits, U08, [0:7], "P-Gain", "", "", "", "Idle di1", "Channel 1 Fall Counter", "", "", "", "", "Multispark Count", "", "", "", "", "", "", "ETB P-Gain", "", "", "di1", "di1", "22di1", "", "23:di1", "CJ125: state", "read count","", "", "", "", "SPI Counter", "", "", "", "", "", "Start Count" "", "" + debugFieldI2List = bits, U08, [0:7], "Offset", "", "", "", "Idle di2", "Channel 2 Fall Counter", "", "", "", "", "", "", "", "", "", "", "", "ETB di2", "", "", "di2", "di2", "22di2", "", "23:di2", "", "", "", "", "", "", "Latest Transmit","", "", "", "", "", "S unused" "", "" + debugFieldI3List = bits, U08, [0:7], "", "", "", "", "Idle di3", "Cycle Index", "", "", "", "", "", "", "", "", "", "", "", "ETB di3", "", "", "di3", "di3", "22di3", "", "23:di3", "", "", "", "", "", "", "Latest Received","", "", "", "", "", "S unused" "", "" + debugFieldI4List = bits, U08, [0:7], "", "", "", "", "Idle di4", "Cycle Cnt 1", "", "", "", "", "", "", "", "", "", "", "", "ETB di4", "", "", "di4", "di4", "22di4", "", "23:di4", "", "", "", "", "", "", "Init Count", "", "", "", "", "", "S unused" "", "" + debugFieldI5List = bits, U08, [0:7], "", "", "", "", "Idle di5", "Cycle Cnt 2", "", "", "", "", "", "", "", "", "", "di5", "di5", "ETB di5", "di5", "di5", "di5", "di5", "22di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "S di5" "", "" + [ConstantsExtensions] + ; defaultValue is used to provide TunerStudio with a value to use in the case of + ; the constant not yet being initialized. This is primarily important if the + ; constant is used as a variable in the ini. + ; defaultValue = constantName, value; defaultValue = wueAfrTargetOffset, -1.5 -1.4 -1.15 -0.95 -0.775 -0.65 -0.5625 -0.5 -0.4375 -0.375 -0.3125 -0.25 -0.1875 -0.125 -0.0625 0 + + requiresPowerCycle = warningLedPin + requiresPowerCycle = runningLedPin + requiresPowerCycle = binarySerialTxPin + requiresPowerCycle = binarySerialRxPin + + requiresPowerCycle = etb_use_two_wires + requiresPowerCycle = etbFreq + + requiresPowerCycle = idle_solenoidFrequency + requiresPowerCycle = boostPwmFrequency + requiresPowerCycle = alternatorPwmFrequency + requiresPowerCycle = auxPidFrequency1 + requiresPowerCycle = auxPidFrequency2 + requiresPowerCycle = auxPidFrequency3 + requiresPowerCycle = auxPidFrequency4 + + requiresPowerCycle = fsioOutputPins1 + requiresPowerCycle = fsioOutputPins2 + requiresPowerCycle = fsioOutputPins3 + requiresPowerCycle = fsioOutputPins4 + requiresPowerCycle = fsioOutputPins5 + requiresPowerCycle = fsioOutputPins6 + requiresPowerCycle = fsioOutputPins7 + requiresPowerCycle = fsioOutputPins8 + requiresPowerCycle = fsioOutputPins9 + requiresPowerCycle = fsioOutputPins10 + requiresPowerCycle = fsioOutputPins11 + requiresPowerCycle = fsioOutputPins12 + requiresPowerCycle = fsioOutputPins13 + requiresPowerCycle = fsioOutputPins14 + requiresPowerCycle = fsioOutputPins15 + requiresPowerCycle = fsioOutputPins16 + + requiresPowerCycle = fsioFrequency1 + requiresPowerCycle = fsioFrequency2 + requiresPowerCycle = fsioFrequency3 + requiresPowerCycle = fsioFrequency4 + requiresPowerCycle = fsioFrequency5 + requiresPowerCycle = fsioFrequency6 + requiresPowerCycle = fsioFrequency7 + requiresPowerCycle = fsioFrequency8 + requiresPowerCycle = fsioFrequency9 + requiresPowerCycle = fsioFrequency10 + requiresPowerCycle = fsioFrequency11 + requiresPowerCycle = fsioFrequency12 + requiresPowerCycle = fsioFrequency13 + requiresPowerCycle = fsioFrequency14 + requiresPowerCycle = fsioFrequency15 + requiresPowerCycle = fsioFrequency16 + + requiresPowerCycle = fsioAdc1 + requiresPowerCycle = fsioAdc2 + requiresPowerCycle = fsioAdc3 + requiresPowerCycle = fsioAdc4 + + readOnly = warning_message + + [CurveEditor] ; xAxis = leftValue, rightValue, step ; yAxis = bottomValue, topValue, step @@ -475,11 +569,7 @@ fileVersion = { @@TS_FILE_VERSION@@ } curve = iatFuelCorrCurve, "Intake air temperature fuel Multiplier" columnLabel = "Coolant", "Multiplier" -#if CELSIUS xAxis = -40, 120, 10 -#else - xAxis = -40, 250, 10 -#endif yAxis = 0, 2, 11 xBins = iatFuelCorrBins, intake yBins = iatFuelCorr @@ -487,11 +577,7 @@ fileVersion = { @@TS_FILE_VERSION@@ } curve = cltTimingCorrCurve, "Warmup timing correction" columnLabel = "Coolant", "Extra" -#if CELSIUS xAxis = -40, 120, 10 -#else - xAxis = -40, 250, 10 -#endif yAxis = 0, 50, 10 xBins = cltTimingBins, coolant yBins = cltTimingExtra @@ -499,11 +585,7 @@ fileVersion = { @@TS_FILE_VERSION@@ } curve = cltFuelCorrCurve, "Warmup fuel manual Multiplier" columnLabel = "Coolant", "Multiplier" -#if CELSIUS xAxis = -40, 100, 10 -#else - xAxis = -40, 210, 10 -#endif yAxis = 0, 3, 10 xBins = cltFuelCorrBins, coolant yBins = cltFuelCorr @@ -511,11 +593,7 @@ fileVersion = { @@TS_FILE_VERSION@@ } curve = crankingCltCurve, "Cranking Coolant Temperature Multiplier" columnLabel = "Coolant", "Multiplier" -#if CELSIUS xAxis = -40, 100, 10 -#else - xAxis = -40, 210, 10 -#endif yAxis = 0, 3, 10 xBins = crankingFuelBins, coolant yBins = crankingFuelCoef @@ -523,8 +601,8 @@ fileVersion = { @@TS_FILE_VERSION@@ } curve = etbTpsBiasCurve, "Electronic TB Bias Curve" columnLabel = "TPS", "duty bias" - xAxis = 0, 100, 10 - yAxis = 0, 100, 10 + xAxis = 0, 50, 11 + yAxis = -40, 40, 9 xBins = etbBiasBins, TPSValue yBins = etbBiasValues gauge = TPSGauge @@ -547,11 +625,7 @@ fileVersion = { @@TS_FILE_VERSION@@ } curve = cltIdleCurve, "Warmup Idle multiplier" columnLabel = "Coolant", "Multiplier" -#if CELSIUS xAxis = -40, 120, 10 -#else - xAxis = -40, 250, 10 -#endif yAxis = 0, 3, 10 xBins = cltIdleCorrBins, coolant yBins = cltIdleCorr @@ -559,11 +633,7 @@ fileVersion = { @@TS_FILE_VERSION@@ } curve = iacCoastingCurve, "Coasting IAC Position for Auto-Idle" columnLabel = "Coolant", "Multiplier" -#if CELSIUS xAxis = -40, 120, 10 -#else - xAxis = -40, 250, 10 -#endif yAxis = 0, 100, 10 xBins = iacCoastingBins, coolant yBins = iacCoasting @@ -571,11 +641,7 @@ fileVersion = { @@TS_FILE_VERSION@@ } curve = cltCrankingCurve, "Cranking Idle Air multiplier" columnLabel = "Coolant", "Multiplier" -#if CELSIUS xAxis = -40, 120, 10 -#else - xAxis = -40, 250, 10 -#endif yAxis = 0, 3, 10 xBins = cltCrankingCorrBins, coolant yBins = cltCrankingCorr @@ -583,11 +649,7 @@ fileVersion = { @@TS_FILE_VERSION@@ } curve = cltIdleRPMCurve, "Idle Target RPM" columnLabel = "Coolant", "RPM" -#if CELSIUS xAxis = -40, 120, 10 -#else - xAxis = -40, 250, 10 -#endif yAxis = 0, 8000, 10 xBins = cltIdleRpmBins, coolant yBins = cltIdleRpm, RPMValue @@ -619,11 +681,7 @@ fileVersion = { @@TS_FILE_VERSION@@ } curve = wueAfrTargetOffsetCurve, "AFR Target Temperature Adjustment" columnLabel = "Coolant", "AFR Offset" -#if CELSIUS xAxis = -40, 200, 9 -#else - xAxis = -40, 400, 9 -#endif yAxis = -3, 1, 5 xBins = cltFuelCorrBins, coolant yBins = wueAfrTargetOffset @@ -631,11 +689,7 @@ fileVersion = { @@TS_FILE_VERSION@@ } curve = wueAnalyzer_warmup_curve, "Warmup Enrichment" columnLabel = "Coolant", "Current WUE", "Coolant", "Corrected" -#if CELSIUS xAxis = -40, 200, 9 -#else - xAxis = -40, 400, 9 -#endif yAxis = 90, 500, 6 xBins = cltFuelCorrBins, coolant yBins = cltFuelCorr @@ -813,6 +867,30 @@ fileVersion = { @@TS_FILE_VERSION@@ } gridOrient = 250, 0, 340 ; Space 123 rotation of grid in degrees. upDownLabel = "(Later)", "(Sooner)" + table = gppwm1Tbl, gppwm1Map, "", 1 + xyLabels = "RPM", "" + xBins = gppwm1_rpmBins, RPMValue + yBins = gppwm1_loadBins, gppwm1_load + zBins = gppwm1_table + + table = gppwm2Tbl, gppwm2Map, "", 1 + xyLabels = "RPM", "" + xBins = gppwm2_rpmBins, RPMValue + yBins = gppwm2_loadBins, gppwm2_load + zBins = gppwm2_table + + table = gppwm3Tbl, gppwm3Map, "", 1 + xyLabels = "RPM", "" + xBins = gppwm3_rpmBins, RPMValue + yBins = gppwm3_loadBins, gppwm3_load + zBins = gppwm3_table + + table = gppwm4Tbl, gppwm4Map, "", 1 + xyLabels = "RPM", "" + xBins = gppwm4_rpmBins, RPMValue + yBins = gppwm4_loadBins, gppwm4_load + zBins = gppwm4_table + [GaugeConfigurations] gaugeCategory = Sensors - Extra 2 @@ -843,7 +921,7 @@ gaugeCategory = ECU Status recentErrorCode6Gauge = recentErrorCode6, "Error#7", "", 0, 18000, 0, 0, 18000, 18000, 0, 0 recentErrorCode7Gauge = recentErrorCode7, "Error#8", "", 0, 18000, 0, 0, 18000, 18000, 0, 0 firmwareVersionGauge = firmwareVersion , "ECU Software Version", "%", 0, 100, 0, 0, 100, 100, 0, 0 - timeSecondsGauge = timeSeconds, "Uptime", "sec", 0, 100, 0, 0, 100, 100, 0, 0 + timeSecondsGauge = seconds, "Uptime", "sec", 0, 100, 0, 0, 100, 100, 0, 0 gaugeCategory = Debug @@ -863,16 +941,8 @@ gaugeCategory = Debug gaugeCategory = Sensors - Basic RPMGauge = RPMValue, "RPM - engine speed", "RPM", 0, 15000, 200, 500, 6000, 6000, 0, 0 -#if CELSIUS CLTGauge = coolant, "Coolant temp", "deg C", -40, 140, -15, 1, 95, 110, 1, 1 -#else - CLTGauge = coolant, "Coolant temp", "deg F", -40, 285, 5, 35, 205, 230, 1, 1 -#endif -#if CELSIUS IATGauge = intake, "Intake air temp", "deg C", -40, 140, -15, 1, 95, 110, 1, 1 -#else - IATGauge = intake, "Intake air temp", "deg F", -40, 285, 5, 35, 205, 230, 1, 1 -#endif afr1Gauge = AFRValue, "Air fuel ratio", "", 10, 19.4, 12, 13, 15, 16, 2, 2 MAFGauge = MAFValue, "Mass air flow", "v", 0, 5, 0, 1, 3, 4, 1, 1 VBattGauge = VBatt, "Battery voltage", "V", 8, 21, 9, 10, 17, 19, 1, 1 @@ -905,11 +975,7 @@ gaugeCategory = Acceleration Enrichment gaugeCategory = Fueling ;Name Var Title Units Lo Hi LoD LoW HiW HiD vd ld -#if CELSIUS tChargeGauge = tCharge, @@GAUGE_NAME_FUEL_CHARGE_TEMP@@, "deg C", -40, 140, -15, 1, 95, 110, 1, 1 -#else - tChargeGauge = tCharge, @@GAUGE_NAME_FUEL_CHARGE_TEMP@@, "deg F", -40, 285, 5, 35, 205, 230, 1, 1 -#endif baroCorrectionGauge = baroCorrection,@@GAUGE_NAME_FUEL_BARO_CORR@@, "ratio", 0.5, 1.5, 0.6, 0.7, 1.3, 1.4, 1, 1 crankingFuelGauge = crankingFuelMs, @@GAUGE_NAME_FUEL_CRANKING@@, "mSec", 0, 25.5, 1.0, 1.2, 20, 25, 3, 1 iatCorrectionGauge = iatCorrection, @@GAUGE_NAME_FUEL_IAT_CORR@@, "mult", 0, 3, 0, 0, 3, 3, 2, 2 @@ -933,6 +999,12 @@ gaugeCategory = Throttle Body (incl. ETB) etbErrorGauge = etb1Error, @@GAUGE_NAME_ETB_ERROR@@, "%", -20, 20, -10, -5, 5, 10, 2, 0 etbDutyCycleGauge = etb1DutyCycle, @@GAUGE_NAME_ETB_DUTY@@, "%", -100, 100, -75, -50, 50, 75, 0, 0 +gaugeCategory = Sensors - Raw + rawTps1PrimaryGauge = rawTps1Primary, "Raw TPS 1 Primary", "volts", 0, 5, 0, 0, 5, 5, 3, 0 + rawPpsPrimaryGauge = rawPpsPrimary , "Raw Pedal Primary", "volts", 0, 5, 0, 0, 5, 5, 3, 0 + rawCltGauge = rawClt , "Raw CLT", "volts", 0, 5, 0, 0, 5, 5, 3, 0 + rawIatGauge = rawIat , "Raw IAT", "volts", 0, 5, 0, 0, 5, 5, 3, 0 + rawOilPressureGauge = rawOilPressure, "Raw Oil Pressure", "volts", 0, 5, 0, 0, 5, 5, 3, 0 [WueAnalyze] @@ -966,11 +1038,10 @@ gaugeCategory = Throttle Body (incl. ETB) ; 1 2 3 4 ; 5 6 7 8 - ; currently a minimum of 6 gauges must be on the dash, this appears to be an old not needed limitation. next release 1 will work. gauge1 = RPMGauge gauge2 = CLTGauge gauge3 = TPSGauge - gauge4 = MAFGauge + gauge4 = MAPGauge gauge5 = afr1Gauge gauge6 = VBattGauge gauge7 = dwellGauge @@ -980,36 +1051,45 @@ gaugeCategory = Throttle Body (incl. ETB) ; = expression, off-label, on-label, off-bg, off-fg, on-bg, on-fg ; important status - indicator = { ind_hasFatalError }, "", "FATAL ERROR", green, black, red, black - indicator = { firmwareTsVersion == fileVersion }, "WRONG VERSION", "version", red, black, green, black - indicator = { ind_isWarnNow }, "", "warn", green, black, red, black - indicator = { ind_check_engine }, "ok", "Check engine", green, black, red, black - indicator = { isIgnitionEnabledIndicator}, "no ignition", "ignition", red, black, green, black - indicator = { ind_injection_enabled}, "no injection", "injection", red, black, green, black - indicator = { ind_isTriggerError}, "ok", "trg err", green, black, red, black + indicator = { ind_hasFatalError }, "", "CRITICAL ERROR", white, black, red, black + indicator = { firmwareTsVersion == fileVersion }, "WRONG VERSION", "version ok", red, black, white, black + indicator = { ind_isWarnNow }, "", "WARNING", white, black, yellow, black + indicator = { ind_check_engine }, "", "Check Engine", white, black, red, black + indicator = { isIgnitionEnabledIndicator}, "no ignition", "ignition", yellow, black, white, black + indicator = { ind_injection_enabled}, "no injection", "injection", yellow, black, white, black + indicator = { ind_isTriggerError}, "trigger ok", "trigger err", white, black, red, black + ; this is required so that the "config error" feature works in TS + ; don't change this line - TS is looking for an indicator with particular text/styling + ; you don't even have to show it by default + indicator = { ind_hasFatalError }, "Config Error", "Config Error", white, black, red, black ; minor info - indicator = { ind_fan}, "no fan", "fan", white, black, green, black - indicator = { isCylinderCleanupActivated}, "no cyl cleanup", "cyl cleanup", white, black, green, black + indicator = { ind_fan}, "fan off", "fan on", white, black, green, black + indicator = { isCylinderCleanupActivated}, "no cyl cleanup", "cyl cleanup", white, black, yellow, black indicator = { needBurn }, "config ok", "unsaved changes", white, black, yellow, black indicator = { hasSdCard}, "no SD", "with SD", white, black, green, black - indicator = { ind_fuel_pump}, "no pump", "pump", white, black, green, black + indicator = { ind_fuel_pump}, "pump off", "pump on", white, black, green, black indicator = { clutchUpState }, "clutch", "cltch Up", white, black, red, black indicator = { clutchDownState }, "clutch", "cltch Down", white, black, yellow, black indicator = { brakePedalIndicator }, "brake", "brake down", white, black, red, black - indicator = { acSwitchIndicator }, "AC on", "AC off", yellow, black, white, black + indicator = { acSwitchIndicator }, "AC off", "AC on", white, black, blue, white ; error codes indicator = { ind_tps_error}, "tps", "tps error", white, black, red, black indicator = { ind_clt_error}, "clt", "clt error", white, black, red, black indicator = { ind_iat_error}, "iat", "iat error", white, black, red, black indicator = { ind_map_error}, "map", "map error", white, black, red, black + indicator = { ind_pedal_error}, "pedal", "pedal error", white, black, red, black indicator = { knockEverIndicator }, "", "Knock recently", white, black, red, black indicator = { knockNowIndicator }, "no knock", "Knock NOW", white, black, red, black +[KeyActions] + showPanel = spi, spiFunction + showPanel = con, connection + [Datalog] ; Channel Label Type Format entry = time, "Time", float, "%.3f" @@ -1163,7 +1243,7 @@ menuDialog = main # Digital outputs subMenu = mainRelay, "Main relay" subMenu = starterRelay, "Starter Disable relay" - subMenu = fuelPump, "Fuel rail" + subMenu = fuelPump, "Fuel pump & rail" subMenu = fanSetting, "Fan" subMenu = tachSettings, "Tachometer" subMenu = malfunction, "Check engine light" @@ -1176,14 +1256,14 @@ menuDialog = main subMenu = std_separator # Targets & closed loop - subMenu = afrTableTbl, "Target AFR", 0, {isInjectionEnabled == 1 && fuelAlgorithm == LM_SPEED_DENSITY} + subMenu = afrTableTbl, "Target AFR", 0, {isInjectionEnabled == 1 && (fuelAlgorithm == LM_SPEED_DENSITY || fuelAlgorithm == LM_REAL_MAF)} subMenu = fuelClosedLoopDialog, "Closed loop correction", 0, {isInjectionEnabled == 1} subMenu = coastingFuelCutControl, "Deceleration fuel cutoff (DFCO)", 0, {isInjectionEnabled == 1} subMenu = std_separator # Fuel table/VE - subMenu = fuelTableDialog, "Fuel table", 0, {isInjectionEnabled == 1 && fuelAlgorithm != LM_SPEED_DENSITY} - subMenu = veTableDialog, "VE", 0, {isInjectionEnabled == 1 && fuelAlgorithm == LM_SPEED_DENSITY} + subMenu = fuelTableDialog, "Fuel table", 0, {isInjectionEnabled == 1 && fuelAlgorithm != LM_SPEED_DENSITY && fuelAlgorithm != LM_REAL_MAF} + subMenu = veTableDialog, "VE", 0, {isInjectionEnabled == 1 && (fuelAlgorithm == LM_SPEED_DENSITY || fuelAlgorithm == LM_REAL_MAF)} subMenu = injPhaseTableTbl, "Injection phase", 0, {isInjectionEnabled == 1} subMenu = std_separator @@ -1249,7 +1329,14 @@ menuDialog = main menu = "&Advanced" subMenu = boostDialog, "Boost Control" subMenu = boostPidDialog, "Closed Loop Boost", { boostType == 1 } - subMenu = std_separator + + subMenu = std_separator + subMenu = gppwm1, "General Purpose PWM 1" + subMenu = gppwm2, "General Purpose PWM 2" + subMenu = gppwm3, "General Purpose PWM 3" + subMenu = gppwm4, "General Purpose PWM 4" + + subMenu = std_separator subMenu = fsioInputsDialog, "FSIO inputs" subMenu = auxPidDialog, "Aux PID" subMenu = fsioOutputsDialog, "FSIO outputs" @@ -1318,6 +1405,8 @@ menuDialog = main subMenu = std_separator subMenu = connection, "Connection" + subMenu = tle8888, "TLE8888" + subMenu = allPins1, "Full pinout 1/2" @@if_ts_show_full_pinout subMenu = allPins2, "Full pinout 2/2" @@if_ts_show_full_pinout subMenu = std_separator @@ -1326,6 +1415,7 @@ menuDialog = main # EXPERIMENTAL FEATURES subMenu = parkingLot, "Experimental/Broken" subMenu = multisparkSettings, "Multispark", 0, {isIgnitionEnabled == 1} + subMenu = mc33Dialog, "GDI Dreams" subMenu = std_separator subMenu = hipFunction, "HIP9011 settings (knock sensor) (alpha version)" @@if_ts_show_hip9011 @@ -1343,6 +1433,10 @@ menuDialog = main subMenu = std_separator + menu = "Help" + subMenu = helpGeneral, "rusEfi Info" + + [ControllerCommands] ; commandName = command1, command2, commandn... ; command in standard ini format, a command name can be assigned to 1 to n commands that will be executed in order. @@ -1403,6 +1497,9 @@ cmd_calibrate_pedal_down = "w\x00\x14\x00\x07" cmd_tle8888_init = "w\x00\x14\x00\x08" cmd_test_ac_relay = "w\x00\x14\x00\x09" cmd_write_config = "w\x00\x14\x00\x0A" +cmd_test_starter_relay = "w\x00\x14\x00\x0B" +cmd_etb_autotune = "w\x00\x14\x00\x0C" +cmd_enable_self_stim = "w\x00\x14\x00\x0D" cmd_test_radiator_fan = "w\x00\x15\x00\x01" cmd_test_check_engine_light = "w\x00\x16\x00\x01" @@ -1540,6 +1637,7 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" field = "!Reminder that 4-stroke cycle is 720 degrees" field = "!For well-known trigger types use '0' trigger angle offset" field = "Trigger Angle Offset", globalTriggerAngleOffset + field = "Display only interesting", displayLogicLevelsInEngineSniffer field = "#Custom Trigger" field = "total Tooth Count", trigger_customTotalToothCount, {trigger_type == 0} field = "skipped Tooth Count", trigger_customSkippedToothCount, {trigger_type == 0} @@ -1550,10 +1648,9 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" field = "VVT use rise front", vvtCamSensorUseRise, {trigger_type != 80} field = "VVT position display offset", vvtOffset field = "VVT display inverted", vvtDisplayInverted - field = "nbVvtIndex", nbVvtIndex field = "print verbose sync details to console",verboseTriggerSynchDetails field = "Do not print messages in case of sync error", silentTriggerError - field = "Enable noise filtering", useNoiselessTriggerDecoder, {trigger_type == 8 || trigger_type == 9} + field = "Enable noise filtering", useNoiselessTriggerDecoder, {trigger_type == @@TRIGGER_TYPE_60_2@@ || trigger_type == @@TRIGGER_TYPE_36_1@@} dialog = triggerConfiguration panel = triggerConfiguration_settings, North panel = triggerConfiguration_IO, South @@ -1670,11 +1767,27 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" field = "TPS low value detection threshold", tpsErrorDetectionTooLow, {tps1_1AdcChannel != 16} field = "TPS high value detection threshold", tpsErrorDetectionTooHigh, {tps1_1AdcChannel != 16} - dialog = pedalSensor, "Accelerator pedal" + dialog = pedalSensorLeft, "Accelerator pedal" field = "Accelerator position sensor", throttlePedalPositionAdcChannel + field = "Up voltage", throttlePedalUpVoltage + field = "Down (WOT) voltage", throttlePedalWOTVoltage field = "Accelerator position 2nd sensor", throttlePedalPositionSecondAdcChannel - field = "Up voltage", throttlePedalUpVoltage - field = "Down (WOT) voltage", throttlePedalWOTVoltage + + dialog = pedalGauges + gauge = pedalPositionGauge + gauge = rawPpsPrimaryGauge + + dialog = pedalSensor, "Accelerator pedal", border + panel = pedalSensorLeft, West + panel = pedalGauges, East + + dialog = mc33Dialog, "GDI Dreams" + field = mc33816_cs, mc33816_cs + field = mc33816_rstb, mc33816_rstb + field = mc33816_flag0, mc33816_flag0 + field = "mc33972 SPI", mc33972spiDevice + field = mc33_hvolt, mc33_hvolt + ; Sensor Inputs dialog = otherSensorInputs, "Other Sensor Inputs" @@ -1701,8 +1814,12 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" field = "Secondary channel", triggerInputPins2, { trigger_type != 0 && trigger_type != 8 && trigger_type != 9 && trigger_type != 18 && trigger_type != 20} field = "Invert Secondary", invertSecondaryTriggerSignal, { trigger_type != 0 && trigger_type != 8 && trigger_type != 9 && trigger_type != 18 && trigger_type != 20} field = "Cam Sync/VVT input", camInputs1 - panel = triggerInputComparator - + panel = triggerInputComparator @@if_ts_show_trigger_comparator + +; +; allXXX sections allows a quick overview of used I/O in order to address conflicts mostly, not really to +; configure the features. +; dialog = allPinsSensors, "Sensors" field = "Throttle pedal Position Channel", throttlePedalPositionAdcChannel field = "Primary input channel", triggerInputPins1 @@ -1730,16 +1847,18 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" dialog = allPins1_1 field = mc33816_cs, mc33816_cs field = mc33816_rstb, mc33816_rstb + field = mc33816_flag0, mc33816_flag0 + field = "trigger stimulator pin #1", triggerSimulatorPins1 + field = "trigger stimulator pin #2", triggerSimulatorPins2 + field = "trigger stimulator pin #2", triggerSimulatorPins3 field = high_fuel_pressure_sensor_1, high_fuel_pressure_sensor_1 field = high_fuel_pressure_sensor_2, high_fuel_pressure_sensor_2 field = mc33816_driven, mc33816_driven field = mc33816spiDevice, mc33816spiDevice field = "Warning Led", warningLedPin - ; field = "Fatal Error Led", fatalErrorPin field = "tle6240_cs", tle6240_cs field = "tle6240 SPI", tle6240spiDevice field = "mc33972_cs", mc33972_cs - field = "mc33972 SPI", mc33972spiDevice panel = allPinsSensors dialog = allPins1_2 @@ -1749,32 +1868,27 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" field = "Idle Solenoid Pin", idle_solenoidPin field = "Second Idle Solenoid Pin", secondSolenoidPin field = "Idle Stepper Dir", idle_stepperDirectionPin - field = "Idle Stepper Dir Mode", stepperDirectionPinMode field = "Idle Stepper Step", idle_stepperStepPin field = "Idle Stepper Enable", stepperEnablePin field = "Fuel Pump Pin", fuelPumpPin - field = "Fuel Pump Pin Mode", fuelPumpPinMode field = "ETB#1 Dir #1", etbIo1_directionPin1 @@if_ts_show_etb_pins field = "ETB#1 Dir #2", etbIo1_directionPin2 @@if_ts_show_etb_pins - field = "ETB#1 Control #1", etbIo1_controlPin1 @@if_ts_show_etb_pins - field = "etb1_controlPinMode", etbIo1_controlPinMode @@if_ts_show_etb_pins + field = "ETB#1 Control #1", etbIo1_controlPin1 @@if_ts_show_etb_pins + field = "ETB#1 Disable", etbIo1_disablePin @@if_ts_show_etb_pins field = "ETB#2 Dir #1", etbIo2_directionPin1 @@if_ts_show_etb_pins field = "ETB#2 Dir #2", etbIo2_directionPin2 @@if_ts_show_etb_pins field = "ETB#2 Control #1", etbIo2_controlPin1 @@if_ts_show_etb_pins - field = "SD CS Pin", sdCardCsPin + field = "ETB#2 Disable", etbIo2_disablePin @@if_ts_show_etb_pins + field = "SD CS Pin", sdCardCsPin @@if_ts_show_sd_card field = "MIL / Check Engine Pin", malfunctionIndicatorPin - field = "MIL / Check Engine Pin Mode", malfunctionIndicatorPinMode field = "Aux Pin #1", auxPidPins1 field = "Aux Pin #2", auxPidPins2 field = "Aux Pin #3", auxPidPins3 field = "Aux Pin #4", auxPidPins4 field = "test557pin", test557pin field = "Fan Pin", fanPin - field = "Fan Pin Mode", fanPinMode field = "Main Relay Pin", mainRelayPin - field = "Main Relay Mode", mainRelayPinMode - field = "Starter Relay Pin", starterRelayPin - field = "Starter Relay Mode", starterRelayPinMode + field = "Starter Relay Pin", starterRelayDisablePin field = "aux valve #1", auxValves1 field = "aux valve #2", auxValves2 @@ -1840,9 +1954,12 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" field = "output #16", fsioOutputPins16 dialog = allPins2_3 + field = "LCD E pin", HD44780_e + field = "LCD D4 pin", HD44780_db4 + field = "LCD D5 pin", HD44780_db5 + field = "LCD D6 pin", HD44780_db6 + field = "LCD D7 pin", HD44780_db7 field = "Debug Trigger Sync", debugTriggerSync - field = "Debug Timer Callback", debugTimerCallback - field = "Debug Set Timer", debugSetTimer field = "Aux Fast Analog", auxFastSensor1_adcChannel dialog = allPins1_3 @@ -1852,31 +1969,32 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" field = "FSIO ADC #4", fsioAdc4 field = "GPS RX", gps_rx_pin @@if_ts_show_gps field = "GPS TX", gps_tx_pin @@if_ts_show_gps - field = "CAN RX pin", canRxPin - field = "CAN TX pin", canTxPin - field = "SPI1 MOSI", spi1mosiPin, {is_enabled_spi_1 == 1} - field = "SPI1 MISO", spi1misoPin, {is_enabled_spi_1 == 1} - field = "SPI1 SCK", spi1sckPin, {is_enabled_spi_1 == 1} - field = "SPI2 MOSI", spi2mosiPin, {is_enabled_spi_2 == 1} - field = "SPI2 MISO", spi2misoPin, {is_enabled_spi_2 == 1} - field = "SPI2 SCK", spi2sckPin, {is_enabled_spi_2 == 1} - field = "SPI3 MOSI", spi3mosiPin, {is_enabled_spi_3 == 1} - field = "SPI3 MISO", spi3misoPin, {is_enabled_spi_3 == 1} - field = "SPI3 SCK", spi3sckPin, {is_enabled_spi_3 == 1} + field = "CAN RX pin", canRxPin @@if_ts_show_can_pins + field = "CAN TX pin", canTxPin @@if_ts_show_can_pins + field = "SPI1 MOSI", spi1mosiPin, {is_enabled_spi_1 == 1} @@if_ts_show_spi + field = "SPI1 MISO", spi1misoPin, {is_enabled_spi_1 == 1} @@if_ts_show_spi + field = "SPI1 SCK", spi1sckPin, {is_enabled_spi_1 == 1} @@if_ts_show_spi + field = "SPI2 MOSI", spi2mosiPin, {is_enabled_spi_2 == 1} @@if_ts_show_spi + field = "SPI2 MISO", spi2misoPin, {is_enabled_spi_2 == 1} @@if_ts_show_spi + field = "SPI2 SCK", spi2sckPin, {is_enabled_spi_2 == 1} @@if_ts_show_spi + field = "SPI3 MOSI", spi3mosiPin, {is_enabled_spi_3 == 1} @@if_ts_show_spi + field = "SPI3 MISO", spi3misoPin, {is_enabled_spi_3 == 1} @@if_ts_show_spi + field = "SPI3 SCK", spi3sckPin, {is_enabled_spi_3 == 1} @@if_ts_show_spi field = "hip9011CsPin", hip9011CsPin field = "LIS302DLCsPin", LIS302DLCsPin field = "MIL / Check Engine", malfunctionIndicatorPin field = "Saab CDM knock", cdmInputPin field = "comm status light", communicationLedPin field = "running status light", runningLedPin - field = "TLE8888 Chip Select", tle8888_cs - field = "TLE8888 CS Mode", tle8888_csPinMode - field = "TLE 8888 spi", tle8888spiDevice + field = "TLE8888 Chip Select", tle8888_cs @@if_ts_show_spi + field = "TLE 8888 spi", tle8888spiDevice @@if_ts_show_spi field = "servo#1", servoOutputPins1 field = "servo#2", servoOutputPins2 field = "servo#3", servoOutputPins3 field = "servo#4", servoOutputPins4 field = "servo#5", servoOutputPins5 + field = "AUX Serial TX", auxSerialTxPin + field = "AUX Serial RX", auxSerialRxPin dialog = allPins1_1_and_2, "", xAxis @@ -2010,9 +2128,10 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" field = "Heater pin", o2heaterPin dialog = egoSettings, "", yAxis - panel = egoSettings_IO, {enableAemXSeries == 0} - panel = egoSettings_sensor, {afr_hwChannel != 16 && enableAemXSeries == 0} + panel = egoSettings_IO + panel = egoSettings_sensor, {afr_hwChannel != 16 && enableAemXSeries == 0 && !auxSerialRxPin && !auxSerialTxPin} field = "Enable AEM X-Series CANbus", enableAemXSeries, { canReadEnabled } + field = "Enable Innovate LC-2 Serial", enableInnovateLC2, { auxSerialRxPin && auxSerialTxPin } ; Engine->EGT inputs dialog = egtInputs, "EGT inputs" @@ -2039,9 +2158,11 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" field = "No1 Direction #1", etbIo1_directionPin1 field = "No1 Direction #2", etbIo1_directionPin2 field = "No1 Control #1", etbIo1_controlPin1, { etb_use_two_wires == 0 } + field = "No1 Disable", etbIo1_disablePin field = "No2 Direction #1", etbIo2_directionPin1 field = "No2 Direction #2", etbIo2_directionPin2 field = "No2 Control #1", etbIo2_controlPin1, { etb_use_two_wires == 0} + field = "No2 Disable", etbIo2_disablePin dialog = idleStepperHw, "Stepper Hardware" field = "Idle Stepper Step Pin", idle_stepperStepPin @@ -2126,27 +2247,33 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" field = "On temperature", fanOnTemperature field = "Off temperature", fanOffTemperature - dialog = fuelPump, "Fuel Rail" + dialog = fuelPumpConfig, "Fuel Pump" field = "Pin", fuelPumpPin field = "Pin mode", fuelPumpPinMode field = "Prime duration", startUpFuelPumpDuration + + dialog = fuelRailConfig, "Fuel Rail" field = "Absolute Fuel Pressure", absoluteFuelPressure field = "Fuel Rail pressure", fuelRailPressure, {absoluteFuelPressure == 1} + dialog = fuelPump, "" + panel = fuelPumpConfig + panel = fuelRailConfig + + ; Controller->Actuator Outputs dialog = mainRelay, "Main relay output" field = "Pin", mainRelayPin field = "Pin mode", mainRelayPinMode dialog = starterRelay, "Starter relay output" - field = "Pin", starterRelayPin - field = "Pin mode", starterRelayPinMode + field = "Pin", starterRelayDisablePin + field = "Pin mode", starterRelayDisableMode dialog = statusLeds, "Status LEDs" field = "Running status LED", runningLedPin field = "TS communication status LED", communicationLedPin field = "Trigger error LED", triggerErrorPin - ; field = "Fatal Error Led", fatalErrorPin ; Engine->MIL Settings dialog = malfunction, "Check Engine Settings" @@ -2272,34 +2399,40 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" field = "Min", alternatorControl_minValue, {isAlternatorControlEnabled == 1 && onOffAlternatorLogic == 0} field = "Max", alternatorControl_maxValue, {isAlternatorControlEnabled == 1 && onOffAlternatorLogic == 0} field = "#% duty = Pterm + Iterm + Dterm + offset%" - field = "Start/Stop Button Pin", startStopButtonPin - field = "Start/Stop Button Mode", startStopButtonMode + dialog = startStopDialog, "Start/Stop Button" + field = "Start/Stop Button Pin", startStopButtonPin + field = "Start/Stop Button Mode", startStopButtonMode + field = "Starter Control", starterControlPin, {startStopButtonPin != 0} + field = "Start cranking maximum time", startCrankingDuration, {startStopButtonPin != 0} dialog = energySystems, "Battery and Alternator Settings", yAxis panel = batteryDialog panel = alternator - - dialog = speedSensorLeft + panel = startStopDialog + + dialog = speedSensorAnalog field = "Input pin", vehicleSpeedSensorInputPin field = "revolution to speed mult", vehicleSpeedCoef + dialog = speedSensorCan + field = "Vss Car Type", canVssNbcType, { enableCanVss } + + dialog = speedSensorLeft, "Speed sensor config", yAxis + panel = speedSensorCan, { enableCanVss } + panel = speedSensorAnalog, { enableCanVss == 0 } + field = "Enable CANbus VSS values", enableCanVss, { canReadEnabled } + dialog = speedSensor, "Speed sensor", xAxis panel = speedSensorLeft gauge = VSSGauge - + ; Engine->Other inputs dialog = analogInputSettings, "Analog Input Settings" field = "!ECU reboot needed to apply these settings" field = "Use fixed baro corr from MAP", useFixedBaroCorrFromMap field = "Analog divider ratio", analogInputDividerCoefficient@@if_ts_show_analog_divider - field = "Use BiQuad averaging", useBiQuadAnalogFiltering - field = "Smoothing factor", slowAdcAlpha, {useBiQuadAnalogFiltering == 0} - field = "Bi_Q a0", biQuad_a0, {useBiQuadAnalogFiltering == 1} - field = "Bi_Q a1", biQuad_a1, {useBiQuadAnalogFiltering == 1} - field = "Bi_Q a2", biQuad_a2, {useBiQuadAnalogFiltering == 1} - field = "Bi_Q b1", biQuad_b1, {useBiQuadAnalogFiltering == 1} - field = "Bi_Q b2", biQuad_b2, {useBiQuadAnalogFiltering == 1} + field = "Smoothing factor", slowAdcAlpha dialog = tachSettings, "Tachometer output" field = "!See also dizzySparkOutputPin" @@ -2327,8 +2460,13 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" field = "Enable rusEfi CAN data", enableVerboseCanTx field = "rusEfi CAN data base address", verboseCanBaseAddress field = "Can Sleep Period", canSleepPeriodMs - field = "RX pin", canRxPin - field = "TX pin", canTxPin + field = "RX pin", canRxPin @@if_ts_show_can_pins + field = "TX pin", canTxPin @@if_ts_show_can_pins + + dialog = auxSerial, "AUX Serial" + field = "RX pin", auxSerialRxPin @@if_ts_show_auxserial_pins + field = "TX pin", auxSerialTxPin @@if_ts_show_auxserial_pins + field = "Serial Baud Rate", auxSerialSpeed @@if_ts_show_auxserial_pins dialog = sdCard, "SD Card Logger" field = "SdCard", isSdCardEnabled @@ -2355,19 +2493,19 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" field = "D7 pin", HD44780_db7 dialog = tle8888, "TLE8888", yAxis - field = "TLE8888 Chip Select", tle8888_cs - field = "TLE8888 SPI", tle8888spiDevice - field = "useTLE8888_hall_mode", useTLE8888_hall_mode + field = "TLE8888 Chip Select", tle8888_cs @@if_ts_show_spi + field = "TLE8888 SPI", tle8888spiDevice @@if_ts_show_spi + field = "Mode", tle8888mode field = "useTLE8888 cranking reset hack", useTLE8888_cranking_hack commandButton = "Reinit", cmd_tle8888_init dialog = connection, "", yAxis field = "ADC vRef voltage", adcVcc - panel = tsPort + panel = tsPort @@if_ts_show_tunerstudio_port panel = canBus - panel = sdCard + panel = auxSerial + panel = sdCard @@if_ts_show_sd_card panel = gpsReceiver @@if_ts_show_gps - panel = tle8888 dialog = joystickPanel, "Joystick" field = "joustick center button", joystickCenterPin @@ -2390,6 +2528,8 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" dialog = debugging, "Debug" field = "!https://rusefi.com/s/debugmode" field = "Debug mode", debugMode + field = "Warning Text", warning_message + field = "showHumanReadableWarning (affects Burn)", showHumanReadableWarning dialog = limits, "Limits" @@ -2495,7 +2635,7 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" field = "aux valve #1", auxValves1 field = "aux valve #2", auxValves2 field = "Start/Stop Button", startStopButtonPin - field = "" + field = "External Knock", externalKnockSenseAdc dialog = fsioFrequency, "Frequency" field = "freq #1", fsioFrequency1 @@ -2544,6 +2684,7 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" dialog = fsioFormulas, "FSIO Formulas" field = "!FSIO uses Reverse Polish Notation. Please read http://rusefi.com/s/fsio" + field = "#fsioinfo command in rusEfi console could be useful while troubleshooting those" field = "#1", fsioFormulas1 field = "#2", fsioFormulas2 field = "#3", fsioFormulas3 @@ -2640,43 +2781,37 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" field = "pFactor", etb_pFactor, {throttlePedalPositionAdcChannel != 16} field = "iFactor", etb_iFactor, {throttlePedalPositionAdcChannel != 16} field = "dFactor", etb_dFactor, {throttlePedalPositionAdcChannel != 16} - field = "offset", etb_offset, {throttlePedalPositionAdcChannel != 16} field = "control period", etb_periodMs, {throttlePedalPositionAdcChannel != 16} field = "pid min", etb_minValue, {throttlePedalPositionAdcChannel != 16} field = "pid max", etb_maxValue, {throttlePedalPositionAdcChannel != 16} field = "iTermMin", etb_iTermMin, {throttlePedalPositionAdcChannel != 16} field = "iTermMax", etb_iTermMax, {throttlePedalPositionAdcChannel != 16} + dialog = etbIdleDialog, "ETB Idle" + field = "use ETB for idle", useETBforIdleControl + field = "ETB idle maximum angle", etbIdleThrottleRange dialog = etbDialogLeft field = "https://rusefi.com/s/etb" field = "Detailed status in console", isVerboseETB field = "Pause ETB control", pauseEtbControl - field = "Throttle Pedal Up", throttlePedalUpVoltage - field = "Throttle Pedal Wide Open", throttlePedalWOTVoltage field = etbCalibrationOnStart, etbCalibrationOnStart - field = "TPS#2 min", tps2Min, { tps2_1AdcChannel != 16 } - field = "TPS#2 max", tps2Max, { tps2_1AdcChannel != 16 } ; we need the term about stepper idle in here, because there's a bug in TS that you can't have different visibility ; criteria for the same panel when used in multiple places panel = hbridgeHardware, { throttlePedalPositionAdcChannel != 16 || useStepperIdle && useHbridges } - panel = etbPidDialog + + dialog = etbAutotune, "PID Autotune" + field = "!Set debug mode below to 'ETB Autotune' to show results" + field = "Debug mode", debugMode + commandButton = "ETB PID Autotune", cmd_etb_autotune dialog = etbDialogRight - field = "!https://rusefi.com/s/debugmode" - field = "Neutral Position", etbNeutralPosition - field = "Debug mode", debugMode - field = "use ETB for idle", useETBforIdleControl - field = "ETB idle maximum angle", etbIdleThrottleRange - field = "Press buttons to calibrate sensors" - field = "You would have to remove air filter to move throttle manually" - commandButton = "TPS#1 closed position", cmd_calibrate_tps_1_closed - commandButton = "TPS#1 wide open position", cmd_calibrate_tps_1_wot - field = "Not many vehicles have two throttle bodies but some do" - commandButton = "TPS#2 closed position", cmd_calibrate_tps_2_closed - commandButton = "TPS#2 wide open position", cmd_calibrate_tps_2_wot - commandButton = "Pedal Up", cmd_calibrate_pedal_up - commandButton = "Pedal Down", cmd_calibrate_pedal_down + panel = etbIdleDialog + panel = etbPidDialog + panel = etbAutotune + + ; Neutral position handling not yet implemented! + ;field = "Neutral Position", etbNeutralPosition dialog = etbDialog, "Electronic Throttle Body (beta)", border topicHelp = "etbHelp" @@ -2705,12 +2840,13 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" commandButton = "Injector #8", cmd_test_inj8 dialog = testMisc, "Misc" - commandButton = "Come To Pit", cmd_call_from_pit +; commandButton = "Come To Pit", cmd_call_from_pit commandButton = "Fuel Pump", cmd_test_fuel_pump commandButton = "Radiator Fan", cmd_test_radiator_fan commandButton = "Check Engine", cmd_test_check_engine_light commandButton = "Idle Air Valve", cmd_test_idle_valve commandButton = "A/C Relay", cmd_test_ac_relay + commandButton = "Starter Relay", cmd_test_starter_relay commandButton = "Stop Engine", cmd_stop_engine commandButton = "Write Config", cmd_write_config commandButton = "Reset ECU", cmd_reset_controller @@ -2736,7 +2872,7 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" ; Board->ECU stimulator dialog = ecuStimulator, "ECU stimulator" field = "Trigger Simulator", triggerSimulatorFrequency - field = "self-stimulation", directSelfStimulation + commandButton = "Enable Internal Trigger Simulation", cmd_enable_self_stim field = "" field = "digipot spi", digitalPotentiometerSpiDevice field = "digipot CS #0", digitalPotentiometerChipSelect1 @@ -2813,7 +2949,94 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" field = "Ignition Math Logic @", ignMathCalculateAtIndex field = "MAP Averaging Logic @", mapAveragingSchedulingAtIndex - field = "Target temperature", postCrankingTargetClt + + help = helpGeneral, "rusEfi General Help" + webHelp = "http://www.rusefi.com/" + text = "" + + dialog = gppwm1left, "" + field = "Pin", gppwm1_pin + field = "" + field = "Set frequency to 0hz for on-off mode" + field = "Frequency", gppwm1_pwmFrequency, {gppwm1_pin != 0} + field = "" + field = "On above duty", gppwm1_onAboveDuty, {gppwm1_pin != 0 && gppwm1_pwmFrequency == 0} + field = "Off below duty", gppwm1_offBelowDuty, {gppwm1_pin != 0 && gppwm1_pwmFrequency == 0} + field = "Duty if error", gppwm1_dutyIfError, {gppwm1_pin != 0} + field = "" + field = "Load Axis", gppwm1_loadAxis, {gppwm1_pin != 0} + field = "" + field = "" + field = "" + field = "" + field = "" + + dialog = gppwm1, "General Purpose PWM 1", xAxis + panel = gppwm1left + panel = gppwm1Tbl, {gppwm1_pin != 0} + + dialog = gppwm2left, "" + field = "Pin", gppwm2_pin + field = "" + field = "Set frequency to 0hz for on-off mode" + field = "Frequency", gppwm2_pwmFrequency, {gppwm2_pin != 0} + field = "" + field = "On above duty", gppwm2_onAboveDuty, {gppwm2_pin != 0 && gppwm2_pwmFrequency == 0} + field = "Off below duty", gppwm2_offBelowDuty, {gppwm2_pin != 0 && gppwm2_pwmFrequency == 0} + field = "Duty if error", gppwm2_dutyIfError, {gppwm2_pin != 0} + field = "" + field = "Load Axis", gppwm2_loadAxis, {gppwm2_pin != 0} + field = "" + field = "" + field = "" + field = "" + field = "" + + dialog = gppwm2, "General Purpose PWM 2", xAxis + panel = gppwm2left + panel = gppwm2Tbl, {gppwm2_pin != 0} + + dialog = gppwm3left, "" + field = "Pin", gppwm3_pin + field = "" + field = "Set frequency to 0hz for on-off mode" + field = "Frequency", gppwm3_pwmFrequency, {gppwm3_pin != 0} + field = "" + field = "On above duty", gppwm3_onAboveDuty, {gppwm3_pin != 0 && gppwm3_pwmFrequency == 0} + field = "Off below duty", gppwm3_offBelowDuty, {gppwm3_pin != 0 && gppwm3_pwmFrequency == 0} + field = "Duty if error", gppwm3_dutyIfError, {gppwm3_pin != 0} + field = "" + field = "Load Axis", gppwm3_loadAxis, {gppwm3_pin != 0} + field = "" + field = "" + field = "" + field = "" + field = "" + + dialog = gppwm3, "General Purpose PWM 3", xAxis + panel = gppwm3left + panel = gppwm3Tbl, {gppwm3_pin != 0} + + dialog = gppwm4left, "" + field = "Pin", gppwm4_pin + field = "" + field = "Set frequency to 0hz for on-off mode" + field = "Frequency", gppwm4_pwmFrequency, {gppwm4_pin != 0} + field = "" + field = "On above duty", gppwm4_onAboveDuty, {gppwm4_pin != 0 && gppwm4_pwmFrequency == 0} + field = "Off below duty", gppwm4_offBelowDuty, {gppwm4_pin != 0 && gppwm4_pwmFrequency == 0} + field = "Duty if error", gppwm4_dutyIfError, {gppwm4_pin != 0} + field = "" + field = "Load Axis", gppwm4_loadAxis, {gppwm4_pin != 0} + field = "" + field = "" + field = "" + field = "" + field = "" + + dialog = gppwm4, "General Purpose PWM 4", xAxis + panel = gppwm4left + panel = gppwm4Tbl, {gppwm4_pin != 0} [Tools] ;addTool = toolName, PanelName diff --git a/firmware/tunerstudio/rusefi_frankenso.ini b/firmware/tunerstudio/rusefi_frankenso.ini index 4f7caa0e38..e147dd7944 100644 --- a/firmware/tunerstudio/rusefi_frankenso.ini +++ b/firmware/tunerstudio/rusefi_frankenso.ini @@ -40,11 +40,14 @@ enable2ndByteCanID = false ; settingOption = DEFAULT, "Speed Density" ; DEFAULT will be over looked and this will fall into the #else block of the statement. +[MegaTune] + ; https://rusefi.com/forum/viewtopic.php?p=36201#p36201 + signature = "rusEFI v1.2020.4" [TunerStudio] queryCommand = "S" versionInfo = "V" ; firmwave version for title bar. - signature = "rusEFI v1.2020.3" ; signature is expected to be 7 or more characters. + signature = "rusEFI v1.2020.4" ; signature is expected to be 7 or more characters. [Constants] ; new packet serial format with CRC @@ -66,6 +69,7 @@ enable2ndByteCanID = false ; we have current pageSize or (pageSize + 8) here? ; crc32CheckCommand = "k\x00\x00\x00\x00\x36\xB8" + retrieveConfigError = "e" ;communication settings pageActivationDelay = 500 ; Milliseconds delay after burn command. See https://sourceforge.net/p/rusefi/tickets/77/ @@ -85,7 +89,7 @@ enable2ndByteCanID = false ; see PAGE_0_SIZE in C source code ; CONFIG_DEFINITION_START -; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on integration\rusefi_config.txt Fri Mar 20 19:58:54 EDT 2020 +; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.bat integration\rusefi_config.txt Sun Apr 26 14:17:33 EDT 2020 pageSize = 20000 page = 1 @@ -94,7 +98,7 @@ page = 1 injector_flow = scalar, F32, 8, "cm3/min", 1, 0, 0, 99999, 2 injector_battLagCorrBins = array, F32, 12, [8], "volts", 1, 0, 0.0, 20.0, 2 injector_battLagCorr = array, F32, 44, [8], "ms", 1, 0, 0.0, 50.0, 2 - directSelfStimulation = bits, U32, 76, [0:0], "false", "true" + unused76b0 = bits, U32, 76, [0:0], "false", "true" activateAuxPid1 = bits, U32, 76, [1:1], "false", "true" isVerboseAuxPid1 = bits, U32, 76, [2:2], "false", "true" activateAuxPid2 = bits, U32, 76, [3:3], "false", "true" @@ -103,14 +107,14 @@ page = 1 isVerboseAuxPid3 = bits, U32, 76, [6:6], "false", "true" activateAuxPid4 = bits, U32, 76, [7:7], "false", "true" isVerboseAuxPid4 = bits, U32, 76, [8:8], "false", "true" - useBiQuadAnalogFiltering= bits, U32, 76, [9:9], "false", "true" + isCJ125Verbose = bits, U32, 76, [9:9], "false", "true" cj125isUaDivided = bits, U32, 76, [10:10], "false", "true" cj125isLsu49 = bits, U32, 76, [11:11], "false", "true" etb_use_two_wires = bits, U32, 76, [12:12], "false", "true" isDoubleSolenoidIdle = bits, U32, 76, [13:13], "false", "true" showSdCardWarning = bits, U32, 76, [14:14], "false", "true" cj125isUrDivided = bits, U32, 76, [15:15], "false", "true" - useTLE8888_hall_mode = bits, U32, 76, [16:16], "false", "true" + issue_294_unused = bits, U32, 76, [16:16], "false", "true" useTLE8888_cranking_hack= bits, U32, 76, [17:17], "false", "true" useInstantRpmForIdle = bits, U32, 76, [18:18], "false", "true" absoluteFuelPressure = bits, U32, 76, [19:19], "false", "true" @@ -118,7 +122,7 @@ page = 1 rollingLaunchEnabled = bits, U32, 76, [21:21], "false", "true" antiLagEnabled = bits, U32, 76, [22:22], "false", "true" useRunningMathForCranking= bits, U32, 76, [23:23], "Fixed", "Fuel Map" - issue_294_25 = bits, U32, 76, [24:24], "false", "true" + displayLogicLevelsInEngineSniffer= bits, U32, 76, [24:24], "false", "true" issue_294_26 = bits, U32, 76, [25:25], "false", "true" issue_294_27 = bits, U32, 76, [26:26], "false", "true" issue_294_28 = bits, U32, 76, [27:27], "false", "true" @@ -190,7 +194,7 @@ page = 1 fanOnTemperature = scalar, F32, 468, "*C", 1, 0, 0, 1000.0, 0 fanOffTemperature = scalar, F32, 472, "*C", 1, 0, 0, 1000.0, 0 vehicleSpeedCoef = scalar, F32, 476, "coef", 1, 0, 0.01, 2000.0, 2 - canNbcType = bits, U32, 480, [0:7], "BMW", "FIAT", "VAG" , "MAZDA RX8" + canNbcType = bits, U32, 480, [0:7], "None", "FIAT", "VAG" , "MAZDA RX8", "BMW", "W202" canSleepPeriodMs = scalar, S32, 484, "ms", 1, 0, 0, 1000.0, 2 ambiguousOperationMode = bits, U32, 488, [0:7], "INVALID", "4 stroke without cam sensor", "4 stroke with cam sensor", "2 stroke", "4 stroke with symmetrical crank (requires VVT input)", "INVALID", "INVALID", "INVALID" displayMode = bits, U32, 492, [0:7], "none", "hd44780", "hd44780 over pcf8574", "INVALID" @@ -204,9 +208,9 @@ page = 1 tps2_1AdcChannel = bits, U08, 515, [0:7] "Analog 3O","Analog 3L","Analog 3M","Analog 3J","Analog 3I","INVALID","Analog 3H","Analog 3G","INVALID","INVALID","INVALID","Analog 3P","Analog 3Q","Analog 3N","Analog VBatt","Analog 3E","NONE","INVALID","INVALID","INVALID" ;no TS info - skipping overrideCrankingIgnition offset 516 sensorChartFrequency = scalar, S32, 520, "index", 1, 0, 0, 300, 0 ; size 4 - trigger_type = bits, U32, 524, [0:7], "custom toothed wheel", "Ford Aspire", "Dodge Neon 1995", "Miata NA", "Miata NB", "GM_7X", "Cooper R50", "Mazda SOHC 4", "60/2", "36/1", "Honda 4+24+1", "Mitsubishi", "Honda 4+24", "Honda 1+4+24", "Dodge Neon 2003", "Mazda DOHC 1+4", "1+1", "1+60/2", "Single Tooth", "Dodge Ram 1+16", "60/2 VW", "Honda 1+24", "Dodge Stratus", "36_2_2_2", "Nissan Primera", "2JZ", "Rover K", "GM LS 24", "Honda CBR 600", "2JZ_1_12", "Honda CBR 600 custom", "3/1 skipped" , "Dodge Neon 2003 crank", "Miata VVT", "trg34", "trg35", "Subaru 7+6", "Jeep 18-2-2-2", "WIP", "Dodge Neon 1995 crank only", "Jeep XJ 4 cyl", "FiatIAQ_P8", "Mazda Z5", "trg43", "trg44", "trg45", "INVALID" - trigger_unusedTriggerBit0= bits, U32, 528, [0:0], "false", "true" - trigger_unusedTriggerBit1= bits, U32, 528, [1:1], "false", "true" + trigger_type = bits, U32, 524, [0:7], "custom toothed wheel", "Ford Aspire", "Dodge Neon 1995", "Miata NA", "Miata NB", "GM_7X", "Cooper R50", "Mazda SOHC 4", "60/2", "36/1", "Honda 4+24+1", "Mitsubishi", "Honda 4+24", "Honda 1+4+24", "Dodge Neon 2003", "Mazda DOHC 1+4", "1+1", "1+60/2", "Single Tooth", "Dodge Ram 1+16", "60/2 VW", "Honda 1+24", "Dodge Stratus", "36_2_2_2", "Nissan Primera", "2JZ", "Rover K", "GM LS 24", "Honda CBR 600", "2JZ_1_12", "Honda CBR 600 custom", "3/1 skipped" , "Dodge Neon 2003 crank", "Miata VVT", "trg34", "trg35", "Subaru 7+6", "Jeep 18-2-2-2", "WIP", "Dodge Neon 1995 crank only", "Jeep XJ 4 cyl", "FiatIAQ_P8", "Mazda Z5", "trg43", "Renix 44-2-2", "Renix 66-2-2-2", "Honda K 12+1", "trg47", "trg48", "INVALID" + trigger_todoRemoveMeOneDay0= bits, U32, 528, [0:0], "false", "true" + trigger_todoRemoveMeOneDay1= bits, U32, 528, [1:1], "false", "true" trigger_useOnlyFirstChannel= bits, U32, 528, [2:2], "false", "true" trigger_unusedBit_4_3 = bits, U32, 528, [3:3], "false", "true" trigger_unusedBit_4_4 = bits, U32, 528, [4:4], "false", "true" @@ -245,7 +249,7 @@ page = 1 mafAdcChannel = bits, U08, 543, [0:7] "Analog 3O","Analog 3L","Analog 3M","Analog 3J","Analog 3I","INVALID","Analog 3H","Analog 3G","INVALID","INVALID","INVALID","Analog 3P","Analog 3Q","Analog 3N","Analog VBatt","Analog 3E","NONE","INVALID","INVALID","INVALID" globalFuelCorrection = scalar, F32, 544, "coef", 1, 0.0, 0, 1000.0, 2 adcVcc = scalar, F32, 548, "volts", 1, 0.0, 0, 6.0, 3 -;no TS info - skipping maxKnockSubDeg offset 552 + maxKnockSubDeg = scalar, F32, 552, "Deg", 1, 0, 0, 100, 0 camInputs1 = bits, U08, 556, [0:7], "NONE", "INVALID", "INVALID", "PA1", "PA2", "PA3", "INVALID", "PA5", "PA6", "PA7", "PA8", "PA9", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "PA15", "INVALID", "INVALID", "INVALID", "PB3", "PB4", "PB5", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "PC6", "PC7", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "PE5", "PE6", "INVALID", "INVALID", "PE9", "INVALID", "PE11", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" camInputs2 = bits, U08, 557, [0:7], "NONE", "INVALID", "INVALID", "PA1", "PA2", "PA3", "INVALID", "PA5", "PA6", "PA7", "PA8", "PA9", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "PA15", "INVALID", "INVALID", "INVALID", "PB3", "PB4", "PB5", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "PC6", "PC7", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "PE5", "PE6", "INVALID", "INVALID", "PE9", "INVALID", "PE11", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" camInputs3 = bits, U08, 558, [0:7], "NONE", "INVALID", "INVALID", "PA1", "PA2", "PA3", "INVALID", "PA5", "PA6", "PA7", "PA8", "PA9", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "PA15", "INVALID", "INVALID", "INVALID", "PB3", "PB4", "PB5", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "PC6", "PC7", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "PE5", "PE6", "INVALID", "INVALID", "PE9", "INVALID", "PE11", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" @@ -349,13 +353,13 @@ page = 1 canTxPin = bits, U08, 708, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" canRxPin = bits, U08, 709, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" throttlePedalUpPinMode = scalar, U08, 710, "todo", 1, 0, 0, 20, 1 - debugTimerCallback = bits, U08, 711, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" +;no TS info - skipping unused711 offset 711 ;no TS info - skipping idleThreadPeriodMs offset 712 ;no TS info - skipping consoleLoopPeriodMs offset 716 ;no TS info - skipping lcdThreadPeriodMs offset 720 ;no TS info - skipping generalPeriodicThreadPeriodMs offset 724 tunerStudioSerialSpeed = scalar, U32, 728, "BPs", 1, 0, 0,1000000, 0 - canDeviceMode = bits, U32, 732, [0:7], "v0", "v1" +;no TS info - skipping anUnused4Bytes offset 732 triggerSimulatorPins1 = bits, U08, 736, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" triggerSimulatorPins2 = bits, U08, 737, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" triggerSimulatorPins3 = bits, U08, 738, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" @@ -405,7 +409,8 @@ page = 1 hip9011IntHoldPin = bits, U08, 754, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" hip9011IntHoldPinMode = bits, U08, 755, [0:7], "default", "default inverted", "open collector", "open collector inverted" verboseCanBaseAddress = scalar, U32, 756, "", 1, 0, 0, 536870911, 0 -;no TS info - skipping unrealisticRpmThreashold offset 760 + mc33_hvolt = scalar, U08, 760, "v", 1, 0, 0, 100, 0 +;no TS info - skipping unusedHere offset 761 gpioPinModes1 = bits, U08, 764, [0:7], "default", "default inverted", "open collector", "open collector inverted" gpioPinModes2 = bits, U08, 765, [0:7], "default", "default inverted", "open collector", "open collector inverted" gpioPinModes3 = bits, U08, 766, [0:7], "default", "default inverted", "open collector", "open collector inverted" @@ -447,7 +452,7 @@ page = 1 max31855_cs7 = bits, U08, 802, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" max31855_cs8 = bits, U08, 803, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" sdCardPeriodMs = scalar, S16, 804, "ms", 1, 0, 0, 30000, 0 - debugSetTimer = bits, U08, 806, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" +;no TS info - skipping unused806 offset 806 debugMapAveraging = bits, U08, 807, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" starterRelayDisablePin = bits, U08, 808, [0:7], "NONE","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","Injector 3Z","Injector 3Y","Injector 3W","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","Coil 1H","INVALID","Coil 1F","INVALID","INVALID","INVALID","Injector 2M","INVALID","INVALID","INVALID","INVALID","INVALID","Injector 3U","INVALID","Injector 3X","INVALID","Injector 2N","Coil 1O","Coil 1P","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","Injector 3V","Injector 3S","Injector 3T","Injector 2O","Injector 2P","INVALID","Coil 1L","INVALID","Coil 1I","INVALID","Coil 1M","INVALID","Coil 1G","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID" starterRelayDisableMode = bits, U08, 809, [0:7], "default", "default inverted", "open collector", "open collector inverted" @@ -456,8 +461,9 @@ page = 1 mapMinBufferLength = scalar, S32, 812, "count", 1, 0, 0, 24, 0 idlePidDeactivationTpsThreshold = scalar, S16, 816, "%", 1, 0, 0, 100.0, 0 stepperParkingExtraSteps = scalar, S16, 818, "%", 1, 0, 0, 3000.0, 0 - unusedmiataNb2VVTRatioFrom = scalar, F32, 820, "value", 1, 0, 0, 1000, 5 - unusedmiataNb2VVTRatioTo = scalar, F32, 824, "value", 1, 0, 0, 1000, 5 +;no TS info - skipping unusedAntilagTimeout offset 820 +;no TS info - skipping antiLagRpmTreshold offset 824 + startCrankingDuration = scalar, S16, 826, "Seconds", 1, 0, 0, 30, 0 triggerErrorPin = bits, U08, 828, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" triggerErrorPinMode = bits, U08, 829, [0:7], "default", "default inverted", "open collector", "open collector inverted" acRelayPin = bits, U08, 830, [0:7], "NONE","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","Injector 3Z","Injector 3Y","Injector 3W","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","Coil 1H","INVALID","Coil 1F","INVALID","INVALID","INVALID","Injector 2M","INVALID","INVALID","INVALID","INVALID","INVALID","Injector 3U","INVALID","Injector 3X","INVALID","Injector 2N","Coil 1O","Coil 1P","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","Injector 3V","Injector 3S","Injector 3T","Injector 2O","Injector 2P","INVALID","Coil 1L","INVALID","Coil 1I","INVALID","Coil 1M","INVALID","Coil 1G","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID" @@ -539,12 +545,12 @@ page = 1 todoClutchDownPinInverted= bits, U32, 976, [1:1], "false", "true" useHbridges = bits, U32, 976, [2:2], "false", "true" multisparkEnable = bits, U32, 976, [3:3], "false", "true" - unusedBit_251_4 = bits, U32, 976, [4:4], "false", "true" - unusedBit_251_5 = bits, U32, 976, [5:5], "false", "true" - unusedBit_251_6 = bits, U32, 976, [6:6], "false", "true" - unusedBit_251_7 = bits, U32, 976, [7:7], "false", "true" - unusedBit_251_8 = bits, U32, 976, [8:8], "false", "true" - unusedBit_251_9 = bits, U32, 976, [9:9], "false", "true" + enableLaunchRetard = bits, U32, 976, [4:4], "false", "true" + enableLaunchBoost = bits, U32, 976, [5:5], "false", "true" + launchDisableBySpeed = bits, U32, 976, [6:6], "false", "true" + enableCanVss = bits, U32, 976, [7:7], "false", "true" + enableInnovateLC2 = bits, U32, 976, [8:8], "false", "true" + showHumanReadableWarning= bits, U32, 976, [9:9], "false", "true" unusedBit_251_10 = bits, U32, 976, [10:10], "false", "true" unusedBit_251_11 = bits, U32, 976, [11:11], "false", "true" unusedBit_251_12 = bits, U32, 976, [12:12], "false", "true" @@ -565,16 +571,16 @@ page = 1 unusedBit_251_27 = bits, U32, 976, [27:27], "false", "true" unusedBit_251_28 = bits, U32, 976, [28:28], "false", "true" unusedBit_251_29 = bits, U32, 976, [29:29], "false", "true" - unusedBit_280_30 = bits, U32, 976, [30:30], "false", "true" - unusedBit_280_31 = bits, U32, 976, [31:31], "false", "true" + unusedBit_282_30 = bits, U32, 976, [30:30], "false", "true" + unusedBit_282_31 = bits, U32, 976, [31:31], "false", "true" etbIo1_directionPin1 = bits, U08, 980, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" etbIo1_directionPin2 = bits, U08, 981, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" etbIo1_controlPin1 = bits, U08, 982, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" - etbIo1_controlPinMode = bits, U08, 983, [0:7], "default", "default inverted", "open collector", "open collector inverted" + etbIo1_disablePin = bits, U08, 983, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" etbIo2_directionPin1 = bits, U08, 984, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" etbIo2_directionPin2 = bits, U08, 985, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" etbIo2_controlPin1 = bits, U08, 986, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" - etbIo2_controlPinMode = bits, U08, 987, [0:7], "default", "default inverted", "open collector", "open collector inverted" + etbIo2_disablePin = bits, U08, 987, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" boostControlPin = bits, U08, 988, [0:7], "NONE","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","Injector 3Z","Injector 3Y","Injector 3W","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","Coil 1H","INVALID","Coil 1F","INVALID","INVALID","INVALID","Injector 2M","INVALID","INVALID","INVALID","INVALID","INVALID","Injector 3U","INVALID","Injector 3X","INVALID","Injector 2N","Coil 1O","Coil 1P","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","Injector 3V","Injector 3S","Injector 3T","Injector 2O","Injector 2P","INVALID","Coil 1L","INVALID","Coil 1I","INVALID","Coil 1M","INVALID","Coil 1G","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID" boostControlPinMode = bits, U08, 989, [0:7], "default", "default inverted", "open collector", "open collector inverted" antiLagActivatePin = bits, U08, 990, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" @@ -596,7 +602,30 @@ page = 1 launchFuelAdded = scalar, S32, 1040, "%", 1, 0, 0, 100.0, 0 launchBoostDuty = scalar, S32, 1044, "%", 1, 0, 0, 100.0, 0 hardCutRpmRange = scalar, S32, 1048, "rpm", 1, 0, 0, 3000.0, 2 -;no TS info - skipping unusedAtOldBoardConfigurationEnd offset 1052 +;no TS info - skipping launchAdvanceRpmRange offset 1052 +;no TS info - skipping launchTpsTreshold offset 1056 +;no TS info - skipping launchActivateDelay offset 1060 + stft_maxIdleRegionRpm = scalar, U08, 1064, "RPM", 50, 0, 0.0, 12000.0, 0 + stft_maxOverrunLoad = scalar, U08, 1065, "load", 1, 0, 0.0, 250, 0 + stft_minPowerLoad = scalar, U08, 1066, "load", 1, 0, 0.0, 250, 0 + stft_deadband = scalar, U08, 1067, "%", 0.1, 0, 0, 3, 1 + stft_minClt = scalar, S08, 1068, "C", 1, 0, -20, 100, 0 + stft_minAfr = scalar, U08, 1069, "afr", 0.1, 0, 10, 20, 1 + stft_maxAfr = scalar, U08, 1070, "afr", 0.1, 0, 10, 20, 1 + stft_startupDelay = scalar, U08, 1071, "seconds", 1, 0, 0, 250, 0 + stft_cellCfgs1_maxAdd = scalar, S08, 1072, "%", 1, 0, 0, 25, 0 + stft_cellCfgs1_maxRemove = scalar, S08, 1073, "%", 1, 0, -25, 0, 0 + stft_cellCfgs1_timeConstant = scalar, U16, 1074, "sec", 0.1, 0, 0.1, 100, 2 + stft_cellCfgs2_maxAdd = scalar, S08, 1076, "%", 1, 0, 0, 25, 0 + stft_cellCfgs2_maxRemove = scalar, S08, 1077, "%", 1, 0, -25, 0, 0 + stft_cellCfgs2_timeConstant = scalar, U16, 1078, "sec", 0.1, 0, 0.1, 100, 2 + stft_cellCfgs3_maxAdd = scalar, S08, 1080, "%", 1, 0, 0, 25, 0 + stft_cellCfgs3_maxRemove = scalar, S08, 1081, "%", 1, 0, -25, 0, 0 + stft_cellCfgs3_timeConstant = scalar, U16, 1082, "sec", 0.1, 0, 0.1, 100, 2 + stft_cellCfgs4_maxAdd = scalar, S08, 1084, "%", 1, 0, 0, 25, 0 + stft_cellCfgs4_maxRemove = scalar, S08, 1085, "%", 1, 0, -25, 0, 0 + stft_cellCfgs4_timeConstant = scalar, U16, 1086, "sec", 0.1, 0, 0.1, 100, 2 +;no TS info - skipping unusedAtOldBoardConfigurationEnd offset 1088 vvtDisplayInverted = bits, U32, 1464, [0:0], "false", "true" fuelClosedLoopCorrectionEnabled= bits, U32, 1464, [1:1], "false", "true" isVerboseIAC = bits, U32, 1464, [2:2], "false", "true" @@ -726,7 +755,7 @@ page = 1 tps2Max = scalar, S16, 1770, "ADC", 1, 0, 0, 1023, 0 starterControlPin = bits, U08, 1772, [0:7], "NONE","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","Injector 3Z","Injector 3Y","Injector 3W","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","Coil 1H","INVALID","Coil 1F","INVALID","INVALID","INVALID","Injector 2M","INVALID","INVALID","INVALID","INVALID","INVALID","Injector 3U","INVALID","Injector 3X","INVALID","Injector 2N","Coil 1O","Coil 1P","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","Injector 3V","Injector 3S","Injector 3T","Injector 2O","Injector 2P","INVALID","Coil 1L","INVALID","Coil 1I","INVALID","Coil 1M","INVALID","Coil 1G","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID" startStopButtonMode = scalar, U08, 1773, "todo", 1, 0, 0, 20, 1 -;no TS info - skipping unusedFormerWarmupAfrPid offset 1774 + mc33816_flag0 = bits, U08, 1774, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" tachPulsePerRev = scalar, U08, 1775, "Pulse", 1, 0, 1.0, 255.0, 0 mapErrorDetectionTooLow = scalar, F32, 1776, "kPa", 1, 0, -100.0, 100.0, 2 mapErrorDetectionTooHigh = scalar, F32, 1780, "kPa", 1, 0, -100.0, 800.0, 2 @@ -761,9 +790,9 @@ page = 1 startOfCrankingPrimingPulse = scalar, F32, 2032, "ms", 1, 0, 0, 200, 1 afterCrankingIACtaperDuration = scalar, S16, 2036, "cycles", 1, 0, 0, 5000, 0 iacByTpsTaper = scalar, S16, 2038, "percent", 1, 0, 0, 500, 0 - unusedErrorPin = bits, U08, 2040, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" + auxSerialTxPin = bits, U08, 2040, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" warningLedPin = bits, U08, 2041, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" - unused1234234 = bits, U08, 2042, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" + auxSerialRxPin = bits, U08, 2042, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" LIS302DLCsPin = bits, U08, 2043, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" tpsAccelLength = scalar, S32, 2044, "cycles", 1, 0, 1, 200, 0 tpsAccelEnrichmentThreshold = scalar, F32, 2048, "roc", 1, 0, 0, 200, 3 @@ -777,8 +806,9 @@ page = 1 tpsDecelEnleanmentThreshold = scalar, F32, 2080, "roc", 1, 0, 0, 200, 3 tpsDecelEnleanmentMultiplier = scalar, F32, 2084, "coeff", 1, 0, 0, 200, 3 slowAdcAlpha = scalar, F32, 2088, "coeff", 1, 0, 0, 200, 3 - debugMode = bits, U32, 2092, [0:7], "Alternator PID", "TPS acceleration enrichment", "INVALID", "Idle Control", "Engine Load accl enrich", "Trigger Counters", "FSIO_ADC", "AUX_PID_1", "VVT input", "Cranking", "Timing", "Closed-loop fuel corr PID", "VSS", "SD card", "sr5", "Knock", "Trigger Sync", "Electronic Throttle", "Executor", "Bench Test / TS commands", "Aux Valves", "Analog inputs #1", "INSTANT_RPM", "FSIO_EXPRESSION", "Status", "CJ125", "CAN", "MAP", "Metrics", "ETB#2", "Ion Sense", "TLE8888", "Analog inputs #2", "Dwell Metric", "Aux Temperature", "ETB Logic", "Boost Control" -;no TS info - skipping unused_former_warmup_target_afr offset 2096 + debugMode = bits, U32, 2092, [0:7], "Alternator PID", "TPS acceleration enrichment", "INVALID", "Idle Control", "Engine Load accl enrich", "Trigger Counters", "FSIO_ADC", "AUX_PID_1", "VVT input", "Cranking", "Timing", "Closed-loop fuel corr PID", "VSS", "SD card", "sr5", "Knock", "mode16", "Electronic Throttle", "Executor", "Bench Test / TS commands", "Aux Valves", "Analog inputs #1", "INSTANT_RPM", "FSIO_EXPRESSION", "Status", "CJ125", "CAN", "MAP", "Metrics", "ETB#2", "Ion Sense", "TLE8888", "Analog inputs #2", "Dwell Metric", "INVALID", "ETB Logic", "Boost Control", "Start/Stop", "Launch", "ETB Autotune", "Mode40" + auxSerialSpeed = scalar, U32, 2096, "BPs", 1, 0, 0,1000000, 0 +;no TS info - skipping unused_former_warmup_target_afr offset 2100 boostCutPressure = scalar, F32, 2132, "kPa", 1, 0, 0, 500, 0 mapAccelTaperBins = array, F32, 2136, [8], "counter", 1, 0, 0.0, 300, 0 mapAccelTaperMult = array, F32, 2168, [8], "mult", 1, 0, 0.0, 300, 2 @@ -812,18 +842,15 @@ page = 1 narrowToWideOxygenBins = array, F32, 2264, [8], "V", 1, 0, -10.0, 10.0, 3 narrowToWideOxygen = array, F32, 2296, [8], "ratio", 1, 0, -40.0, 40.0, 2 vvtMode = bits, U32, 2328, [0:7], "First half", "Second half", "2GZ", "Miata NB2", "mode4", "mode5", "mode6", "mode7" - biQuad_a0 = scalar, F32, 2332, "v", 1, 0, -1000, 1000, 9 - biQuad_a1 = scalar, F32, 2336, "v", 1, 0, -1000, 1000, 9 - biQuad_a2 = scalar, F32, 2340, "v", 1, 0, -1000, 1000, 9 - biQuad_b1 = scalar, F32, 2344, "v", 1, 0, -1000, 1000, 9 - biQuad_b2 = scalar, F32, 2348, "v", 1, 0, -1000, 1000, 9 +;no TS info - skipping unusedOldBiquad offset 2332 cltTimingBins = array, F32, 2352, [8], "C", 1, 0, -100.0, 250.0, 1 cltTimingExtra = array, F32, 2384, [8], "degree", 1, 0, -400.0, 400.0, 0 - nbVvtIndex = scalar, S32, 2416, "index", 1, 0, 0, 4.0, 0 + tle8888mode = bits, U08, 2416, [0:7], "Auto", "SemiAuto", "Manual", "Hall" +;no TS info - skipping unusedSomethingWasHere offset 2417 ;no TS info - skipping autoTuneCltThreshold offset 2420 ;no TS info - skipping autoTuneTpsRocThreshold offset 2424 ;no TS info - skipping autoTuneTpsQuietPeriod offset 2428 - postCrankingTargetClt = scalar, F32, 2432, "C", 1, 0, 0, 100, 0 +;no TS info - skipping unused2432 offset 2432 postCrankingFactor = scalar, F32, 2436, "mult", 1, 0, 0, 100, 4 postCrankingDurationSec = scalar, F32, 2440, "seconds", 1, 0, 0, 100, 2 auxTempSensor1_tempC_1 = scalar, F32, 2444, "*C", 1, 0, -40, 200, 1 @@ -1010,13 +1037,59 @@ page = 1 iacPidMultTable = array, U08, 4060, [8x8],"%", 1, 0, 0, 999, 2 iacPidMultLoadBins = array, U08, 4124, [8], "Load", 1, 0.0, 0, 500.0, 2 iacPidMultRpmBins = array, U08, 4132, [8], "RPM", 50, 0, 0.0, 12000.0, 0 -;no TS info - skipping mainUnusedEnd offset 4140 + canVssNbcType = bits, U32, 4140, [0:7], "BMW_e46", "W202" + gppwm1_pin = bits, U08, 4144, [0:7], "NONE","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","Injector 3Z","Injector 3Y","Injector 3W","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","Coil 1H","INVALID","Coil 1F","INVALID","INVALID","INVALID","Injector 2M","INVALID","INVALID","INVALID","INVALID","INVALID","Injector 3U","INVALID","Injector 3X","INVALID","Injector 2N","Coil 1O","Coil 1P","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","Injector 3V","Injector 3S","Injector 3T","Injector 2O","Injector 2P","INVALID","Coil 1L","INVALID","Coil 1I","INVALID","Coil 1M","INVALID","Coil 1G","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID" + gppwm1_dutyIfError = scalar, U08, 4145, "%", 1, 0, 0, 100, 0 + gppwm1_pwmFrequency = scalar, U16, 4146, "hz", 1, 0, 0, 500, 0 + gppwm1_onAboveDuty = scalar, U08, 4148, "%", 1, 0, 0, 100, 0 + gppwm1_offBelowDuty = scalar, U08, 4149, "%", 1, 0, 0, 100, 0 + gppwm1_loadAxis = bits, U08, 4150, [0:1], "TPS", "MAP", "CLT", "IAT" +;no TS info - skipping gppwm1_pad offset 4151 + gppwm1_loadBins = array, U08, 4152, [8], "load", 1, 0, 0.0, 250, 0 + gppwm1_rpmBins = array, U08, 4160, [8], "RPM", 50, 0, 0.0, 12000.0, 0 + gppwm1_table = array, U08, 4168, [8x8], "duty", 1, 0, 0, 100, 0 + gppwm2_pin = bits, U08, 4232, [0:7], "NONE","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","Injector 3Z","Injector 3Y","Injector 3W","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","Coil 1H","INVALID","Coil 1F","INVALID","INVALID","INVALID","Injector 2M","INVALID","INVALID","INVALID","INVALID","INVALID","Injector 3U","INVALID","Injector 3X","INVALID","Injector 2N","Coil 1O","Coil 1P","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","Injector 3V","Injector 3S","Injector 3T","Injector 2O","Injector 2P","INVALID","Coil 1L","INVALID","Coil 1I","INVALID","Coil 1M","INVALID","Coil 1G","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID" + gppwm2_dutyIfError = scalar, U08, 4233, "%", 1, 0, 0, 100, 0 + gppwm2_pwmFrequency = scalar, U16, 4234, "hz", 1, 0, 0, 500, 0 + gppwm2_onAboveDuty = scalar, U08, 4236, "%", 1, 0, 0, 100, 0 + gppwm2_offBelowDuty = scalar, U08, 4237, "%", 1, 0, 0, 100, 0 + gppwm2_loadAxis = bits, U08, 4238, [0:1], "TPS", "MAP", "CLT", "IAT" +;no TS info - skipping gppwm2_pad offset 4239 + gppwm2_loadBins = array, U08, 4240, [8], "load", 1, 0, 0.0, 250, 0 + gppwm2_rpmBins = array, U08, 4248, [8], "RPM", 50, 0, 0.0, 12000.0, 0 + gppwm2_table = array, U08, 4256, [8x8], "duty", 1, 0, 0, 100, 0 + gppwm3_pin = bits, U08, 4320, [0:7], "NONE","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","Injector 3Z","Injector 3Y","Injector 3W","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","Coil 1H","INVALID","Coil 1F","INVALID","INVALID","INVALID","Injector 2M","INVALID","INVALID","INVALID","INVALID","INVALID","Injector 3U","INVALID","Injector 3X","INVALID","Injector 2N","Coil 1O","Coil 1P","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","Injector 3V","Injector 3S","Injector 3T","Injector 2O","Injector 2P","INVALID","Coil 1L","INVALID","Coil 1I","INVALID","Coil 1M","INVALID","Coil 1G","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID" + gppwm3_dutyIfError = scalar, U08, 4321, "%", 1, 0, 0, 100, 0 + gppwm3_pwmFrequency = scalar, U16, 4322, "hz", 1, 0, 0, 500, 0 + gppwm3_onAboveDuty = scalar, U08, 4324, "%", 1, 0, 0, 100, 0 + gppwm3_offBelowDuty = scalar, U08, 4325, "%", 1, 0, 0, 100, 0 + gppwm3_loadAxis = bits, U08, 4326, [0:1], "TPS", "MAP", "CLT", "IAT" +;no TS info - skipping gppwm3_pad offset 4327 + gppwm3_loadBins = array, U08, 4328, [8], "load", 1, 0, 0.0, 250, 0 + gppwm3_rpmBins = array, U08, 4336, [8], "RPM", 50, 0, 0.0, 12000.0, 0 + gppwm3_table = array, U08, 4344, [8x8], "duty", 1, 0, 0, 100, 0 + gppwm4_pin = bits, U08, 4408, [0:7], "NONE","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","Injector 3Z","Injector 3Y","Injector 3W","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","Coil 1H","INVALID","Coil 1F","INVALID","INVALID","INVALID","Injector 2M","INVALID","INVALID","INVALID","INVALID","INVALID","Injector 3U","INVALID","Injector 3X","INVALID","Injector 2N","Coil 1O","Coil 1P","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","Injector 3V","Injector 3S","Injector 3T","Injector 2O","Injector 2P","INVALID","Coil 1L","INVALID","Coil 1I","INVALID","Coil 1M","INVALID","Coil 1G","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID" + gppwm4_dutyIfError = scalar, U08, 4409, "%", 1, 0, 0, 100, 0 + gppwm4_pwmFrequency = scalar, U16, 4410, "hz", 1, 0, 0, 500, 0 + gppwm4_onAboveDuty = scalar, U08, 4412, "%", 1, 0, 0, 100, 0 + gppwm4_offBelowDuty = scalar, U08, 4413, "%", 1, 0, 0, 100, 0 + gppwm4_loadAxis = bits, U08, 4414, [0:1], "TPS", "MAP", "CLT", "IAT" +;no TS info - skipping gppwm4_pad offset 4415 + gppwm4_loadBins = array, U08, 4416, [8], "load", 1, 0, 0.0, 250, 0 + gppwm4_rpmBins = array, U08, 4424, [8], "RPM", 50, 0, 0.0, 12000.0, 0 + gppwm4_table = array, U08, 4432, [8x8], "duty", 1, 0, 0, 100, 0 +;no TS info - skipping mainUnusedEnd offset 4496 + warning_message = string, ASCII, 6000, 120 + afterstartCoolantBins = array, F32, 6120, [8], "C", 1, 0, -100.0, 250.0, 0 + afterstartHoldTime = array, F32, 6152, [8], "Seconds", 1, 0, 0, 100, 1 + afterstartEnrich = array, F32, 6184, [8], "%", 1, 0, 0, 600, 1 + afterstartDecayTime = array, F32, 6216, [8], "Seconds", 1, 0, 0, 100, 1 boostTableOpenLoop = array, U08, 6248, [8x8],"", 2, 0 , 0, 3000, 0 boostMapBins = array, U08, 6312, [8], "", 2, 0, 0, 600.0, 1 boostRpmBins = array, U08, 6320, [8], "RPM", 50, 0, 0.0, 12000.0, 0 boostTableClosedLoop = array, U08, 6328, [8x8],"", 2, 0 , 0, 3000, 0 boostTpsBins = array, U08, 6392, [8], "%", 2, 0.0, 0, 100.0, 2 - pedalToTpsTable = array, U08, 6400, [8x8],"deg", 1, 0, -720, 720, 2 + pedalToTpsTable = array, U08, 6400, [8x8],"%", 1, 0, 0, 100, 0 pedalToTpsPedalBins = array, U08, 6464, [8], "%", 1, 0, 0.0, 120.0, 0 pedalToTpsRpmBins = array, U08, 6472, [8], "RPM", 50, 0, 0.0, 12000.0, 0 cltCrankingCorrBins = array, F32, 6480, [8], "C", 1, 0, -100.0, 250.0, 2 @@ -1091,8 +1164,8 @@ page = 1 ; total TS size = 20000 [SettingContextHelp] injector_flow = "This is your injector flow at the fuel pressure used in the vehicle. cc/min, cubic centimetre per minute\nBy the way, g/s = 0.125997881 * (lb/hr)\ng/s = 0.125997881 * (cc/min)/10.5\ng/s = 0.0119997981 * cc/min" - directSelfStimulation = "Should trigger emulator push data right into trigger handling logic, eliminating the need for physical jumper wires?\nSee also triggerSimulatorPins\nPS: Funny name, right? :)" cj125isUaDivided = "Is your UA CJ125 output wired to MCU via resistor divider?" + etb_use_two_wires = "TLE7209 uses two-wire mode. TLE9201 and VNH2SP30 do NOT use two wire mode." cj125isUrDivided = "Is your UR CJ125 output wired to MCU via resistor divider?\nLooks like 3v range should be enough, divider generally not needed." absoluteFuelPressure = "If your fuel regulator does not have vacuum line" tpsErrorDetectionTooLow = "TPS error detection, what TPS % value is unrealistically low" @@ -1150,6 +1223,14 @@ page = 1 launchFuelAdded = "Extra Fuel Added" launchBoostDuty = "Duty Cycle for the Boost Solenoid" hardCutRpmRange = "RPM Range for Hard Cut" + stft_maxIdleRegionRpm = "Below this RPM, the idle region is active" + stft_maxOverrunLoad = "Below this engine load, the overrun region is active" + stft_minPowerLoad = "Above this engine load, the power region is active" + stft_deadband = "When close to correct AFR, pause correction. This can improve stability by not changing the adjustment if the error is extremely small, but is not required." + stft_minClt = "Below this temperature, correction is disabled." + stft_minAfr = "Below this AFR, correction is paused" + stft_maxAfr = "Above this AFR, correction is paused" + stft_startupDelay = "Delay after starting the engine before beginning closed loop correction." fuelClosedLoopCorrectionEnabled = "Enables lambda sensor closed loop feedback for fuelling." isVerboseIAC = "Print details into rusEfi console" isVerboseETB = "Prints ETB details to rusEFI console" @@ -1218,6 +1299,30 @@ page = 1 triggerCompHystMin = "Trigger comparator hysteresis voltage (Min)" triggerCompHystMax = "Trigger comparator hysteresis voltage (Max)" triggerCompSensorSatRpm = "VR-sensor saturation RPM" + gppwm1_pin = "Select a pin to use for PWM or on-off output." + gppwm1_dutyIfError = "If an error (with a sensor, etc) is detected, this value is used instead of reading from the table.\nThis should be a safe value for whatever hardware is connected to prevent damage." + gppwm1_pwmFrequency = "Select a frequency to run PWM at.\nSet this to 0hz to enable on-off mode." + gppwm1_onAboveDuty = "In on-off mode, turn the output on when the table value is above this duty." + gppwm1_offBelowDuty = "In on-off mode, turn the output off when the table value is below this duty." + gppwm1_loadAxis = "Selects the load axis to use for the table." + gppwm2_pin = "Select a pin to use for PWM or on-off output." + gppwm2_dutyIfError = "If an error (with a sensor, etc) is detected, this value is used instead of reading from the table.\nThis should be a safe value for whatever hardware is connected to prevent damage." + gppwm2_pwmFrequency = "Select a frequency to run PWM at.\nSet this to 0hz to enable on-off mode." + gppwm2_onAboveDuty = "In on-off mode, turn the output on when the table value is above this duty." + gppwm2_offBelowDuty = "In on-off mode, turn the output off when the table value is below this duty." + gppwm2_loadAxis = "Selects the load axis to use for the table." + gppwm3_pin = "Select a pin to use for PWM or on-off output." + gppwm3_dutyIfError = "If an error (with a sensor, etc) is detected, this value is used instead of reading from the table.\nThis should be a safe value for whatever hardware is connected to prevent damage." + gppwm3_pwmFrequency = "Select a frequency to run PWM at.\nSet this to 0hz to enable on-off mode." + gppwm3_onAboveDuty = "In on-off mode, turn the output on when the table value is above this duty." + gppwm3_offBelowDuty = "In on-off mode, turn the output off when the table value is below this duty." + gppwm3_loadAxis = "Selects the load axis to use for the table." + gppwm4_pin = "Select a pin to use for PWM or on-off output." + gppwm4_dutyIfError = "If an error (with a sensor, etc) is detected, this value is used instead of reading from the table.\nThis should be a safe value for whatever hardware is connected to prevent damage." + gppwm4_pwmFrequency = "Select a frequency to run PWM at.\nSet this to 0hz to enable on-off mode." + gppwm4_onAboveDuty = "In on-off mode, turn the output on when the table value is above this duty." + gppwm4_offBelowDuty = "In on-off mode, turn the output off when the table value is below this duty." + gppwm4_loadAxis = "Selects the load axis to use for the table." ; CONFIG_DEFINITION_END @@ -1240,20 +1345,39 @@ page = 1 [LoggerDefinition] ; valid logger types: composite, tooth, trigger, csv - loggerDef = compositeLogger, "Primary Trigger Logger", tooth +; loggerDef = compositeLogger, "Primary Trigger Logger", tooth + loggerDef = compositeLogger, "Trigger Logger", composite startCommand = "l\x01" stopCommand = "l\x02" dataReadCommand = "L" dataReadTimeout = 10000 ; time in ms dataReadyCondition = { toothLogReady } + continuousRead = true + ; each packet is 5 and we have 500 of those + dataLength = 2500 +;tooth ; recordDef = headerLen, footerLen, recordLen - recordDef = 0, 0, 2; in bytes, the recordLen is for each record, currently limited to 4 bytes +; recordDef = 0, 0, 5 ; uint16 that stores 1/100 second - recordField = toothTime, "tooth", 0, 16, 0.01, "ms" +; recordField = toothTime, "tooth", 0, 16, 0.01, "ms" + + ; recordDef = headerLen, footerLen, recordLen + recordDef = 0, 0, 5 + + ; these names are hard-coded inside TS + recordField = priLevel, "PriLevel", 0, 1, 1.0, "Flag" + recordField = secLevel, "SecLevel", 1, 1, 1.0, "Flag" + recordField = trigger, "Trigger", 2, 1, 1.0, "Flag" + recordField = sync, "Sync", 3, 1, 1.0, "Flag" + recordField = time, "Time", 8, 32, 0.01, "ms" + + ; it seems that TS also needs to know the diff.size of a tooth + calcField = toothTime, "ToothTime", "ms", { time - pastValue(time, 1) } + [VeAnalyze] ; tableName, lambdaTargetTableName, lambdaChannel, egoCorrectionChannel, activeCondition @@ -1267,11 +1391,7 @@ page = 1 ; filter = Name, "DisplayName", outputChannel, operator, defaultVal, userAdjustable filter = minRPMFilter, "Minimum RPM", RPMValue, < , 500, , true -#if CELSIUS filter = minCltFilter, "Minimum CLT", coolant, < , 60, , true -#else - filter = minCltFilter, "Minimum CLT", coolant, < , 160, , true -#endif filter = deltaTps, "dTPS", deltaTps > , 50, , true @@ -1293,7 +1413,7 @@ fileVersion = { 20200310 } ochGetCommand = "O%2o%2c" ; see TS_OUTPUT_SIZE in console source code - ochBlockSize = 240 + ochBlockSize = 244 ; ; see TunerStudioOutputChannels struct @@ -1325,6 +1445,7 @@ fileVersion = { 20200310 } ind_isTriggerError = bits, U32, 0, [23:23], "true", "false"; ind_hasFatalError=bits, U32, 0, [24:24], "true", "false"; ind_isWarnNow =bits, U32, 0, [25:25], "true", "false"; + ind_pedal_error =bits, U32, 0, [26:26], "true", "false"; ; RPM, vss RPMValue = scalar, U16, 4, "RPM", 1, 0.00000 @@ -1334,16 +1455,8 @@ fileVersion = { 20200310 } ; temperatures internalMcuTemperature = scalar,S08, 11, "deg C", 1, 0 -#if CELSIUS coolant = scalar, S16, 12, "deg C",{1/100}, 0.0 -#else - coolant = scalar, S16, 12, "deg F",{9/(5 * 100)}, 17.77777 -#endif -#if CELSIUS intake = scalar, S16, 14, "deg C",{1/100}, 0.0 -#else - intake = scalar, S16, 14, "deg F",{9/(5 * 100)}, 17.77777 -#endif ; todo: aux1 ; todo: aux2 @@ -1418,55 +1531,66 @@ fileVersion = { 20200310 } knockLevel = scalar, F32, 108, "Volts", 1, 0 ; Mode, firmware, protocol, run time - timeSeconds = scalar, U32, 112, "sec", 1, 0.0 +; TS requires 'seconds' name since it has special internal meaning + seconds = scalar, U32, 112, "sec", 1, 0.0 engineMode = scalar, U32, 116, "em", 1, 0.0; firmwareVersion = scalar, U32, 120,"version_f", 1, 0 firmwareTsVersion=scalar, U32, 124,"version_p", 1, 0 +; calibation helpers + calibrationValue = scalar, F32, 128, "", 1, 0 + calibrationMode = scalar, U08, 132, "", 1, 0 + ; 3 bytes padding1 + ; Errors - totalTriggerErrorCounter=scalar,U32, 128,"counter", 1, 0 - ; orderingErrorCounter 132 - warningCounter = scalar, U16, 136, "count", 1, 0 - lastErrorCode = scalar, U16, 138, "error", 1, 0 - recentErrorCode0= scalar, U16, 140, "error", 1, 0 - recentErrorCode1= scalar, U16, 142, "error", 1, 0 - recentErrorCode2= scalar, U16, 144, "error", 1, 0 - recentErrorCode3= scalar, U16, 146, "error", 1, 0 - recentErrorCode4= scalar, U16, 148, "error", 1, 0 - recentErrorCode5= scalar, U16, 150, "error", 1, 0 - recentErrorCode6= scalar, U16, 152, "error", 1, 0 - recentErrorCode7= scalar, U16, 154, "error", 1, 0 + totalTriggerErrorCounter=scalar,U32, 136,"counter", 1, 0 + ; orderingErrorCounter 140 + warningCounter = scalar, U16, 144, "count", 1, 0 + lastErrorCode = scalar, U16, 146, "error", 1, 0 + recentErrorCode0= scalar, U16, 148, "error", 1, 0 + recentErrorCode1= scalar, U16, 150, "error", 1, 0 + recentErrorCode2= scalar, U16, 152, "error", 1, 0 + recentErrorCode3= scalar, U16, 154, "error", 1, 0 + recentErrorCode4= scalar, U16, 156, "error", 1, 0 + recentErrorCode5= scalar, U16, 158, "error", 1, 0 + recentErrorCode6= scalar, U16, 160, "error", 1, 0 + recentErrorCode7= scalar, U16, 162, "error", 1, 0 ; Debug - debugFloatField1= scalar, F32, 156, "val", 1, 0.0 - debugFloatField2= scalar, F32, 160, "val", 1, 0.0 - debugFloatField3= scalar, F32, 164, "val", 1, 0.0 - debugFloatField4= scalar, F32, 168, "val", 1, 0.0 - debugFloatField5= scalar, F32, 172, "val", 1, 0.0 - debugFloatField6= scalar, F32, 176, "val", 1, 0.0 - debugFloatField7= scalar, F32, 180, "val", 1, 0.0 - debugIntField1 = scalar, S32, 184, "val", 1, 0.0 - debugIntField2 = scalar, S32, 188, "val", 1, 0.0 - debugIntField3 = scalar, S32, 192, "val", 1, 0.0 - debugIntField4 = scalar, S16, 196, "val", 1, 0.0 - debugIntField5 = scalar, S16, 198, "val", 1, 0.0 + debugFloatField1= scalar, F32, 164, "val", 1, 0.0 + debugFloatField2= scalar, F32, 168, "val", 1, 0.0 + debugFloatField3= scalar, F32, 172, "val", 1, 0.0 + debugFloatField4= scalar, F32, 176, "val", 1, 0.0 + debugFloatField5= scalar, F32, 180, "val", 1, 0.0 + debugFloatField6= scalar, F32, 184, "val", 1, 0.0 + debugFloatField7= scalar, F32, 188, "val", 1, 0.0 + debugIntField1 = scalar, S32, 192, "val", 1, 0.0 + debugIntField2 = scalar, S32, 196, "val", 1, 0.0 + debugIntField3 = scalar, S32, 200, "val", 1, 0.0 + debugIntField4 = scalar, S16, 204, "val", 1, 0.0 + debugIntField5 = scalar, S16, 206, "val", 1, 0.0 ; Accel - accelerationX = scalar, S16, 200, "G", 0.01, 0 - accelerationY = scalar, S16, 202, "G", 0.01, 0 + accelerationX = scalar, S16, 208, "G", 0.01, 0 + accelerationY = scalar, S16, 210, "G", 0.01, 0 ; egt - egt1 = scalar, S16, 204, "deg C", 1, 0 - egt2 = scalar, S16, 206, "deg C", 1, 0 - egt3 = scalar, S16, 208, "deg C", 1, 0 - egt4 = scalar, S16, 210, "deg C", 1, 0 - egt5 = scalar, S16, 212, "deg C", 1, 0 - egt6 = scalar, S16, 214, "deg C", 1, 0 - egt7 = scalar, S16, 216, "deg C", 1, 0 - egt8 = scalar, S16, 218, "deg C", 1, 0 -; - TPS2Value = scalar, S16, 220, "%",{1/100}, 0 + egt1 = scalar, S16, 212, "deg C", 1, 0 + egt2 = scalar, S16, 214, "deg C", 1, 0 + egt3 = scalar, S16, 216, "deg C", 1, 0 + egt4 = scalar, S16, 218, "deg C", 1, 0 + egt5 = scalar, S16, 220, "deg C", 1, 0 + egt6 = scalar, S16, 222, "deg C", 1, 0 + egt7 = scalar, S16, 224, "deg C", 1, 0 + egt8 = scalar, S16, 226, "deg C", 1, 0 + TPS2Value = scalar, S16, 228, "%",{1/100}, 0 + + rawTps1Primary = scalar, U16, 230, "V",{1/1000}, 0.0 + rawPpsPrimary = scalar, U16, 232, "V",{1/1000}, 0.0 + rawClt = scalar, U16, 234, "V",{1/1000}, 0.0 + rawIat = scalar, U16, 236, "V",{1/1000}, 0.0 + rawOilPressure = scalar, U16, 238, "V",{1/1000}, 0.0 ; ; see TunerStudioOutputChannels struct @@ -1483,6 +1607,12 @@ fileVersion = { 20200310 } time = { timeNow } ; engineLoad = { fuleAlgorithm == 0 ? MAF : TPS } + ; These "synthetic" channels provide the Y-axis (load) value for gen purp PWM table's Y axes + gppwm1_load = {(gppwm1_loadAxis == 0) ? TPSValue : ((gppwm1_loadAxis == 1) ? MAPValue : ((gppwm1_loadAxis == 2) ? coolant : intake))} + gppwm2_load = {(gppwm2_loadAxis == 0) ? TPSValue : ((gppwm2_loadAxis == 1) ? MAPValue : ((gppwm2_loadAxis == 2) ? coolant : intake))} + gppwm3_load = {(gppwm3_loadAxis == 0) ? TPSValue : ((gppwm3_loadAxis == 1) ? MAPValue : ((gppwm3_loadAxis == 2) ? coolant : intake))} + gppwm4_load = {(gppwm4_loadAxis == 0) ? TPSValue : ((gppwm4_loadAxis == 1) ? MAPValue : ((gppwm4_loadAxis == 2) ? coolant : intake))} + [PcVariables] wueAfrTargetOffset = array, S16, [ 16], ":1", 0.1, 0.0, -3.0, 3.0, 1; wueAnalRecommend = array, U08, [ 16], "%", 1.00, 0.0, 100, 255.00, 0 @@ -1491,24 +1621,89 @@ fileVersion = { 20200310 } enableLogDebugChannels = bits, U08, [0:0], "Yes", "No" enableLogErrorList = bits, U08, [0:0], "Yes", "No" -; 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 -; Alternator TPS Acceleration Warmup-Pid Idle Engine Load Acc Trigger Counters ETB PID TLE8888 Boost - debugFieldF1List = bits, U08, [0:7], "Controller Output", "From TPS", "", "Controller Output", "", "Channel 1 Rise Counter", "", "", "", "", "", "", "", "", "", "", "", "ETB Controller Output", "", "", "df1", "df1", "22df1", "", "", "", "", "", "", "", "", "", "", "", "", "", "Open Loop Duty", "" - debugFieldF2List = bits, U08, [0:7], "I-Term", "To TPS", "", "I-Term", "", "Channel 2 Rise Counter", "", "", "", "", "", "", "", "", "", "", "", "ETB I-Term", "", "", "df2", "df2", "22df2", "", "", "", "", "", "", "", "", "", "", "", "", "", "Closed Loop Duty","" - debugFieldF3List = bits, U08, [0:7], "Previous Error", "Current TPS<>TPS", "", "", "", "Channel 3 Rise Counter", "", "", "", "", "", "", "", "", "", "", "", "ETB Previous Error", "", "", "df3", "df3", "22df3", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" - debugFieldF4List = bits, U08, [0:7], "I Gain", "Extra Fuel", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "ETB df4", "", "", "df4", "df4", "22df4", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" - debugFieldF5List = bits, U08, [0:7], "D Gain", "df5", "df5", "df5", "df5", "df5", "df5", "", "", "", "", "", "", "", "", "", "", "ETB df5", "df5", "df5", "df5", "df5", "22df5", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" - debugFieldF6List = bits, U08, [0:7], "D Term", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "ETB df6", "", "", "df6", "df6", "22df6", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" - debugFieldF7List = bits, U08, [0:7], "Max-Value", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "ETB df7", "", "", "df7", "df7", "22df7", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" - - debugFieldI1List = bits, U08, [0:7], "P-Gain", "", "", "", "", "Channel 2 Fall Counter", "", "", "", "", "", "", "", "", "", "", "", "ETB P-Gain", "", "", "di1", "di1", "22", "", "", "", "", "", "", "", "", "SPI Counter", "", "", "", "", "", "" - debugFieldI2List = bits, U08, [0:7], "Offset", "", "", "", "", "Channel 3 Fall Counter", "", "", "", "", "", "", "", "", "", "", "", "ETB di2", "", "", "di2", "di2", "22", "", "", "", "", "", "", "", "", "Latest Transmit","", "", "", "", "", "" - debugFieldI3List = bits, U08, [0:7], "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "ETB di3", "", "", "di3", "di3", "22", "", "", "", "", "", "", "", "", "Latest Received","", "", "", "", "", "" - debugFieldI4List = bits, U08, [0:7], "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "ETB di4", "", "", "di4", "di4", "22", "", "", "", "", "", "", "", "", "Init Count", "", "", "", "", "", "" - debugFieldI5List = bits, U08, [0:7], "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "di5", "di5", "ETB di5", "di5", "di5", "di5", "di5", "22di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5" +; wall of debug mode :) +; https://rusefi.com/wiki/index.php?title=Manual:Debug_fields +; 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 +; Alternator TPS Acceleration Warmup-Pid Idle Engine Load Acc Trigger Counters VVT Cranking Ignition Timing ETB PID CJ125 CAN TLE8888 Boost Start Launcher ETB Autotune + debugFieldF1List = bits, U08, [0:7], "Controller Output", "From TPS", "", "Controller Output", "Idle output", "Channel 1 Rise Counter", "", "", "", "", "Ign IAT Corr", "", "", "", "", "", "", "ETB Controller Output", "", "", "df1", "df1", "22df1", "", "23:df1", "CJ125: output", "", "", "", "", "", "", "", "", "", "", "Boost Open Loop Duty", "S unused" "", "Osc Amplitude" + debugFieldF2List = bits, U08, [0:7], "I-Term", "To TPS", "", "I-Term", "Idle df2", "Channel 2 Rise Counter", "", "", "", "", "Ign CLT Corr", "", "", "", "", "", "", "ETB I-Term", "", "", "df2", "df2", "22df2", "", "23:df2", "CJ125: i-term", "", "", "", "", "", "", "", "", "", "", "Boost Closed Loop Duty","S unused" "", "Duty Amplitude" + debugFieldF3List = bits, U08, [0:7], "Previous Error", "Current TPS<>TPS", "", "", "Idle df3", "ICU sum", "", "", "", "", "Ign FSIO Adj", "", "", "", "", "", "", "ETB err", "", "", "df3", "df3", "22df3", "", "23:df3", "CJ125: err", "", "", "", "", "", "", "", "", "", "", "", "S unused" "", "Tu" + debugFieldF4List = bits, U08, [0:7], "I Gain", "Extra Fuel", "", "", "Idle df4", "VVT rise", "", "", "", "", "Ign PID Adj", "", "", "", "", "", "", "ETB I setting", "", "", "df4", "df4", "22df4", "", "23:df4", "CJ125: UA", "", "", "", "", "", "", "", "", "", "", "", "S unused" "", "Ku" + debugFieldF5List = bits, U08, [0:7], "D Gain", "df5", "df5", "df5", "Idle df5", "VVT fall", "df5", "", "", "", "", "", "", "", "", "", "", "ETB D setting", "df5", "df5", "df5", "df5", "22df5", "", "23:df5", "CJ125: UR", "", "", "", "", "", "", "", "", "", "", "", "S unused" "", "Kp" + debugFieldF6List = bits, U08, [0:7], "D Term", "", "", "", "Idle df6", "Current Gap", "", "", "", "", "", "", "", "", "", "", "", "ETB df6", "", "", "df6", "df6", "22df6", "", "23:df6", "cj: f7", "", "", "", "", "", "", "", "", "", "", "", "S unused" "", "Ki" + debugFieldF7List = bits, U08, [0:7], "Max-Value", "", "", "", "Idle df7", "", "", "", "", "", "", "", "", "", "", "", "", "ETB df7", "", "", "df7", "df7", "22df7", "", "23:df7", "cj: f7", "", "", "", "", "", "", "", "", "", "", "", "S unused" "", "Kd" + debugFieldI1List = bits, U08, [0:7], "P-Gain", "", "", "", "Idle di1", "Channel 1 Fall Counter", "", "", "", "", "Multispark Count", "", "", "", "", "", "", "ETB P-Gain", "", "", "di1", "di1", "22di1", "", "23:di1", "CJ125: state", "read count","", "", "", "", "SPI Counter", "", "", "", "", "", "Start Count" "", "" + debugFieldI2List = bits, U08, [0:7], "Offset", "", "", "", "Idle di2", "Channel 2 Fall Counter", "", "", "", "", "", "", "", "", "", "", "", "ETB di2", "", "", "di2", "di2", "22di2", "", "23:di2", "", "", "", "", "", "", "Latest Transmit","", "", "", "", "", "S unused" "", "" + debugFieldI3List = bits, U08, [0:7], "", "", "", "", "Idle di3", "Cycle Index", "", "", "", "", "", "", "", "", "", "", "", "ETB di3", "", "", "di3", "di3", "22di3", "", "23:di3", "", "", "", "", "", "", "Latest Received","", "", "", "", "", "S unused" "", "" + debugFieldI4List = bits, U08, [0:7], "", "", "", "", "Idle di4", "Cycle Cnt 1", "", "", "", "", "", "", "", "", "", "", "", "ETB di4", "", "", "di4", "di4", "22di4", "", "23:di4", "", "", "", "", "", "", "Init Count", "", "", "", "", "", "S unused" "", "" + debugFieldI5List = bits, U08, [0:7], "", "", "", "", "Idle di5", "Cycle Cnt 2", "", "", "", "", "", "", "", "", "", "di5", "di5", "ETB di5", "di5", "di5", "di5", "di5", "22di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "S di5" "", "" + [ConstantsExtensions] + ; defaultValue is used to provide TunerStudio with a value to use in the case of + ; the constant not yet being initialized. This is primarily important if the + ; constant is used as a variable in the ini. + ; defaultValue = constantName, value; defaultValue = wueAfrTargetOffset, -1.5 -1.4 -1.15 -0.95 -0.775 -0.65 -0.5625 -0.5 -0.4375 -0.375 -0.3125 -0.25 -0.1875 -0.125 -0.0625 0 + + requiresPowerCycle = warningLedPin + requiresPowerCycle = runningLedPin + requiresPowerCycle = binarySerialTxPin + requiresPowerCycle = binarySerialRxPin + + requiresPowerCycle = etb_use_two_wires + requiresPowerCycle = etbFreq + + requiresPowerCycle = idle_solenoidFrequency + requiresPowerCycle = boostPwmFrequency + requiresPowerCycle = alternatorPwmFrequency + requiresPowerCycle = auxPidFrequency1 + requiresPowerCycle = auxPidFrequency2 + requiresPowerCycle = auxPidFrequency3 + requiresPowerCycle = auxPidFrequency4 + + requiresPowerCycle = fsioOutputPins1 + requiresPowerCycle = fsioOutputPins2 + requiresPowerCycle = fsioOutputPins3 + requiresPowerCycle = fsioOutputPins4 + requiresPowerCycle = fsioOutputPins5 + requiresPowerCycle = fsioOutputPins6 + requiresPowerCycle = fsioOutputPins7 + requiresPowerCycle = fsioOutputPins8 + requiresPowerCycle = fsioOutputPins9 + requiresPowerCycle = fsioOutputPins10 + requiresPowerCycle = fsioOutputPins11 + requiresPowerCycle = fsioOutputPins12 + requiresPowerCycle = fsioOutputPins13 + requiresPowerCycle = fsioOutputPins14 + requiresPowerCycle = fsioOutputPins15 + requiresPowerCycle = fsioOutputPins16 + + requiresPowerCycle = fsioFrequency1 + requiresPowerCycle = fsioFrequency2 + requiresPowerCycle = fsioFrequency3 + requiresPowerCycle = fsioFrequency4 + requiresPowerCycle = fsioFrequency5 + requiresPowerCycle = fsioFrequency6 + requiresPowerCycle = fsioFrequency7 + requiresPowerCycle = fsioFrequency8 + requiresPowerCycle = fsioFrequency9 + requiresPowerCycle = fsioFrequency10 + requiresPowerCycle = fsioFrequency11 + requiresPowerCycle = fsioFrequency12 + requiresPowerCycle = fsioFrequency13 + requiresPowerCycle = fsioFrequency14 + requiresPowerCycle = fsioFrequency15 + requiresPowerCycle = fsioFrequency16 + + requiresPowerCycle = fsioAdc1 + requiresPowerCycle = fsioAdc2 + requiresPowerCycle = fsioAdc3 + requiresPowerCycle = fsioAdc4 + + readOnly = warning_message + + [CurveEditor] ; xAxis = leftValue, rightValue, step ; yAxis = bottomValue, topValue, step @@ -1607,11 +1802,7 @@ fileVersion = { 20200310 } curve = iatFuelCorrCurve, "Intake air temperature fuel Multiplier" columnLabel = "Coolant", "Multiplier" -#if CELSIUS xAxis = -40, 120, 10 -#else - xAxis = -40, 250, 10 -#endif yAxis = 0, 2, 11 xBins = iatFuelCorrBins, intake yBins = iatFuelCorr @@ -1619,11 +1810,7 @@ fileVersion = { 20200310 } curve = cltTimingCorrCurve, "Warmup timing correction" columnLabel = "Coolant", "Extra" -#if CELSIUS xAxis = -40, 120, 10 -#else - xAxis = -40, 250, 10 -#endif yAxis = 0, 50, 10 xBins = cltTimingBins, coolant yBins = cltTimingExtra @@ -1631,11 +1818,7 @@ fileVersion = { 20200310 } curve = cltFuelCorrCurve, "Warmup fuel manual Multiplier" columnLabel = "Coolant", "Multiplier" -#if CELSIUS xAxis = -40, 100, 10 -#else - xAxis = -40, 210, 10 -#endif yAxis = 0, 3, 10 xBins = cltFuelCorrBins, coolant yBins = cltFuelCorr @@ -1643,11 +1826,7 @@ fileVersion = { 20200310 } curve = crankingCltCurve, "Cranking Coolant Temperature Multiplier" columnLabel = "Coolant", "Multiplier" -#if CELSIUS xAxis = -40, 100, 10 -#else - xAxis = -40, 210, 10 -#endif yAxis = 0, 3, 10 xBins = crankingFuelBins, coolant yBins = crankingFuelCoef @@ -1655,8 +1834,8 @@ fileVersion = { 20200310 } curve = etbTpsBiasCurve, "Electronic TB Bias Curve" columnLabel = "TPS", "duty bias" - xAxis = 0, 100, 10 - yAxis = 0, 100, 10 + xAxis = 0, 50, 11 + yAxis = -40, 40, 9 xBins = etbBiasBins, TPSValue yBins = etbBiasValues gauge = TPSGauge @@ -1679,11 +1858,7 @@ fileVersion = { 20200310 } curve = cltIdleCurve, "Warmup Idle multiplier" columnLabel = "Coolant", "Multiplier" -#if CELSIUS xAxis = -40, 120, 10 -#else - xAxis = -40, 250, 10 -#endif yAxis = 0, 3, 10 xBins = cltIdleCorrBins, coolant yBins = cltIdleCorr @@ -1691,11 +1866,7 @@ fileVersion = { 20200310 } curve = iacCoastingCurve, "Coasting IAC Position for Auto-Idle" columnLabel = "Coolant", "Multiplier" -#if CELSIUS xAxis = -40, 120, 10 -#else - xAxis = -40, 250, 10 -#endif yAxis = 0, 100, 10 xBins = iacCoastingBins, coolant yBins = iacCoasting @@ -1703,11 +1874,7 @@ fileVersion = { 20200310 } curve = cltCrankingCurve, "Cranking Idle Air multiplier" columnLabel = "Coolant", "Multiplier" -#if CELSIUS xAxis = -40, 120, 10 -#else - xAxis = -40, 250, 10 -#endif yAxis = 0, 3, 10 xBins = cltCrankingCorrBins, coolant yBins = cltCrankingCorr @@ -1715,11 +1882,7 @@ fileVersion = { 20200310 } curve = cltIdleRPMCurve, "Idle Target RPM" columnLabel = "Coolant", "RPM" -#if CELSIUS xAxis = -40, 120, 10 -#else - xAxis = -40, 250, 10 -#endif yAxis = 0, 8000, 10 xBins = cltIdleRpmBins, coolant yBins = cltIdleRpm, RPMValue @@ -1751,11 +1914,7 @@ fileVersion = { 20200310 } curve = wueAfrTargetOffsetCurve, "AFR Target Temperature Adjustment" columnLabel = "Coolant", "AFR Offset" -#if CELSIUS xAxis = -40, 200, 9 -#else - xAxis = -40, 400, 9 -#endif yAxis = -3, 1, 5 xBins = cltFuelCorrBins, coolant yBins = wueAfrTargetOffset @@ -1763,11 +1922,7 @@ fileVersion = { 20200310 } curve = wueAnalyzer_warmup_curve, "Warmup Enrichment" columnLabel = "Coolant", "Current WUE", "Coolant", "Corrected" -#if CELSIUS xAxis = -40, 200, 9 -#else - xAxis = -40, 400, 9 -#endif yAxis = 90, 500, 6 xBins = cltFuelCorrBins, coolant yBins = cltFuelCorr @@ -1945,6 +2100,30 @@ fileVersion = { 20200310 } gridOrient = 250, 0, 340 ; Space 123 rotation of grid in degrees. upDownLabel = "(Later)", "(Sooner)" + table = gppwm1Tbl, gppwm1Map, "", 1 + xyLabels = "RPM", "" + xBins = gppwm1_rpmBins, RPMValue + yBins = gppwm1_loadBins, gppwm1_load + zBins = gppwm1_table + + table = gppwm2Tbl, gppwm2Map, "", 1 + xyLabels = "RPM", "" + xBins = gppwm2_rpmBins, RPMValue + yBins = gppwm2_loadBins, gppwm2_load + zBins = gppwm2_table + + table = gppwm3Tbl, gppwm3Map, "", 1 + xyLabels = "RPM", "" + xBins = gppwm3_rpmBins, RPMValue + yBins = gppwm3_loadBins, gppwm3_load + zBins = gppwm3_table + + table = gppwm4Tbl, gppwm4Map, "", 1 + xyLabels = "RPM", "" + xBins = gppwm4_rpmBins, RPMValue + yBins = gppwm4_loadBins, gppwm4_load + zBins = gppwm4_table + [GaugeConfigurations] gaugeCategory = Sensors - Extra 2 @@ -1975,7 +2154,7 @@ gaugeCategory = ECU Status recentErrorCode6Gauge = recentErrorCode6, "Error#7", "", 0, 18000, 0, 0, 18000, 18000, 0, 0 recentErrorCode7Gauge = recentErrorCode7, "Error#8", "", 0, 18000, 0, 0, 18000, 18000, 0, 0 firmwareVersionGauge = firmwareVersion , "ECU Software Version", "%", 0, 100, 0, 0, 100, 100, 0, 0 - timeSecondsGauge = timeSeconds, "Uptime", "sec", 0, 100, 0, 0, 100, 100, 0, 0 + timeSecondsGauge = seconds, "Uptime", "sec", 0, 100, 0, 0, 100, 100, 0, 0 gaugeCategory = Debug @@ -1995,16 +2174,8 @@ gaugeCategory = Debug gaugeCategory = Sensors - Basic RPMGauge = RPMValue, "RPM - engine speed", "RPM", 0, 15000, 200, 500, 6000, 6000, 0, 0 -#if CELSIUS CLTGauge = coolant, "Coolant temp", "deg C", -40, 140, -15, 1, 95, 110, 1, 1 -#else - CLTGauge = coolant, "Coolant temp", "deg F", -40, 285, 5, 35, 205, 230, 1, 1 -#endif -#if CELSIUS IATGauge = intake, "Intake air temp", "deg C", -40, 140, -15, 1, 95, 110, 1, 1 -#else - IATGauge = intake, "Intake air temp", "deg F", -40, 285, 5, 35, 205, 230, 1, 1 -#endif afr1Gauge = AFRValue, "Air fuel ratio", "", 10, 19.4, 12, 13, 15, 16, 2, 2 MAFGauge = MAFValue, "Mass air flow", "v", 0, 5, 0, 1, 3, 4, 1, 1 VBattGauge = VBatt, "Battery voltage", "V", 8, 21, 9, 10, 17, 19, 1, 1 @@ -2037,11 +2208,7 @@ gaugeCategory = Acceleration Enrichment gaugeCategory = Fueling ;Name Var Title Units Lo Hi LoD LoW HiW HiD vd ld -#if CELSIUS tChargeGauge = tCharge, "fuel: Estimated charge temperature", "deg C", -40, 140, -15, 1, 95, 110, 1, 1 -#else - tChargeGauge = tCharge, "fuel: Estimated charge temperature", "deg F", -40, 285, 5, 35, 205, 230, 1, 1 -#endif baroCorrectionGauge = baroCorrection,"fuel: Barometric pressure correction", "ratio", 0.5, 1.5, 0.6, 0.7, 1.3, 1.4, 1, 1 crankingFuelGauge = crankingFuelMs, "fuel: cranking", "mSec", 0, 25.5, 1.0, 1.2, 20, 25, 3, 1 iatCorrectionGauge = iatCorrection, "fuel: IAT correction", "mult", 0, 3, 0, 0, 3, 3, 2, 2 @@ -2065,6 +2232,12 @@ gaugeCategory = Throttle Body (incl. ETB) etbErrorGauge = etb1Error, "ETB position error", "%", -20, 20, -10, -5, 5, 10, 2, 0 etbDutyCycleGauge = etb1DutyCycle, "ETB duty cycle", "%", -100, 100, -75, -50, 50, 75, 0, 0 +gaugeCategory = Sensors - Raw + rawTps1PrimaryGauge = rawTps1Primary, "Raw TPS 1 Primary", "volts", 0, 5, 0, 0, 5, 5, 3, 0 + rawPpsPrimaryGauge = rawPpsPrimary , "Raw Pedal Primary", "volts", 0, 5, 0, 0, 5, 5, 3, 0 + rawCltGauge = rawClt , "Raw CLT", "volts", 0, 5, 0, 0, 5, 5, 3, 0 + rawIatGauge = rawIat , "Raw IAT", "volts", 0, 5, 0, 0, 5, 5, 3, 0 + rawOilPressureGauge = rawOilPressure, "Raw Oil Pressure", "volts", 0, 5, 0, 0, 5, 5, 3, 0 [WueAnalyze] @@ -2098,11 +2271,10 @@ gaugeCategory = Throttle Body (incl. ETB) ; 1 2 3 4 ; 5 6 7 8 - ; currently a minimum of 6 gauges must be on the dash, this appears to be an old not needed limitation. next release 1 will work. gauge1 = RPMGauge gauge2 = CLTGauge gauge3 = TPSGauge - gauge4 = MAFGauge + gauge4 = MAPGauge gauge5 = afr1Gauge gauge6 = VBattGauge gauge7 = dwellGauge @@ -2112,36 +2284,45 @@ gaugeCategory = Throttle Body (incl. ETB) ; = expression, off-label, on-label, off-bg, off-fg, on-bg, on-fg ; important status - indicator = { ind_hasFatalError }, "", "FATAL ERROR", green, black, red, black - indicator = { firmwareTsVersion == fileVersion }, "WRONG VERSION", "version", red, black, green, black - indicator = { ind_isWarnNow }, "", "warn", green, black, red, black - indicator = { ind_check_engine }, "ok", "Check engine", green, black, red, black - indicator = { isIgnitionEnabledIndicator}, "no ignition", "ignition", red, black, green, black - indicator = { ind_injection_enabled}, "no injection", "injection", red, black, green, black - indicator = { ind_isTriggerError}, "ok", "trg err", green, black, red, black + indicator = { ind_hasFatalError }, "", "CRITICAL ERROR", white, black, red, black + indicator = { firmwareTsVersion == fileVersion }, "WRONG VERSION", "version ok", red, black, white, black + indicator = { ind_isWarnNow }, "", "WARNING", white, black, yellow, black + indicator = { ind_check_engine }, "", "Check Engine", white, black, red, black + indicator = { isIgnitionEnabledIndicator}, "no ignition", "ignition", yellow, black, white, black + indicator = { ind_injection_enabled}, "no injection", "injection", yellow, black, white, black + indicator = { ind_isTriggerError}, "trigger ok", "trigger err", white, black, red, black + ; this is required so that the "config error" feature works in TS + ; don't change this line - TS is looking for an indicator with particular text/styling + ; you don't even have to show it by default + indicator = { ind_hasFatalError }, "Config Error", "Config Error", white, black, red, black ; minor info - indicator = { ind_fan}, "no fan", "fan", white, black, green, black - indicator = { isCylinderCleanupActivated}, "no cyl cleanup", "cyl cleanup", white, black, green, black + indicator = { ind_fan}, "fan off", "fan on", white, black, green, black + indicator = { isCylinderCleanupActivated}, "no cyl cleanup", "cyl cleanup", white, black, yellow, black indicator = { needBurn }, "config ok", "unsaved changes", white, black, yellow, black indicator = { hasSdCard}, "no SD", "with SD", white, black, green, black - indicator = { ind_fuel_pump}, "no pump", "pump", white, black, green, black + indicator = { ind_fuel_pump}, "pump off", "pump on", white, black, green, black indicator = { clutchUpState }, "clutch", "cltch Up", white, black, red, black indicator = { clutchDownState }, "clutch", "cltch Down", white, black, yellow, black indicator = { brakePedalIndicator }, "brake", "brake down", white, black, red, black - indicator = { acSwitchIndicator }, "AC on", "AC off", yellow, black, white, black + indicator = { acSwitchIndicator }, "AC off", "AC on", white, black, blue, white ; error codes indicator = { ind_tps_error}, "tps", "tps error", white, black, red, black indicator = { ind_clt_error}, "clt", "clt error", white, black, red, black indicator = { ind_iat_error}, "iat", "iat error", white, black, red, black indicator = { ind_map_error}, "map", "map error", white, black, red, black + indicator = { ind_pedal_error}, "pedal", "pedal error", white, black, red, black indicator = { knockEverIndicator }, "", "Knock recently", white, black, red, black indicator = { knockNowIndicator }, "no knock", "Knock NOW", white, black, red, black +[KeyActions] + showPanel = spi, spiFunction + showPanel = con, connection + [Datalog] ; Channel Label Type Format entry = time, "Time", float, "%.3f" @@ -2295,7 +2476,7 @@ menuDialog = main # Digital outputs subMenu = mainRelay, "Main relay" subMenu = starterRelay, "Starter Disable relay" - subMenu = fuelPump, "Fuel rail" + subMenu = fuelPump, "Fuel pump & rail" subMenu = fanSetting, "Fan" subMenu = tachSettings, "Tachometer" subMenu = malfunction, "Check engine light" @@ -2308,14 +2489,14 @@ menuDialog = main subMenu = std_separator # Targets & closed loop - subMenu = afrTableTbl, "Target AFR", 0, {isInjectionEnabled == 1 && fuelAlgorithm == LM_SPEED_DENSITY} + subMenu = afrTableTbl, "Target AFR", 0, {isInjectionEnabled == 1 && (fuelAlgorithm == LM_SPEED_DENSITY || fuelAlgorithm == LM_REAL_MAF)} subMenu = fuelClosedLoopDialog, "Closed loop correction", 0, {isInjectionEnabled == 1} subMenu = coastingFuelCutControl, "Deceleration fuel cutoff (DFCO)", 0, {isInjectionEnabled == 1} subMenu = std_separator # Fuel table/VE - subMenu = fuelTableDialog, "Fuel table", 0, {isInjectionEnabled == 1 && fuelAlgorithm != LM_SPEED_DENSITY} - subMenu = veTableDialog, "VE", 0, {isInjectionEnabled == 1 && fuelAlgorithm == LM_SPEED_DENSITY} + subMenu = fuelTableDialog, "Fuel table", 0, {isInjectionEnabled == 1 && fuelAlgorithm != LM_SPEED_DENSITY && fuelAlgorithm != LM_REAL_MAF} + subMenu = veTableDialog, "VE", 0, {isInjectionEnabled == 1 && (fuelAlgorithm == LM_SPEED_DENSITY || fuelAlgorithm == LM_REAL_MAF)} subMenu = injPhaseTableTbl, "Injection phase", 0, {isInjectionEnabled == 1} subMenu = std_separator @@ -2381,7 +2562,14 @@ menuDialog = main menu = "&Advanced" subMenu = boostDialog, "Boost Control" subMenu = boostPidDialog, "Closed Loop Boost", { boostType == 1 } - subMenu = std_separator + + subMenu = std_separator + subMenu = gppwm1, "General Purpose PWM 1" + subMenu = gppwm2, "General Purpose PWM 2" + subMenu = gppwm3, "General Purpose PWM 3" + subMenu = gppwm4, "General Purpose PWM 4" + + subMenu = std_separator subMenu = fsioInputsDialog, "FSIO inputs" subMenu = auxPidDialog, "Aux PID" subMenu = fsioOutputsDialog, "FSIO outputs" @@ -2450,6 +2638,8 @@ menuDialog = main subMenu = std_separator subMenu = connection, "Connection" + subMenu = tle8888, "TLE8888" + subMenu = allPins1, "Full pinout 1/2" subMenu = allPins2, "Full pinout 2/2" subMenu = std_separator @@ -2458,6 +2648,7 @@ menuDialog = main # EXPERIMENTAL FEATURES subMenu = parkingLot, "Experimental/Broken" subMenu = multisparkSettings, "Multispark", 0, {isIgnitionEnabled == 1} + subMenu = mc33Dialog, "GDI Dreams" subMenu = std_separator subMenu = hipFunction, "HIP9011 settings (knock sensor) (alpha version)" @@ -2475,6 +2666,10 @@ menuDialog = main subMenu = std_separator + menu = "Help" + subMenu = helpGeneral, "rusEfi Info" + + [ControllerCommands] ; commandName = command1, command2, commandn... ; command in standard ini format, a command name can be assigned to 1 to n commands that will be executed in order. @@ -2535,6 +2730,9 @@ cmd_calibrate_pedal_down = "w\x00\x14\x00\x07" cmd_tle8888_init = "w\x00\x14\x00\x08" cmd_test_ac_relay = "w\x00\x14\x00\x09" cmd_write_config = "w\x00\x14\x00\x0A" +cmd_test_starter_relay = "w\x00\x14\x00\x0B" +cmd_etb_autotune = "w\x00\x14\x00\x0C" +cmd_enable_self_stim = "w\x00\x14\x00\x0D" cmd_test_radiator_fan = "w\x00\x15\x00\x01" cmd_test_check_engine_light = "w\x00\x16\x00\x01" @@ -2672,6 +2870,7 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" field = "!Reminder that 4-stroke cycle is 720 degrees" field = "!For well-known trigger types use '0' trigger angle offset" field = "Trigger Angle Offset", globalTriggerAngleOffset + field = "Display only interesting", displayLogicLevelsInEngineSniffer field = "#Custom Trigger" field = "total Tooth Count", trigger_customTotalToothCount, {trigger_type == 0} field = "skipped Tooth Count", trigger_customSkippedToothCount, {trigger_type == 0} @@ -2682,7 +2881,6 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" field = "VVT use rise front", vvtCamSensorUseRise, {trigger_type != 80} field = "VVT position display offset", vvtOffset field = "VVT display inverted", vvtDisplayInverted - field = "nbVvtIndex", nbVvtIndex field = "print verbose sync details to console",verboseTriggerSynchDetails field = "Do not print messages in case of sync error", silentTriggerError field = "Enable noise filtering", useNoiselessTriggerDecoder, {trigger_type == 8 || trigger_type == 9} @@ -2802,11 +3000,27 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" field = "TPS low value detection threshold", tpsErrorDetectionTooLow, {tps1_1AdcChannel != 16} field = "TPS high value detection threshold", tpsErrorDetectionTooHigh, {tps1_1AdcChannel != 16} - dialog = pedalSensor, "Accelerator pedal" + dialog = pedalSensorLeft, "Accelerator pedal" field = "Accelerator position sensor", throttlePedalPositionAdcChannel + field = "Up voltage", throttlePedalUpVoltage + field = "Down (WOT) voltage", throttlePedalWOTVoltage field = "Accelerator position 2nd sensor", throttlePedalPositionSecondAdcChannel - field = "Up voltage", throttlePedalUpVoltage - field = "Down (WOT) voltage", throttlePedalWOTVoltage + + dialog = pedalGauges + gauge = pedalPositionGauge + gauge = rawPpsPrimaryGauge + + dialog = pedalSensor, "Accelerator pedal", border + panel = pedalSensorLeft, West + panel = pedalGauges, East + + dialog = mc33Dialog, "GDI Dreams" + field = mc33816_cs, mc33816_cs + field = mc33816_rstb, mc33816_rstb + field = mc33816_flag0, mc33816_flag0 + field = "mc33972 SPI", mc33972spiDevice + field = mc33_hvolt, mc33_hvolt + ; Sensor Inputs dialog = otherSensorInputs, "Other Sensor Inputs" @@ -2833,8 +3047,11 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" field = "Secondary channel", triggerInputPins2, { trigger_type != 0 && trigger_type != 8 && trigger_type != 9 && trigger_type != 18 && trigger_type != 20} field = "Invert Secondary", invertSecondaryTriggerSignal, { trigger_type != 0 && trigger_type != 8 && trigger_type != 9 && trigger_type != 18 && trigger_type != 20} field = "Cam Sync/VVT input", camInputs1 - panel = triggerInputComparator - + +; +; allXXX sections allows a quick overview of used I/O in order to address conflicts mostly, not really to +; configure the features. +; dialog = allPinsSensors, "Sensors" field = "Throttle pedal Position Channel", throttlePedalPositionAdcChannel field = "Primary input channel", triggerInputPins1 @@ -2862,16 +3079,18 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" dialog = allPins1_1 field = mc33816_cs, mc33816_cs field = mc33816_rstb, mc33816_rstb + field = mc33816_flag0, mc33816_flag0 + field = "trigger stimulator pin #1", triggerSimulatorPins1 + field = "trigger stimulator pin #2", triggerSimulatorPins2 + field = "trigger stimulator pin #2", triggerSimulatorPins3 field = high_fuel_pressure_sensor_1, high_fuel_pressure_sensor_1 field = high_fuel_pressure_sensor_2, high_fuel_pressure_sensor_2 field = mc33816_driven, mc33816_driven field = mc33816spiDevice, mc33816spiDevice field = "Warning Led", warningLedPin - ; field = "Fatal Error Led", fatalErrorPin field = "tle6240_cs", tle6240_cs field = "tle6240 SPI", tle6240spiDevice field = "mc33972_cs", mc33972_cs - field = "mc33972 SPI", mc33972spiDevice panel = allPinsSensors dialog = allPins1_2 @@ -2881,32 +3100,27 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" field = "Idle Solenoid Pin", idle_solenoidPin field = "Second Idle Solenoid Pin", secondSolenoidPin field = "Idle Stepper Dir", idle_stepperDirectionPin - field = "Idle Stepper Dir Mode", stepperDirectionPinMode field = "Idle Stepper Step", idle_stepperStepPin field = "Idle Stepper Enable", stepperEnablePin field = "Fuel Pump Pin", fuelPumpPin - field = "Fuel Pump Pin Mode", fuelPumpPinMode field = "ETB#1 Dir #1", etbIo1_directionPin1 field = "ETB#1 Dir #2", etbIo1_directionPin2 field = "ETB#1 Control #1", etbIo1_controlPin1 - field = "etb1_controlPinMode", etbIo1_controlPinMode + field = "ETB#1 Disable", etbIo1_disablePin field = "ETB#2 Dir #1", etbIo2_directionPin1 field = "ETB#2 Dir #2", etbIo2_directionPin2 field = "ETB#2 Control #1", etbIo2_controlPin1 - field = "SD CS Pin", sdCardCsPin + field = "ETB#2 Disable", etbIo2_disablePin + field = "SD CS Pin", sdCardCsPin field = "MIL / Check Engine Pin", malfunctionIndicatorPin - field = "MIL / Check Engine Pin Mode", malfunctionIndicatorPinMode field = "Aux Pin #1", auxPidPins1 field = "Aux Pin #2", auxPidPins2 field = "Aux Pin #3", auxPidPins3 field = "Aux Pin #4", auxPidPins4 field = "test557pin", test557pin field = "Fan Pin", fanPin - field = "Fan Pin Mode", fanPinMode field = "Main Relay Pin", mainRelayPin - field = "Main Relay Mode", mainRelayPinMode - field = "Starter Relay Pin", starterRelayPin - field = "Starter Relay Mode", starterRelayPinMode + field = "Starter Relay Pin", starterRelayDisablePin field = "aux valve #1", auxValves1 field = "aux valve #2", auxValves2 @@ -2972,9 +3186,12 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" field = "output #16", fsioOutputPins16 dialog = allPins2_3 + field = "LCD E pin", HD44780_e + field = "LCD D4 pin", HD44780_db4 + field = "LCD D5 pin", HD44780_db5 + field = "LCD D6 pin", HD44780_db6 + field = "LCD D7 pin", HD44780_db7 field = "Debug Trigger Sync", debugTriggerSync - field = "Debug Timer Callback", debugTimerCallback - field = "Debug Set Timer", debugSetTimer field = "Aux Fast Analog", auxFastSensor1_adcChannel dialog = allPins1_3 @@ -2984,31 +3201,32 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" field = "FSIO ADC #4", fsioAdc4 field = "GPS RX", gps_rx_pin field = "GPS TX", gps_tx_pin - field = "CAN RX pin", canRxPin - field = "CAN TX pin", canTxPin - field = "SPI1 MOSI", spi1mosiPin, {is_enabled_spi_1 == 1} - field = "SPI1 MISO", spi1misoPin, {is_enabled_spi_1 == 1} - field = "SPI1 SCK", spi1sckPin, {is_enabled_spi_1 == 1} - field = "SPI2 MOSI", spi2mosiPin, {is_enabled_spi_2 == 1} - field = "SPI2 MISO", spi2misoPin, {is_enabled_spi_2 == 1} - field = "SPI2 SCK", spi2sckPin, {is_enabled_spi_2 == 1} - field = "SPI3 MOSI", spi3mosiPin, {is_enabled_spi_3 == 1} - field = "SPI3 MISO", spi3misoPin, {is_enabled_spi_3 == 1} - field = "SPI3 SCK", spi3sckPin, {is_enabled_spi_3 == 1} + field = "CAN RX pin", canRxPin + field = "CAN TX pin", canTxPin + field = "SPI1 MOSI", spi1mosiPin, {is_enabled_spi_1 == 1} + field = "SPI1 MISO", spi1misoPin, {is_enabled_spi_1 == 1} + field = "SPI1 SCK", spi1sckPin, {is_enabled_spi_1 == 1} + field = "SPI2 MOSI", spi2mosiPin, {is_enabled_spi_2 == 1} + field = "SPI2 MISO", spi2misoPin, {is_enabled_spi_2 == 1} + field = "SPI2 SCK", spi2sckPin, {is_enabled_spi_2 == 1} + field = "SPI3 MOSI", spi3mosiPin, {is_enabled_spi_3 == 1} + field = "SPI3 MISO", spi3misoPin, {is_enabled_spi_3 == 1} + field = "SPI3 SCK", spi3sckPin, {is_enabled_spi_3 == 1} field = "hip9011CsPin", hip9011CsPin field = "LIS302DLCsPin", LIS302DLCsPin field = "MIL / Check Engine", malfunctionIndicatorPin field = "Saab CDM knock", cdmInputPin field = "comm status light", communicationLedPin field = "running status light", runningLedPin - field = "TLE8888 Chip Select", tle8888_cs - field = "TLE8888 CS Mode", tle8888_csPinMode - field = "TLE 8888 spi", tle8888spiDevice + field = "TLE8888 Chip Select", tle8888_cs + field = "TLE 8888 spi", tle8888spiDevice field = "servo#1", servoOutputPins1 field = "servo#2", servoOutputPins2 field = "servo#3", servoOutputPins3 field = "servo#4", servoOutputPins4 field = "servo#5", servoOutputPins5 + field = "AUX Serial TX", auxSerialTxPin + field = "AUX Serial RX", auxSerialRxPin dialog = allPins1_1_and_2, "", xAxis @@ -3142,9 +3360,10 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" field = "Heater pin", o2heaterPin dialog = egoSettings, "", yAxis - panel = egoSettings_IO, {enableAemXSeries == 0} - panel = egoSettings_sensor, {afr_hwChannel != 16 && enableAemXSeries == 0} + panel = egoSettings_IO + panel = egoSettings_sensor, {afr_hwChannel != 16 && enableAemXSeries == 0 && !auxSerialRxPin && !auxSerialTxPin} field = "Enable AEM X-Series CANbus", enableAemXSeries, { canReadEnabled } + field = "Enable Innovate LC-2 Serial", enableInnovateLC2, { auxSerialRxPin && auxSerialTxPin } ; Engine->EGT inputs dialog = egtInputs, "EGT inputs" @@ -3171,9 +3390,11 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" field = "No1 Direction #1", etbIo1_directionPin1 field = "No1 Direction #2", etbIo1_directionPin2 field = "No1 Control #1", etbIo1_controlPin1, { etb_use_two_wires == 0 } + field = "No1 Disable", etbIo1_disablePin field = "No2 Direction #1", etbIo2_directionPin1 field = "No2 Direction #2", etbIo2_directionPin2 field = "No2 Control #1", etbIo2_controlPin1, { etb_use_two_wires == 0} + field = "No2 Disable", etbIo2_disablePin dialog = idleStepperHw, "Stepper Hardware" field = "Idle Stepper Step Pin", idle_stepperStepPin @@ -3258,27 +3479,33 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" field = "On temperature", fanOnTemperature field = "Off temperature", fanOffTemperature - dialog = fuelPump, "Fuel Rail" + dialog = fuelPumpConfig, "Fuel Pump" field = "Pin", fuelPumpPin field = "Pin mode", fuelPumpPinMode field = "Prime duration", startUpFuelPumpDuration + + dialog = fuelRailConfig, "Fuel Rail" field = "Absolute Fuel Pressure", absoluteFuelPressure field = "Fuel Rail pressure", fuelRailPressure, {absoluteFuelPressure == 1} + dialog = fuelPump, "" + panel = fuelPumpConfig + panel = fuelRailConfig + + ; Controller->Actuator Outputs dialog = mainRelay, "Main relay output" field = "Pin", mainRelayPin field = "Pin mode", mainRelayPinMode dialog = starterRelay, "Starter relay output" - field = "Pin", starterRelayPin - field = "Pin mode", starterRelayPinMode + field = "Pin", starterRelayDisablePin + field = "Pin mode", starterRelayDisableMode dialog = statusLeds, "Status LEDs" field = "Running status LED", runningLedPin field = "TS communication status LED", communicationLedPin field = "Trigger error LED", triggerErrorPin - ; field = "Fatal Error Led", fatalErrorPin ; Engine->MIL Settings dialog = malfunction, "Check Engine Settings" @@ -3404,34 +3631,40 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" field = "Min", alternatorControl_minValue, {isAlternatorControlEnabled == 1 && onOffAlternatorLogic == 0} field = "Max", alternatorControl_maxValue, {isAlternatorControlEnabled == 1 && onOffAlternatorLogic == 0} field = "#% duty = Pterm + Iterm + Dterm + offset%" - field = "Start/Stop Button Pin", startStopButtonPin - field = "Start/Stop Button Mode", startStopButtonMode + dialog = startStopDialog, "Start/Stop Button" + field = "Start/Stop Button Pin", startStopButtonPin + field = "Start/Stop Button Mode", startStopButtonMode + field = "Starter Control", starterControlPin, {startStopButtonPin != 0} + field = "Start cranking maximum time", startCrankingDuration, {startStopButtonPin != 0} dialog = energySystems, "Battery and Alternator Settings", yAxis panel = batteryDialog panel = alternator - - dialog = speedSensorLeft + panel = startStopDialog + + dialog = speedSensorAnalog field = "Input pin", vehicleSpeedSensorInputPin field = "revolution to speed mult", vehicleSpeedCoef + dialog = speedSensorCan + field = "Vss Car Type", canVssNbcType, { enableCanVss } + + dialog = speedSensorLeft, "Speed sensor config", yAxis + panel = speedSensorCan, { enableCanVss } + panel = speedSensorAnalog, { enableCanVss == 0 } + field = "Enable CANbus VSS values", enableCanVss, { canReadEnabled } + dialog = speedSensor, "Speed sensor", xAxis panel = speedSensorLeft gauge = VSSGauge - + ; Engine->Other inputs dialog = analogInputSettings, "Analog Input Settings" field = "!ECU reboot needed to apply these settings" field = "Use fixed baro corr from MAP", useFixedBaroCorrFromMap field = "Analog divider ratio", analogInputDividerCoefficient - field = "Use BiQuad averaging", useBiQuadAnalogFiltering - field = "Smoothing factor", slowAdcAlpha, {useBiQuadAnalogFiltering == 0} - field = "Bi_Q a0", biQuad_a0, {useBiQuadAnalogFiltering == 1} - field = "Bi_Q a1", biQuad_a1, {useBiQuadAnalogFiltering == 1} - field = "Bi_Q a2", biQuad_a2, {useBiQuadAnalogFiltering == 1} - field = "Bi_Q b1", biQuad_b1, {useBiQuadAnalogFiltering == 1} - field = "Bi_Q b2", biQuad_b2, {useBiQuadAnalogFiltering == 1} + field = "Smoothing factor", slowAdcAlpha dialog = tachSettings, "Tachometer output" field = "!See also dizzySparkOutputPin" @@ -3459,8 +3692,13 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" field = "Enable rusEfi CAN data", enableVerboseCanTx field = "rusEfi CAN data base address", verboseCanBaseAddress field = "Can Sleep Period", canSleepPeriodMs - field = "RX pin", canRxPin - field = "TX pin", canTxPin + field = "RX pin", canRxPin + field = "TX pin", canTxPin + + dialog = auxSerial, "AUX Serial" + field = "RX pin", auxSerialRxPin + field = "TX pin", auxSerialTxPin + field = "Serial Baud Rate", auxSerialSpeed dialog = sdCard, "SD Card Logger" field = "SdCard", isSdCardEnabled @@ -3487,19 +3725,19 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" field = "D7 pin", HD44780_db7 dialog = tle8888, "TLE8888", yAxis - field = "TLE8888 Chip Select", tle8888_cs - field = "TLE8888 SPI", tle8888spiDevice - field = "useTLE8888_hall_mode", useTLE8888_hall_mode + field = "TLE8888 Chip Select", tle8888_cs + field = "TLE8888 SPI", tle8888spiDevice + field = "Mode", tle8888mode field = "useTLE8888 cranking reset hack", useTLE8888_cranking_hack commandButton = "Reinit", cmd_tle8888_init dialog = connection, "", yAxis field = "ADC vRef voltage", adcVcc - panel = tsPort + panel = tsPort panel = canBus - panel = sdCard + panel = auxSerial + panel = sdCard panel = gpsReceiver - panel = tle8888 dialog = joystickPanel, "Joystick" field = "joustick center button", joystickCenterPin @@ -3522,6 +3760,8 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" dialog = debugging, "Debug" field = "!https://rusefi.com/s/debugmode" field = "Debug mode", debugMode + field = "Warning Text", warning_message + field = "showHumanReadableWarning (affects Burn)", showHumanReadableWarning dialog = limits, "Limits" @@ -3627,7 +3867,7 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" field = "aux valve #1", auxValves1 field = "aux valve #2", auxValves2 field = "Start/Stop Button", startStopButtonPin - field = "" + field = "External Knock", externalKnockSenseAdc dialog = fsioFrequency, "Frequency" field = "freq #1", fsioFrequency1 @@ -3676,6 +3916,7 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" dialog = fsioFormulas, "FSIO Formulas" field = "!FSIO uses Reverse Polish Notation. Please read http://rusefi.com/s/fsio" + field = "#fsioinfo command in rusEfi console could be useful while troubleshooting those" field = "#1", fsioFormulas1 field = "#2", fsioFormulas2 field = "#3", fsioFormulas3 @@ -3772,43 +4013,37 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" field = "pFactor", etb_pFactor, {throttlePedalPositionAdcChannel != 16} field = "iFactor", etb_iFactor, {throttlePedalPositionAdcChannel != 16} field = "dFactor", etb_dFactor, {throttlePedalPositionAdcChannel != 16} - field = "offset", etb_offset, {throttlePedalPositionAdcChannel != 16} field = "control period", etb_periodMs, {throttlePedalPositionAdcChannel != 16} field = "pid min", etb_minValue, {throttlePedalPositionAdcChannel != 16} field = "pid max", etb_maxValue, {throttlePedalPositionAdcChannel != 16} field = "iTermMin", etb_iTermMin, {throttlePedalPositionAdcChannel != 16} field = "iTermMax", etb_iTermMax, {throttlePedalPositionAdcChannel != 16} + dialog = etbIdleDialog, "ETB Idle" + field = "use ETB for idle", useETBforIdleControl + field = "ETB idle maximum angle", etbIdleThrottleRange dialog = etbDialogLeft field = "https://rusefi.com/s/etb" field = "Detailed status in console", isVerboseETB field = "Pause ETB control", pauseEtbControl - field = "Throttle Pedal Up", throttlePedalUpVoltage - field = "Throttle Pedal Wide Open", throttlePedalWOTVoltage field = etbCalibrationOnStart, etbCalibrationOnStart - field = "TPS#2 min", tps2Min, { tps2_1AdcChannel != 16 } - field = "TPS#2 max", tps2Max, { tps2_1AdcChannel != 16 } ; we need the term about stepper idle in here, because there's a bug in TS that you can't have different visibility ; criteria for the same panel when used in multiple places panel = hbridgeHardware, { throttlePedalPositionAdcChannel != 16 || useStepperIdle && useHbridges } - panel = etbPidDialog + + dialog = etbAutotune, "PID Autotune" + field = "!Set debug mode below to 'ETB Autotune' to show results" + field = "Debug mode", debugMode + commandButton = "ETB PID Autotune", cmd_etb_autotune dialog = etbDialogRight - field = "!https://rusefi.com/s/debugmode" - field = "Neutral Position", etbNeutralPosition - field = "Debug mode", debugMode - field = "use ETB for idle", useETBforIdleControl - field = "ETB idle maximum angle", etbIdleThrottleRange - field = "Press buttons to calibrate sensors" - field = "You would have to remove air filter to move throttle manually" - commandButton = "TPS#1 closed position", cmd_calibrate_tps_1_closed - commandButton = "TPS#1 wide open position", cmd_calibrate_tps_1_wot - field = "Not many vehicles have two throttle bodies but some do" - commandButton = "TPS#2 closed position", cmd_calibrate_tps_2_closed - commandButton = "TPS#2 wide open position", cmd_calibrate_tps_2_wot - commandButton = "Pedal Up", cmd_calibrate_pedal_up - commandButton = "Pedal Down", cmd_calibrate_pedal_down + panel = etbIdleDialog + panel = etbPidDialog + panel = etbAutotune + + ; Neutral position handling not yet implemented! + ;field = "Neutral Position", etbNeutralPosition dialog = etbDialog, "Electronic Throttle Body (beta)", border topicHelp = "etbHelp" @@ -3837,12 +4072,13 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" commandButton = "Injector #8", cmd_test_inj8 dialog = testMisc, "Misc" - commandButton = "Come To Pit", cmd_call_from_pit +; commandButton = "Come To Pit", cmd_call_from_pit commandButton = "Fuel Pump", cmd_test_fuel_pump commandButton = "Radiator Fan", cmd_test_radiator_fan commandButton = "Check Engine", cmd_test_check_engine_light commandButton = "Idle Air Valve", cmd_test_idle_valve commandButton = "A/C Relay", cmd_test_ac_relay + commandButton = "Starter Relay", cmd_test_starter_relay commandButton = "Stop Engine", cmd_stop_engine commandButton = "Write Config", cmd_write_config commandButton = "Reset ECU", cmd_reset_controller @@ -3868,7 +4104,7 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" ; Board->ECU stimulator dialog = ecuStimulator, "ECU stimulator" field = "Trigger Simulator", triggerSimulatorFrequency - field = "self-stimulation", directSelfStimulation + commandButton = "Enable Internal Trigger Simulation", cmd_enable_self_stim field = "" field = "digipot spi", digitalPotentiometerSpiDevice field = "digipot CS #0", digitalPotentiometerChipSelect1 @@ -3945,7 +4181,94 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" field = "Ignition Math Logic @", ignMathCalculateAtIndex field = "MAP Averaging Logic @", mapAveragingSchedulingAtIndex - field = "Target temperature", postCrankingTargetClt + + help = helpGeneral, "rusEfi General Help" + webHelp = "http://www.rusefi.com/" + text = "" + + dialog = gppwm1left, "" + field = "Pin", gppwm1_pin + field = "" + field = "Set frequency to 0hz for on-off mode" + field = "Frequency", gppwm1_pwmFrequency, {gppwm1_pin != 0} + field = "" + field = "On above duty", gppwm1_onAboveDuty, {gppwm1_pin != 0 && gppwm1_pwmFrequency == 0} + field = "Off below duty", gppwm1_offBelowDuty, {gppwm1_pin != 0 && gppwm1_pwmFrequency == 0} + field = "Duty if error", gppwm1_dutyIfError, {gppwm1_pin != 0} + field = "" + field = "Load Axis", gppwm1_loadAxis, {gppwm1_pin != 0} + field = "" + field = "" + field = "" + field = "" + field = "" + + dialog = gppwm1, "General Purpose PWM 1", xAxis + panel = gppwm1left + panel = gppwm1Tbl, {gppwm1_pin != 0} + + dialog = gppwm2left, "" + field = "Pin", gppwm2_pin + field = "" + field = "Set frequency to 0hz for on-off mode" + field = "Frequency", gppwm2_pwmFrequency, {gppwm2_pin != 0} + field = "" + field = "On above duty", gppwm2_onAboveDuty, {gppwm2_pin != 0 && gppwm2_pwmFrequency == 0} + field = "Off below duty", gppwm2_offBelowDuty, {gppwm2_pin != 0 && gppwm2_pwmFrequency == 0} + field = "Duty if error", gppwm2_dutyIfError, {gppwm2_pin != 0} + field = "" + field = "Load Axis", gppwm2_loadAxis, {gppwm2_pin != 0} + field = "" + field = "" + field = "" + field = "" + field = "" + + dialog = gppwm2, "General Purpose PWM 2", xAxis + panel = gppwm2left + panel = gppwm2Tbl, {gppwm2_pin != 0} + + dialog = gppwm3left, "" + field = "Pin", gppwm3_pin + field = "" + field = "Set frequency to 0hz for on-off mode" + field = "Frequency", gppwm3_pwmFrequency, {gppwm3_pin != 0} + field = "" + field = "On above duty", gppwm3_onAboveDuty, {gppwm3_pin != 0 && gppwm3_pwmFrequency == 0} + field = "Off below duty", gppwm3_offBelowDuty, {gppwm3_pin != 0 && gppwm3_pwmFrequency == 0} + field = "Duty if error", gppwm3_dutyIfError, {gppwm3_pin != 0} + field = "" + field = "Load Axis", gppwm3_loadAxis, {gppwm3_pin != 0} + field = "" + field = "" + field = "" + field = "" + field = "" + + dialog = gppwm3, "General Purpose PWM 3", xAxis + panel = gppwm3left + panel = gppwm3Tbl, {gppwm3_pin != 0} + + dialog = gppwm4left, "" + field = "Pin", gppwm4_pin + field = "" + field = "Set frequency to 0hz for on-off mode" + field = "Frequency", gppwm4_pwmFrequency, {gppwm4_pin != 0} + field = "" + field = "On above duty", gppwm4_onAboveDuty, {gppwm4_pin != 0 && gppwm4_pwmFrequency == 0} + field = "Off below duty", gppwm4_offBelowDuty, {gppwm4_pin != 0 && gppwm4_pwmFrequency == 0} + field = "Duty if error", gppwm4_dutyIfError, {gppwm4_pin != 0} + field = "" + field = "Load Axis", gppwm4_loadAxis, {gppwm4_pin != 0} + field = "" + field = "" + field = "" + field = "" + field = "" + + dialog = gppwm4, "General Purpose PWM 4", xAxis + panel = gppwm4left + panel = gppwm4Tbl, {gppwm4_pin != 0} [Tools] ;addTool = toolName, PanelName diff --git a/firmware/tunerstudio/rusefi_kinetis.ini b/firmware/tunerstudio/rusefi_kinetis.ini index 1ba1e65198..62af2e7f61 100644 --- a/firmware/tunerstudio/rusefi_kinetis.ini +++ b/firmware/tunerstudio/rusefi_kinetis.ini @@ -40,11 +40,14 @@ enable2ndByteCanID = false ; settingOption = DEFAULT, "Speed Density" ; DEFAULT will be over looked and this will fall into the #else block of the statement. +[MegaTune] + ; https://rusefi.com/forum/viewtopic.php?p=36201#p36201 + signature = "rusEFI v1.2020.4" [TunerStudio] queryCommand = "S" versionInfo = "V" ; firmwave version for title bar. - signature = "rusEFI v1.2020.3" ; signature is expected to be 7 or more characters. + signature = "rusEFI v1.2020.4" ; signature is expected to be 7 or more characters. [Constants] ; new packet serial format with CRC @@ -66,6 +69,7 @@ enable2ndByteCanID = false ; we have current pageSize or (pageSize + 8) here? ; crc32CheckCommand = "k\x00\x00\x00\x00\x36\xB8" + retrieveConfigError = "e" ;communication settings pageActivationDelay = 500 ; Milliseconds delay after burn command. See https://sourceforge.net/p/rusefi/tickets/77/ @@ -85,7 +89,7 @@ enable2ndByteCanID = false ; see PAGE_0_SIZE in C source code ; CONFIG_DEFINITION_START -; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on integration/rusefi_config.txt Fri Mar 20 19:55:09 EDT 2020 +; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on kineris_gen_config.bat integration/rusefi_config.txt Sun Apr 26 14:18:05 EDT 2020 pageSize = 20000 page = 1 @@ -94,7 +98,7 @@ page = 1 injector_flow = scalar, F32, 8, "cm3/min", 1, 0, 0, 99999, 2 injector_battLagCorrBins = array, F32, 12, [8], "volts", 1, 0, 0.0, 20.0, 2 injector_battLagCorr = array, F32, 44, [8], "ms", 1, 0, 0.0, 50.0, 2 - directSelfStimulation = bits, U32, 76, [0:0], "false", "true" + unused76b0 = bits, U32, 76, [0:0], "false", "true" activateAuxPid1 = bits, U32, 76, [1:1], "false", "true" isVerboseAuxPid1 = bits, U32, 76, [2:2], "false", "true" activateAuxPid2 = bits, U32, 76, [3:3], "false", "true" @@ -103,14 +107,14 @@ page = 1 isVerboseAuxPid3 = bits, U32, 76, [6:6], "false", "true" activateAuxPid4 = bits, U32, 76, [7:7], "false", "true" isVerboseAuxPid4 = bits, U32, 76, [8:8], "false", "true" - useBiQuadAnalogFiltering= bits, U32, 76, [9:9], "false", "true" + isCJ125Verbose = bits, U32, 76, [9:9], "false", "true" cj125isUaDivided = bits, U32, 76, [10:10], "false", "true" cj125isLsu49 = bits, U32, 76, [11:11], "false", "true" etb_use_two_wires = bits, U32, 76, [12:12], "false", "true" isDoubleSolenoidIdle = bits, U32, 76, [13:13], "false", "true" showSdCardWarning = bits, U32, 76, [14:14], "false", "true" cj125isUrDivided = bits, U32, 76, [15:15], "false", "true" - useTLE8888_hall_mode = bits, U32, 76, [16:16], "false", "true" + issue_294_unused = bits, U32, 76, [16:16], "false", "true" useTLE8888_cranking_hack= bits, U32, 76, [17:17], "false", "true" useInstantRpmForIdle = bits, U32, 76, [18:18], "false", "true" absoluteFuelPressure = bits, U32, 76, [19:19], "false", "true" @@ -118,7 +122,7 @@ page = 1 rollingLaunchEnabled = bits, U32, 76, [21:21], "false", "true" antiLagEnabled = bits, U32, 76, [22:22], "false", "true" useRunningMathForCranking= bits, U32, 76, [23:23], "Fixed", "Fuel Map" - issue_294_25 = bits, U32, 76, [24:24], "false", "true" + displayLogicLevelsInEngineSniffer= bits, U32, 76, [24:24], "false", "true" issue_294_26 = bits, U32, 76, [25:25], "false", "true" issue_294_27 = bits, U32, 76, [26:26], "false", "true" issue_294_28 = bits, U32, 76, [27:27], "false", "true" @@ -190,7 +194,7 @@ page = 1 fanOnTemperature = scalar, F32, 468, "*C", 1, 0, 0, 1000.0, 0 fanOffTemperature = scalar, F32, 472, "*C", 1, 0, 0, 1000.0, 0 vehicleSpeedCoef = scalar, F32, 476, "coef", 1, 0, 0.01, 2000.0, 2 - canNbcType = bits, U32, 480, [0:7], "BMW", "FIAT", "VAG" , "MAZDA RX8" + canNbcType = bits, U32, 480, [0:7], "None", "FIAT", "VAG" , "MAZDA RX8", "BMW", "W202" canSleepPeriodMs = scalar, S32, 484, "ms", 1, 0, 0, 1000.0, 2 ambiguousOperationMode = bits, U32, 488, [0:7], "INVALID", "4 stroke without cam sensor", "4 stroke with cam sensor", "2 stroke", "4 stroke with symmetrical crank (requires VVT input)", "INVALID", "INVALID", "INVALID" displayMode = bits, U32, 492, [0:7], "none", "hd44780", "hd44780 over pcf8574", "INVALID" @@ -204,9 +208,9 @@ page = 1 tps2_1AdcChannel = bits, U08, 515, [0:7] "PA2", "PA3", "INVALID", "PD3", "INVALID", "INVALID", "INVALID", "PB12", "PB13", "INVALID", "PE2", "INVALID", "PC14", "PC15", "PC16", "PC17", "Disabled", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" ;no TS info - skipping overrideCrankingIgnition offset 516 sensorChartFrequency = scalar, S32, 520, "index", 1, 0, 0, 300, 0 ; size 4 - trigger_type = bits, U32, 524, [0:7], "custom toothed wheel", "Ford Aspire", "Dodge Neon 1995", "Miata NA", "Miata NB", "GM_7X", "Cooper R50", "Mazda SOHC 4", "60/2", "36/1", "Honda 4+24+1", "Mitsubishi", "Honda 4+24", "Honda 1+4+24", "Dodge Neon 2003", "Mazda DOHC 1+4", "1+1", "1+60/2", "Single Tooth", "Dodge Ram 1+16", "60/2 VW", "Honda 1+24", "Dodge Stratus", "36_2_2_2", "Nissan Primera", "2JZ", "Rover K", "GM LS 24", "Honda CBR 600", "2JZ_1_12", "Honda CBR 600 custom", "3/1 skipped" , "Dodge Neon 2003 crank", "Miata VVT", "trg34", "trg35", "Subaru 7+6", "Jeep 18-2-2-2", "WIP", "Dodge Neon 1995 crank only", "Jeep XJ 4 cyl", "FiatIAQ_P8", "Mazda Z5", "trg43", "trg44", "trg45", "INVALID" - trigger_unusedTriggerBit0= bits, U32, 528, [0:0], "false", "true" - trigger_unusedTriggerBit1= bits, U32, 528, [1:1], "false", "true" + trigger_type = bits, U32, 524, [0:7], "custom toothed wheel", "Ford Aspire", "Dodge Neon 1995", "Miata NA", "Miata NB", "GM_7X", "Cooper R50", "Mazda SOHC 4", "60/2", "36/1", "Honda 4+24+1", "Mitsubishi", "Honda 4+24", "Honda 1+4+24", "Dodge Neon 2003", "Mazda DOHC 1+4", "1+1", "1+60/2", "Single Tooth", "Dodge Ram 1+16", "60/2 VW", "Honda 1+24", "Dodge Stratus", "36_2_2_2", "Nissan Primera", "2JZ", "Rover K", "GM LS 24", "Honda CBR 600", "2JZ_1_12", "Honda CBR 600 custom", "3/1 skipped" , "Dodge Neon 2003 crank", "Miata VVT", "trg34", "trg35", "Subaru 7+6", "Jeep 18-2-2-2", "WIP", "Dodge Neon 1995 crank only", "Jeep XJ 4 cyl", "FiatIAQ_P8", "Mazda Z5", "trg43", "Renix 44-2-2", "Renix 66-2-2-2", "Honda K 12+1", "trg47", "trg48", "INVALID" + trigger_todoRemoveMeOneDay0= bits, U32, 528, [0:0], "false", "true" + trigger_todoRemoveMeOneDay1= bits, U32, 528, [1:1], "false", "true" trigger_useOnlyFirstChannel= bits, U32, 528, [2:2], "false", "true" trigger_unusedBit_4_3 = bits, U32, 528, [3:3], "false", "true" trigger_unusedBit_4_4 = bits, U32, 528, [4:4], "false", "true" @@ -245,7 +249,7 @@ page = 1 mafAdcChannel = bits, U08, 543, [0:7] "PA2", "PA3", "INVALID", "PD3", "INVALID", "INVALID", "INVALID", "PB12", "PB13", "INVALID", "PE2", "INVALID", "PC14", "PC15", "PC16", "PC17", "Disabled", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" globalFuelCorrection = scalar, F32, 544, "coef", 1, 0.0, 0, 1000.0, 2 adcVcc = scalar, F32, 548, "volts", 1, 0.0, 0, 6.0, 3 -;no TS info - skipping maxKnockSubDeg offset 552 + maxKnockSubDeg = scalar, F32, 552, "Deg", 1, 0, 0, 100, 0 camInputs1 = bits, U08, 556, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "N/A", "N/A", "PA10", "PA11", "PA12", "PA13", "N/A", "N/A", "N/A", "N/A", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "N/A", "N/A", "N/A", "N/A", "PB12", "PB13", "N/A", "N/A", "N/A", "N/A", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "N/A", "N/A", "N/A", "N/A", "PC14", "PC15", "PC16", "PC17", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "PD15", "PD16", "N/A", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6", "PE7", "PE8", "PE9", "PE10", "PE11", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A" camInputs2 = bits, U08, 557, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "N/A", "N/A", "PA10", "PA11", "PA12", "PA13", "N/A", "N/A", "N/A", "N/A", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "N/A", "N/A", "N/A", "N/A", "PB12", "PB13", "N/A", "N/A", "N/A", "N/A", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "N/A", "N/A", "N/A", "N/A", "PC14", "PC15", "PC16", "PC17", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "PD15", "PD16", "N/A", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6", "PE7", "PE8", "PE9", "PE10", "PE11", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A" camInputs3 = bits, U08, 558, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "N/A", "N/A", "PA10", "PA11", "PA12", "PA13", "N/A", "N/A", "N/A", "N/A", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "N/A", "N/A", "N/A", "N/A", "PB12", "PB13", "N/A", "N/A", "N/A", "N/A", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "N/A", "N/A", "N/A", "N/A", "PC14", "PC15", "PC16", "PC17", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "PD15", "PD16", "N/A", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6", "PE7", "PE8", "PE9", "PE10", "PE11", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A" @@ -349,13 +353,13 @@ page = 1 canTxPin = bits, U08, 708, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PA16", "PA17", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PB16", "PB17", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PC16", "PC17", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PD16", "PD17", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6", "PE7", "PE8", "PE9", "PE10", "PE11", "PE12", "PE13", "PE14", "PE15", "PE16", "PE17", "TLE6240_1", "TLE6240_2", "TLE6240_3", "TLE6240_4", "TLE6240_5", "TLE6240_6", "TLE6240_7", "TLE6240_8", "TLE6240_9", "TLE6240_10", "TLE6240_11", "TLE6240_12", "TLE6240_13", "TLE6240_14", "TLE6240_15", "TLE6240_16" canRxPin = bits, U08, 709, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PA16", "PA17", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PB16", "PB17", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PC16", "PC17", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PD16", "PD17", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6", "PE7", "PE8", "PE9", "PE10", "PE11", "PE12", "PE13", "PE14", "PE15", "PE16", "PE17", "TLE6240_1", "TLE6240_2", "TLE6240_3", "TLE6240_4", "TLE6240_5", "TLE6240_6", "TLE6240_7", "TLE6240_8", "TLE6240_9", "TLE6240_10", "TLE6240_11", "TLE6240_12", "TLE6240_13", "TLE6240_14", "TLE6240_15", "TLE6240_16" throttlePedalUpPinMode = scalar, U08, 710, "todo", 1, 0, 0, 20, 1 - debugTimerCallback = bits, U08, 711, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PA16", "PA17", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PB16", "PB17", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PC16", "PC17", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PD16", "PD17", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6", "PE7", "PE8", "PE9", "PE10", "PE11", "PE12", "PE13", "PE14", "PE15", "PE16", "PE17", "TLE6240_1", "TLE6240_2", "TLE6240_3", "TLE6240_4", "TLE6240_5", "TLE6240_6", "TLE6240_7", "TLE6240_8", "TLE6240_9", "TLE6240_10", "TLE6240_11", "TLE6240_12", "TLE6240_13", "TLE6240_14", "TLE6240_15", "TLE6240_16" +;no TS info - skipping unused711 offset 711 ;no TS info - skipping idleThreadPeriodMs offset 712 ;no TS info - skipping consoleLoopPeriodMs offset 716 ;no TS info - skipping lcdThreadPeriodMs offset 720 ;no TS info - skipping generalPeriodicThreadPeriodMs offset 724 tunerStudioSerialSpeed = scalar, U32, 728, "BPs", 1, 0, 0,1000000, 0 - canDeviceMode = bits, U32, 732, [0:7], "v0", "v1" +;no TS info - skipping anUnused4Bytes offset 732 triggerSimulatorPins1 = bits, U08, 736, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PA16", "PA17", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PB16", "PB17", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PC16", "PC17", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PD16", "PD17", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6", "PE7", "PE8", "PE9", "PE10", "PE11", "PE12", "PE13", "PE14", "PE15", "PE16", "PE17", "TLE6240_1", "TLE6240_2", "TLE6240_3", "TLE6240_4", "TLE6240_5", "TLE6240_6", "TLE6240_7", "TLE6240_8", "TLE6240_9", "TLE6240_10", "TLE6240_11", "TLE6240_12", "TLE6240_13", "TLE6240_14", "TLE6240_15", "TLE6240_16" triggerSimulatorPins2 = bits, U08, 737, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PA16", "PA17", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PB16", "PB17", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PC16", "PC17", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PD16", "PD17", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6", "PE7", "PE8", "PE9", "PE10", "PE11", "PE12", "PE13", "PE14", "PE15", "PE16", "PE17", "TLE6240_1", "TLE6240_2", "TLE6240_3", "TLE6240_4", "TLE6240_5", "TLE6240_6", "TLE6240_7", "TLE6240_8", "TLE6240_9", "TLE6240_10", "TLE6240_11", "TLE6240_12", "TLE6240_13", "TLE6240_14", "TLE6240_15", "TLE6240_16" triggerSimulatorPins3 = bits, U08, 738, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PA16", "PA17", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PB16", "PB17", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PC16", "PC17", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PD16", "PD17", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6", "PE7", "PE8", "PE9", "PE10", "PE11", "PE12", "PE13", "PE14", "PE15", "PE16", "PE17", "TLE6240_1", "TLE6240_2", "TLE6240_3", "TLE6240_4", "TLE6240_5", "TLE6240_6", "TLE6240_7", "TLE6240_8", "TLE6240_9", "TLE6240_10", "TLE6240_11", "TLE6240_12", "TLE6240_13", "TLE6240_14", "TLE6240_15", "TLE6240_16" @@ -405,7 +409,8 @@ page = 1 hip9011IntHoldPin = bits, U08, 754, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PA16", "PA17", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PB16", "PB17", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PC16", "PC17", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PD16", "PD17", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6", "PE7", "PE8", "PE9", "PE10", "PE11", "PE12", "PE13", "PE14", "PE15", "PE16", "PE17", "TLE6240_1", "TLE6240_2", "TLE6240_3", "TLE6240_4", "TLE6240_5", "TLE6240_6", "TLE6240_7", "TLE6240_8", "TLE6240_9", "TLE6240_10", "TLE6240_11", "TLE6240_12", "TLE6240_13", "TLE6240_14", "TLE6240_15", "TLE6240_16" hip9011IntHoldPinMode = bits, U08, 755, [0:7], "default", "default inverted", "open collector", "open collector inverted" verboseCanBaseAddress = scalar, U32, 756, "", 1, 0, 0, 536870911, 0 -;no TS info - skipping unrealisticRpmThreashold offset 760 + mc33_hvolt = scalar, U08, 760, "v", 1, 0, 0, 100, 0 +;no TS info - skipping unusedHere offset 761 gpioPinModes1 = bits, U08, 764, [0:7], "default", "default inverted", "open collector", "open collector inverted" gpioPinModes2 = bits, U08, 765, [0:7], "default", "default inverted", "open collector", "open collector inverted" gpioPinModes3 = bits, U08, 766, [0:7], "default", "default inverted", "open collector", "open collector inverted" @@ -447,7 +452,7 @@ page = 1 max31855_cs7 = bits, U08, 802, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PA16", "PA17", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PB16", "PB17", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PC16", "PC17", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PD16", "PD17", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6", "PE7", "PE8", "PE9", "PE10", "PE11", "PE12", "PE13", "PE14", "PE15", "PE16", "PE17", "TLE6240_1", "TLE6240_2", "TLE6240_3", "TLE6240_4", "TLE6240_5", "TLE6240_6", "TLE6240_7", "TLE6240_8", "TLE6240_9", "TLE6240_10", "TLE6240_11", "TLE6240_12", "TLE6240_13", "TLE6240_14", "TLE6240_15", "TLE6240_16" max31855_cs8 = bits, U08, 803, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PA16", "PA17", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PB16", "PB17", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PC16", "PC17", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PD16", "PD17", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6", "PE7", "PE8", "PE9", "PE10", "PE11", "PE12", "PE13", "PE14", "PE15", "PE16", "PE17", "TLE6240_1", "TLE6240_2", "TLE6240_3", "TLE6240_4", "TLE6240_5", "TLE6240_6", "TLE6240_7", "TLE6240_8", "TLE6240_9", "TLE6240_10", "TLE6240_11", "TLE6240_12", "TLE6240_13", "TLE6240_14", "TLE6240_15", "TLE6240_16" sdCardPeriodMs = scalar, S16, 804, "ms", 1, 0, 0, 30000, 0 - debugSetTimer = bits, U08, 806, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PA16", "PA17", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PB16", "PB17", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PC16", "PC17", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PD16", "PD17", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6", "PE7", "PE8", "PE9", "PE10", "PE11", "PE12", "PE13", "PE14", "PE15", "PE16", "PE17", "TLE6240_1", "TLE6240_2", "TLE6240_3", "TLE6240_4", "TLE6240_5", "TLE6240_6", "TLE6240_7", "TLE6240_8", "TLE6240_9", "TLE6240_10", "TLE6240_11", "TLE6240_12", "TLE6240_13", "TLE6240_14", "TLE6240_15", "TLE6240_16" +;no TS info - skipping unused806 offset 806 debugMapAveraging = bits, U08, 807, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PA16", "PA17", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PB16", "PB17", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PC16", "PC17", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PD16", "PD17", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6", "PE7", "PE8", "PE9", "PE10", "PE11", "PE12", "PE13", "PE14", "PE15", "PE16", "PE17", "TLE6240_1", "TLE6240_2", "TLE6240_3", "TLE6240_4", "TLE6240_5", "TLE6240_6", "TLE6240_7", "TLE6240_8", "TLE6240_9", "TLE6240_10", "TLE6240_11", "TLE6240_12", "TLE6240_13", "TLE6240_14", "TLE6240_15", "TLE6240_16" starterRelayDisablePin = bits, U08, 808, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "N/A", "N/A", "PA10", "PA11", "PA12", "PA13", "N/A", "N/A", "N/A", "N/A", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "N/A", "N/A", "N/A", "N/A", "PB12", "PB13", "N/A", "N/A", "N/A", "N/A", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "N/A", "N/A", "N/A", "N/A", "PC14", "PC15", "PC16", "PC17", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "PD15", "PD16", "N/A", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6", "PE7", "PE8", "PE9", "PE10", "PE11", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "TLE6240_1", "TLE6240_2", "TLE6240_3", "TLE6240_4", "TLE6240_5", "TLE6240_6", "TLE6240_7", "TLE6240_8", "TLE6240_9", "TLE6240_10", "TLE6240_11", "TLE6240_12", "TLE6240_13", "TLE6240_14", "TLE6240_15", "TLE6240_16" starterRelayDisableMode = bits, U08, 809, [0:7], "default", "default inverted", "open collector", "open collector inverted" @@ -456,8 +461,9 @@ page = 1 mapMinBufferLength = scalar, S32, 812, "count", 1, 0, 0, 24, 0 idlePidDeactivationTpsThreshold = scalar, S16, 816, "%", 1, 0, 0, 100.0, 0 stepperParkingExtraSteps = scalar, S16, 818, "%", 1, 0, 0, 3000.0, 0 - unusedmiataNb2VVTRatioFrom = scalar, F32, 820, "value", 1, 0, 0, 1000, 5 - unusedmiataNb2VVTRatioTo = scalar, F32, 824, "value", 1, 0, 0, 1000, 5 +;no TS info - skipping unusedAntilagTimeout offset 820 +;no TS info - skipping antiLagRpmTreshold offset 824 + startCrankingDuration = scalar, S16, 826, "Seconds", 1, 0, 0, 30, 0 triggerErrorPin = bits, U08, 828, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PA16", "PA17", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PB16", "PB17", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PC16", "PC17", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PD16", "PD17", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6", "PE7", "PE8", "PE9", "PE10", "PE11", "PE12", "PE13", "PE14", "PE15", "PE16", "PE17", "TLE6240_1", "TLE6240_2", "TLE6240_3", "TLE6240_4", "TLE6240_5", "TLE6240_6", "TLE6240_7", "TLE6240_8", "TLE6240_9", "TLE6240_10", "TLE6240_11", "TLE6240_12", "TLE6240_13", "TLE6240_14", "TLE6240_15", "TLE6240_16" triggerErrorPinMode = bits, U08, 829, [0:7], "default", "default inverted", "open collector", "open collector inverted" acRelayPin = bits, U08, 830, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "N/A", "N/A", "PA10", "PA11", "PA12", "PA13", "N/A", "N/A", "N/A", "N/A", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "N/A", "N/A", "N/A", "N/A", "PB12", "PB13", "N/A", "N/A", "N/A", "N/A", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "N/A", "N/A", "N/A", "N/A", "PC14", "PC15", "PC16", "PC17", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "PD15", "PD16", "N/A", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6", "PE7", "PE8", "PE9", "PE10", "PE11", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "TLE6240_1", "TLE6240_2", "TLE6240_3", "TLE6240_4", "TLE6240_5", "TLE6240_6", "TLE6240_7", "TLE6240_8", "TLE6240_9", "TLE6240_10", "TLE6240_11", "TLE6240_12", "TLE6240_13", "TLE6240_14", "TLE6240_15", "TLE6240_16" @@ -539,12 +545,12 @@ page = 1 todoClutchDownPinInverted= bits, U32, 976, [1:1], "false", "true" useHbridges = bits, U32, 976, [2:2], "false", "true" multisparkEnable = bits, U32, 976, [3:3], "false", "true" - unusedBit_251_4 = bits, U32, 976, [4:4], "false", "true" - unusedBit_251_5 = bits, U32, 976, [5:5], "false", "true" - unusedBit_251_6 = bits, U32, 976, [6:6], "false", "true" - unusedBit_251_7 = bits, U32, 976, [7:7], "false", "true" - unusedBit_251_8 = bits, U32, 976, [8:8], "false", "true" - unusedBit_251_9 = bits, U32, 976, [9:9], "false", "true" + enableLaunchRetard = bits, U32, 976, [4:4], "false", "true" + enableLaunchBoost = bits, U32, 976, [5:5], "false", "true" + launchDisableBySpeed = bits, U32, 976, [6:6], "false", "true" + enableCanVss = bits, U32, 976, [7:7], "false", "true" + enableInnovateLC2 = bits, U32, 976, [8:8], "false", "true" + showHumanReadableWarning= bits, U32, 976, [9:9], "false", "true" unusedBit_251_10 = bits, U32, 976, [10:10], "false", "true" unusedBit_251_11 = bits, U32, 976, [11:11], "false", "true" unusedBit_251_12 = bits, U32, 976, [12:12], "false", "true" @@ -565,16 +571,16 @@ page = 1 unusedBit_251_27 = bits, U32, 976, [27:27], "false", "true" unusedBit_251_28 = bits, U32, 976, [28:28], "false", "true" unusedBit_251_29 = bits, U32, 976, [29:29], "false", "true" - unusedBit_280_30 = bits, U32, 976, [30:30], "false", "true" - unusedBit_280_31 = bits, U32, 976, [31:31], "false", "true" + unusedBit_282_30 = bits, U32, 976, [30:30], "false", "true" + unusedBit_282_31 = bits, U32, 976, [31:31], "false", "true" etbIo1_directionPin1 = bits, U08, 980, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PA16", "PA17", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PB16", "PB17", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PC16", "PC17", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PD16", "PD17", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6", "PE7", "PE8", "PE9", "PE10", "PE11", "PE12", "PE13", "PE14", "PE15", "PE16", "PE17", "TLE6240_1", "TLE6240_2", "TLE6240_3", "TLE6240_4", "TLE6240_5", "TLE6240_6", "TLE6240_7", "TLE6240_8", "TLE6240_9", "TLE6240_10", "TLE6240_11", "TLE6240_12", "TLE6240_13", "TLE6240_14", "TLE6240_15", "TLE6240_16" etbIo1_directionPin2 = bits, U08, 981, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PA16", "PA17", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PB16", "PB17", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PC16", "PC17", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PD16", "PD17", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6", "PE7", "PE8", "PE9", "PE10", "PE11", "PE12", "PE13", "PE14", "PE15", "PE16", "PE17", "TLE6240_1", "TLE6240_2", "TLE6240_3", "TLE6240_4", "TLE6240_5", "TLE6240_6", "TLE6240_7", "TLE6240_8", "TLE6240_9", "TLE6240_10", "TLE6240_11", "TLE6240_12", "TLE6240_13", "TLE6240_14", "TLE6240_15", "TLE6240_16" etbIo1_controlPin1 = bits, U08, 982, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PA16", "PA17", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PB16", "PB17", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PC16", "PC17", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PD16", "PD17", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6", "PE7", "PE8", "PE9", "PE10", "PE11", "PE12", "PE13", "PE14", "PE15", "PE16", "PE17", "TLE6240_1", "TLE6240_2", "TLE6240_3", "TLE6240_4", "TLE6240_5", "TLE6240_6", "TLE6240_7", "TLE6240_8", "TLE6240_9", "TLE6240_10", "TLE6240_11", "TLE6240_12", "TLE6240_13", "TLE6240_14", "TLE6240_15", "TLE6240_16" - etbIo1_controlPinMode = bits, U08, 983, [0:7], "default", "default inverted", "open collector", "open collector inverted" + etbIo1_disablePin = bits, U08, 983, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PA16", "PA17", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PB16", "PB17", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PC16", "PC17", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PD16", "PD17", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6", "PE7", "PE8", "PE9", "PE10", "PE11", "PE12", "PE13", "PE14", "PE15", "PE16", "PE17", "TLE6240_1", "TLE6240_2", "TLE6240_3", "TLE6240_4", "TLE6240_5", "TLE6240_6", "TLE6240_7", "TLE6240_8", "TLE6240_9", "TLE6240_10", "TLE6240_11", "TLE6240_12", "TLE6240_13", "TLE6240_14", "TLE6240_15", "TLE6240_16" etbIo2_directionPin1 = bits, U08, 984, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PA16", "PA17", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PB16", "PB17", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PC16", "PC17", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PD16", "PD17", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6", "PE7", "PE8", "PE9", "PE10", "PE11", "PE12", "PE13", "PE14", "PE15", "PE16", "PE17", "TLE6240_1", "TLE6240_2", "TLE6240_3", "TLE6240_4", "TLE6240_5", "TLE6240_6", "TLE6240_7", "TLE6240_8", "TLE6240_9", "TLE6240_10", "TLE6240_11", "TLE6240_12", "TLE6240_13", "TLE6240_14", "TLE6240_15", "TLE6240_16" etbIo2_directionPin2 = bits, U08, 985, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PA16", "PA17", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PB16", "PB17", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PC16", "PC17", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PD16", "PD17", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6", "PE7", "PE8", "PE9", "PE10", "PE11", "PE12", "PE13", "PE14", "PE15", "PE16", "PE17", "TLE6240_1", "TLE6240_2", "TLE6240_3", "TLE6240_4", "TLE6240_5", "TLE6240_6", "TLE6240_7", "TLE6240_8", "TLE6240_9", "TLE6240_10", "TLE6240_11", "TLE6240_12", "TLE6240_13", "TLE6240_14", "TLE6240_15", "TLE6240_16" etbIo2_controlPin1 = bits, U08, 986, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PA16", "PA17", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PB16", "PB17", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PC16", "PC17", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PD16", "PD17", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6", "PE7", "PE8", "PE9", "PE10", "PE11", "PE12", "PE13", "PE14", "PE15", "PE16", "PE17", "TLE6240_1", "TLE6240_2", "TLE6240_3", "TLE6240_4", "TLE6240_5", "TLE6240_6", "TLE6240_7", "TLE6240_8", "TLE6240_9", "TLE6240_10", "TLE6240_11", "TLE6240_12", "TLE6240_13", "TLE6240_14", "TLE6240_15", "TLE6240_16" - etbIo2_controlPinMode = bits, U08, 987, [0:7], "default", "default inverted", "open collector", "open collector inverted" + etbIo2_disablePin = bits, U08, 987, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PA16", "PA17", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PB16", "PB17", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PC16", "PC17", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PD16", "PD17", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6", "PE7", "PE8", "PE9", "PE10", "PE11", "PE12", "PE13", "PE14", "PE15", "PE16", "PE17", "TLE6240_1", "TLE6240_2", "TLE6240_3", "TLE6240_4", "TLE6240_5", "TLE6240_6", "TLE6240_7", "TLE6240_8", "TLE6240_9", "TLE6240_10", "TLE6240_11", "TLE6240_12", "TLE6240_13", "TLE6240_14", "TLE6240_15", "TLE6240_16" boostControlPin = bits, U08, 988, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "N/A", "N/A", "PA10", "PA11", "PA12", "PA13", "N/A", "N/A", "N/A", "N/A", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "N/A", "N/A", "N/A", "N/A", "PB12", "PB13", "N/A", "N/A", "N/A", "N/A", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "N/A", "N/A", "N/A", "N/A", "PC14", "PC15", "PC16", "PC17", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "PD15", "PD16", "N/A", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6", "PE7", "PE8", "PE9", "PE10", "PE11", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "TLE6240_1", "TLE6240_2", "TLE6240_3", "TLE6240_4", "TLE6240_5", "TLE6240_6", "TLE6240_7", "TLE6240_8", "TLE6240_9", "TLE6240_10", "TLE6240_11", "TLE6240_12", "TLE6240_13", "TLE6240_14", "TLE6240_15", "TLE6240_16" boostControlPinMode = bits, U08, 989, [0:7], "default", "default inverted", "open collector", "open collector inverted" antiLagActivatePin = bits, U08, 990, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "N/A", "N/A", "PA10", "PA11", "PA12", "PA13", "N/A", "N/A", "N/A", "N/A", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "N/A", "N/A", "N/A", "N/A", "PB12", "PB13", "N/A", "N/A", "N/A", "N/A", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "N/A", "N/A", "N/A", "N/A", "PC14", "PC15", "PC16", "PC17", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "PD15", "PD16", "N/A", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6", "PE7", "PE8", "PE9", "PE10", "PE11", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A" @@ -596,7 +602,30 @@ page = 1 launchFuelAdded = scalar, S32, 1040, "%", 1, 0, 0, 100.0, 0 launchBoostDuty = scalar, S32, 1044, "%", 1, 0, 0, 100.0, 0 hardCutRpmRange = scalar, S32, 1048, "rpm", 1, 0, 0, 3000.0, 2 -;no TS info - skipping unusedAtOldBoardConfigurationEnd offset 1052 +;no TS info - skipping launchAdvanceRpmRange offset 1052 +;no TS info - skipping launchTpsTreshold offset 1056 +;no TS info - skipping launchActivateDelay offset 1060 + stft_maxIdleRegionRpm = scalar, U08, 1064, "RPM", 50, 0, 0.0, 12000.0, 0 + stft_maxOverrunLoad = scalar, U08, 1065, "load", 1, 0, 0.0, 250, 0 + stft_minPowerLoad = scalar, U08, 1066, "load", 1, 0, 0.0, 250, 0 + stft_deadband = scalar, U08, 1067, "%", 0.1, 0, 0, 3, 1 + stft_minClt = scalar, S08, 1068, "C", 1, 0, -20, 100, 0 + stft_minAfr = scalar, U08, 1069, "afr", 0.1, 0, 10, 20, 1 + stft_maxAfr = scalar, U08, 1070, "afr", 0.1, 0, 10, 20, 1 + stft_startupDelay = scalar, U08, 1071, "seconds", 1, 0, 0, 250, 0 + stft_cellCfgs1_maxAdd = scalar, S08, 1072, "%", 1, 0, 0, 25, 0 + stft_cellCfgs1_maxRemove = scalar, S08, 1073, "%", 1, 0, -25, 0, 0 + stft_cellCfgs1_timeConstant = scalar, U16, 1074, "sec", 0.1, 0, 0.1, 100, 2 + stft_cellCfgs2_maxAdd = scalar, S08, 1076, "%", 1, 0, 0, 25, 0 + stft_cellCfgs2_maxRemove = scalar, S08, 1077, "%", 1, 0, -25, 0, 0 + stft_cellCfgs2_timeConstant = scalar, U16, 1078, "sec", 0.1, 0, 0.1, 100, 2 + stft_cellCfgs3_maxAdd = scalar, S08, 1080, "%", 1, 0, 0, 25, 0 + stft_cellCfgs3_maxRemove = scalar, S08, 1081, "%", 1, 0, -25, 0, 0 + stft_cellCfgs3_timeConstant = scalar, U16, 1082, "sec", 0.1, 0, 0.1, 100, 2 + stft_cellCfgs4_maxAdd = scalar, S08, 1084, "%", 1, 0, 0, 25, 0 + stft_cellCfgs4_maxRemove = scalar, S08, 1085, "%", 1, 0, -25, 0, 0 + stft_cellCfgs4_timeConstant = scalar, U16, 1086, "sec", 0.1, 0, 0.1, 100, 2 +;no TS info - skipping unusedAtOldBoardConfigurationEnd offset 1088 vvtDisplayInverted = bits, U32, 1464, [0:0], "false", "true" fuelClosedLoopCorrectionEnabled= bits, U32, 1464, [1:1], "false", "true" isVerboseIAC = bits, U32, 1464, [2:2], "false", "true" @@ -726,7 +755,7 @@ page = 1 tps2Max = scalar, S16, 1770, "ADC", 1, 0, 0, 1023, 0 starterControlPin = bits, U08, 1772, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "N/A", "N/A", "PA10", "PA11", "PA12", "PA13", "N/A", "N/A", "N/A", "N/A", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "N/A", "N/A", "N/A", "N/A", "PB12", "PB13", "N/A", "N/A", "N/A", "N/A", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "N/A", "N/A", "N/A", "N/A", "PC14", "PC15", "PC16", "PC17", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "PD15", "PD16", "N/A", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6", "PE7", "PE8", "PE9", "PE10", "PE11", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "TLE6240_1", "TLE6240_2", "TLE6240_3", "TLE6240_4", "TLE6240_5", "TLE6240_6", "TLE6240_7", "TLE6240_8", "TLE6240_9", "TLE6240_10", "TLE6240_11", "TLE6240_12", "TLE6240_13", "TLE6240_14", "TLE6240_15", "TLE6240_16" startStopButtonMode = scalar, U08, 1773, "todo", 1, 0, 0, 20, 1 -;no TS info - skipping unusedFormerWarmupAfrPid offset 1774 + mc33816_flag0 = bits, U08, 1774, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PA16", "PA17", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PB16", "PB17", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PC16", "PC17", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PD16", "PD17", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6", "PE7", "PE8", "PE9", "PE10", "PE11", "PE12", "PE13", "PE14", "PE15", "PE16", "PE17", "TLE6240_1", "TLE6240_2", "TLE6240_3", "TLE6240_4", "TLE6240_5", "TLE6240_6", "TLE6240_7", "TLE6240_8", "TLE6240_9", "TLE6240_10", "TLE6240_11", "TLE6240_12", "TLE6240_13", "TLE6240_14", "TLE6240_15", "TLE6240_16" tachPulsePerRev = scalar, U08, 1775, "Pulse", 1, 0, 1.0, 255.0, 0 mapErrorDetectionTooLow = scalar, F32, 1776, "kPa", 1, 0, -100.0, 100.0, 2 mapErrorDetectionTooHigh = scalar, F32, 1780, "kPa", 1, 0, -100.0, 800.0, 2 @@ -761,9 +790,9 @@ page = 1 startOfCrankingPrimingPulse = scalar, F32, 2032, "ms", 1, 0, 0, 200, 1 afterCrankingIACtaperDuration = scalar, S16, 2036, "cycles", 1, 0, 0, 5000, 0 iacByTpsTaper = scalar, S16, 2038, "percent", 1, 0, 0, 500, 0 - unusedErrorPin = bits, U08, 2040, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PA16", "PA17", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PB16", "PB17", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PC16", "PC17", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PD16", "PD17", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6", "PE7", "PE8", "PE9", "PE10", "PE11", "PE12", "PE13", "PE14", "PE15", "PE16", "PE17", "TLE6240_1", "TLE6240_2", "TLE6240_3", "TLE6240_4", "TLE6240_5", "TLE6240_6", "TLE6240_7", "TLE6240_8", "TLE6240_9", "TLE6240_10", "TLE6240_11", "TLE6240_12", "TLE6240_13", "TLE6240_14", "TLE6240_15", "TLE6240_16" + auxSerialTxPin = bits, U08, 2040, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PA16", "PA17", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PB16", "PB17", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PC16", "PC17", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PD16", "PD17", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6", "PE7", "PE8", "PE9", "PE10", "PE11", "PE12", "PE13", "PE14", "PE15", "PE16", "PE17", "TLE6240_1", "TLE6240_2", "TLE6240_3", "TLE6240_4", "TLE6240_5", "TLE6240_6", "TLE6240_7", "TLE6240_8", "TLE6240_9", "TLE6240_10", "TLE6240_11", "TLE6240_12", "TLE6240_13", "TLE6240_14", "TLE6240_15", "TLE6240_16" warningLedPin = bits, U08, 2041, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PA16", "PA17", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PB16", "PB17", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PC16", "PC17", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PD16", "PD17", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6", "PE7", "PE8", "PE9", "PE10", "PE11", "PE12", "PE13", "PE14", "PE15", "PE16", "PE17", "TLE6240_1", "TLE6240_2", "TLE6240_3", "TLE6240_4", "TLE6240_5", "TLE6240_6", "TLE6240_7", "TLE6240_8", "TLE6240_9", "TLE6240_10", "TLE6240_11", "TLE6240_12", "TLE6240_13", "TLE6240_14", "TLE6240_15", "TLE6240_16" - unused1234234 = bits, U08, 2042, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PA16", "PA17", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PB16", "PB17", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PC16", "PC17", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PD16", "PD17", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6", "PE7", "PE8", "PE9", "PE10", "PE11", "PE12", "PE13", "PE14", "PE15", "PE16", "PE17", "TLE6240_1", "TLE6240_2", "TLE6240_3", "TLE6240_4", "TLE6240_5", "TLE6240_6", "TLE6240_7", "TLE6240_8", "TLE6240_9", "TLE6240_10", "TLE6240_11", "TLE6240_12", "TLE6240_13", "TLE6240_14", "TLE6240_15", "TLE6240_16" + auxSerialRxPin = bits, U08, 2042, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PA16", "PA17", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PB16", "PB17", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PC16", "PC17", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PD16", "PD17", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6", "PE7", "PE8", "PE9", "PE10", "PE11", "PE12", "PE13", "PE14", "PE15", "PE16", "PE17", "TLE6240_1", "TLE6240_2", "TLE6240_3", "TLE6240_4", "TLE6240_5", "TLE6240_6", "TLE6240_7", "TLE6240_8", "TLE6240_9", "TLE6240_10", "TLE6240_11", "TLE6240_12", "TLE6240_13", "TLE6240_14", "TLE6240_15", "TLE6240_16" LIS302DLCsPin = bits, U08, 2043, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PA16", "PA17", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PB16", "PB17", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PC16", "PC17", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PD16", "PD17", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6", "PE7", "PE8", "PE9", "PE10", "PE11", "PE12", "PE13", "PE14", "PE15", "PE16", "PE17", "TLE6240_1", "TLE6240_2", "TLE6240_3", "TLE6240_4", "TLE6240_5", "TLE6240_6", "TLE6240_7", "TLE6240_8", "TLE6240_9", "TLE6240_10", "TLE6240_11", "TLE6240_12", "TLE6240_13", "TLE6240_14", "TLE6240_15", "TLE6240_16" tpsAccelLength = scalar, S32, 2044, "cycles", 1, 0, 1, 200, 0 tpsAccelEnrichmentThreshold = scalar, F32, 2048, "roc", 1, 0, 0, 200, 3 @@ -777,8 +806,9 @@ page = 1 tpsDecelEnleanmentThreshold = scalar, F32, 2080, "roc", 1, 0, 0, 200, 3 tpsDecelEnleanmentMultiplier = scalar, F32, 2084, "coeff", 1, 0, 0, 200, 3 slowAdcAlpha = scalar, F32, 2088, "coeff", 1, 0, 0, 200, 3 - debugMode = bits, U32, 2092, [0:7], "Alternator PID", "TPS acceleration enrichment", "INVALID", "Idle Control", "Engine Load accl enrich", "Trigger Counters", "FSIO_ADC", "AUX_PID_1", "VVT input", "Cranking", "Timing", "Closed-loop fuel corr PID", "VSS", "SD card", "sr5", "Knock", "Trigger Sync", "Electronic Throttle", "Executor", "Bench Test / TS commands", "Aux Valves", "Analog inputs #1", "INSTANT_RPM", "FSIO_EXPRESSION", "Status", "CJ125", "CAN", "MAP", "Metrics", "ETB#2", "Ion Sense", "TLE8888", "Analog inputs #2", "Dwell Metric", "Aux Temperature", "ETB Logic", "Boost Control" -;no TS info - skipping unused_former_warmup_target_afr offset 2096 + debugMode = bits, U32, 2092, [0:7], "Alternator PID", "TPS acceleration enrichment", "INVALID", "Idle Control", "Engine Load accl enrich", "Trigger Counters", "FSIO_ADC", "AUX_PID_1", "VVT input", "Cranking", "Timing", "Closed-loop fuel corr PID", "VSS", "SD card", "sr5", "Knock", "mode16", "Electronic Throttle", "Executor", "Bench Test / TS commands", "Aux Valves", "Analog inputs #1", "INSTANT_RPM", "FSIO_EXPRESSION", "Status", "CJ125", "CAN", "MAP", "Metrics", "ETB#2", "Ion Sense", "TLE8888", "Analog inputs #2", "Dwell Metric", "INVALID", "ETB Logic", "Boost Control", "Start/Stop", "Launch", "ETB Autotune", "Mode40" + auxSerialSpeed = scalar, U32, 2096, "BPs", 1, 0, 0,1000000, 0 +;no TS info - skipping unused_former_warmup_target_afr offset 2100 boostCutPressure = scalar, F32, 2132, "kPa", 1, 0, 0, 500, 0 mapAccelTaperBins = array, F32, 2136, [8], "counter", 1, 0, 0.0, 300, 0 mapAccelTaperMult = array, F32, 2168, [8], "mult", 1, 0, 0.0, 300, 2 @@ -812,18 +842,15 @@ page = 1 narrowToWideOxygenBins = array, F32, 2264, [8], "V", 1, 0, -10.0, 10.0, 3 narrowToWideOxygen = array, F32, 2296, [8], "ratio", 1, 0, -40.0, 40.0, 2 vvtMode = bits, U32, 2328, [0:7], "First half", "Second half", "2GZ", "Miata NB2", "mode4", "mode5", "mode6", "mode7" - biQuad_a0 = scalar, F32, 2332, "v", 1, 0, -1000, 1000, 9 - biQuad_a1 = scalar, F32, 2336, "v", 1, 0, -1000, 1000, 9 - biQuad_a2 = scalar, F32, 2340, "v", 1, 0, -1000, 1000, 9 - biQuad_b1 = scalar, F32, 2344, "v", 1, 0, -1000, 1000, 9 - biQuad_b2 = scalar, F32, 2348, "v", 1, 0, -1000, 1000, 9 +;no TS info - skipping unusedOldBiquad offset 2332 cltTimingBins = array, F32, 2352, [8], "C", 1, 0, -100.0, 250.0, 1 cltTimingExtra = array, F32, 2384, [8], "degree", 1, 0, -400.0, 400.0, 0 - nbVvtIndex = scalar, S32, 2416, "index", 1, 0, 0, 4.0, 0 + tle8888mode = bits, U08, 2416, [0:7], "Auto", "SemiAuto", "Manual", "Hall" +;no TS info - skipping unusedSomethingWasHere offset 2417 ;no TS info - skipping autoTuneCltThreshold offset 2420 ;no TS info - skipping autoTuneTpsRocThreshold offset 2424 ;no TS info - skipping autoTuneTpsQuietPeriod offset 2428 - postCrankingTargetClt = scalar, F32, 2432, "C", 1, 0, 0, 100, 0 +;no TS info - skipping unused2432 offset 2432 postCrankingFactor = scalar, F32, 2436, "mult", 1, 0, 0, 100, 4 postCrankingDurationSec = scalar, F32, 2440, "seconds", 1, 0, 0, 100, 2 auxTempSensor1_tempC_1 = scalar, F32, 2444, "*C", 1, 0, -40, 200, 1 @@ -1010,13 +1037,59 @@ page = 1 iacPidMultTable = array, U08, 4060, [8x8],"%", 1, 0, 0, 999, 2 iacPidMultLoadBins = array, U08, 4124, [8], "Load", 1, 0.0, 0, 500.0, 2 iacPidMultRpmBins = array, U08, 4132, [8], "RPM", 50, 0, 0.0, 12000.0, 0 -;no TS info - skipping mainUnusedEnd offset 4140 + canVssNbcType = bits, U32, 4140, [0:7], "BMW_e46", "W202" + gppwm1_pin = bits, U08, 4144, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "N/A", "N/A", "PA10", "PA11", "PA12", "PA13", "N/A", "N/A", "N/A", "N/A", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "N/A", "N/A", "N/A", "N/A", "PB12", "PB13", "N/A", "N/A", "N/A", "N/A", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "N/A", "N/A", "N/A", "N/A", "PC14", "PC15", "PC16", "PC17", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "PD15", "PD16", "N/A", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6", "PE7", "PE8", "PE9", "PE10", "PE11", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "TLE6240_1", "TLE6240_2", "TLE6240_3", "TLE6240_4", "TLE6240_5", "TLE6240_6", "TLE6240_7", "TLE6240_8", "TLE6240_9", "TLE6240_10", "TLE6240_11", "TLE6240_12", "TLE6240_13", "TLE6240_14", "TLE6240_15", "TLE6240_16" + gppwm1_dutyIfError = scalar, U08, 4145, "%", 1, 0, 0, 100, 0 + gppwm1_pwmFrequency = scalar, U16, 4146, "hz", 1, 0, 0, 500, 0 + gppwm1_onAboveDuty = scalar, U08, 4148, "%", 1, 0, 0, 100, 0 + gppwm1_offBelowDuty = scalar, U08, 4149, "%", 1, 0, 0, 100, 0 + gppwm1_loadAxis = bits, U08, 4150, [0:1], "TPS", "MAP", "CLT", "IAT" +;no TS info - skipping gppwm1_pad offset 4151 + gppwm1_loadBins = array, U08, 4152, [8], "load", 1, 0, 0.0, 250, 0 + gppwm1_rpmBins = array, U08, 4160, [8], "RPM", 50, 0, 0.0, 12000.0, 0 + gppwm1_table = array, U08, 4168, [8x8], "duty", 1, 0, 0, 100, 0 + gppwm2_pin = bits, U08, 4232, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "N/A", "N/A", "PA10", "PA11", "PA12", "PA13", "N/A", "N/A", "N/A", "N/A", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "N/A", "N/A", "N/A", "N/A", "PB12", "PB13", "N/A", "N/A", "N/A", "N/A", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "N/A", "N/A", "N/A", "N/A", "PC14", "PC15", "PC16", "PC17", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "PD15", "PD16", "N/A", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6", "PE7", "PE8", "PE9", "PE10", "PE11", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "TLE6240_1", "TLE6240_2", "TLE6240_3", "TLE6240_4", "TLE6240_5", "TLE6240_6", "TLE6240_7", "TLE6240_8", "TLE6240_9", "TLE6240_10", "TLE6240_11", "TLE6240_12", "TLE6240_13", "TLE6240_14", "TLE6240_15", "TLE6240_16" + gppwm2_dutyIfError = scalar, U08, 4233, "%", 1, 0, 0, 100, 0 + gppwm2_pwmFrequency = scalar, U16, 4234, "hz", 1, 0, 0, 500, 0 + gppwm2_onAboveDuty = scalar, U08, 4236, "%", 1, 0, 0, 100, 0 + gppwm2_offBelowDuty = scalar, U08, 4237, "%", 1, 0, 0, 100, 0 + gppwm2_loadAxis = bits, U08, 4238, [0:1], "TPS", "MAP", "CLT", "IAT" +;no TS info - skipping gppwm2_pad offset 4239 + gppwm2_loadBins = array, U08, 4240, [8], "load", 1, 0, 0.0, 250, 0 + gppwm2_rpmBins = array, U08, 4248, [8], "RPM", 50, 0, 0.0, 12000.0, 0 + gppwm2_table = array, U08, 4256, [8x8], "duty", 1, 0, 0, 100, 0 + gppwm3_pin = bits, U08, 4320, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "N/A", "N/A", "PA10", "PA11", "PA12", "PA13", "N/A", "N/A", "N/A", "N/A", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "N/A", "N/A", "N/A", "N/A", "PB12", "PB13", "N/A", "N/A", "N/A", "N/A", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "N/A", "N/A", "N/A", "N/A", "PC14", "PC15", "PC16", "PC17", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "PD15", "PD16", "N/A", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6", "PE7", "PE8", "PE9", "PE10", "PE11", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "TLE6240_1", "TLE6240_2", "TLE6240_3", "TLE6240_4", "TLE6240_5", "TLE6240_6", "TLE6240_7", "TLE6240_8", "TLE6240_9", "TLE6240_10", "TLE6240_11", "TLE6240_12", "TLE6240_13", "TLE6240_14", "TLE6240_15", "TLE6240_16" + gppwm3_dutyIfError = scalar, U08, 4321, "%", 1, 0, 0, 100, 0 + gppwm3_pwmFrequency = scalar, U16, 4322, "hz", 1, 0, 0, 500, 0 + gppwm3_onAboveDuty = scalar, U08, 4324, "%", 1, 0, 0, 100, 0 + gppwm3_offBelowDuty = scalar, U08, 4325, "%", 1, 0, 0, 100, 0 + gppwm3_loadAxis = bits, U08, 4326, [0:1], "TPS", "MAP", "CLT", "IAT" +;no TS info - skipping gppwm3_pad offset 4327 + gppwm3_loadBins = array, U08, 4328, [8], "load", 1, 0, 0.0, 250, 0 + gppwm3_rpmBins = array, U08, 4336, [8], "RPM", 50, 0, 0.0, 12000.0, 0 + gppwm3_table = array, U08, 4344, [8x8], "duty", 1, 0, 0, 100, 0 + gppwm4_pin = bits, U08, 4408, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "N/A", "N/A", "PA10", "PA11", "PA12", "PA13", "N/A", "N/A", "N/A", "N/A", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "N/A", "N/A", "N/A", "N/A", "PB12", "PB13", "N/A", "N/A", "N/A", "N/A", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "N/A", "N/A", "N/A", "N/A", "PC14", "PC15", "PC16", "PC17", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "PD15", "PD16", "N/A", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6", "PE7", "PE8", "PE9", "PE10", "PE11", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "TLE6240_1", "TLE6240_2", "TLE6240_3", "TLE6240_4", "TLE6240_5", "TLE6240_6", "TLE6240_7", "TLE6240_8", "TLE6240_9", "TLE6240_10", "TLE6240_11", "TLE6240_12", "TLE6240_13", "TLE6240_14", "TLE6240_15", "TLE6240_16" + gppwm4_dutyIfError = scalar, U08, 4409, "%", 1, 0, 0, 100, 0 + gppwm4_pwmFrequency = scalar, U16, 4410, "hz", 1, 0, 0, 500, 0 + gppwm4_onAboveDuty = scalar, U08, 4412, "%", 1, 0, 0, 100, 0 + gppwm4_offBelowDuty = scalar, U08, 4413, "%", 1, 0, 0, 100, 0 + gppwm4_loadAxis = bits, U08, 4414, [0:1], "TPS", "MAP", "CLT", "IAT" +;no TS info - skipping gppwm4_pad offset 4415 + gppwm4_loadBins = array, U08, 4416, [8], "load", 1, 0, 0.0, 250, 0 + gppwm4_rpmBins = array, U08, 4424, [8], "RPM", 50, 0, 0.0, 12000.0, 0 + gppwm4_table = array, U08, 4432, [8x8], "duty", 1, 0, 0, 100, 0 +;no TS info - skipping mainUnusedEnd offset 4496 + warning_message = string, ASCII, 6000, 120 + afterstartCoolantBins = array, F32, 6120, [8], "C", 1, 0, -100.0, 250.0, 0 + afterstartHoldTime = array, F32, 6152, [8], "Seconds", 1, 0, 0, 100, 1 + afterstartEnrich = array, F32, 6184, [8], "%", 1, 0, 0, 600, 1 + afterstartDecayTime = array, F32, 6216, [8], "Seconds", 1, 0, 0, 100, 1 boostTableOpenLoop = array, U08, 6248, [8x8],"", 2, 0 , 0, 3000, 0 boostMapBins = array, U08, 6312, [8], "", 2, 0, 0, 600.0, 1 boostRpmBins = array, U08, 6320, [8], "RPM", 50, 0, 0.0, 12000.0, 0 boostTableClosedLoop = array, U08, 6328, [8x8],"", 2, 0 , 0, 3000, 0 boostTpsBins = array, U08, 6392, [8], "%", 2, 0.0, 0, 100.0, 2 - pedalToTpsTable = array, U08, 6400, [8x8],"deg", 1, 0, -720, 720, 2 + pedalToTpsTable = array, U08, 6400, [8x8],"%", 1, 0, 0, 100, 0 pedalToTpsPedalBins = array, U08, 6464, [8], "%", 1, 0, 0.0, 120.0, 0 pedalToTpsRpmBins = array, U08, 6472, [8], "RPM", 50, 0, 0.0, 12000.0, 0 cltCrankingCorrBins = array, F32, 6480, [8], "C", 1, 0, -100.0, 250.0, 2 @@ -1091,8 +1164,8 @@ page = 1 ; total TS size = 20000 [SettingContextHelp] injector_flow = "This is your injector flow at the fuel pressure used in the vehicle. cc/min, cubic centimetre per minute\nBy the way, g/s = 0.125997881 * (lb/hr)\ng/s = 0.125997881 * (cc/min)/10.5\ng/s = 0.0119997981 * cc/min" - directSelfStimulation = "Should trigger emulator push data right into trigger handling logic, eliminating the need for physical jumper wires?\nSee also triggerSimulatorPins\nPS: Funny name, right? :)" cj125isUaDivided = "Is your UA CJ125 output wired to MCU via resistor divider?" + etb_use_two_wires = "TLE7209 uses two-wire mode. TLE9201 and VNH2SP30 do NOT use two wire mode." cj125isUrDivided = "Is your UR CJ125 output wired to MCU via resistor divider?\nLooks like 3v range should be enough, divider generally not needed." absoluteFuelPressure = "If your fuel regulator does not have vacuum line" tpsErrorDetectionTooLow = "TPS error detection, what TPS % value is unrealistically low" @@ -1150,6 +1223,14 @@ page = 1 launchFuelAdded = "Extra Fuel Added" launchBoostDuty = "Duty Cycle for the Boost Solenoid" hardCutRpmRange = "RPM Range for Hard Cut" + stft_maxIdleRegionRpm = "Below this RPM, the idle region is active" + stft_maxOverrunLoad = "Below this engine load, the overrun region is active" + stft_minPowerLoad = "Above this engine load, the power region is active" + stft_deadband = "When close to correct AFR, pause correction. This can improve stability by not changing the adjustment if the error is extremely small, but is not required." + stft_minClt = "Below this temperature, correction is disabled." + stft_minAfr = "Below this AFR, correction is paused" + stft_maxAfr = "Above this AFR, correction is paused" + stft_startupDelay = "Delay after starting the engine before beginning closed loop correction." fuelClosedLoopCorrectionEnabled = "Enables lambda sensor closed loop feedback for fuelling." isVerboseIAC = "Print details into rusEfi console" isVerboseETB = "Prints ETB details to rusEFI console" @@ -1218,6 +1299,30 @@ page = 1 triggerCompHystMin = "Trigger comparator hysteresis voltage (Min)" triggerCompHystMax = "Trigger comparator hysteresis voltage (Max)" triggerCompSensorSatRpm = "VR-sensor saturation RPM" + gppwm1_pin = "Select a pin to use for PWM or on-off output." + gppwm1_dutyIfError = "If an error (with a sensor, etc) is detected, this value is used instead of reading from the table.\nThis should be a safe value for whatever hardware is connected to prevent damage." + gppwm1_pwmFrequency = "Select a frequency to run PWM at.\nSet this to 0hz to enable on-off mode." + gppwm1_onAboveDuty = "In on-off mode, turn the output on when the table value is above this duty." + gppwm1_offBelowDuty = "In on-off mode, turn the output off when the table value is below this duty." + gppwm1_loadAxis = "Selects the load axis to use for the table." + gppwm2_pin = "Select a pin to use for PWM or on-off output." + gppwm2_dutyIfError = "If an error (with a sensor, etc) is detected, this value is used instead of reading from the table.\nThis should be a safe value for whatever hardware is connected to prevent damage." + gppwm2_pwmFrequency = "Select a frequency to run PWM at.\nSet this to 0hz to enable on-off mode." + gppwm2_onAboveDuty = "In on-off mode, turn the output on when the table value is above this duty." + gppwm2_offBelowDuty = "In on-off mode, turn the output off when the table value is below this duty." + gppwm2_loadAxis = "Selects the load axis to use for the table." + gppwm3_pin = "Select a pin to use for PWM or on-off output." + gppwm3_dutyIfError = "If an error (with a sensor, etc) is detected, this value is used instead of reading from the table.\nThis should be a safe value for whatever hardware is connected to prevent damage." + gppwm3_pwmFrequency = "Select a frequency to run PWM at.\nSet this to 0hz to enable on-off mode." + gppwm3_onAboveDuty = "In on-off mode, turn the output on when the table value is above this duty." + gppwm3_offBelowDuty = "In on-off mode, turn the output off when the table value is below this duty." + gppwm3_loadAxis = "Selects the load axis to use for the table." + gppwm4_pin = "Select a pin to use for PWM or on-off output." + gppwm4_dutyIfError = "If an error (with a sensor, etc) is detected, this value is used instead of reading from the table.\nThis should be a safe value for whatever hardware is connected to prevent damage." + gppwm4_pwmFrequency = "Select a frequency to run PWM at.\nSet this to 0hz to enable on-off mode." + gppwm4_onAboveDuty = "In on-off mode, turn the output on when the table value is above this duty." + gppwm4_offBelowDuty = "In on-off mode, turn the output off when the table value is below this duty." + gppwm4_loadAxis = "Selects the load axis to use for the table." ; CONFIG_DEFINITION_END @@ -1240,20 +1345,39 @@ page = 1 [LoggerDefinition] ; valid logger types: composite, tooth, trigger, csv - loggerDef = compositeLogger, "Primary Trigger Logger", tooth +; loggerDef = compositeLogger, "Primary Trigger Logger", tooth + loggerDef = compositeLogger, "Trigger Logger", composite startCommand = "l\x01" stopCommand = "l\x02" dataReadCommand = "L" dataReadTimeout = 10000 ; time in ms dataReadyCondition = { toothLogReady } + continuousRead = true + ; each packet is 5 and we have 500 of those + dataLength = 2500 +;tooth ; recordDef = headerLen, footerLen, recordLen - recordDef = 0, 0, 2; in bytes, the recordLen is for each record, currently limited to 4 bytes +; recordDef = 0, 0, 5 ; uint16 that stores 1/100 second - recordField = toothTime, "tooth", 0, 16, 0.01, "ms" +; recordField = toothTime, "tooth", 0, 16, 0.01, "ms" + + ; recordDef = headerLen, footerLen, recordLen + recordDef = 0, 0, 5 + + ; these names are hard-coded inside TS + recordField = priLevel, "PriLevel", 0, 1, 1.0, "Flag" + recordField = secLevel, "SecLevel", 1, 1, 1.0, "Flag" + recordField = trigger, "Trigger", 2, 1, 1.0, "Flag" + recordField = sync, "Sync", 3, 1, 1.0, "Flag" + recordField = time, "Time", 8, 32, 0.01, "ms" + + ; it seems that TS also needs to know the diff.size of a tooth + calcField = toothTime, "ToothTime", "ms", { time - pastValue(time, 1) } + [VeAnalyze] ; tableName, lambdaTargetTableName, lambdaChannel, egoCorrectionChannel, activeCondition @@ -1267,11 +1391,7 @@ page = 1 ; filter = Name, "DisplayName", outputChannel, operator, defaultVal, userAdjustable filter = minRPMFilter, "Minimum RPM", RPMValue, < , 500, , true -#if CELSIUS filter = minCltFilter, "Minimum CLT", coolant, < , 60, , true -#else - filter = minCltFilter, "Minimum CLT", coolant, < , 160, , true -#endif filter = deltaTps, "dTPS", deltaTps > , 50, , true @@ -1293,7 +1413,7 @@ fileVersion = { 20200310 } ochGetCommand = "O%2o%2c" ; see TS_OUTPUT_SIZE in console source code - ochBlockSize = 240 + ochBlockSize = 244 ; ; see TunerStudioOutputChannels struct @@ -1325,6 +1445,7 @@ fileVersion = { 20200310 } ind_isTriggerError = bits, U32, 0, [23:23], "true", "false"; ind_hasFatalError=bits, U32, 0, [24:24], "true", "false"; ind_isWarnNow =bits, U32, 0, [25:25], "true", "false"; + ind_pedal_error =bits, U32, 0, [26:26], "true", "false"; ; RPM, vss RPMValue = scalar, U16, 4, "RPM", 1, 0.00000 @@ -1334,16 +1455,8 @@ fileVersion = { 20200310 } ; temperatures internalMcuTemperature = scalar,S08, 11, "deg C", 1, 0 -#if CELSIUS coolant = scalar, S16, 12, "deg C",{1/100}, 0.0 -#else - coolant = scalar, S16, 12, "deg F",{9/(5 * 100)}, 17.77777 -#endif -#if CELSIUS intake = scalar, S16, 14, "deg C",{1/100}, 0.0 -#else - intake = scalar, S16, 14, "deg F",{9/(5 * 100)}, 17.77777 -#endif ; todo: aux1 ; todo: aux2 @@ -1418,55 +1531,66 @@ fileVersion = { 20200310 } knockLevel = scalar, F32, 108, "Volts", 1, 0 ; Mode, firmware, protocol, run time - timeSeconds = scalar, U32, 112, "sec", 1, 0.0 +; TS requires 'seconds' name since it has special internal meaning + seconds = scalar, U32, 112, "sec", 1, 0.0 engineMode = scalar, U32, 116, "em", 1, 0.0; firmwareVersion = scalar, U32, 120,"version_f", 1, 0 firmwareTsVersion=scalar, U32, 124,"version_p", 1, 0 +; calibation helpers + calibrationValue = scalar, F32, 128, "", 1, 0 + calibrationMode = scalar, U08, 132, "", 1, 0 + ; 3 bytes padding1 + ; Errors - totalTriggerErrorCounter=scalar,U32, 128,"counter", 1, 0 - ; orderingErrorCounter 132 - warningCounter = scalar, U16, 136, "count", 1, 0 - lastErrorCode = scalar, U16, 138, "error", 1, 0 - recentErrorCode0= scalar, U16, 140, "error", 1, 0 - recentErrorCode1= scalar, U16, 142, "error", 1, 0 - recentErrorCode2= scalar, U16, 144, "error", 1, 0 - recentErrorCode3= scalar, U16, 146, "error", 1, 0 - recentErrorCode4= scalar, U16, 148, "error", 1, 0 - recentErrorCode5= scalar, U16, 150, "error", 1, 0 - recentErrorCode6= scalar, U16, 152, "error", 1, 0 - recentErrorCode7= scalar, U16, 154, "error", 1, 0 + totalTriggerErrorCounter=scalar,U32, 136,"counter", 1, 0 + ; orderingErrorCounter 140 + warningCounter = scalar, U16, 144, "count", 1, 0 + lastErrorCode = scalar, U16, 146, "error", 1, 0 + recentErrorCode0= scalar, U16, 148, "error", 1, 0 + recentErrorCode1= scalar, U16, 150, "error", 1, 0 + recentErrorCode2= scalar, U16, 152, "error", 1, 0 + recentErrorCode3= scalar, U16, 154, "error", 1, 0 + recentErrorCode4= scalar, U16, 156, "error", 1, 0 + recentErrorCode5= scalar, U16, 158, "error", 1, 0 + recentErrorCode6= scalar, U16, 160, "error", 1, 0 + recentErrorCode7= scalar, U16, 162, "error", 1, 0 ; Debug - debugFloatField1= scalar, F32, 156, "val", 1, 0.0 - debugFloatField2= scalar, F32, 160, "val", 1, 0.0 - debugFloatField3= scalar, F32, 164, "val", 1, 0.0 - debugFloatField4= scalar, F32, 168, "val", 1, 0.0 - debugFloatField5= scalar, F32, 172, "val", 1, 0.0 - debugFloatField6= scalar, F32, 176, "val", 1, 0.0 - debugFloatField7= scalar, F32, 180, "val", 1, 0.0 - debugIntField1 = scalar, S32, 184, "val", 1, 0.0 - debugIntField2 = scalar, S32, 188, "val", 1, 0.0 - debugIntField3 = scalar, S32, 192, "val", 1, 0.0 - debugIntField4 = scalar, S16, 196, "val", 1, 0.0 - debugIntField5 = scalar, S16, 198, "val", 1, 0.0 + debugFloatField1= scalar, F32, 164, "val", 1, 0.0 + debugFloatField2= scalar, F32, 168, "val", 1, 0.0 + debugFloatField3= scalar, F32, 172, "val", 1, 0.0 + debugFloatField4= scalar, F32, 176, "val", 1, 0.0 + debugFloatField5= scalar, F32, 180, "val", 1, 0.0 + debugFloatField6= scalar, F32, 184, "val", 1, 0.0 + debugFloatField7= scalar, F32, 188, "val", 1, 0.0 + debugIntField1 = scalar, S32, 192, "val", 1, 0.0 + debugIntField2 = scalar, S32, 196, "val", 1, 0.0 + debugIntField3 = scalar, S32, 200, "val", 1, 0.0 + debugIntField4 = scalar, S16, 204, "val", 1, 0.0 + debugIntField5 = scalar, S16, 206, "val", 1, 0.0 ; Accel - accelerationX = scalar, S16, 200, "G", 0.01, 0 - accelerationY = scalar, S16, 202, "G", 0.01, 0 + accelerationX = scalar, S16, 208, "G", 0.01, 0 + accelerationY = scalar, S16, 210, "G", 0.01, 0 ; egt - egt1 = scalar, S16, 204, "deg C", 1, 0 - egt2 = scalar, S16, 206, "deg C", 1, 0 - egt3 = scalar, S16, 208, "deg C", 1, 0 - egt4 = scalar, S16, 210, "deg C", 1, 0 - egt5 = scalar, S16, 212, "deg C", 1, 0 - egt6 = scalar, S16, 214, "deg C", 1, 0 - egt7 = scalar, S16, 216, "deg C", 1, 0 - egt8 = scalar, S16, 218, "deg C", 1, 0 -; - TPS2Value = scalar, S16, 220, "%",{1/100}, 0 + egt1 = scalar, S16, 212, "deg C", 1, 0 + egt2 = scalar, S16, 214, "deg C", 1, 0 + egt3 = scalar, S16, 216, "deg C", 1, 0 + egt4 = scalar, S16, 218, "deg C", 1, 0 + egt5 = scalar, S16, 220, "deg C", 1, 0 + egt6 = scalar, S16, 222, "deg C", 1, 0 + egt7 = scalar, S16, 224, "deg C", 1, 0 + egt8 = scalar, S16, 226, "deg C", 1, 0 + TPS2Value = scalar, S16, 228, "%",{1/100}, 0 + + rawTps1Primary = scalar, U16, 230, "V",{1/1000}, 0.0 + rawPpsPrimary = scalar, U16, 232, "V",{1/1000}, 0.0 + rawClt = scalar, U16, 234, "V",{1/1000}, 0.0 + rawIat = scalar, U16, 236, "V",{1/1000}, 0.0 + rawOilPressure = scalar, U16, 238, "V",{1/1000}, 0.0 ; ; see TunerStudioOutputChannels struct @@ -1483,6 +1607,12 @@ fileVersion = { 20200310 } time = { timeNow } ; engineLoad = { fuleAlgorithm == 0 ? MAF : TPS } + ; These "synthetic" channels provide the Y-axis (load) value for gen purp PWM table's Y axes + gppwm1_load = {(gppwm1_loadAxis == 0) ? TPSValue : ((gppwm1_loadAxis == 1) ? MAPValue : ((gppwm1_loadAxis == 2) ? coolant : intake))} + gppwm2_load = {(gppwm2_loadAxis == 0) ? TPSValue : ((gppwm2_loadAxis == 1) ? MAPValue : ((gppwm2_loadAxis == 2) ? coolant : intake))} + gppwm3_load = {(gppwm3_loadAxis == 0) ? TPSValue : ((gppwm3_loadAxis == 1) ? MAPValue : ((gppwm3_loadAxis == 2) ? coolant : intake))} + gppwm4_load = {(gppwm4_loadAxis == 0) ? TPSValue : ((gppwm4_loadAxis == 1) ? MAPValue : ((gppwm4_loadAxis == 2) ? coolant : intake))} + [PcVariables] wueAfrTargetOffset = array, S16, [ 16], ":1", 0.1, 0.0, -3.0, 3.0, 1; wueAnalRecommend = array, U08, [ 16], "%", 1.00, 0.0, 100, 255.00, 0 @@ -1491,24 +1621,89 @@ fileVersion = { 20200310 } enableLogDebugChannels = bits, U08, [0:0], "Yes", "No" enableLogErrorList = bits, U08, [0:0], "Yes", "No" -; 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 -; Alternator TPS Acceleration Warmup-Pid Idle Engine Load Acc Trigger Counters ETB PID TLE8888 Boost - debugFieldF1List = bits, U08, [0:7], "Controller Output", "From TPS", "", "Controller Output", "", "Channel 1 Rise Counter", "", "", "", "", "", "", "", "", "", "", "", "ETB Controller Output", "", "", "df1", "df1", "22df1", "", "", "", "", "", "", "", "", "", "", "", "", "", "Open Loop Duty", "" - debugFieldF2List = bits, U08, [0:7], "I-Term", "To TPS", "", "I-Term", "", "Channel 2 Rise Counter", "", "", "", "", "", "", "", "", "", "", "", "ETB I-Term", "", "", "df2", "df2", "22df2", "", "", "", "", "", "", "", "", "", "", "", "", "", "Closed Loop Duty","" - debugFieldF3List = bits, U08, [0:7], "Previous Error", "Current TPS<>TPS", "", "", "", "Channel 3 Rise Counter", "", "", "", "", "", "", "", "", "", "", "", "ETB Previous Error", "", "", "df3", "df3", "22df3", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" - debugFieldF4List = bits, U08, [0:7], "I Gain", "Extra Fuel", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "ETB df4", "", "", "df4", "df4", "22df4", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" - debugFieldF5List = bits, U08, [0:7], "D Gain", "df5", "df5", "df5", "df5", "df5", "df5", "", "", "", "", "", "", "", "", "", "", "ETB df5", "df5", "df5", "df5", "df5", "22df5", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" - debugFieldF6List = bits, U08, [0:7], "D Term", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "ETB df6", "", "", "df6", "df6", "22df6", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" - debugFieldF7List = bits, U08, [0:7], "Max-Value", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "ETB df7", "", "", "df7", "df7", "22df7", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" - - debugFieldI1List = bits, U08, [0:7], "P-Gain", "", "", "", "", "Channel 2 Fall Counter", "", "", "", "", "", "", "", "", "", "", "", "ETB P-Gain", "", "", "di1", "di1", "22", "", "", "", "", "", "", "", "", "SPI Counter", "", "", "", "", "", "" - debugFieldI2List = bits, U08, [0:7], "Offset", "", "", "", "", "Channel 3 Fall Counter", "", "", "", "", "", "", "", "", "", "", "", "ETB di2", "", "", "di2", "di2", "22", "", "", "", "", "", "", "", "", "Latest Transmit","", "", "", "", "", "" - debugFieldI3List = bits, U08, [0:7], "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "ETB di3", "", "", "di3", "di3", "22", "", "", "", "", "", "", "", "", "Latest Received","", "", "", "", "", "" - debugFieldI4List = bits, U08, [0:7], "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "ETB di4", "", "", "di4", "di4", "22", "", "", "", "", "", "", "", "", "Init Count", "", "", "", "", "", "" - debugFieldI5List = bits, U08, [0:7], "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "di5", "di5", "ETB di5", "di5", "di5", "di5", "di5", "22di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5" +; wall of debug mode :) +; https://rusefi.com/wiki/index.php?title=Manual:Debug_fields +; 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 +; Alternator TPS Acceleration Warmup-Pid Idle Engine Load Acc Trigger Counters VVT Cranking Ignition Timing ETB PID CJ125 CAN TLE8888 Boost Start Launcher ETB Autotune + debugFieldF1List = bits, U08, [0:7], "Controller Output", "From TPS", "", "Controller Output", "Idle output", "Channel 1 Rise Counter", "", "", "", "", "Ign IAT Corr", "", "", "", "", "", "", "ETB Controller Output", "", "", "df1", "df1", "22df1", "", "23:df1", "CJ125: output", "", "", "", "", "", "", "", "", "", "", "Boost Open Loop Duty", "S unused" "", "Osc Amplitude" + debugFieldF2List = bits, U08, [0:7], "I-Term", "To TPS", "", "I-Term", "Idle df2", "Channel 2 Rise Counter", "", "", "", "", "Ign CLT Corr", "", "", "", "", "", "", "ETB I-Term", "", "", "df2", "df2", "22df2", "", "23:df2", "CJ125: i-term", "", "", "", "", "", "", "", "", "", "", "Boost Closed Loop Duty","S unused" "", "Duty Amplitude" + debugFieldF3List = bits, U08, [0:7], "Previous Error", "Current TPS<>TPS", "", "", "Idle df3", "ICU sum", "", "", "", "", "Ign FSIO Adj", "", "", "", "", "", "", "ETB err", "", "", "df3", "df3", "22df3", "", "23:df3", "CJ125: err", "", "", "", "", "", "", "", "", "", "", "", "S unused" "", "Tu" + debugFieldF4List = bits, U08, [0:7], "I Gain", "Extra Fuel", "", "", "Idle df4", "VVT rise", "", "", "", "", "Ign PID Adj", "", "", "", "", "", "", "ETB I setting", "", "", "df4", "df4", "22df4", "", "23:df4", "CJ125: UA", "", "", "", "", "", "", "", "", "", "", "", "S unused" "", "Ku" + debugFieldF5List = bits, U08, [0:7], "D Gain", "df5", "df5", "df5", "Idle df5", "VVT fall", "df5", "", "", "", "", "", "", "", "", "", "", "ETB D setting", "df5", "df5", "df5", "df5", "22df5", "", "23:df5", "CJ125: UR", "", "", "", "", "", "", "", "", "", "", "", "S unused" "", "Kp" + debugFieldF6List = bits, U08, [0:7], "D Term", "", "", "", "Idle df6", "Current Gap", "", "", "", "", "", "", "", "", "", "", "", "ETB df6", "", "", "df6", "df6", "22df6", "", "23:df6", "cj: f7", "", "", "", "", "", "", "", "", "", "", "", "S unused" "", "Ki" + debugFieldF7List = bits, U08, [0:7], "Max-Value", "", "", "", "Idle df7", "", "", "", "", "", "", "", "", "", "", "", "", "ETB df7", "", "", "df7", "df7", "22df7", "", "23:df7", "cj: f7", "", "", "", "", "", "", "", "", "", "", "", "S unused" "", "Kd" + debugFieldI1List = bits, U08, [0:7], "P-Gain", "", "", "", "Idle di1", "Channel 1 Fall Counter", "", "", "", "", "Multispark Count", "", "", "", "", "", "", "ETB P-Gain", "", "", "di1", "di1", "22di1", "", "23:di1", "CJ125: state", "read count","", "", "", "", "SPI Counter", "", "", "", "", "", "Start Count" "", "" + debugFieldI2List = bits, U08, [0:7], "Offset", "", "", "", "Idle di2", "Channel 2 Fall Counter", "", "", "", "", "", "", "", "", "", "", "", "ETB di2", "", "", "di2", "di2", "22di2", "", "23:di2", "", "", "", "", "", "", "Latest Transmit","", "", "", "", "", "S unused" "", "" + debugFieldI3List = bits, U08, [0:7], "", "", "", "", "Idle di3", "Cycle Index", "", "", "", "", "", "", "", "", "", "", "", "ETB di3", "", "", "di3", "di3", "22di3", "", "23:di3", "", "", "", "", "", "", "Latest Received","", "", "", "", "", "S unused" "", "" + debugFieldI4List = bits, U08, [0:7], "", "", "", "", "Idle di4", "Cycle Cnt 1", "", "", "", "", "", "", "", "", "", "", "", "ETB di4", "", "", "di4", "di4", "22di4", "", "23:di4", "", "", "", "", "", "", "Init Count", "", "", "", "", "", "S unused" "", "" + debugFieldI5List = bits, U08, [0:7], "", "", "", "", "Idle di5", "Cycle Cnt 2", "", "", "", "", "", "", "", "", "", "di5", "di5", "ETB di5", "di5", "di5", "di5", "di5", "22di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "S di5" "", "" + [ConstantsExtensions] + ; defaultValue is used to provide TunerStudio with a value to use in the case of + ; the constant not yet being initialized. This is primarily important if the + ; constant is used as a variable in the ini. + ; defaultValue = constantName, value; defaultValue = wueAfrTargetOffset, -1.5 -1.4 -1.15 -0.95 -0.775 -0.65 -0.5625 -0.5 -0.4375 -0.375 -0.3125 -0.25 -0.1875 -0.125 -0.0625 0 + + requiresPowerCycle = warningLedPin + requiresPowerCycle = runningLedPin + requiresPowerCycle = binarySerialTxPin + requiresPowerCycle = binarySerialRxPin + + requiresPowerCycle = etb_use_two_wires + requiresPowerCycle = etbFreq + + requiresPowerCycle = idle_solenoidFrequency + requiresPowerCycle = boostPwmFrequency + requiresPowerCycle = alternatorPwmFrequency + requiresPowerCycle = auxPidFrequency1 + requiresPowerCycle = auxPidFrequency2 + requiresPowerCycle = auxPidFrequency3 + requiresPowerCycle = auxPidFrequency4 + + requiresPowerCycle = fsioOutputPins1 + requiresPowerCycle = fsioOutputPins2 + requiresPowerCycle = fsioOutputPins3 + requiresPowerCycle = fsioOutputPins4 + requiresPowerCycle = fsioOutputPins5 + requiresPowerCycle = fsioOutputPins6 + requiresPowerCycle = fsioOutputPins7 + requiresPowerCycle = fsioOutputPins8 + requiresPowerCycle = fsioOutputPins9 + requiresPowerCycle = fsioOutputPins10 + requiresPowerCycle = fsioOutputPins11 + requiresPowerCycle = fsioOutputPins12 + requiresPowerCycle = fsioOutputPins13 + requiresPowerCycle = fsioOutputPins14 + requiresPowerCycle = fsioOutputPins15 + requiresPowerCycle = fsioOutputPins16 + + requiresPowerCycle = fsioFrequency1 + requiresPowerCycle = fsioFrequency2 + requiresPowerCycle = fsioFrequency3 + requiresPowerCycle = fsioFrequency4 + requiresPowerCycle = fsioFrequency5 + requiresPowerCycle = fsioFrequency6 + requiresPowerCycle = fsioFrequency7 + requiresPowerCycle = fsioFrequency8 + requiresPowerCycle = fsioFrequency9 + requiresPowerCycle = fsioFrequency10 + requiresPowerCycle = fsioFrequency11 + requiresPowerCycle = fsioFrequency12 + requiresPowerCycle = fsioFrequency13 + requiresPowerCycle = fsioFrequency14 + requiresPowerCycle = fsioFrequency15 + requiresPowerCycle = fsioFrequency16 + + requiresPowerCycle = fsioAdc1 + requiresPowerCycle = fsioAdc2 + requiresPowerCycle = fsioAdc3 + requiresPowerCycle = fsioAdc4 + + readOnly = warning_message + + [CurveEditor] ; xAxis = leftValue, rightValue, step ; yAxis = bottomValue, topValue, step @@ -1607,11 +1802,7 @@ fileVersion = { 20200310 } curve = iatFuelCorrCurve, "Intake air temperature fuel Multiplier" columnLabel = "Coolant", "Multiplier" -#if CELSIUS xAxis = -40, 120, 10 -#else - xAxis = -40, 250, 10 -#endif yAxis = 0, 2, 11 xBins = iatFuelCorrBins, intake yBins = iatFuelCorr @@ -1619,11 +1810,7 @@ fileVersion = { 20200310 } curve = cltTimingCorrCurve, "Warmup timing correction" columnLabel = "Coolant", "Extra" -#if CELSIUS xAxis = -40, 120, 10 -#else - xAxis = -40, 250, 10 -#endif yAxis = 0, 50, 10 xBins = cltTimingBins, coolant yBins = cltTimingExtra @@ -1631,11 +1818,7 @@ fileVersion = { 20200310 } curve = cltFuelCorrCurve, "Warmup fuel manual Multiplier" columnLabel = "Coolant", "Multiplier" -#if CELSIUS xAxis = -40, 100, 10 -#else - xAxis = -40, 210, 10 -#endif yAxis = 0, 3, 10 xBins = cltFuelCorrBins, coolant yBins = cltFuelCorr @@ -1643,11 +1826,7 @@ fileVersion = { 20200310 } curve = crankingCltCurve, "Cranking Coolant Temperature Multiplier" columnLabel = "Coolant", "Multiplier" -#if CELSIUS xAxis = -40, 100, 10 -#else - xAxis = -40, 210, 10 -#endif yAxis = 0, 3, 10 xBins = crankingFuelBins, coolant yBins = crankingFuelCoef @@ -1655,8 +1834,8 @@ fileVersion = { 20200310 } curve = etbTpsBiasCurve, "Electronic TB Bias Curve" columnLabel = "TPS", "duty bias" - xAxis = 0, 100, 10 - yAxis = 0, 100, 10 + xAxis = 0, 50, 11 + yAxis = -40, 40, 9 xBins = etbBiasBins, TPSValue yBins = etbBiasValues gauge = TPSGauge @@ -1679,11 +1858,7 @@ fileVersion = { 20200310 } curve = cltIdleCurve, "Warmup Idle multiplier" columnLabel = "Coolant", "Multiplier" -#if CELSIUS xAxis = -40, 120, 10 -#else - xAxis = -40, 250, 10 -#endif yAxis = 0, 3, 10 xBins = cltIdleCorrBins, coolant yBins = cltIdleCorr @@ -1691,11 +1866,7 @@ fileVersion = { 20200310 } curve = iacCoastingCurve, "Coasting IAC Position for Auto-Idle" columnLabel = "Coolant", "Multiplier" -#if CELSIUS xAxis = -40, 120, 10 -#else - xAxis = -40, 250, 10 -#endif yAxis = 0, 100, 10 xBins = iacCoastingBins, coolant yBins = iacCoasting @@ -1703,11 +1874,7 @@ fileVersion = { 20200310 } curve = cltCrankingCurve, "Cranking Idle Air multiplier" columnLabel = "Coolant", "Multiplier" -#if CELSIUS xAxis = -40, 120, 10 -#else - xAxis = -40, 250, 10 -#endif yAxis = 0, 3, 10 xBins = cltCrankingCorrBins, coolant yBins = cltCrankingCorr @@ -1715,11 +1882,7 @@ fileVersion = { 20200310 } curve = cltIdleRPMCurve, "Idle Target RPM" columnLabel = "Coolant", "RPM" -#if CELSIUS xAxis = -40, 120, 10 -#else - xAxis = -40, 250, 10 -#endif yAxis = 0, 8000, 10 xBins = cltIdleRpmBins, coolant yBins = cltIdleRpm, RPMValue @@ -1751,11 +1914,7 @@ fileVersion = { 20200310 } curve = wueAfrTargetOffsetCurve, "AFR Target Temperature Adjustment" columnLabel = "Coolant", "AFR Offset" -#if CELSIUS xAxis = -40, 200, 9 -#else - xAxis = -40, 400, 9 -#endif yAxis = -3, 1, 5 xBins = cltFuelCorrBins, coolant yBins = wueAfrTargetOffset @@ -1763,11 +1922,7 @@ fileVersion = { 20200310 } curve = wueAnalyzer_warmup_curve, "Warmup Enrichment" columnLabel = "Coolant", "Current WUE", "Coolant", "Corrected" -#if CELSIUS xAxis = -40, 200, 9 -#else - xAxis = -40, 400, 9 -#endif yAxis = 90, 500, 6 xBins = cltFuelCorrBins, coolant yBins = cltFuelCorr @@ -1945,6 +2100,30 @@ fileVersion = { 20200310 } gridOrient = 250, 0, 340 ; Space 123 rotation of grid in degrees. upDownLabel = "(Later)", "(Sooner)" + table = gppwm1Tbl, gppwm1Map, "", 1 + xyLabels = "RPM", "" + xBins = gppwm1_rpmBins, RPMValue + yBins = gppwm1_loadBins, gppwm1_load + zBins = gppwm1_table + + table = gppwm2Tbl, gppwm2Map, "", 1 + xyLabels = "RPM", "" + xBins = gppwm2_rpmBins, RPMValue + yBins = gppwm2_loadBins, gppwm2_load + zBins = gppwm2_table + + table = gppwm3Tbl, gppwm3Map, "", 1 + xyLabels = "RPM", "" + xBins = gppwm3_rpmBins, RPMValue + yBins = gppwm3_loadBins, gppwm3_load + zBins = gppwm3_table + + table = gppwm4Tbl, gppwm4Map, "", 1 + xyLabels = "RPM", "" + xBins = gppwm4_rpmBins, RPMValue + yBins = gppwm4_loadBins, gppwm4_load + zBins = gppwm4_table + [GaugeConfigurations] gaugeCategory = Sensors - Extra 2 @@ -1975,7 +2154,7 @@ gaugeCategory = ECU Status recentErrorCode6Gauge = recentErrorCode6, "Error#7", "", 0, 18000, 0, 0, 18000, 18000, 0, 0 recentErrorCode7Gauge = recentErrorCode7, "Error#8", "", 0, 18000, 0, 0, 18000, 18000, 0, 0 firmwareVersionGauge = firmwareVersion , "ECU Software Version", "%", 0, 100, 0, 0, 100, 100, 0, 0 - timeSecondsGauge = timeSeconds, "Uptime", "sec", 0, 100, 0, 0, 100, 100, 0, 0 + timeSecondsGauge = seconds, "Uptime", "sec", 0, 100, 0, 0, 100, 100, 0, 0 gaugeCategory = Debug @@ -1995,16 +2174,8 @@ gaugeCategory = Debug gaugeCategory = Sensors - Basic RPMGauge = RPMValue, "RPM - engine speed", "RPM", 0, 15000, 200, 500, 6000, 6000, 0, 0 -#if CELSIUS CLTGauge = coolant, "Coolant temp", "deg C", -40, 140, -15, 1, 95, 110, 1, 1 -#else - CLTGauge = coolant, "Coolant temp", "deg F", -40, 285, 5, 35, 205, 230, 1, 1 -#endif -#if CELSIUS IATGauge = intake, "Intake air temp", "deg C", -40, 140, -15, 1, 95, 110, 1, 1 -#else - IATGauge = intake, "Intake air temp", "deg F", -40, 285, 5, 35, 205, 230, 1, 1 -#endif afr1Gauge = AFRValue, "Air fuel ratio", "", 10, 19.4, 12, 13, 15, 16, 2, 2 MAFGauge = MAFValue, "Mass air flow", "v", 0, 5, 0, 1, 3, 4, 1, 1 VBattGauge = VBatt, "Battery voltage", "V", 8, 21, 9, 10, 17, 19, 1, 1 @@ -2037,11 +2208,7 @@ gaugeCategory = Acceleration Enrichment gaugeCategory = Fueling ;Name Var Title Units Lo Hi LoD LoW HiW HiD vd ld -#if CELSIUS tChargeGauge = tCharge, "fuel: Estimated charge temperature", "deg C", -40, 140, -15, 1, 95, 110, 1, 1 -#else - tChargeGauge = tCharge, "fuel: Estimated charge temperature", "deg F", -40, 285, 5, 35, 205, 230, 1, 1 -#endif baroCorrectionGauge = baroCorrection,"fuel: Barometric pressure correction", "ratio", 0.5, 1.5, 0.6, 0.7, 1.3, 1.4, 1, 1 crankingFuelGauge = crankingFuelMs, "fuel: cranking", "mSec", 0, 25.5, 1.0, 1.2, 20, 25, 3, 1 iatCorrectionGauge = iatCorrection, "fuel: IAT correction", "mult", 0, 3, 0, 0, 3, 3, 2, 2 @@ -2065,6 +2232,12 @@ gaugeCategory = Throttle Body (incl. ETB) etbErrorGauge = etb1Error, "ETB position error", "%", -20, 20, -10, -5, 5, 10, 2, 0 etbDutyCycleGauge = etb1DutyCycle, "ETB duty cycle", "%", -100, 100, -75, -50, 50, 75, 0, 0 +gaugeCategory = Sensors - Raw + rawTps1PrimaryGauge = rawTps1Primary, "Raw TPS 1 Primary", "volts", 0, 5, 0, 0, 5, 5, 3, 0 + rawPpsPrimaryGauge = rawPpsPrimary , "Raw Pedal Primary", "volts", 0, 5, 0, 0, 5, 5, 3, 0 + rawCltGauge = rawClt , "Raw CLT", "volts", 0, 5, 0, 0, 5, 5, 3, 0 + rawIatGauge = rawIat , "Raw IAT", "volts", 0, 5, 0, 0, 5, 5, 3, 0 + rawOilPressureGauge = rawOilPressure, "Raw Oil Pressure", "volts", 0, 5, 0, 0, 5, 5, 3, 0 [WueAnalyze] @@ -2098,11 +2271,10 @@ gaugeCategory = Throttle Body (incl. ETB) ; 1 2 3 4 ; 5 6 7 8 - ; currently a minimum of 6 gauges must be on the dash, this appears to be an old not needed limitation. next release 1 will work. gauge1 = RPMGauge gauge2 = CLTGauge gauge3 = TPSGauge - gauge4 = MAFGauge + gauge4 = MAPGauge gauge5 = afr1Gauge gauge6 = VBattGauge gauge7 = dwellGauge @@ -2112,36 +2284,45 @@ gaugeCategory = Throttle Body (incl. ETB) ; = expression, off-label, on-label, off-bg, off-fg, on-bg, on-fg ; important status - indicator = { ind_hasFatalError }, "", "FATAL ERROR", green, black, red, black - indicator = { firmwareTsVersion == fileVersion }, "WRONG VERSION", "version", red, black, green, black - indicator = { ind_isWarnNow }, "", "warn", green, black, red, black - indicator = { ind_check_engine }, "ok", "Check engine", green, black, red, black - indicator = { isIgnitionEnabledIndicator}, "no ignition", "ignition", red, black, green, black - indicator = { ind_injection_enabled}, "no injection", "injection", red, black, green, black - indicator = { ind_isTriggerError}, "ok", "trg err", green, black, red, black + indicator = { ind_hasFatalError }, "", "CRITICAL ERROR", white, black, red, black + indicator = { firmwareTsVersion == fileVersion }, "WRONG VERSION", "version ok", red, black, white, black + indicator = { ind_isWarnNow }, "", "WARNING", white, black, yellow, black + indicator = { ind_check_engine }, "", "Check Engine", white, black, red, black + indicator = { isIgnitionEnabledIndicator}, "no ignition", "ignition", yellow, black, white, black + indicator = { ind_injection_enabled}, "no injection", "injection", yellow, black, white, black + indicator = { ind_isTriggerError}, "trigger ok", "trigger err", white, black, red, black + ; this is required so that the "config error" feature works in TS + ; don't change this line - TS is looking for an indicator with particular text/styling + ; you don't even have to show it by default + indicator = { ind_hasFatalError }, "Config Error", "Config Error", white, black, red, black ; minor info - indicator = { ind_fan}, "no fan", "fan", white, black, green, black - indicator = { isCylinderCleanupActivated}, "no cyl cleanup", "cyl cleanup", white, black, green, black + indicator = { ind_fan}, "fan off", "fan on", white, black, green, black + indicator = { isCylinderCleanupActivated}, "no cyl cleanup", "cyl cleanup", white, black, yellow, black indicator = { needBurn }, "config ok", "unsaved changes", white, black, yellow, black indicator = { hasSdCard}, "no SD", "with SD", white, black, green, black - indicator = { ind_fuel_pump}, "no pump", "pump", white, black, green, black + indicator = { ind_fuel_pump}, "pump off", "pump on", white, black, green, black indicator = { clutchUpState }, "clutch", "cltch Up", white, black, red, black indicator = { clutchDownState }, "clutch", "cltch Down", white, black, yellow, black indicator = { brakePedalIndicator }, "brake", "brake down", white, black, red, black - indicator = { acSwitchIndicator }, "AC on", "AC off", yellow, black, white, black + indicator = { acSwitchIndicator }, "AC off", "AC on", white, black, blue, white ; error codes indicator = { ind_tps_error}, "tps", "tps error", white, black, red, black indicator = { ind_clt_error}, "clt", "clt error", white, black, red, black indicator = { ind_iat_error}, "iat", "iat error", white, black, red, black indicator = { ind_map_error}, "map", "map error", white, black, red, black + indicator = { ind_pedal_error}, "pedal", "pedal error", white, black, red, black indicator = { knockEverIndicator }, "", "Knock recently", white, black, red, black indicator = { knockNowIndicator }, "no knock", "Knock NOW", white, black, red, black +[KeyActions] + showPanel = spi, spiFunction + showPanel = con, connection + [Datalog] ; Channel Label Type Format entry = time, "Time", float, "%.3f" @@ -2295,7 +2476,7 @@ menuDialog = main # Digital outputs subMenu = mainRelay, "Main relay" subMenu = starterRelay, "Starter Disable relay" - subMenu = fuelPump, "Fuel rail" + subMenu = fuelPump, "Fuel pump & rail" subMenu = fanSetting, "Fan" subMenu = tachSettings, "Tachometer" subMenu = malfunction, "Check engine light" @@ -2308,14 +2489,14 @@ menuDialog = main subMenu = std_separator # Targets & closed loop - subMenu = afrTableTbl, "Target AFR", 0, {isInjectionEnabled == 1 && fuelAlgorithm == LM_SPEED_DENSITY} + subMenu = afrTableTbl, "Target AFR", 0, {isInjectionEnabled == 1 && (fuelAlgorithm == LM_SPEED_DENSITY || fuelAlgorithm == LM_REAL_MAF)} subMenu = fuelClosedLoopDialog, "Closed loop correction", 0, {isInjectionEnabled == 1} subMenu = coastingFuelCutControl, "Deceleration fuel cutoff (DFCO)", 0, {isInjectionEnabled == 1} subMenu = std_separator # Fuel table/VE - subMenu = fuelTableDialog, "Fuel table", 0, {isInjectionEnabled == 1 && fuelAlgorithm != LM_SPEED_DENSITY} - subMenu = veTableDialog, "VE", 0, {isInjectionEnabled == 1 && fuelAlgorithm == LM_SPEED_DENSITY} + subMenu = fuelTableDialog, "Fuel table", 0, {isInjectionEnabled == 1 && fuelAlgorithm != LM_SPEED_DENSITY && fuelAlgorithm != LM_REAL_MAF} + subMenu = veTableDialog, "VE", 0, {isInjectionEnabled == 1 && (fuelAlgorithm == LM_SPEED_DENSITY || fuelAlgorithm == LM_REAL_MAF)} subMenu = injPhaseTableTbl, "Injection phase", 0, {isInjectionEnabled == 1} subMenu = std_separator @@ -2381,7 +2562,14 @@ menuDialog = main menu = "&Advanced" subMenu = boostDialog, "Boost Control" subMenu = boostPidDialog, "Closed Loop Boost", { boostType == 1 } - subMenu = std_separator + + subMenu = std_separator + subMenu = gppwm1, "General Purpose PWM 1" + subMenu = gppwm2, "General Purpose PWM 2" + subMenu = gppwm3, "General Purpose PWM 3" + subMenu = gppwm4, "General Purpose PWM 4" + + subMenu = std_separator subMenu = fsioInputsDialog, "FSIO inputs" subMenu = auxPidDialog, "Aux PID" subMenu = fsioOutputsDialog, "FSIO outputs" @@ -2450,6 +2638,8 @@ menuDialog = main subMenu = std_separator subMenu = connection, "Connection" + subMenu = tle8888, "TLE8888" + subMenu = allPins1, "Full pinout 1/2" subMenu = allPins2, "Full pinout 2/2" subMenu = std_separator @@ -2458,6 +2648,7 @@ menuDialog = main # EXPERIMENTAL FEATURES subMenu = parkingLot, "Experimental/Broken" subMenu = multisparkSettings, "Multispark", 0, {isIgnitionEnabled == 1} + subMenu = mc33Dialog, "GDI Dreams" subMenu = std_separator subMenu = hipFunction, "HIP9011 settings (knock sensor) (alpha version)" @@ -2475,6 +2666,10 @@ menuDialog = main subMenu = std_separator + menu = "Help" + subMenu = helpGeneral, "rusEfi Info" + + [ControllerCommands] ; commandName = command1, command2, commandn... ; command in standard ini format, a command name can be assigned to 1 to n commands that will be executed in order. @@ -2535,6 +2730,9 @@ cmd_calibrate_pedal_down = "w\x00\x14\x00\x07" cmd_tle8888_init = "w\x00\x14\x00\x08" cmd_test_ac_relay = "w\x00\x14\x00\x09" cmd_write_config = "w\x00\x14\x00\x0A" +cmd_test_starter_relay = "w\x00\x14\x00\x0B" +cmd_etb_autotune = "w\x00\x14\x00\x0C" +cmd_enable_self_stim = "w\x00\x14\x00\x0D" cmd_test_radiator_fan = "w\x00\x15\x00\x01" cmd_test_check_engine_light = "w\x00\x16\x00\x01" @@ -2672,6 +2870,7 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" field = "!Reminder that 4-stroke cycle is 720 degrees" field = "!For well-known trigger types use '0' trigger angle offset" field = "Trigger Angle Offset", globalTriggerAngleOffset + field = "Display only interesting", displayLogicLevelsInEngineSniffer field = "#Custom Trigger" field = "total Tooth Count", trigger_customTotalToothCount, {trigger_type == 0} field = "skipped Tooth Count", trigger_customSkippedToothCount, {trigger_type == 0} @@ -2682,7 +2881,6 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" field = "VVT use rise front", vvtCamSensorUseRise, {trigger_type != 80} field = "VVT position display offset", vvtOffset field = "VVT display inverted", vvtDisplayInverted - field = "nbVvtIndex", nbVvtIndex field = "print verbose sync details to console",verboseTriggerSynchDetails field = "Do not print messages in case of sync error", silentTriggerError field = "Enable noise filtering", useNoiselessTriggerDecoder, {trigger_type == 8 || trigger_type == 9} @@ -2802,11 +3000,27 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" field = "TPS low value detection threshold", tpsErrorDetectionTooLow, {tps1_1AdcChannel != 16} field = "TPS high value detection threshold", tpsErrorDetectionTooHigh, {tps1_1AdcChannel != 16} - dialog = pedalSensor, "Accelerator pedal" + dialog = pedalSensorLeft, "Accelerator pedal" field = "Accelerator position sensor", throttlePedalPositionAdcChannel + field = "Up voltage", throttlePedalUpVoltage + field = "Down (WOT) voltage", throttlePedalWOTVoltage field = "Accelerator position 2nd sensor", throttlePedalPositionSecondAdcChannel - field = "Up voltage", throttlePedalUpVoltage - field = "Down (WOT) voltage", throttlePedalWOTVoltage + + dialog = pedalGauges + gauge = pedalPositionGauge + gauge = rawPpsPrimaryGauge + + dialog = pedalSensor, "Accelerator pedal", border + panel = pedalSensorLeft, West + panel = pedalGauges, East + + dialog = mc33Dialog, "GDI Dreams" + field = mc33816_cs, mc33816_cs + field = mc33816_rstb, mc33816_rstb + field = mc33816_flag0, mc33816_flag0 + field = "mc33972 SPI", mc33972spiDevice + field = mc33_hvolt, mc33_hvolt + ; Sensor Inputs dialog = otherSensorInputs, "Other Sensor Inputs" @@ -2833,8 +3047,12 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" field = "Secondary channel", triggerInputPins2, { trigger_type != 0 && trigger_type != 8 && trigger_type != 9 && trigger_type != 18 && trigger_type != 20} field = "Invert Secondary", invertSecondaryTriggerSignal, { trigger_type != 0 && trigger_type != 8 && trigger_type != 9 && trigger_type != 18 && trigger_type != 20} field = "Cam Sync/VVT input", camInputs1 - panel = triggerInputComparator - + panel = triggerInputComparator + +; +; allXXX sections allows a quick overview of used I/O in order to address conflicts mostly, not really to +; configure the features. +; dialog = allPinsSensors, "Sensors" field = "Throttle pedal Position Channel", throttlePedalPositionAdcChannel field = "Primary input channel", triggerInputPins1 @@ -2862,16 +3080,18 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" dialog = allPins1_1 field = mc33816_cs, mc33816_cs field = mc33816_rstb, mc33816_rstb + field = mc33816_flag0, mc33816_flag0 + field = "trigger stimulator pin #1", triggerSimulatorPins1 + field = "trigger stimulator pin #2", triggerSimulatorPins2 + field = "trigger stimulator pin #2", triggerSimulatorPins3 field = high_fuel_pressure_sensor_1, high_fuel_pressure_sensor_1 field = high_fuel_pressure_sensor_2, high_fuel_pressure_sensor_2 field = mc33816_driven, mc33816_driven field = mc33816spiDevice, mc33816spiDevice field = "Warning Led", warningLedPin - ; field = "Fatal Error Led", fatalErrorPin field = "tle6240_cs", tle6240_cs field = "tle6240 SPI", tle6240spiDevice field = "mc33972_cs", mc33972_cs - field = "mc33972 SPI", mc33972spiDevice panel = allPinsSensors dialog = allPins1_2 @@ -2881,32 +3101,27 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" field = "Idle Solenoid Pin", idle_solenoidPin field = "Second Idle Solenoid Pin", secondSolenoidPin field = "Idle Stepper Dir", idle_stepperDirectionPin - field = "Idle Stepper Dir Mode", stepperDirectionPinMode field = "Idle Stepper Step", idle_stepperStepPin field = "Idle Stepper Enable", stepperEnablePin field = "Fuel Pump Pin", fuelPumpPin - field = "Fuel Pump Pin Mode", fuelPumpPinMode field = "ETB#1 Dir #1", etbIo1_directionPin1 field = "ETB#1 Dir #2", etbIo1_directionPin2 field = "ETB#1 Control #1", etbIo1_controlPin1 - field = "etb1_controlPinMode", etbIo1_controlPinMode + field = "ETB#1 Disable", etbIo1_disablePin field = "ETB#2 Dir #1", etbIo2_directionPin1 field = "ETB#2 Dir #2", etbIo2_directionPin2 field = "ETB#2 Control #1", etbIo2_controlPin1 - field = "SD CS Pin", sdCardCsPin + field = "ETB#2 Disable", etbIo2_disablePin + field = "SD CS Pin", sdCardCsPin field = "MIL / Check Engine Pin", malfunctionIndicatorPin - field = "MIL / Check Engine Pin Mode", malfunctionIndicatorPinMode field = "Aux Pin #1", auxPidPins1 field = "Aux Pin #2", auxPidPins2 field = "Aux Pin #3", auxPidPins3 field = "Aux Pin #4", auxPidPins4 field = "test557pin", test557pin field = "Fan Pin", fanPin - field = "Fan Pin Mode", fanPinMode field = "Main Relay Pin", mainRelayPin - field = "Main Relay Mode", mainRelayPinMode - field = "Starter Relay Pin", starterRelayPin - field = "Starter Relay Mode", starterRelayPinMode + field = "Starter Relay Pin", starterRelayDisablePin field = "aux valve #1", auxValves1 field = "aux valve #2", auxValves2 @@ -2972,9 +3187,12 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" field = "output #16", fsioOutputPins16 dialog = allPins2_3 + field = "LCD E pin", HD44780_e + field = "LCD D4 pin", HD44780_db4 + field = "LCD D5 pin", HD44780_db5 + field = "LCD D6 pin", HD44780_db6 + field = "LCD D7 pin", HD44780_db7 field = "Debug Trigger Sync", debugTriggerSync - field = "Debug Timer Callback", debugTimerCallback - field = "Debug Set Timer", debugSetTimer field = "Aux Fast Analog", auxFastSensor1_adcChannel dialog = allPins1_3 @@ -2984,31 +3202,32 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" field = "FSIO ADC #4", fsioAdc4 field = "GPS RX", gps_rx_pin field = "GPS TX", gps_tx_pin - field = "CAN RX pin", canRxPin - field = "CAN TX pin", canTxPin - field = "SPI1 MOSI", spi1mosiPin, {is_enabled_spi_1 == 1} - field = "SPI1 MISO", spi1misoPin, {is_enabled_spi_1 == 1} - field = "SPI1 SCK", spi1sckPin, {is_enabled_spi_1 == 1} - field = "SPI2 MOSI", spi2mosiPin, {is_enabled_spi_2 == 1} - field = "SPI2 MISO", spi2misoPin, {is_enabled_spi_2 == 1} - field = "SPI2 SCK", spi2sckPin, {is_enabled_spi_2 == 1} - field = "SPI3 MOSI", spi3mosiPin, {is_enabled_spi_3 == 1} - field = "SPI3 MISO", spi3misoPin, {is_enabled_spi_3 == 1} - field = "SPI3 SCK", spi3sckPin, {is_enabled_spi_3 == 1} + field = "CAN RX pin", canRxPin + field = "CAN TX pin", canTxPin + field = "SPI1 MOSI", spi1mosiPin, {is_enabled_spi_1 == 1} + field = "SPI1 MISO", spi1misoPin, {is_enabled_spi_1 == 1} + field = "SPI1 SCK", spi1sckPin, {is_enabled_spi_1 == 1} + field = "SPI2 MOSI", spi2mosiPin, {is_enabled_spi_2 == 1} + field = "SPI2 MISO", spi2misoPin, {is_enabled_spi_2 == 1} + field = "SPI2 SCK", spi2sckPin, {is_enabled_spi_2 == 1} + field = "SPI3 MOSI", spi3mosiPin, {is_enabled_spi_3 == 1} + field = "SPI3 MISO", spi3misoPin, {is_enabled_spi_3 == 1} + field = "SPI3 SCK", spi3sckPin, {is_enabled_spi_3 == 1} field = "hip9011CsPin", hip9011CsPin field = "LIS302DLCsPin", LIS302DLCsPin field = "MIL / Check Engine", malfunctionIndicatorPin field = "Saab CDM knock", cdmInputPin field = "comm status light", communicationLedPin field = "running status light", runningLedPin - field = "TLE8888 Chip Select", tle8888_cs - field = "TLE8888 CS Mode", tle8888_csPinMode - field = "TLE 8888 spi", tle8888spiDevice + field = "TLE8888 Chip Select", tle8888_cs + field = "TLE 8888 spi", tle8888spiDevice field = "servo#1", servoOutputPins1 field = "servo#2", servoOutputPins2 field = "servo#3", servoOutputPins3 field = "servo#4", servoOutputPins4 field = "servo#5", servoOutputPins5 + field = "AUX Serial TX", auxSerialTxPin + field = "AUX Serial RX", auxSerialRxPin dialog = allPins1_1_and_2, "", xAxis @@ -3142,9 +3361,10 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" field = "Heater pin", o2heaterPin dialog = egoSettings, "", yAxis - panel = egoSettings_IO, {enableAemXSeries == 0} - panel = egoSettings_sensor, {afr_hwChannel != 16 && enableAemXSeries == 0} + panel = egoSettings_IO + panel = egoSettings_sensor, {afr_hwChannel != 16 && enableAemXSeries == 0 && !auxSerialRxPin && !auxSerialTxPin} field = "Enable AEM X-Series CANbus", enableAemXSeries, { canReadEnabled } + field = "Enable Innovate LC-2 Serial", enableInnovateLC2, { auxSerialRxPin && auxSerialTxPin } ; Engine->EGT inputs dialog = egtInputs, "EGT inputs" @@ -3171,9 +3391,11 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" field = "No1 Direction #1", etbIo1_directionPin1 field = "No1 Direction #2", etbIo1_directionPin2 field = "No1 Control #1", etbIo1_controlPin1, { etb_use_two_wires == 0 } + field = "No1 Disable", etbIo1_disablePin field = "No2 Direction #1", etbIo2_directionPin1 field = "No2 Direction #2", etbIo2_directionPin2 field = "No2 Control #1", etbIo2_controlPin1, { etb_use_two_wires == 0} + field = "No2 Disable", etbIo2_disablePin dialog = idleStepperHw, "Stepper Hardware" field = "Idle Stepper Step Pin", idle_stepperStepPin @@ -3258,27 +3480,33 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" field = "On temperature", fanOnTemperature field = "Off temperature", fanOffTemperature - dialog = fuelPump, "Fuel Rail" + dialog = fuelPumpConfig, "Fuel Pump" field = "Pin", fuelPumpPin field = "Pin mode", fuelPumpPinMode field = "Prime duration", startUpFuelPumpDuration + + dialog = fuelRailConfig, "Fuel Rail" field = "Absolute Fuel Pressure", absoluteFuelPressure field = "Fuel Rail pressure", fuelRailPressure, {absoluteFuelPressure == 1} + dialog = fuelPump, "" + panel = fuelPumpConfig + panel = fuelRailConfig + + ; Controller->Actuator Outputs dialog = mainRelay, "Main relay output" field = "Pin", mainRelayPin field = "Pin mode", mainRelayPinMode dialog = starterRelay, "Starter relay output" - field = "Pin", starterRelayPin - field = "Pin mode", starterRelayPinMode + field = "Pin", starterRelayDisablePin + field = "Pin mode", starterRelayDisableMode dialog = statusLeds, "Status LEDs" field = "Running status LED", runningLedPin field = "TS communication status LED", communicationLedPin field = "Trigger error LED", triggerErrorPin - ; field = "Fatal Error Led", fatalErrorPin ; Engine->MIL Settings dialog = malfunction, "Check Engine Settings" @@ -3405,31 +3633,39 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" field = "Max", alternatorControl_maxValue, {isAlternatorControlEnabled == 1 && onOffAlternatorLogic == 0} field = "#% duty = Pterm + Iterm + Dterm + offset%" + dialog = startStopDialog, "Start/Stop Button" + field = "Start/Stop Button Pin", startStopButtonPin + field = "Start/Stop Button Mode", startStopButtonMode + field = "Starter Control", starterControlPin, {startStopButtonPin != 0} + field = "Start cranking maximum time", startCrankingDuration, {startStopButtonPin != 0} dialog = energySystems, "Battery and Alternator Settings", yAxis panel = batteryDialog panel = alternator - - dialog = speedSensorLeft + panel = startStopDialog + + dialog = speedSensorAnalog field = "Input pin", vehicleSpeedSensorInputPin field = "revolution to speed mult", vehicleSpeedCoef + dialog = speedSensorCan + field = "Vss Car Type", canVssNbcType, { enableCanVss } + + dialog = speedSensorLeft, "Speed sensor config", yAxis + panel = speedSensorCan, { enableCanVss } + panel = speedSensorAnalog, { enableCanVss == 0 } + field = "Enable CANbus VSS values", enableCanVss, { canReadEnabled } + dialog = speedSensor, "Speed sensor", xAxis panel = speedSensorLeft gauge = VSSGauge - + ; Engine->Other inputs dialog = analogInputSettings, "Analog Input Settings" field = "!ECU reboot needed to apply these settings" field = "Use fixed baro corr from MAP", useFixedBaroCorrFromMap field = "Analog divider ratio", analogInputDividerCoefficient - field = "Use BiQuad averaging", useBiQuadAnalogFiltering - field = "Smoothing factor", slowAdcAlpha, {useBiQuadAnalogFiltering == 0} - field = "Bi_Q a0", biQuad_a0, {useBiQuadAnalogFiltering == 1} - field = "Bi_Q a1", biQuad_a1, {useBiQuadAnalogFiltering == 1} - field = "Bi_Q a2", biQuad_a2, {useBiQuadAnalogFiltering == 1} - field = "Bi_Q b1", biQuad_b1, {useBiQuadAnalogFiltering == 1} - field = "Bi_Q b2", biQuad_b2, {useBiQuadAnalogFiltering == 1} + field = "Smoothing factor", slowAdcAlpha dialog = tachSettings, "Tachometer output" field = "!See also dizzySparkOutputPin" @@ -3457,8 +3693,13 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" field = "Enable rusEfi CAN data", enableVerboseCanTx field = "rusEfi CAN data base address", verboseCanBaseAddress field = "Can Sleep Period", canSleepPeriodMs - field = "RX pin", canRxPin - field = "TX pin", canTxPin + field = "RX pin", canRxPin + field = "TX pin", canTxPin + + dialog = auxSerial, "AUX Serial" + field = "RX pin", auxSerialRxPin + field = "TX pin", auxSerialTxPin + field = "Serial Baud Rate", auxSerialSpeed dialog = sdCard, "SD Card Logger" field = "SdCard", isSdCardEnabled @@ -3485,19 +3726,19 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" field = "D7 pin", HD44780_db7 dialog = tle8888, "TLE8888", yAxis - field = "TLE8888 Chip Select", tle8888_cs - field = "TLE8888 SPI", tle8888spiDevice - field = "useTLE8888_hall_mode", useTLE8888_hall_mode + field = "TLE8888 Chip Select", tle8888_cs + field = "TLE8888 SPI", tle8888spiDevice + field = "Mode", tle8888mode field = "useTLE8888 cranking reset hack", useTLE8888_cranking_hack commandButton = "Reinit", cmd_tle8888_init dialog = connection, "", yAxis field = "ADC vRef voltage", adcVcc - panel = tsPort + panel = tsPort panel = canBus - panel = sdCard + panel = auxSerial + panel = sdCard panel = gpsReceiver - panel = tle8888 dialog = joystickPanel, "Joystick" field = "joustick center button", joystickCenterPin @@ -3520,6 +3761,8 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" dialog = debugging, "Debug" field = "!https://rusefi.com/s/debugmode" field = "Debug mode", debugMode + field = "Warning Text", warning_message + field = "showHumanReadableWarning (affects Burn)", showHumanReadableWarning dialog = limits, "Limits" @@ -3624,8 +3867,8 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" field = "output #16", fsioOutputPins16 field = "aux valve #1", auxValves1 field = "aux valve #2", auxValves2 - field = "" - field = "" + field = "Start/Stop Button", startStopButtonPin + field = "External Knock", externalKnockSenseAdc dialog = fsioFrequency, "Frequency" field = "freq #1", fsioFrequency1 @@ -3674,6 +3917,7 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" dialog = fsioFormulas, "FSIO Formulas" field = "!FSIO uses Reverse Polish Notation. Please read http://rusefi.com/s/fsio" + field = "#fsioinfo command in rusEfi console could be useful while troubleshooting those" field = "#1", fsioFormulas1 field = "#2", fsioFormulas2 field = "#3", fsioFormulas3 @@ -3770,43 +4014,37 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" field = "pFactor", etb_pFactor, {throttlePedalPositionAdcChannel != 16} field = "iFactor", etb_iFactor, {throttlePedalPositionAdcChannel != 16} field = "dFactor", etb_dFactor, {throttlePedalPositionAdcChannel != 16} - field = "offset", etb_offset, {throttlePedalPositionAdcChannel != 16} field = "control period", etb_periodMs, {throttlePedalPositionAdcChannel != 16} field = "pid min", etb_minValue, {throttlePedalPositionAdcChannel != 16} field = "pid max", etb_maxValue, {throttlePedalPositionAdcChannel != 16} field = "iTermMin", etb_iTermMin, {throttlePedalPositionAdcChannel != 16} field = "iTermMax", etb_iTermMax, {throttlePedalPositionAdcChannel != 16} + dialog = etbIdleDialog, "ETB Idle" + field = "use ETB for idle", useETBforIdleControl + field = "ETB idle maximum angle", etbIdleThrottleRange dialog = etbDialogLeft field = "https://rusefi.com/s/etb" field = "Detailed status in console", isVerboseETB field = "Pause ETB control", pauseEtbControl - field = "Throttle Pedal Up", throttlePedalUpVoltage - field = "Throttle Pedal Wide Open", throttlePedalWOTVoltage field = etbCalibrationOnStart, etbCalibrationOnStart - field = "TPS#2 min", tps2Min, { tps2_1AdcChannel != 16 } - field = "TPS#2 max", tps2Max, { tps2_1AdcChannel != 16 } ; we need the term about stepper idle in here, because there's a bug in TS that you can't have different visibility ; criteria for the same panel when used in multiple places panel = hbridgeHardware, { throttlePedalPositionAdcChannel != 16 || useStepperIdle && useHbridges } - panel = etbPidDialog + + dialog = etbAutotune, "PID Autotune" + field = "!Set debug mode below to 'ETB Autotune' to show results" + field = "Debug mode", debugMode + commandButton = "ETB PID Autotune", cmd_etb_autotune dialog = etbDialogRight - field = "!https://rusefi.com/s/debugmode" - field = "Neutral Position", etbNeutralPosition - field = "Debug mode", debugMode - field = "use ETB for idle", useETBforIdleControl - field = "ETB idle maximum angle", etbIdleThrottleRange - field = "Press buttons to calibrate sensors" - field = "You would have to remove air filter to move throttle manually" - commandButton = "TPS#1 closed position", cmd_calibrate_tps_1_closed - commandButton = "TPS#1 wide open position", cmd_calibrate_tps_1_wot - field = "Not many vehicles have two throttle bodies but some do" - commandButton = "TPS#2 closed position", cmd_calibrate_tps_2_closed - commandButton = "TPS#2 wide open position", cmd_calibrate_tps_2_wot - commandButton = "Pedal Up", cmd_calibrate_pedal_up - commandButton = "Pedal Down", cmd_calibrate_pedal_down + panel = etbIdleDialog + panel = etbPidDialog + panel = etbAutotune + + ; Neutral position handling not yet implemented! + ;field = "Neutral Position", etbNeutralPosition dialog = etbDialog, "Electronic Throttle Body (beta)", border topicHelp = "etbHelp" @@ -3835,12 +4073,13 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" commandButton = "Injector #8", cmd_test_inj8 dialog = testMisc, "Misc" - commandButton = "Come To Pit", cmd_call_from_pit +; commandButton = "Come To Pit", cmd_call_from_pit commandButton = "Fuel Pump", cmd_test_fuel_pump commandButton = "Radiator Fan", cmd_test_radiator_fan commandButton = "Check Engine", cmd_test_check_engine_light commandButton = "Idle Air Valve", cmd_test_idle_valve commandButton = "A/C Relay", cmd_test_ac_relay + commandButton = "Starter Relay", cmd_test_starter_relay commandButton = "Stop Engine", cmd_stop_engine commandButton = "Write Config", cmd_write_config commandButton = "Reset ECU", cmd_reset_controller @@ -3866,7 +4105,7 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" ; Board->ECU stimulator dialog = ecuStimulator, "ECU stimulator" field = "Trigger Simulator", triggerSimulatorFrequency - field = "self-stimulation", directSelfStimulation + commandButton = "Enable Internal Trigger Simulation", cmd_enable_self_stim field = "" field = "digipot spi", digitalPotentiometerSpiDevice field = "digipot CS #0", digitalPotentiometerChipSelect1 @@ -3943,7 +4182,94 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" field = "Ignition Math Logic @", ignMathCalculateAtIndex field = "MAP Averaging Logic @", mapAveragingSchedulingAtIndex - field = "Target temperature", postCrankingTargetClt + + help = helpGeneral, "rusEfi General Help" + webHelp = "http://www.rusefi.com/" + text = "" + + dialog = gppwm1left, "" + field = "Pin", gppwm1_pin + field = "" + field = "Set frequency to 0hz for on-off mode" + field = "Frequency", gppwm1_pwmFrequency, {gppwm1_pin != 0} + field = "" + field = "On above duty", gppwm1_onAboveDuty, {gppwm1_pin != 0 && gppwm1_pwmFrequency == 0} + field = "Off below duty", gppwm1_offBelowDuty, {gppwm1_pin != 0 && gppwm1_pwmFrequency == 0} + field = "Duty if error", gppwm1_dutyIfError, {gppwm1_pin != 0} + field = "" + field = "Load Axis", gppwm1_loadAxis, {gppwm1_pin != 0} + field = "" + field = "" + field = "" + field = "" + field = "" + + dialog = gppwm1, "General Purpose PWM 1", xAxis + panel = gppwm1left + panel = gppwm1Tbl, {gppwm1_pin != 0} + + dialog = gppwm2left, "" + field = "Pin", gppwm2_pin + field = "" + field = "Set frequency to 0hz for on-off mode" + field = "Frequency", gppwm2_pwmFrequency, {gppwm2_pin != 0} + field = "" + field = "On above duty", gppwm2_onAboveDuty, {gppwm2_pin != 0 && gppwm2_pwmFrequency == 0} + field = "Off below duty", gppwm2_offBelowDuty, {gppwm2_pin != 0 && gppwm2_pwmFrequency == 0} + field = "Duty if error", gppwm2_dutyIfError, {gppwm2_pin != 0} + field = "" + field = "Load Axis", gppwm2_loadAxis, {gppwm2_pin != 0} + field = "" + field = "" + field = "" + field = "" + field = "" + + dialog = gppwm2, "General Purpose PWM 2", xAxis + panel = gppwm2left + panel = gppwm2Tbl, {gppwm2_pin != 0} + + dialog = gppwm3left, "" + field = "Pin", gppwm3_pin + field = "" + field = "Set frequency to 0hz for on-off mode" + field = "Frequency", gppwm3_pwmFrequency, {gppwm3_pin != 0} + field = "" + field = "On above duty", gppwm3_onAboveDuty, {gppwm3_pin != 0 && gppwm3_pwmFrequency == 0} + field = "Off below duty", gppwm3_offBelowDuty, {gppwm3_pin != 0 && gppwm3_pwmFrequency == 0} + field = "Duty if error", gppwm3_dutyIfError, {gppwm3_pin != 0} + field = "" + field = "Load Axis", gppwm3_loadAxis, {gppwm3_pin != 0} + field = "" + field = "" + field = "" + field = "" + field = "" + + dialog = gppwm3, "General Purpose PWM 3", xAxis + panel = gppwm3left + panel = gppwm3Tbl, {gppwm3_pin != 0} + + dialog = gppwm4left, "" + field = "Pin", gppwm4_pin + field = "" + field = "Set frequency to 0hz for on-off mode" + field = "Frequency", gppwm4_pwmFrequency, {gppwm4_pin != 0} + field = "" + field = "On above duty", gppwm4_onAboveDuty, {gppwm4_pin != 0 && gppwm4_pwmFrequency == 0} + field = "Off below duty", gppwm4_offBelowDuty, {gppwm4_pin != 0 && gppwm4_pwmFrequency == 0} + field = "Duty if error", gppwm4_dutyIfError, {gppwm4_pin != 0} + field = "" + field = "Load Axis", gppwm4_loadAxis, {gppwm4_pin != 0} + field = "" + field = "" + field = "" + field = "" + field = "" + + dialog = gppwm4, "General Purpose PWM 4", xAxis + panel = gppwm4left + panel = gppwm4Tbl, {gppwm4_pin != 0} [Tools] ;addTool = toolName, PanelName diff --git a/firmware/tunerstudio/rusefi_microrusefi.ini b/firmware/tunerstudio/rusefi_microrusefi.ini index 8a89c72658..5bff3b2568 100644 --- a/firmware/tunerstudio/rusefi_microrusefi.ini +++ b/firmware/tunerstudio/rusefi_microrusefi.ini @@ -40,11 +40,14 @@ enable2ndByteCanID = false ; settingOption = DEFAULT, "Speed Density" ; DEFAULT will be over looked and this will fall into the #else block of the statement. +[MegaTune] + ; https://rusefi.com/forum/viewtopic.php?p=36201#p36201 + signature = "rusEFI v1.2020.4" [TunerStudio] queryCommand = "S" versionInfo = "V" ; firmwave version for title bar. - signature = "rusEFI v1.2020.3" ; signature is expected to be 7 or more characters. + signature = "rusEFI v1.2020.4" ; signature is expected to be 7 or more characters. [Constants] ; new packet serial format with CRC @@ -66,6 +69,7 @@ enable2ndByteCanID = false ; we have current pageSize or (pageSize + 8) here? ; crc32CheckCommand = "k\x00\x00\x00\x00\x36\xB8" + retrieveConfigError = "e" ;communication settings pageActivationDelay = 500 ; Milliseconds delay after burn command. See https://sourceforge.net/p/rusefi/tickets/77/ @@ -85,7 +89,7 @@ enable2ndByteCanID = false ; see PAGE_0_SIZE in C source code ; CONFIG_DEFINITION_START -; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on integration\rusefi_config.txt Fri Mar 20 19:58:51 EDT 2020 +; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.bat integration\rusefi_config.txt Sun Apr 26 14:17:13 EDT 2020 pageSize = 20000 page = 1 @@ -94,7 +98,7 @@ page = 1 injector_flow = scalar, F32, 8, "cm3/min", 1, 0, 0, 99999, 2 injector_battLagCorrBins = array, F32, 12, [8], "volts", 1, 0, 0.0, 20.0, 2 injector_battLagCorr = array, F32, 44, [8], "ms", 1, 0, 0.0, 50.0, 2 - directSelfStimulation = bits, U32, 76, [0:0], "false", "true" + unused76b0 = bits, U32, 76, [0:0], "false", "true" activateAuxPid1 = bits, U32, 76, [1:1], "false", "true" isVerboseAuxPid1 = bits, U32, 76, [2:2], "false", "true" activateAuxPid2 = bits, U32, 76, [3:3], "false", "true" @@ -103,14 +107,14 @@ page = 1 isVerboseAuxPid3 = bits, U32, 76, [6:6], "false", "true" activateAuxPid4 = bits, U32, 76, [7:7], "false", "true" isVerboseAuxPid4 = bits, U32, 76, [8:8], "false", "true" - useBiQuadAnalogFiltering= bits, U32, 76, [9:9], "false", "true" + isCJ125Verbose = bits, U32, 76, [9:9], "false", "true" cj125isUaDivided = bits, U32, 76, [10:10], "false", "true" cj125isLsu49 = bits, U32, 76, [11:11], "false", "true" etb_use_two_wires = bits, U32, 76, [12:12], "false", "true" isDoubleSolenoidIdle = bits, U32, 76, [13:13], "false", "true" showSdCardWarning = bits, U32, 76, [14:14], "false", "true" cj125isUrDivided = bits, U32, 76, [15:15], "false", "true" - useTLE8888_hall_mode = bits, U32, 76, [16:16], "false", "true" + issue_294_unused = bits, U32, 76, [16:16], "false", "true" useTLE8888_cranking_hack= bits, U32, 76, [17:17], "false", "true" useInstantRpmForIdle = bits, U32, 76, [18:18], "false", "true" absoluteFuelPressure = bits, U32, 76, [19:19], "false", "true" @@ -118,7 +122,7 @@ page = 1 rollingLaunchEnabled = bits, U32, 76, [21:21], "false", "true" antiLagEnabled = bits, U32, 76, [22:22], "false", "true" useRunningMathForCranking= bits, U32, 76, [23:23], "Fixed", "Fuel Map" - issue_294_25 = bits, U32, 76, [24:24], "false", "true" + displayLogicLevelsInEngineSniffer= bits, U32, 76, [24:24], "false", "true" issue_294_26 = bits, U32, 76, [25:25], "false", "true" issue_294_27 = bits, U32, 76, [26:26], "false", "true" issue_294_28 = bits, U32, 76, [27:27], "false", "true" @@ -190,7 +194,7 @@ page = 1 fanOnTemperature = scalar, F32, 468, "*C", 1, 0, 0, 1000.0, 0 fanOffTemperature = scalar, F32, 472, "*C", 1, 0, 0, 1000.0, 0 vehicleSpeedCoef = scalar, F32, 476, "coef", 1, 0, 0.01, 2000.0, 2 - canNbcType = bits, U32, 480, [0:7], "BMW", "FIAT", "VAG" , "MAZDA RX8" + canNbcType = bits, U32, 480, [0:7], "None", "FIAT", "VAG" , "MAZDA RX8", "BMW", "W202" canSleepPeriodMs = scalar, S32, 484, "ms", 1, 0, 0, 1000.0, 2 ambiguousOperationMode = bits, U32, 488, [0:7], "INVALID", "4 stroke without cam sensor", "4 stroke with cam sensor", "2 stroke", "4 stroke with symmetrical crank (requires VVT input)", "INVALID", "INVALID", "INVALID" displayMode = bits, U32, 492, [0:7], "none", "hd44780", "hd44780 over pcf8574", "INVALID" @@ -204,9 +208,9 @@ page = 1 tps2_1AdcChannel = bits, U08, 515, [0:7] "18 - AN temp 1","23 - AN temp 2","24 - AN temp 3","22 - AN temp 4","28 - AN volt 10","INVALID","26 - AN volt 2","31 - AN volt 3","36 - AN volt 8","40 - AN volt 9","27 - AN volt 1","Battery Sense","19 - AN volt 4","20 - AN volt 5","32 - AN volt 6","30 - AN volt 7","NONE","INVALID","INVALID","INVALID" ;no TS info - skipping overrideCrankingIgnition offset 516 sensorChartFrequency = scalar, S32, 520, "index", 1, 0, 0, 300, 0 ; size 4 - trigger_type = bits, U32, 524, [0:7], "custom toothed wheel", "Ford Aspire", "Dodge Neon 1995", "Miata NA", "Miata NB", "GM_7X", "Cooper R50", "Mazda SOHC 4", "60/2", "36/1", "Honda 4+24+1", "Mitsubishi", "Honda 4+24", "Honda 1+4+24", "Dodge Neon 2003", "Mazda DOHC 1+4", "1+1", "1+60/2", "Single Tooth", "Dodge Ram 1+16", "60/2 VW", "Honda 1+24", "Dodge Stratus", "36_2_2_2", "Nissan Primera", "2JZ", "Rover K", "GM LS 24", "Honda CBR 600", "2JZ_1_12", "Honda CBR 600 custom", "3/1 skipped" , "Dodge Neon 2003 crank", "Miata VVT", "trg34", "trg35", "Subaru 7+6", "Jeep 18-2-2-2", "WIP", "Dodge Neon 1995 crank only", "Jeep XJ 4 cyl", "FiatIAQ_P8", "Mazda Z5", "trg43", "trg44", "trg45", "INVALID" - trigger_unusedTriggerBit0= bits, U32, 528, [0:0], "false", "true" - trigger_unusedTriggerBit1= bits, U32, 528, [1:1], "false", "true" + trigger_type = bits, U32, 524, [0:7], "custom toothed wheel", "Ford Aspire", "Dodge Neon 1995", "Miata NA", "Miata NB", "GM_7X", "Cooper R50", "Mazda SOHC 4", "60/2", "36/1", "Honda 4+24+1", "Mitsubishi", "Honda 4+24", "Honda 1+4+24", "Dodge Neon 2003", "Mazda DOHC 1+4", "1+1", "1+60/2", "Single Tooth", "Dodge Ram 1+16", "60/2 VW", "Honda 1+24", "Dodge Stratus", "36_2_2_2", "Nissan Primera", "2JZ", "Rover K", "GM LS 24", "Honda CBR 600", "2JZ_1_12", "Honda CBR 600 custom", "3/1 skipped" , "Dodge Neon 2003 crank", "Miata VVT", "trg34", "trg35", "Subaru 7+6", "Jeep 18-2-2-2", "WIP", "Dodge Neon 1995 crank only", "Jeep XJ 4 cyl", "FiatIAQ_P8", "Mazda Z5", "trg43", "Renix 44-2-2", "Renix 66-2-2-2", "Honda K 12+1", "trg47", "trg48", "INVALID" + trigger_todoRemoveMeOneDay0= bits, U32, 528, [0:0], "false", "true" + trigger_todoRemoveMeOneDay1= bits, U32, 528, [1:1], "false", "true" trigger_useOnlyFirstChannel= bits, U32, 528, [2:2], "false", "true" trigger_unusedBit_4_3 = bits, U32, 528, [3:3], "false", "true" trigger_unusedBit_4_4 = bits, U32, 528, [4:4], "false", "true" @@ -245,7 +249,7 @@ page = 1 mafAdcChannel = bits, U08, 543, [0:7] "18 - AN temp 1","23 - AN temp 2","24 - AN temp 3","22 - AN temp 4","28 - AN volt 10","INVALID","26 - AN volt 2","31 - AN volt 3","36 - AN volt 8","40 - AN volt 9","27 - AN volt 1","Battery Sense","19 - AN volt 4","20 - AN volt 5","32 - AN volt 6","30 - AN volt 7","NONE","INVALID","INVALID","INVALID" globalFuelCorrection = scalar, F32, 544, "coef", 1, 0.0, 0, 1000.0, 2 adcVcc = scalar, F32, 548, "volts", 1, 0.0, 0, 6.0, 3 -;no TS info - skipping maxKnockSubDeg offset 552 + maxKnockSubDeg = scalar, F32, 552, "Deg", 1, 0, 0, 100, 0 camInputs1 = bits, U08, 556, [0:7], "NONE","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","25 - Hall Cam","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","45 - VR/Hall Crank","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID" camInputs2 = bits, U08, 557, [0:7], "NONE","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","25 - Hall Cam","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","45 - VR/Hall Crank","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID" camInputs3 = bits, U08, 558, [0:7], "NONE","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","25 - Hall Cam","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","45 - VR/Hall Crank","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID" @@ -349,13 +353,13 @@ page = 1 canTxPin = bits, U08, 708, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" canRxPin = bits, U08, 709, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" throttlePedalUpPinMode = scalar, U08, 710, "todo", 1, 0, 0, 20, 1 - debugTimerCallback = bits, U08, 711, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" +;no TS info - skipping unused711 offset 711 ;no TS info - skipping idleThreadPeriodMs offset 712 ;no TS info - skipping consoleLoopPeriodMs offset 716 ;no TS info - skipping lcdThreadPeriodMs offset 720 ;no TS info - skipping generalPeriodicThreadPeriodMs offset 724 tunerStudioSerialSpeed = scalar, U32, 728, "BPs", 1, 0, 0,1000000, 0 - canDeviceMode = bits, U32, 732, [0:7], "v0", "v1" +;no TS info - skipping anUnused4Bytes offset 732 triggerSimulatorPins1 = bits, U08, 736, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" triggerSimulatorPins2 = bits, U08, 737, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" triggerSimulatorPins3 = bits, U08, 738, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" @@ -405,7 +409,8 @@ page = 1 hip9011IntHoldPin = bits, U08, 754, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" hip9011IntHoldPinMode = bits, U08, 755, [0:7], "default", "default inverted", "open collector", "open collector inverted" verboseCanBaseAddress = scalar, U32, 756, "", 1, 0, 0, 536870911, 0 -;no TS info - skipping unrealisticRpmThreashold offset 760 + mc33_hvolt = scalar, U08, 760, "v", 1, 0, 0, 100, 0 +;no TS info - skipping unusedHere offset 761 gpioPinModes1 = bits, U08, 764, [0:7], "default", "default inverted", "open collector", "open collector inverted" gpioPinModes2 = bits, U08, 765, [0:7], "default", "default inverted", "open collector", "open collector inverted" gpioPinModes3 = bits, U08, 766, [0:7], "default", "default inverted", "open collector", "open collector inverted" @@ -447,7 +452,7 @@ page = 1 max31855_cs7 = bits, U08, 802, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" max31855_cs8 = bits, U08, 803, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" sdCardPeriodMs = scalar, S16, 804, "ms", 1, 0, 0, 30000, 0 - debugSetTimer = bits, U08, 806, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" +;no TS info - skipping unused806 offset 806 debugMapAveraging = bits, U08, 807, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" starterRelayDisablePin = bits, U08, 808, [0:7], "NONE","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","12 - Ignition 4","11 - Ignition 3","10 - Ignition 2","9 - Ignition 1","INVALID","13 - GP Out 6","14 - GP Out 5","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","35 - GP Out 1","7 - Lowside 1","3 - Lowside 2","42 - Injector 4","41 - Injector 3","38 - Injector 2","37 - Injector 1","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","34 - GP Out 2","33 - GP Out 3","43 - GP Out 4","INVALID","INVALID","INVALID" starterRelayDisableMode = bits, U08, 809, [0:7], "default", "default inverted", "open collector", "open collector inverted" @@ -456,8 +461,9 @@ page = 1 mapMinBufferLength = scalar, S32, 812, "count", 1, 0, 0, 24, 0 idlePidDeactivationTpsThreshold = scalar, S16, 816, "%", 1, 0, 0, 100.0, 0 stepperParkingExtraSteps = scalar, S16, 818, "%", 1, 0, 0, 3000.0, 0 - unusedmiataNb2VVTRatioFrom = scalar, F32, 820, "value", 1, 0, 0, 1000, 5 - unusedmiataNb2VVTRatioTo = scalar, F32, 824, "value", 1, 0, 0, 1000, 5 +;no TS info - skipping unusedAntilagTimeout offset 820 +;no TS info - skipping antiLagRpmTreshold offset 824 + startCrankingDuration = scalar, S16, 826, "Seconds", 1, 0, 0, 30, 0 triggerErrorPin = bits, U08, 828, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" triggerErrorPinMode = bits, U08, 829, [0:7], "default", "default inverted", "open collector", "open collector inverted" acRelayPin = bits, U08, 830, [0:7], "NONE","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","12 - Ignition 4","11 - Ignition 3","10 - Ignition 2","9 - Ignition 1","INVALID","13 - GP Out 6","14 - GP Out 5","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","35 - GP Out 1","7 - Lowside 1","3 - Lowside 2","42 - Injector 4","41 - Injector 3","38 - Injector 2","37 - Injector 1","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","34 - GP Out 2","33 - GP Out 3","43 - GP Out 4","INVALID","INVALID","INVALID" @@ -539,12 +545,12 @@ page = 1 todoClutchDownPinInverted= bits, U32, 976, [1:1], "false", "true" useHbridges = bits, U32, 976, [2:2], "false", "true" multisparkEnable = bits, U32, 976, [3:3], "false", "true" - unusedBit_251_4 = bits, U32, 976, [4:4], "false", "true" - unusedBit_251_5 = bits, U32, 976, [5:5], "false", "true" - unusedBit_251_6 = bits, U32, 976, [6:6], "false", "true" - unusedBit_251_7 = bits, U32, 976, [7:7], "false", "true" - unusedBit_251_8 = bits, U32, 976, [8:8], "false", "true" - unusedBit_251_9 = bits, U32, 976, [9:9], "false", "true" + enableLaunchRetard = bits, U32, 976, [4:4], "false", "true" + enableLaunchBoost = bits, U32, 976, [5:5], "false", "true" + launchDisableBySpeed = bits, U32, 976, [6:6], "false", "true" + enableCanVss = bits, U32, 976, [7:7], "false", "true" + enableInnovateLC2 = bits, U32, 976, [8:8], "false", "true" + showHumanReadableWarning= bits, U32, 976, [9:9], "false", "true" unusedBit_251_10 = bits, U32, 976, [10:10], "false", "true" unusedBit_251_11 = bits, U32, 976, [11:11], "false", "true" unusedBit_251_12 = bits, U32, 976, [12:12], "false", "true" @@ -565,16 +571,16 @@ page = 1 unusedBit_251_27 = bits, U32, 976, [27:27], "false", "true" unusedBit_251_28 = bits, U32, 976, [28:28], "false", "true" unusedBit_251_29 = bits, U32, 976, [29:29], "false", "true" - unusedBit_280_30 = bits, U32, 976, [30:30], "false", "true" - unusedBit_280_31 = bits, U32, 976, [31:31], "false", "true" + unusedBit_282_30 = bits, U32, 976, [30:30], "false", "true" + unusedBit_282_31 = bits, U32, 976, [31:31], "false", "true" etbIo1_directionPin1 = bits, U08, 980, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" etbIo1_directionPin2 = bits, U08, 981, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" etbIo1_controlPin1 = bits, U08, 982, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" - etbIo1_controlPinMode = bits, U08, 983, [0:7], "default", "default inverted", "open collector", "open collector inverted" + etbIo1_disablePin = bits, U08, 983, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" etbIo2_directionPin1 = bits, U08, 984, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" etbIo2_directionPin2 = bits, U08, 985, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" etbIo2_controlPin1 = bits, U08, 986, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" - etbIo2_controlPinMode = bits, U08, 987, [0:7], "default", "default inverted", "open collector", "open collector inverted" + etbIo2_disablePin = bits, U08, 987, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" boostControlPin = bits, U08, 988, [0:7], "NONE","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","12 - Ignition 4","11 - Ignition 3","10 - Ignition 2","9 - Ignition 1","INVALID","13 - GP Out 6","14 - GP Out 5","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","35 - GP Out 1","7 - Lowside 1","3 - Lowside 2","42 - Injector 4","41 - Injector 3","38 - Injector 2","37 - Injector 1","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","34 - GP Out 2","33 - GP Out 3","43 - GP Out 4","INVALID","INVALID","INVALID" boostControlPinMode = bits, U08, 989, [0:7], "default", "default inverted", "open collector", "open collector inverted" antiLagActivatePin = bits, U08, 990, [0:7], "NONE","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","Brake Switch","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","Clutch Switch","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID" @@ -596,7 +602,30 @@ page = 1 launchFuelAdded = scalar, S32, 1040, "%", 1, 0, 0, 100.0, 0 launchBoostDuty = scalar, S32, 1044, "%", 1, 0, 0, 100.0, 0 hardCutRpmRange = scalar, S32, 1048, "rpm", 1, 0, 0, 3000.0, 2 -;no TS info - skipping unusedAtOldBoardConfigurationEnd offset 1052 +;no TS info - skipping launchAdvanceRpmRange offset 1052 +;no TS info - skipping launchTpsTreshold offset 1056 +;no TS info - skipping launchActivateDelay offset 1060 + stft_maxIdleRegionRpm = scalar, U08, 1064, "RPM", 50, 0, 0.0, 12000.0, 0 + stft_maxOverrunLoad = scalar, U08, 1065, "load", 1, 0, 0.0, 250, 0 + stft_minPowerLoad = scalar, U08, 1066, "load", 1, 0, 0.0, 250, 0 + stft_deadband = scalar, U08, 1067, "%", 0.1, 0, 0, 3, 1 + stft_minClt = scalar, S08, 1068, "C", 1, 0, -20, 100, 0 + stft_minAfr = scalar, U08, 1069, "afr", 0.1, 0, 10, 20, 1 + stft_maxAfr = scalar, U08, 1070, "afr", 0.1, 0, 10, 20, 1 + stft_startupDelay = scalar, U08, 1071, "seconds", 1, 0, 0, 250, 0 + stft_cellCfgs1_maxAdd = scalar, S08, 1072, "%", 1, 0, 0, 25, 0 + stft_cellCfgs1_maxRemove = scalar, S08, 1073, "%", 1, 0, -25, 0, 0 + stft_cellCfgs1_timeConstant = scalar, U16, 1074, "sec", 0.1, 0, 0.1, 100, 2 + stft_cellCfgs2_maxAdd = scalar, S08, 1076, "%", 1, 0, 0, 25, 0 + stft_cellCfgs2_maxRemove = scalar, S08, 1077, "%", 1, 0, -25, 0, 0 + stft_cellCfgs2_timeConstant = scalar, U16, 1078, "sec", 0.1, 0, 0.1, 100, 2 + stft_cellCfgs3_maxAdd = scalar, S08, 1080, "%", 1, 0, 0, 25, 0 + stft_cellCfgs3_maxRemove = scalar, S08, 1081, "%", 1, 0, -25, 0, 0 + stft_cellCfgs3_timeConstant = scalar, U16, 1082, "sec", 0.1, 0, 0.1, 100, 2 + stft_cellCfgs4_maxAdd = scalar, S08, 1084, "%", 1, 0, 0, 25, 0 + stft_cellCfgs4_maxRemove = scalar, S08, 1085, "%", 1, 0, -25, 0, 0 + stft_cellCfgs4_timeConstant = scalar, U16, 1086, "sec", 0.1, 0, 0.1, 100, 2 +;no TS info - skipping unusedAtOldBoardConfigurationEnd offset 1088 vvtDisplayInverted = bits, U32, 1464, [0:0], "false", "true" fuelClosedLoopCorrectionEnabled= bits, U32, 1464, [1:1], "false", "true" isVerboseIAC = bits, U32, 1464, [2:2], "false", "true" @@ -726,7 +755,7 @@ page = 1 tps2Max = scalar, S16, 1770, "ADC", 1, 0, 0, 1023, 0 starterControlPin = bits, U08, 1772, [0:7], "NONE","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","12 - Ignition 4","11 - Ignition 3","10 - Ignition 2","9 - Ignition 1","INVALID","13 - GP Out 6","14 - GP Out 5","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","35 - GP Out 1","7 - Lowside 1","3 - Lowside 2","42 - Injector 4","41 - Injector 3","38 - Injector 2","37 - Injector 1","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","34 - GP Out 2","33 - GP Out 3","43 - GP Out 4","INVALID","INVALID","INVALID" startStopButtonMode = scalar, U08, 1773, "todo", 1, 0, 0, 20, 1 -;no TS info - skipping unusedFormerWarmupAfrPid offset 1774 + mc33816_flag0 = bits, U08, 1774, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" tachPulsePerRev = scalar, U08, 1775, "Pulse", 1, 0, 1.0, 255.0, 0 mapErrorDetectionTooLow = scalar, F32, 1776, "kPa", 1, 0, -100.0, 100.0, 2 mapErrorDetectionTooHigh = scalar, F32, 1780, "kPa", 1, 0, -100.0, 800.0, 2 @@ -761,9 +790,9 @@ page = 1 startOfCrankingPrimingPulse = scalar, F32, 2032, "ms", 1, 0, 0, 200, 1 afterCrankingIACtaperDuration = scalar, S16, 2036, "cycles", 1, 0, 0, 5000, 0 iacByTpsTaper = scalar, S16, 2038, "percent", 1, 0, 0, 500, 0 - unusedErrorPin = bits, U08, 2040, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" + auxSerialTxPin = bits, U08, 2040, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" warningLedPin = bits, U08, 2041, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" - unused1234234 = bits, U08, 2042, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" + auxSerialRxPin = bits, U08, 2042, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" LIS302DLCsPin = bits, U08, 2043, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" tpsAccelLength = scalar, S32, 2044, "cycles", 1, 0, 1, 200, 0 tpsAccelEnrichmentThreshold = scalar, F32, 2048, "roc", 1, 0, 0, 200, 3 @@ -777,8 +806,9 @@ page = 1 tpsDecelEnleanmentThreshold = scalar, F32, 2080, "roc", 1, 0, 0, 200, 3 tpsDecelEnleanmentMultiplier = scalar, F32, 2084, "coeff", 1, 0, 0, 200, 3 slowAdcAlpha = scalar, F32, 2088, "coeff", 1, 0, 0, 200, 3 - debugMode = bits, U32, 2092, [0:7], "Alternator PID", "TPS acceleration enrichment", "INVALID", "Idle Control", "Engine Load accl enrich", "Trigger Counters", "FSIO_ADC", "AUX_PID_1", "VVT input", "Cranking", "Timing", "Closed-loop fuel corr PID", "VSS", "SD card", "sr5", "Knock", "Trigger Sync", "Electronic Throttle", "Executor", "Bench Test / TS commands", "Aux Valves", "Analog inputs #1", "INSTANT_RPM", "FSIO_EXPRESSION", "Status", "CJ125", "CAN", "MAP", "Metrics", "ETB#2", "Ion Sense", "TLE8888", "Analog inputs #2", "Dwell Metric", "Aux Temperature", "ETB Logic", "Boost Control" -;no TS info - skipping unused_former_warmup_target_afr offset 2096 + debugMode = bits, U32, 2092, [0:7], "Alternator PID", "TPS acceleration enrichment", "INVALID", "Idle Control", "Engine Load accl enrich", "Trigger Counters", "FSIO_ADC", "AUX_PID_1", "VVT input", "Cranking", "Timing", "Closed-loop fuel corr PID", "VSS", "SD card", "sr5", "Knock", "mode16", "Electronic Throttle", "Executor", "Bench Test / TS commands", "Aux Valves", "Analog inputs #1", "INSTANT_RPM", "FSIO_EXPRESSION", "Status", "CJ125", "CAN", "MAP", "Metrics", "ETB#2", "Ion Sense", "TLE8888", "Analog inputs #2", "Dwell Metric", "INVALID", "ETB Logic", "Boost Control", "Start/Stop", "Launch", "ETB Autotune", "Mode40" + auxSerialSpeed = scalar, U32, 2096, "BPs", 1, 0, 0,1000000, 0 +;no TS info - skipping unused_former_warmup_target_afr offset 2100 boostCutPressure = scalar, F32, 2132, "kPa", 1, 0, 0, 500, 0 mapAccelTaperBins = array, F32, 2136, [8], "counter", 1, 0, 0.0, 300, 0 mapAccelTaperMult = array, F32, 2168, [8], "mult", 1, 0, 0.0, 300, 2 @@ -812,18 +842,15 @@ page = 1 narrowToWideOxygenBins = array, F32, 2264, [8], "V", 1, 0, -10.0, 10.0, 3 narrowToWideOxygen = array, F32, 2296, [8], "ratio", 1, 0, -40.0, 40.0, 2 vvtMode = bits, U32, 2328, [0:7], "First half", "Second half", "2GZ", "Miata NB2", "mode4", "mode5", "mode6", "mode7" - biQuad_a0 = scalar, F32, 2332, "v", 1, 0, -1000, 1000, 9 - biQuad_a1 = scalar, F32, 2336, "v", 1, 0, -1000, 1000, 9 - biQuad_a2 = scalar, F32, 2340, "v", 1, 0, -1000, 1000, 9 - biQuad_b1 = scalar, F32, 2344, "v", 1, 0, -1000, 1000, 9 - biQuad_b2 = scalar, F32, 2348, "v", 1, 0, -1000, 1000, 9 +;no TS info - skipping unusedOldBiquad offset 2332 cltTimingBins = array, F32, 2352, [8], "C", 1, 0, -100.0, 250.0, 1 cltTimingExtra = array, F32, 2384, [8], "degree", 1, 0, -400.0, 400.0, 0 - nbVvtIndex = scalar, S32, 2416, "index", 1, 0, 0, 4.0, 0 + tle8888mode = bits, U08, 2416, [0:7], "Auto", "SemiAuto", "Manual", "Hall" +;no TS info - skipping unusedSomethingWasHere offset 2417 ;no TS info - skipping autoTuneCltThreshold offset 2420 ;no TS info - skipping autoTuneTpsRocThreshold offset 2424 ;no TS info - skipping autoTuneTpsQuietPeriod offset 2428 - postCrankingTargetClt = scalar, F32, 2432, "C", 1, 0, 0, 100, 0 +;no TS info - skipping unused2432 offset 2432 postCrankingFactor = scalar, F32, 2436, "mult", 1, 0, 0, 100, 4 postCrankingDurationSec = scalar, F32, 2440, "seconds", 1, 0, 0, 100, 2 auxTempSensor1_tempC_1 = scalar, F32, 2444, "*C", 1, 0, -40, 200, 1 @@ -1010,13 +1037,59 @@ page = 1 iacPidMultTable = array, U08, 4060, [8x8],"%", 1, 0, 0, 999, 2 iacPidMultLoadBins = array, U08, 4124, [8], "Load", 1, 0.0, 0, 500.0, 2 iacPidMultRpmBins = array, U08, 4132, [8], "RPM", 50, 0, 0.0, 12000.0, 0 -;no TS info - skipping mainUnusedEnd offset 4140 + canVssNbcType = bits, U32, 4140, [0:7], "BMW_e46", "W202" + gppwm1_pin = bits, U08, 4144, [0:7], "NONE","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","12 - Ignition 4","11 - Ignition 3","10 - Ignition 2","9 - Ignition 1","INVALID","13 - GP Out 6","14 - GP Out 5","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","35 - GP Out 1","7 - Lowside 1","3 - Lowside 2","42 - Injector 4","41 - Injector 3","38 - Injector 2","37 - Injector 1","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","34 - GP Out 2","33 - GP Out 3","43 - GP Out 4","INVALID","INVALID","INVALID" + gppwm1_dutyIfError = scalar, U08, 4145, "%", 1, 0, 0, 100, 0 + gppwm1_pwmFrequency = scalar, U16, 4146, "hz", 1, 0, 0, 500, 0 + gppwm1_onAboveDuty = scalar, U08, 4148, "%", 1, 0, 0, 100, 0 + gppwm1_offBelowDuty = scalar, U08, 4149, "%", 1, 0, 0, 100, 0 + gppwm1_loadAxis = bits, U08, 4150, [0:1], "TPS", "MAP", "CLT", "IAT" +;no TS info - skipping gppwm1_pad offset 4151 + gppwm1_loadBins = array, U08, 4152, [8], "load", 1, 0, 0.0, 250, 0 + gppwm1_rpmBins = array, U08, 4160, [8], "RPM", 50, 0, 0.0, 12000.0, 0 + gppwm1_table = array, U08, 4168, [8x8], "duty", 1, 0, 0, 100, 0 + gppwm2_pin = bits, U08, 4232, [0:7], "NONE","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","12 - Ignition 4","11 - Ignition 3","10 - Ignition 2","9 - Ignition 1","INVALID","13 - GP Out 6","14 - GP Out 5","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","35 - GP Out 1","7 - Lowside 1","3 - Lowside 2","42 - Injector 4","41 - Injector 3","38 - Injector 2","37 - Injector 1","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","34 - GP Out 2","33 - GP Out 3","43 - GP Out 4","INVALID","INVALID","INVALID" + gppwm2_dutyIfError = scalar, U08, 4233, "%", 1, 0, 0, 100, 0 + gppwm2_pwmFrequency = scalar, U16, 4234, "hz", 1, 0, 0, 500, 0 + gppwm2_onAboveDuty = scalar, U08, 4236, "%", 1, 0, 0, 100, 0 + gppwm2_offBelowDuty = scalar, U08, 4237, "%", 1, 0, 0, 100, 0 + gppwm2_loadAxis = bits, U08, 4238, [0:1], "TPS", "MAP", "CLT", "IAT" +;no TS info - skipping gppwm2_pad offset 4239 + gppwm2_loadBins = array, U08, 4240, [8], "load", 1, 0, 0.0, 250, 0 + gppwm2_rpmBins = array, U08, 4248, [8], "RPM", 50, 0, 0.0, 12000.0, 0 + gppwm2_table = array, U08, 4256, [8x8], "duty", 1, 0, 0, 100, 0 + gppwm3_pin = bits, U08, 4320, [0:7], "NONE","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","12 - Ignition 4","11 - Ignition 3","10 - Ignition 2","9 - Ignition 1","INVALID","13 - GP Out 6","14 - GP Out 5","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","35 - GP Out 1","7 - Lowside 1","3 - Lowside 2","42 - Injector 4","41 - Injector 3","38 - Injector 2","37 - Injector 1","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","34 - GP Out 2","33 - GP Out 3","43 - GP Out 4","INVALID","INVALID","INVALID" + gppwm3_dutyIfError = scalar, U08, 4321, "%", 1, 0, 0, 100, 0 + gppwm3_pwmFrequency = scalar, U16, 4322, "hz", 1, 0, 0, 500, 0 + gppwm3_onAboveDuty = scalar, U08, 4324, "%", 1, 0, 0, 100, 0 + gppwm3_offBelowDuty = scalar, U08, 4325, "%", 1, 0, 0, 100, 0 + gppwm3_loadAxis = bits, U08, 4326, [0:1], "TPS", "MAP", "CLT", "IAT" +;no TS info - skipping gppwm3_pad offset 4327 + gppwm3_loadBins = array, U08, 4328, [8], "load", 1, 0, 0.0, 250, 0 + gppwm3_rpmBins = array, U08, 4336, [8], "RPM", 50, 0, 0.0, 12000.0, 0 + gppwm3_table = array, U08, 4344, [8x8], "duty", 1, 0, 0, 100, 0 + gppwm4_pin = bits, U08, 4408, [0:7], "NONE","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","12 - Ignition 4","11 - Ignition 3","10 - Ignition 2","9 - Ignition 1","INVALID","13 - GP Out 6","14 - GP Out 5","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","35 - GP Out 1","7 - Lowside 1","3 - Lowside 2","42 - Injector 4","41 - Injector 3","38 - Injector 2","37 - Injector 1","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","34 - GP Out 2","33 - GP Out 3","43 - GP Out 4","INVALID","INVALID","INVALID" + gppwm4_dutyIfError = scalar, U08, 4409, "%", 1, 0, 0, 100, 0 + gppwm4_pwmFrequency = scalar, U16, 4410, "hz", 1, 0, 0, 500, 0 + gppwm4_onAboveDuty = scalar, U08, 4412, "%", 1, 0, 0, 100, 0 + gppwm4_offBelowDuty = scalar, U08, 4413, "%", 1, 0, 0, 100, 0 + gppwm4_loadAxis = bits, U08, 4414, [0:1], "TPS", "MAP", "CLT", "IAT" +;no TS info - skipping gppwm4_pad offset 4415 + gppwm4_loadBins = array, U08, 4416, [8], "load", 1, 0, 0.0, 250, 0 + gppwm4_rpmBins = array, U08, 4424, [8], "RPM", 50, 0, 0.0, 12000.0, 0 + gppwm4_table = array, U08, 4432, [8x8], "duty", 1, 0, 0, 100, 0 +;no TS info - skipping mainUnusedEnd offset 4496 + warning_message = string, ASCII, 6000, 120 + afterstartCoolantBins = array, F32, 6120, [8], "C", 1, 0, -100.0, 250.0, 0 + afterstartHoldTime = array, F32, 6152, [8], "Seconds", 1, 0, 0, 100, 1 + afterstartEnrich = array, F32, 6184, [8], "%", 1, 0, 0, 600, 1 + afterstartDecayTime = array, F32, 6216, [8], "Seconds", 1, 0, 0, 100, 1 boostTableOpenLoop = array, U08, 6248, [8x8],"", 2, 0 , 0, 3000, 0 boostMapBins = array, U08, 6312, [8], "", 2, 0, 0, 600.0, 1 boostRpmBins = array, U08, 6320, [8], "RPM", 50, 0, 0.0, 12000.0, 0 boostTableClosedLoop = array, U08, 6328, [8x8],"", 2, 0 , 0, 3000, 0 boostTpsBins = array, U08, 6392, [8], "%", 2, 0.0, 0, 100.0, 2 - pedalToTpsTable = array, U08, 6400, [8x8],"deg", 1, 0, -720, 720, 2 + pedalToTpsTable = array, U08, 6400, [8x8],"%", 1, 0, 0, 100, 0 pedalToTpsPedalBins = array, U08, 6464, [8], "%", 1, 0, 0.0, 120.0, 0 pedalToTpsRpmBins = array, U08, 6472, [8], "RPM", 50, 0, 0.0, 12000.0, 0 cltCrankingCorrBins = array, F32, 6480, [8], "C", 1, 0, -100.0, 250.0, 2 @@ -1091,8 +1164,8 @@ page = 1 ; total TS size = 20000 [SettingContextHelp] injector_flow = "This is your injector flow at the fuel pressure used in the vehicle. cc/min, cubic centimetre per minute\nBy the way, g/s = 0.125997881 * (lb/hr)\ng/s = 0.125997881 * (cc/min)/10.5\ng/s = 0.0119997981 * cc/min" - directSelfStimulation = "Should trigger emulator push data right into trigger handling logic, eliminating the need for physical jumper wires?\nSee also triggerSimulatorPins\nPS: Funny name, right? :)" cj125isUaDivided = "Is your UA CJ125 output wired to MCU via resistor divider?" + etb_use_two_wires = "TLE7209 uses two-wire mode. TLE9201 and VNH2SP30 do NOT use two wire mode." cj125isUrDivided = "Is your UR CJ125 output wired to MCU via resistor divider?\nLooks like 3v range should be enough, divider generally not needed." absoluteFuelPressure = "If your fuel regulator does not have vacuum line" tpsErrorDetectionTooLow = "TPS error detection, what TPS % value is unrealistically low" @@ -1150,6 +1223,14 @@ page = 1 launchFuelAdded = "Extra Fuel Added" launchBoostDuty = "Duty Cycle for the Boost Solenoid" hardCutRpmRange = "RPM Range for Hard Cut" + stft_maxIdleRegionRpm = "Below this RPM, the idle region is active" + stft_maxOverrunLoad = "Below this engine load, the overrun region is active" + stft_minPowerLoad = "Above this engine load, the power region is active" + stft_deadband = "When close to correct AFR, pause correction. This can improve stability by not changing the adjustment if the error is extremely small, but is not required." + stft_minClt = "Below this temperature, correction is disabled." + stft_minAfr = "Below this AFR, correction is paused" + stft_maxAfr = "Above this AFR, correction is paused" + stft_startupDelay = "Delay after starting the engine before beginning closed loop correction." fuelClosedLoopCorrectionEnabled = "Enables lambda sensor closed loop feedback for fuelling." isVerboseIAC = "Print details into rusEfi console" isVerboseETB = "Prints ETB details to rusEFI console" @@ -1218,6 +1299,30 @@ page = 1 triggerCompHystMin = "Trigger comparator hysteresis voltage (Min)" triggerCompHystMax = "Trigger comparator hysteresis voltage (Max)" triggerCompSensorSatRpm = "VR-sensor saturation RPM" + gppwm1_pin = "Select a pin to use for PWM or on-off output." + gppwm1_dutyIfError = "If an error (with a sensor, etc) is detected, this value is used instead of reading from the table.\nThis should be a safe value for whatever hardware is connected to prevent damage." + gppwm1_pwmFrequency = "Select a frequency to run PWM at.\nSet this to 0hz to enable on-off mode." + gppwm1_onAboveDuty = "In on-off mode, turn the output on when the table value is above this duty." + gppwm1_offBelowDuty = "In on-off mode, turn the output off when the table value is below this duty." + gppwm1_loadAxis = "Selects the load axis to use for the table." + gppwm2_pin = "Select a pin to use for PWM or on-off output." + gppwm2_dutyIfError = "If an error (with a sensor, etc) is detected, this value is used instead of reading from the table.\nThis should be a safe value for whatever hardware is connected to prevent damage." + gppwm2_pwmFrequency = "Select a frequency to run PWM at.\nSet this to 0hz to enable on-off mode." + gppwm2_onAboveDuty = "In on-off mode, turn the output on when the table value is above this duty." + gppwm2_offBelowDuty = "In on-off mode, turn the output off when the table value is below this duty." + gppwm2_loadAxis = "Selects the load axis to use for the table." + gppwm3_pin = "Select a pin to use for PWM or on-off output." + gppwm3_dutyIfError = "If an error (with a sensor, etc) is detected, this value is used instead of reading from the table.\nThis should be a safe value for whatever hardware is connected to prevent damage." + gppwm3_pwmFrequency = "Select a frequency to run PWM at.\nSet this to 0hz to enable on-off mode." + gppwm3_onAboveDuty = "In on-off mode, turn the output on when the table value is above this duty." + gppwm3_offBelowDuty = "In on-off mode, turn the output off when the table value is below this duty." + gppwm3_loadAxis = "Selects the load axis to use for the table." + gppwm4_pin = "Select a pin to use for PWM or on-off output." + gppwm4_dutyIfError = "If an error (with a sensor, etc) is detected, this value is used instead of reading from the table.\nThis should be a safe value for whatever hardware is connected to prevent damage." + gppwm4_pwmFrequency = "Select a frequency to run PWM at.\nSet this to 0hz to enable on-off mode." + gppwm4_onAboveDuty = "In on-off mode, turn the output on when the table value is above this duty." + gppwm4_offBelowDuty = "In on-off mode, turn the output off when the table value is below this duty." + gppwm4_loadAxis = "Selects the load axis to use for the table." ; CONFIG_DEFINITION_END @@ -1240,20 +1345,39 @@ page = 1 [LoggerDefinition] ; valid logger types: composite, tooth, trigger, csv - loggerDef = compositeLogger, "Primary Trigger Logger", tooth +; loggerDef = compositeLogger, "Primary Trigger Logger", tooth + loggerDef = compositeLogger, "Trigger Logger", composite startCommand = "l\x01" stopCommand = "l\x02" dataReadCommand = "L" dataReadTimeout = 10000 ; time in ms dataReadyCondition = { toothLogReady } + continuousRead = true + ; each packet is 5 and we have 500 of those + dataLength = 2500 +;tooth ; recordDef = headerLen, footerLen, recordLen - recordDef = 0, 0, 2; in bytes, the recordLen is for each record, currently limited to 4 bytes +; recordDef = 0, 0, 5 ; uint16 that stores 1/100 second - recordField = toothTime, "tooth", 0, 16, 0.01, "ms" +; recordField = toothTime, "tooth", 0, 16, 0.01, "ms" + + ; recordDef = headerLen, footerLen, recordLen + recordDef = 0, 0, 5 + + ; these names are hard-coded inside TS + recordField = priLevel, "PriLevel", 0, 1, 1.0, "Flag" + recordField = secLevel, "SecLevel", 1, 1, 1.0, "Flag" + recordField = trigger, "Trigger", 2, 1, 1.0, "Flag" + recordField = sync, "Sync", 3, 1, 1.0, "Flag" + recordField = time, "Time", 8, 32, 0.01, "ms" + + ; it seems that TS also needs to know the diff.size of a tooth + calcField = toothTime, "ToothTime", "ms", { time - pastValue(time, 1) } + [VeAnalyze] ; tableName, lambdaTargetTableName, lambdaChannel, egoCorrectionChannel, activeCondition @@ -1267,11 +1391,7 @@ page = 1 ; filter = Name, "DisplayName", outputChannel, operator, defaultVal, userAdjustable filter = minRPMFilter, "Minimum RPM", RPMValue, < , 500, , true -#if CELSIUS filter = minCltFilter, "Minimum CLT", coolant, < , 60, , true -#else - filter = minCltFilter, "Minimum CLT", coolant, < , 160, , true -#endif filter = deltaTps, "dTPS", deltaTps > , 50, , true @@ -1293,7 +1413,7 @@ fileVersion = { 20200310 } ochGetCommand = "O%2o%2c" ; see TS_OUTPUT_SIZE in console source code - ochBlockSize = 240 + ochBlockSize = 244 ; ; see TunerStudioOutputChannels struct @@ -1325,6 +1445,7 @@ fileVersion = { 20200310 } ind_isTriggerError = bits, U32, 0, [23:23], "true", "false"; ind_hasFatalError=bits, U32, 0, [24:24], "true", "false"; ind_isWarnNow =bits, U32, 0, [25:25], "true", "false"; + ind_pedal_error =bits, U32, 0, [26:26], "true", "false"; ; RPM, vss RPMValue = scalar, U16, 4, "RPM", 1, 0.00000 @@ -1334,16 +1455,8 @@ fileVersion = { 20200310 } ; temperatures internalMcuTemperature = scalar,S08, 11, "deg C", 1, 0 -#if CELSIUS coolant = scalar, S16, 12, "deg C",{1/100}, 0.0 -#else - coolant = scalar, S16, 12, "deg F",{9/(5 * 100)}, 17.77777 -#endif -#if CELSIUS intake = scalar, S16, 14, "deg C",{1/100}, 0.0 -#else - intake = scalar, S16, 14, "deg F",{9/(5 * 100)}, 17.77777 -#endif ; todo: aux1 ; todo: aux2 @@ -1418,55 +1531,66 @@ fileVersion = { 20200310 } knockLevel = scalar, F32, 108, "Volts", 1, 0 ; Mode, firmware, protocol, run time - timeSeconds = scalar, U32, 112, "sec", 1, 0.0 +; TS requires 'seconds' name since it has special internal meaning + seconds = scalar, U32, 112, "sec", 1, 0.0 engineMode = scalar, U32, 116, "em", 1, 0.0; firmwareVersion = scalar, U32, 120,"version_f", 1, 0 firmwareTsVersion=scalar, U32, 124,"version_p", 1, 0 +; calibation helpers + calibrationValue = scalar, F32, 128, "", 1, 0 + calibrationMode = scalar, U08, 132, "", 1, 0 + ; 3 bytes padding1 + ; Errors - totalTriggerErrorCounter=scalar,U32, 128,"counter", 1, 0 - ; orderingErrorCounter 132 - warningCounter = scalar, U16, 136, "count", 1, 0 - lastErrorCode = scalar, U16, 138, "error", 1, 0 - recentErrorCode0= scalar, U16, 140, "error", 1, 0 - recentErrorCode1= scalar, U16, 142, "error", 1, 0 - recentErrorCode2= scalar, U16, 144, "error", 1, 0 - recentErrorCode3= scalar, U16, 146, "error", 1, 0 - recentErrorCode4= scalar, U16, 148, "error", 1, 0 - recentErrorCode5= scalar, U16, 150, "error", 1, 0 - recentErrorCode6= scalar, U16, 152, "error", 1, 0 - recentErrorCode7= scalar, U16, 154, "error", 1, 0 + totalTriggerErrorCounter=scalar,U32, 136,"counter", 1, 0 + ; orderingErrorCounter 140 + warningCounter = scalar, U16, 144, "count", 1, 0 + lastErrorCode = scalar, U16, 146, "error", 1, 0 + recentErrorCode0= scalar, U16, 148, "error", 1, 0 + recentErrorCode1= scalar, U16, 150, "error", 1, 0 + recentErrorCode2= scalar, U16, 152, "error", 1, 0 + recentErrorCode3= scalar, U16, 154, "error", 1, 0 + recentErrorCode4= scalar, U16, 156, "error", 1, 0 + recentErrorCode5= scalar, U16, 158, "error", 1, 0 + recentErrorCode6= scalar, U16, 160, "error", 1, 0 + recentErrorCode7= scalar, U16, 162, "error", 1, 0 ; Debug - debugFloatField1= scalar, F32, 156, "val", 1, 0.0 - debugFloatField2= scalar, F32, 160, "val", 1, 0.0 - debugFloatField3= scalar, F32, 164, "val", 1, 0.0 - debugFloatField4= scalar, F32, 168, "val", 1, 0.0 - debugFloatField5= scalar, F32, 172, "val", 1, 0.0 - debugFloatField6= scalar, F32, 176, "val", 1, 0.0 - debugFloatField7= scalar, F32, 180, "val", 1, 0.0 - debugIntField1 = scalar, S32, 184, "val", 1, 0.0 - debugIntField2 = scalar, S32, 188, "val", 1, 0.0 - debugIntField3 = scalar, S32, 192, "val", 1, 0.0 - debugIntField4 = scalar, S16, 196, "val", 1, 0.0 - debugIntField5 = scalar, S16, 198, "val", 1, 0.0 + debugFloatField1= scalar, F32, 164, "val", 1, 0.0 + debugFloatField2= scalar, F32, 168, "val", 1, 0.0 + debugFloatField3= scalar, F32, 172, "val", 1, 0.0 + debugFloatField4= scalar, F32, 176, "val", 1, 0.0 + debugFloatField5= scalar, F32, 180, "val", 1, 0.0 + debugFloatField6= scalar, F32, 184, "val", 1, 0.0 + debugFloatField7= scalar, F32, 188, "val", 1, 0.0 + debugIntField1 = scalar, S32, 192, "val", 1, 0.0 + debugIntField2 = scalar, S32, 196, "val", 1, 0.0 + debugIntField3 = scalar, S32, 200, "val", 1, 0.0 + debugIntField4 = scalar, S16, 204, "val", 1, 0.0 + debugIntField5 = scalar, S16, 206, "val", 1, 0.0 ; Accel - accelerationX = scalar, S16, 200, "G", 0.01, 0 - accelerationY = scalar, S16, 202, "G", 0.01, 0 + accelerationX = scalar, S16, 208, "G", 0.01, 0 + accelerationY = scalar, S16, 210, "G", 0.01, 0 ; egt - egt1 = scalar, S16, 204, "deg C", 1, 0 - egt2 = scalar, S16, 206, "deg C", 1, 0 - egt3 = scalar, S16, 208, "deg C", 1, 0 - egt4 = scalar, S16, 210, "deg C", 1, 0 - egt5 = scalar, S16, 212, "deg C", 1, 0 - egt6 = scalar, S16, 214, "deg C", 1, 0 - egt7 = scalar, S16, 216, "deg C", 1, 0 - egt8 = scalar, S16, 218, "deg C", 1, 0 -; - TPS2Value = scalar, S16, 220, "%",{1/100}, 0 + egt1 = scalar, S16, 212, "deg C", 1, 0 + egt2 = scalar, S16, 214, "deg C", 1, 0 + egt3 = scalar, S16, 216, "deg C", 1, 0 + egt4 = scalar, S16, 218, "deg C", 1, 0 + egt5 = scalar, S16, 220, "deg C", 1, 0 + egt6 = scalar, S16, 222, "deg C", 1, 0 + egt7 = scalar, S16, 224, "deg C", 1, 0 + egt8 = scalar, S16, 226, "deg C", 1, 0 + TPS2Value = scalar, S16, 228, "%",{1/100}, 0 + + rawTps1Primary = scalar, U16, 230, "V",{1/1000}, 0.0 + rawPpsPrimary = scalar, U16, 232, "V",{1/1000}, 0.0 + rawClt = scalar, U16, 234, "V",{1/1000}, 0.0 + rawIat = scalar, U16, 236, "V",{1/1000}, 0.0 + rawOilPressure = scalar, U16, 238, "V",{1/1000}, 0.0 ; ; see TunerStudioOutputChannels struct @@ -1483,6 +1607,12 @@ fileVersion = { 20200310 } time = { timeNow } ; engineLoad = { fuleAlgorithm == 0 ? MAF : TPS } + ; These "synthetic" channels provide the Y-axis (load) value for gen purp PWM table's Y axes + gppwm1_load = {(gppwm1_loadAxis == 0) ? TPSValue : ((gppwm1_loadAxis == 1) ? MAPValue : ((gppwm1_loadAxis == 2) ? coolant : intake))} + gppwm2_load = {(gppwm2_loadAxis == 0) ? TPSValue : ((gppwm2_loadAxis == 1) ? MAPValue : ((gppwm2_loadAxis == 2) ? coolant : intake))} + gppwm3_load = {(gppwm3_loadAxis == 0) ? TPSValue : ((gppwm3_loadAxis == 1) ? MAPValue : ((gppwm3_loadAxis == 2) ? coolant : intake))} + gppwm4_load = {(gppwm4_loadAxis == 0) ? TPSValue : ((gppwm4_loadAxis == 1) ? MAPValue : ((gppwm4_loadAxis == 2) ? coolant : intake))} + [PcVariables] wueAfrTargetOffset = array, S16, [ 16], ":1", 0.1, 0.0, -3.0, 3.0, 1; wueAnalRecommend = array, U08, [ 16], "%", 1.00, 0.0, 100, 255.00, 0 @@ -1491,24 +1621,89 @@ fileVersion = { 20200310 } enableLogDebugChannels = bits, U08, [0:0], "Yes", "No" enableLogErrorList = bits, U08, [0:0], "Yes", "No" -; 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 -; Alternator TPS Acceleration Warmup-Pid Idle Engine Load Acc Trigger Counters ETB PID TLE8888 Boost - debugFieldF1List = bits, U08, [0:7], "Controller Output", "From TPS", "", "Controller Output", "", "Channel 1 Rise Counter", "", "", "", "", "", "", "", "", "", "", "", "ETB Controller Output", "", "", "df1", "df1", "22df1", "", "", "", "", "", "", "", "", "", "", "", "", "", "Open Loop Duty", "" - debugFieldF2List = bits, U08, [0:7], "I-Term", "To TPS", "", "I-Term", "", "Channel 2 Rise Counter", "", "", "", "", "", "", "", "", "", "", "", "ETB I-Term", "", "", "df2", "df2", "22df2", "", "", "", "", "", "", "", "", "", "", "", "", "", "Closed Loop Duty","" - debugFieldF3List = bits, U08, [0:7], "Previous Error", "Current TPS<>TPS", "", "", "", "Channel 3 Rise Counter", "", "", "", "", "", "", "", "", "", "", "", "ETB Previous Error", "", "", "df3", "df3", "22df3", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" - debugFieldF4List = bits, U08, [0:7], "I Gain", "Extra Fuel", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "ETB df4", "", "", "df4", "df4", "22df4", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" - debugFieldF5List = bits, U08, [0:7], "D Gain", "df5", "df5", "df5", "df5", "df5", "df5", "", "", "", "", "", "", "", "", "", "", "ETB df5", "df5", "df5", "df5", "df5", "22df5", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" - debugFieldF6List = bits, U08, [0:7], "D Term", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "ETB df6", "", "", "df6", "df6", "22df6", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" - debugFieldF7List = bits, U08, [0:7], "Max-Value", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "ETB df7", "", "", "df7", "df7", "22df7", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" - - debugFieldI1List = bits, U08, [0:7], "P-Gain", "", "", "", "", "Channel 2 Fall Counter", "", "", "", "", "", "", "", "", "", "", "", "ETB P-Gain", "", "", "di1", "di1", "22", "", "", "", "", "", "", "", "", "SPI Counter", "", "", "", "", "", "" - debugFieldI2List = bits, U08, [0:7], "Offset", "", "", "", "", "Channel 3 Fall Counter", "", "", "", "", "", "", "", "", "", "", "", "ETB di2", "", "", "di2", "di2", "22", "", "", "", "", "", "", "", "", "Latest Transmit","", "", "", "", "", "" - debugFieldI3List = bits, U08, [0:7], "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "ETB di3", "", "", "di3", "di3", "22", "", "", "", "", "", "", "", "", "Latest Received","", "", "", "", "", "" - debugFieldI4List = bits, U08, [0:7], "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "ETB di4", "", "", "di4", "di4", "22", "", "", "", "", "", "", "", "", "Init Count", "", "", "", "", "", "" - debugFieldI5List = bits, U08, [0:7], "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "di5", "di5", "ETB di5", "di5", "di5", "di5", "di5", "22di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5" +; wall of debug mode :) +; https://rusefi.com/wiki/index.php?title=Manual:Debug_fields +; 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 +; Alternator TPS Acceleration Warmup-Pid Idle Engine Load Acc Trigger Counters VVT Cranking Ignition Timing ETB PID CJ125 CAN TLE8888 Boost Start Launcher ETB Autotune + debugFieldF1List = bits, U08, [0:7], "Controller Output", "From TPS", "", "Controller Output", "Idle output", "Channel 1 Rise Counter", "", "", "", "", "Ign IAT Corr", "", "", "", "", "", "", "ETB Controller Output", "", "", "df1", "df1", "22df1", "", "23:df1", "CJ125: output", "", "", "", "", "", "", "", "", "", "", "Boost Open Loop Duty", "S unused" "", "Osc Amplitude" + debugFieldF2List = bits, U08, [0:7], "I-Term", "To TPS", "", "I-Term", "Idle df2", "Channel 2 Rise Counter", "", "", "", "", "Ign CLT Corr", "", "", "", "", "", "", "ETB I-Term", "", "", "df2", "df2", "22df2", "", "23:df2", "CJ125: i-term", "", "", "", "", "", "", "", "", "", "", "Boost Closed Loop Duty","S unused" "", "Duty Amplitude" + debugFieldF3List = bits, U08, [0:7], "Previous Error", "Current TPS<>TPS", "", "", "Idle df3", "ICU sum", "", "", "", "", "Ign FSIO Adj", "", "", "", "", "", "", "ETB err", "", "", "df3", "df3", "22df3", "", "23:df3", "CJ125: err", "", "", "", "", "", "", "", "", "", "", "", "S unused" "", "Tu" + debugFieldF4List = bits, U08, [0:7], "I Gain", "Extra Fuel", "", "", "Idle df4", "VVT rise", "", "", "", "", "Ign PID Adj", "", "", "", "", "", "", "ETB I setting", "", "", "df4", "df4", "22df4", "", "23:df4", "CJ125: UA", "", "", "", "", "", "", "", "", "", "", "", "S unused" "", "Ku" + debugFieldF5List = bits, U08, [0:7], "D Gain", "df5", "df5", "df5", "Idle df5", "VVT fall", "df5", "", "", "", "", "", "", "", "", "", "", "ETB D setting", "df5", "df5", "df5", "df5", "22df5", "", "23:df5", "CJ125: UR", "", "", "", "", "", "", "", "", "", "", "", "S unused" "", "Kp" + debugFieldF6List = bits, U08, [0:7], "D Term", "", "", "", "Idle df6", "Current Gap", "", "", "", "", "", "", "", "", "", "", "", "ETB df6", "", "", "df6", "df6", "22df6", "", "23:df6", "cj: f7", "", "", "", "", "", "", "", "", "", "", "", "S unused" "", "Ki" + debugFieldF7List = bits, U08, [0:7], "Max-Value", "", "", "", "Idle df7", "", "", "", "", "", "", "", "", "", "", "", "", "ETB df7", "", "", "df7", "df7", "22df7", "", "23:df7", "cj: f7", "", "", "", "", "", "", "", "", "", "", "", "S unused" "", "Kd" + debugFieldI1List = bits, U08, [0:7], "P-Gain", "", "", "", "Idle di1", "Channel 1 Fall Counter", "", "", "", "", "Multispark Count", "", "", "", "", "", "", "ETB P-Gain", "", "", "di1", "di1", "22di1", "", "23:di1", "CJ125: state", "read count","", "", "", "", "SPI Counter", "", "", "", "", "", "Start Count" "", "" + debugFieldI2List = bits, U08, [0:7], "Offset", "", "", "", "Idle di2", "Channel 2 Fall Counter", "", "", "", "", "", "", "", "", "", "", "", "ETB di2", "", "", "di2", "di2", "22di2", "", "23:di2", "", "", "", "", "", "", "Latest Transmit","", "", "", "", "", "S unused" "", "" + debugFieldI3List = bits, U08, [0:7], "", "", "", "", "Idle di3", "Cycle Index", "", "", "", "", "", "", "", "", "", "", "", "ETB di3", "", "", "di3", "di3", "22di3", "", "23:di3", "", "", "", "", "", "", "Latest Received","", "", "", "", "", "S unused" "", "" + debugFieldI4List = bits, U08, [0:7], "", "", "", "", "Idle di4", "Cycle Cnt 1", "", "", "", "", "", "", "", "", "", "", "", "ETB di4", "", "", "di4", "di4", "22di4", "", "23:di4", "", "", "", "", "", "", "Init Count", "", "", "", "", "", "S unused" "", "" + debugFieldI5List = bits, U08, [0:7], "", "", "", "", "Idle di5", "Cycle Cnt 2", "", "", "", "", "", "", "", "", "", "di5", "di5", "ETB di5", "di5", "di5", "di5", "di5", "22di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "S di5" "", "" + [ConstantsExtensions] + ; defaultValue is used to provide TunerStudio with a value to use in the case of + ; the constant not yet being initialized. This is primarily important if the + ; constant is used as a variable in the ini. + ; defaultValue = constantName, value; defaultValue = wueAfrTargetOffset, -1.5 -1.4 -1.15 -0.95 -0.775 -0.65 -0.5625 -0.5 -0.4375 -0.375 -0.3125 -0.25 -0.1875 -0.125 -0.0625 0 + + requiresPowerCycle = warningLedPin + requiresPowerCycle = runningLedPin + requiresPowerCycle = binarySerialTxPin + requiresPowerCycle = binarySerialRxPin + + requiresPowerCycle = etb_use_two_wires + requiresPowerCycle = etbFreq + + requiresPowerCycle = idle_solenoidFrequency + requiresPowerCycle = boostPwmFrequency + requiresPowerCycle = alternatorPwmFrequency + requiresPowerCycle = auxPidFrequency1 + requiresPowerCycle = auxPidFrequency2 + requiresPowerCycle = auxPidFrequency3 + requiresPowerCycle = auxPidFrequency4 + + requiresPowerCycle = fsioOutputPins1 + requiresPowerCycle = fsioOutputPins2 + requiresPowerCycle = fsioOutputPins3 + requiresPowerCycle = fsioOutputPins4 + requiresPowerCycle = fsioOutputPins5 + requiresPowerCycle = fsioOutputPins6 + requiresPowerCycle = fsioOutputPins7 + requiresPowerCycle = fsioOutputPins8 + requiresPowerCycle = fsioOutputPins9 + requiresPowerCycle = fsioOutputPins10 + requiresPowerCycle = fsioOutputPins11 + requiresPowerCycle = fsioOutputPins12 + requiresPowerCycle = fsioOutputPins13 + requiresPowerCycle = fsioOutputPins14 + requiresPowerCycle = fsioOutputPins15 + requiresPowerCycle = fsioOutputPins16 + + requiresPowerCycle = fsioFrequency1 + requiresPowerCycle = fsioFrequency2 + requiresPowerCycle = fsioFrequency3 + requiresPowerCycle = fsioFrequency4 + requiresPowerCycle = fsioFrequency5 + requiresPowerCycle = fsioFrequency6 + requiresPowerCycle = fsioFrequency7 + requiresPowerCycle = fsioFrequency8 + requiresPowerCycle = fsioFrequency9 + requiresPowerCycle = fsioFrequency10 + requiresPowerCycle = fsioFrequency11 + requiresPowerCycle = fsioFrequency12 + requiresPowerCycle = fsioFrequency13 + requiresPowerCycle = fsioFrequency14 + requiresPowerCycle = fsioFrequency15 + requiresPowerCycle = fsioFrequency16 + + requiresPowerCycle = fsioAdc1 + requiresPowerCycle = fsioAdc2 + requiresPowerCycle = fsioAdc3 + requiresPowerCycle = fsioAdc4 + + readOnly = warning_message + + [CurveEditor] ; xAxis = leftValue, rightValue, step ; yAxis = bottomValue, topValue, step @@ -1607,11 +1802,7 @@ fileVersion = { 20200310 } curve = iatFuelCorrCurve, "Intake air temperature fuel Multiplier" columnLabel = "Coolant", "Multiplier" -#if CELSIUS xAxis = -40, 120, 10 -#else - xAxis = -40, 250, 10 -#endif yAxis = 0, 2, 11 xBins = iatFuelCorrBins, intake yBins = iatFuelCorr @@ -1619,11 +1810,7 @@ fileVersion = { 20200310 } curve = cltTimingCorrCurve, "Warmup timing correction" columnLabel = "Coolant", "Extra" -#if CELSIUS xAxis = -40, 120, 10 -#else - xAxis = -40, 250, 10 -#endif yAxis = 0, 50, 10 xBins = cltTimingBins, coolant yBins = cltTimingExtra @@ -1631,11 +1818,7 @@ fileVersion = { 20200310 } curve = cltFuelCorrCurve, "Warmup fuel manual Multiplier" columnLabel = "Coolant", "Multiplier" -#if CELSIUS xAxis = -40, 100, 10 -#else - xAxis = -40, 210, 10 -#endif yAxis = 0, 3, 10 xBins = cltFuelCorrBins, coolant yBins = cltFuelCorr @@ -1643,11 +1826,7 @@ fileVersion = { 20200310 } curve = crankingCltCurve, "Cranking Coolant Temperature Multiplier" columnLabel = "Coolant", "Multiplier" -#if CELSIUS xAxis = -40, 100, 10 -#else - xAxis = -40, 210, 10 -#endif yAxis = 0, 3, 10 xBins = crankingFuelBins, coolant yBins = crankingFuelCoef @@ -1655,8 +1834,8 @@ fileVersion = { 20200310 } curve = etbTpsBiasCurve, "Electronic TB Bias Curve" columnLabel = "TPS", "duty bias" - xAxis = 0, 100, 10 - yAxis = 0, 100, 10 + xAxis = 0, 50, 11 + yAxis = -40, 40, 9 xBins = etbBiasBins, TPSValue yBins = etbBiasValues gauge = TPSGauge @@ -1679,11 +1858,7 @@ fileVersion = { 20200310 } curve = cltIdleCurve, "Warmup Idle multiplier" columnLabel = "Coolant", "Multiplier" -#if CELSIUS xAxis = -40, 120, 10 -#else - xAxis = -40, 250, 10 -#endif yAxis = 0, 3, 10 xBins = cltIdleCorrBins, coolant yBins = cltIdleCorr @@ -1691,11 +1866,7 @@ fileVersion = { 20200310 } curve = iacCoastingCurve, "Coasting IAC Position for Auto-Idle" columnLabel = "Coolant", "Multiplier" -#if CELSIUS xAxis = -40, 120, 10 -#else - xAxis = -40, 250, 10 -#endif yAxis = 0, 100, 10 xBins = iacCoastingBins, coolant yBins = iacCoasting @@ -1703,11 +1874,7 @@ fileVersion = { 20200310 } curve = cltCrankingCurve, "Cranking Idle Air multiplier" columnLabel = "Coolant", "Multiplier" -#if CELSIUS xAxis = -40, 120, 10 -#else - xAxis = -40, 250, 10 -#endif yAxis = 0, 3, 10 xBins = cltCrankingCorrBins, coolant yBins = cltCrankingCorr @@ -1715,11 +1882,7 @@ fileVersion = { 20200310 } curve = cltIdleRPMCurve, "Idle Target RPM" columnLabel = "Coolant", "RPM" -#if CELSIUS xAxis = -40, 120, 10 -#else - xAxis = -40, 250, 10 -#endif yAxis = 0, 8000, 10 xBins = cltIdleRpmBins, coolant yBins = cltIdleRpm, RPMValue @@ -1751,11 +1914,7 @@ fileVersion = { 20200310 } curve = wueAfrTargetOffsetCurve, "AFR Target Temperature Adjustment" columnLabel = "Coolant", "AFR Offset" -#if CELSIUS xAxis = -40, 200, 9 -#else - xAxis = -40, 400, 9 -#endif yAxis = -3, 1, 5 xBins = cltFuelCorrBins, coolant yBins = wueAfrTargetOffset @@ -1763,11 +1922,7 @@ fileVersion = { 20200310 } curve = wueAnalyzer_warmup_curve, "Warmup Enrichment" columnLabel = "Coolant", "Current WUE", "Coolant", "Corrected" -#if CELSIUS xAxis = -40, 200, 9 -#else - xAxis = -40, 400, 9 -#endif yAxis = 90, 500, 6 xBins = cltFuelCorrBins, coolant yBins = cltFuelCorr @@ -1945,6 +2100,30 @@ fileVersion = { 20200310 } gridOrient = 250, 0, 340 ; Space 123 rotation of grid in degrees. upDownLabel = "(Later)", "(Sooner)" + table = gppwm1Tbl, gppwm1Map, "", 1 + xyLabels = "RPM", "" + xBins = gppwm1_rpmBins, RPMValue + yBins = gppwm1_loadBins, gppwm1_load + zBins = gppwm1_table + + table = gppwm2Tbl, gppwm2Map, "", 1 + xyLabels = "RPM", "" + xBins = gppwm2_rpmBins, RPMValue + yBins = gppwm2_loadBins, gppwm2_load + zBins = gppwm2_table + + table = gppwm3Tbl, gppwm3Map, "", 1 + xyLabels = "RPM", "" + xBins = gppwm3_rpmBins, RPMValue + yBins = gppwm3_loadBins, gppwm3_load + zBins = gppwm3_table + + table = gppwm4Tbl, gppwm4Map, "", 1 + xyLabels = "RPM", "" + xBins = gppwm4_rpmBins, RPMValue + yBins = gppwm4_loadBins, gppwm4_load + zBins = gppwm4_table + [GaugeConfigurations] gaugeCategory = Sensors - Extra 2 @@ -1975,7 +2154,7 @@ gaugeCategory = ECU Status recentErrorCode6Gauge = recentErrorCode6, "Error#7", "", 0, 18000, 0, 0, 18000, 18000, 0, 0 recentErrorCode7Gauge = recentErrorCode7, "Error#8", "", 0, 18000, 0, 0, 18000, 18000, 0, 0 firmwareVersionGauge = firmwareVersion , "ECU Software Version", "%", 0, 100, 0, 0, 100, 100, 0, 0 - timeSecondsGauge = timeSeconds, "Uptime", "sec", 0, 100, 0, 0, 100, 100, 0, 0 + timeSecondsGauge = seconds, "Uptime", "sec", 0, 100, 0, 0, 100, 100, 0, 0 gaugeCategory = Debug @@ -1995,16 +2174,8 @@ gaugeCategory = Debug gaugeCategory = Sensors - Basic RPMGauge = RPMValue, "RPM - engine speed", "RPM", 0, 15000, 200, 500, 6000, 6000, 0, 0 -#if CELSIUS CLTGauge = coolant, "Coolant temp", "deg C", -40, 140, -15, 1, 95, 110, 1, 1 -#else - CLTGauge = coolant, "Coolant temp", "deg F", -40, 285, 5, 35, 205, 230, 1, 1 -#endif -#if CELSIUS IATGauge = intake, "Intake air temp", "deg C", -40, 140, -15, 1, 95, 110, 1, 1 -#else - IATGauge = intake, "Intake air temp", "deg F", -40, 285, 5, 35, 205, 230, 1, 1 -#endif afr1Gauge = AFRValue, "Air fuel ratio", "", 10, 19.4, 12, 13, 15, 16, 2, 2 MAFGauge = MAFValue, "Mass air flow", "v", 0, 5, 0, 1, 3, 4, 1, 1 VBattGauge = VBatt, "Battery voltage", "V", 8, 21, 9, 10, 17, 19, 1, 1 @@ -2037,11 +2208,7 @@ gaugeCategory = Acceleration Enrichment gaugeCategory = Fueling ;Name Var Title Units Lo Hi LoD LoW HiW HiD vd ld -#if CELSIUS tChargeGauge = tCharge, "fuel: Estimated charge temperature", "deg C", -40, 140, -15, 1, 95, 110, 1, 1 -#else - tChargeGauge = tCharge, "fuel: Estimated charge temperature", "deg F", -40, 285, 5, 35, 205, 230, 1, 1 -#endif baroCorrectionGauge = baroCorrection,"fuel: Barometric pressure correction", "ratio", 0.5, 1.5, 0.6, 0.7, 1.3, 1.4, 1, 1 crankingFuelGauge = crankingFuelMs, "fuel: cranking", "mSec", 0, 25.5, 1.0, 1.2, 20, 25, 3, 1 iatCorrectionGauge = iatCorrection, "fuel: IAT correction", "mult", 0, 3, 0, 0, 3, 3, 2, 2 @@ -2065,6 +2232,12 @@ gaugeCategory = Throttle Body (incl. ETB) etbErrorGauge = etb1Error, "ETB position error", "%", -20, 20, -10, -5, 5, 10, 2, 0 etbDutyCycleGauge = etb1DutyCycle, "ETB duty cycle", "%", -100, 100, -75, -50, 50, 75, 0, 0 +gaugeCategory = Sensors - Raw + rawTps1PrimaryGauge = rawTps1Primary, "Raw TPS 1 Primary", "volts", 0, 5, 0, 0, 5, 5, 3, 0 + rawPpsPrimaryGauge = rawPpsPrimary , "Raw Pedal Primary", "volts", 0, 5, 0, 0, 5, 5, 3, 0 + rawCltGauge = rawClt , "Raw CLT", "volts", 0, 5, 0, 0, 5, 5, 3, 0 + rawIatGauge = rawIat , "Raw IAT", "volts", 0, 5, 0, 0, 5, 5, 3, 0 + rawOilPressureGauge = rawOilPressure, "Raw Oil Pressure", "volts", 0, 5, 0, 0, 5, 5, 3, 0 [WueAnalyze] @@ -2098,11 +2271,10 @@ gaugeCategory = Throttle Body (incl. ETB) ; 1 2 3 4 ; 5 6 7 8 - ; currently a minimum of 6 gauges must be on the dash, this appears to be an old not needed limitation. next release 1 will work. gauge1 = RPMGauge gauge2 = CLTGauge gauge3 = TPSGauge - gauge4 = MAFGauge + gauge4 = MAPGauge gauge5 = afr1Gauge gauge6 = VBattGauge gauge7 = dwellGauge @@ -2112,36 +2284,45 @@ gaugeCategory = Throttle Body (incl. ETB) ; = expression, off-label, on-label, off-bg, off-fg, on-bg, on-fg ; important status - indicator = { ind_hasFatalError }, "", "FATAL ERROR", green, black, red, black - indicator = { firmwareTsVersion == fileVersion }, "WRONG VERSION", "version", red, black, green, black - indicator = { ind_isWarnNow }, "", "warn", green, black, red, black - indicator = { ind_check_engine }, "ok", "Check engine", green, black, red, black - indicator = { isIgnitionEnabledIndicator}, "no ignition", "ignition", red, black, green, black - indicator = { ind_injection_enabled}, "no injection", "injection", red, black, green, black - indicator = { ind_isTriggerError}, "ok", "trg err", green, black, red, black + indicator = { ind_hasFatalError }, "", "CRITICAL ERROR", white, black, red, black + indicator = { firmwareTsVersion == fileVersion }, "WRONG VERSION", "version ok", red, black, white, black + indicator = { ind_isWarnNow }, "", "WARNING", white, black, yellow, black + indicator = { ind_check_engine }, "", "Check Engine", white, black, red, black + indicator = { isIgnitionEnabledIndicator}, "no ignition", "ignition", yellow, black, white, black + indicator = { ind_injection_enabled}, "no injection", "injection", yellow, black, white, black + indicator = { ind_isTriggerError}, "trigger ok", "trigger err", white, black, red, black + ; this is required so that the "config error" feature works in TS + ; don't change this line - TS is looking for an indicator with particular text/styling + ; you don't even have to show it by default + indicator = { ind_hasFatalError }, "Config Error", "Config Error", white, black, red, black ; minor info - indicator = { ind_fan}, "no fan", "fan", white, black, green, black - indicator = { isCylinderCleanupActivated}, "no cyl cleanup", "cyl cleanup", white, black, green, black + indicator = { ind_fan}, "fan off", "fan on", white, black, green, black + indicator = { isCylinderCleanupActivated}, "no cyl cleanup", "cyl cleanup", white, black, yellow, black indicator = { needBurn }, "config ok", "unsaved changes", white, black, yellow, black indicator = { hasSdCard}, "no SD", "with SD", white, black, green, black - indicator = { ind_fuel_pump}, "no pump", "pump", white, black, green, black + indicator = { ind_fuel_pump}, "pump off", "pump on", white, black, green, black indicator = { clutchUpState }, "clutch", "cltch Up", white, black, red, black indicator = { clutchDownState }, "clutch", "cltch Down", white, black, yellow, black indicator = { brakePedalIndicator }, "brake", "brake down", white, black, red, black - indicator = { acSwitchIndicator }, "AC on", "AC off", yellow, black, white, black + indicator = { acSwitchIndicator }, "AC off", "AC on", white, black, blue, white ; error codes indicator = { ind_tps_error}, "tps", "tps error", white, black, red, black indicator = { ind_clt_error}, "clt", "clt error", white, black, red, black indicator = { ind_iat_error}, "iat", "iat error", white, black, red, black indicator = { ind_map_error}, "map", "map error", white, black, red, black + indicator = { ind_pedal_error}, "pedal", "pedal error", white, black, red, black indicator = { knockEverIndicator }, "", "Knock recently", white, black, red, black indicator = { knockNowIndicator }, "no knock", "Knock NOW", white, black, red, black +[KeyActions] + showPanel = spi, spiFunction + showPanel = con, connection + [Datalog] ; Channel Label Type Format entry = time, "Time", float, "%.3f" @@ -2295,7 +2476,7 @@ menuDialog = main # Digital outputs subMenu = mainRelay, "Main relay" subMenu = starterRelay, "Starter Disable relay" - subMenu = fuelPump, "Fuel rail" + subMenu = fuelPump, "Fuel pump & rail" subMenu = fanSetting, "Fan" subMenu = tachSettings, "Tachometer" subMenu = malfunction, "Check engine light" @@ -2308,14 +2489,14 @@ menuDialog = main subMenu = std_separator # Targets & closed loop - subMenu = afrTableTbl, "Target AFR", 0, {isInjectionEnabled == 1 && fuelAlgorithm == LM_SPEED_DENSITY} + subMenu = afrTableTbl, "Target AFR", 0, {isInjectionEnabled == 1 && (fuelAlgorithm == LM_SPEED_DENSITY || fuelAlgorithm == LM_REAL_MAF)} subMenu = fuelClosedLoopDialog, "Closed loop correction", 0, {isInjectionEnabled == 1} subMenu = coastingFuelCutControl, "Deceleration fuel cutoff (DFCO)", 0, {isInjectionEnabled == 1} subMenu = std_separator # Fuel table/VE - subMenu = fuelTableDialog, "Fuel table", 0, {isInjectionEnabled == 1 && fuelAlgorithm != LM_SPEED_DENSITY} - subMenu = veTableDialog, "VE", 0, {isInjectionEnabled == 1 && fuelAlgorithm == LM_SPEED_DENSITY} + subMenu = fuelTableDialog, "Fuel table", 0, {isInjectionEnabled == 1 && fuelAlgorithm != LM_SPEED_DENSITY && fuelAlgorithm != LM_REAL_MAF} + subMenu = veTableDialog, "VE", 0, {isInjectionEnabled == 1 && (fuelAlgorithm == LM_SPEED_DENSITY || fuelAlgorithm == LM_REAL_MAF)} subMenu = injPhaseTableTbl, "Injection phase", 0, {isInjectionEnabled == 1} subMenu = std_separator @@ -2381,7 +2562,14 @@ menuDialog = main menu = "&Advanced" subMenu = boostDialog, "Boost Control" subMenu = boostPidDialog, "Closed Loop Boost", { boostType == 1 } - subMenu = std_separator + + subMenu = std_separator + subMenu = gppwm1, "General Purpose PWM 1" + subMenu = gppwm2, "General Purpose PWM 2" + subMenu = gppwm3, "General Purpose PWM 3" + subMenu = gppwm4, "General Purpose PWM 4" + + subMenu = std_separator subMenu = fsioInputsDialog, "FSIO inputs" subMenu = auxPidDialog, "Aux PID" subMenu = fsioOutputsDialog, "FSIO outputs" @@ -2445,12 +2633,15 @@ menuDialog = main subMenu = std_separator subMenu = connection, "Connection" + subMenu = tle8888, "TLE8888" + subMenu = std_separator # EXPERIMENTAL FEATURES subMenu = parkingLot, "Experimental/Broken" subMenu = multisparkSettings, "Multispark", 0, {isIgnitionEnabled == 1} + subMenu = mc33Dialog, "GDI Dreams" subMenu = std_separator subMenu = std_separator @@ -2467,6 +2658,10 @@ menuDialog = main subMenu = std_separator + menu = "Help" + subMenu = helpGeneral, "rusEfi Info" + + [ControllerCommands] ; commandName = command1, command2, commandn... ; command in standard ini format, a command name can be assigned to 1 to n commands that will be executed in order. @@ -2527,6 +2722,9 @@ cmd_calibrate_pedal_down = "w\x00\x14\x00\x07" cmd_tle8888_init = "w\x00\x14\x00\x08" cmd_test_ac_relay = "w\x00\x14\x00\x09" cmd_write_config = "w\x00\x14\x00\x0A" +cmd_test_starter_relay = "w\x00\x14\x00\x0B" +cmd_etb_autotune = "w\x00\x14\x00\x0C" +cmd_enable_self_stim = "w\x00\x14\x00\x0D" cmd_test_radiator_fan = "w\x00\x15\x00\x01" cmd_test_check_engine_light = "w\x00\x16\x00\x01" @@ -2664,6 +2862,7 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" field = "!Reminder that 4-stroke cycle is 720 degrees" field = "!For well-known trigger types use '0' trigger angle offset" field = "Trigger Angle Offset", globalTriggerAngleOffset + field = "Display only interesting", displayLogicLevelsInEngineSniffer field = "#Custom Trigger" field = "total Tooth Count", trigger_customTotalToothCount, {trigger_type == 0} field = "skipped Tooth Count", trigger_customSkippedToothCount, {trigger_type == 0} @@ -2674,7 +2873,6 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" field = "VVT use rise front", vvtCamSensorUseRise, {trigger_type != 80} field = "VVT position display offset", vvtOffset field = "VVT display inverted", vvtDisplayInverted - field = "nbVvtIndex", nbVvtIndex field = "print verbose sync details to console",verboseTriggerSynchDetails field = "Do not print messages in case of sync error", silentTriggerError field = "Enable noise filtering", useNoiselessTriggerDecoder, {trigger_type == 8 || trigger_type == 9} @@ -2794,11 +2992,27 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" field = "TPS low value detection threshold", tpsErrorDetectionTooLow, {tps1_1AdcChannel != 16} field = "TPS high value detection threshold", tpsErrorDetectionTooHigh, {tps1_1AdcChannel != 16} - dialog = pedalSensor, "Accelerator pedal" + dialog = pedalSensorLeft, "Accelerator pedal" field = "Accelerator position sensor", throttlePedalPositionAdcChannel + field = "Up voltage", throttlePedalUpVoltage + field = "Down (WOT) voltage", throttlePedalWOTVoltage field = "Accelerator position 2nd sensor", throttlePedalPositionSecondAdcChannel - field = "Up voltage", throttlePedalUpVoltage - field = "Down (WOT) voltage", throttlePedalWOTVoltage + + dialog = pedalGauges + gauge = pedalPositionGauge + gauge = rawPpsPrimaryGauge + + dialog = pedalSensor, "Accelerator pedal", border + panel = pedalSensorLeft, West + panel = pedalGauges, East + + dialog = mc33Dialog, "GDI Dreams" + field = mc33816_cs, mc33816_cs + field = mc33816_rstb, mc33816_rstb + field = mc33816_flag0, mc33816_flag0 + field = "mc33972 SPI", mc33972spiDevice + field = mc33_hvolt, mc33_hvolt + ; Sensor Inputs dialog = otherSensorInputs, "Other Sensor Inputs" @@ -2825,8 +3039,11 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" field = "Secondary channel", triggerInputPins2, { trigger_type != 0 && trigger_type != 8 && trigger_type != 9 && trigger_type != 18 && trigger_type != 20} field = "Invert Secondary", invertSecondaryTriggerSignal, { trigger_type != 0 && trigger_type != 8 && trigger_type != 9 && trigger_type != 18 && trigger_type != 20} field = "Cam Sync/VVT input", camInputs1 - panel = triggerInputComparator - + +; +; allXXX sections allows a quick overview of used I/O in order to address conflicts mostly, not really to +; configure the features. +; dialog = allPinsSensors, "Sensors" field = "Throttle pedal Position Channel", throttlePedalPositionAdcChannel field = "Primary input channel", triggerInputPins1 @@ -2854,16 +3071,18 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" dialog = allPins1_1 field = mc33816_cs, mc33816_cs field = mc33816_rstb, mc33816_rstb + field = mc33816_flag0, mc33816_flag0 + field = "trigger stimulator pin #1", triggerSimulatorPins1 + field = "trigger stimulator pin #2", triggerSimulatorPins2 + field = "trigger stimulator pin #2", triggerSimulatorPins3 field = high_fuel_pressure_sensor_1, high_fuel_pressure_sensor_1 field = high_fuel_pressure_sensor_2, high_fuel_pressure_sensor_2 field = mc33816_driven, mc33816_driven field = mc33816spiDevice, mc33816spiDevice field = "Warning Led", warningLedPin - ; field = "Fatal Error Led", fatalErrorPin field = "tle6240_cs", tle6240_cs field = "tle6240 SPI", tle6240spiDevice field = "mc33972_cs", mc33972_cs - field = "mc33972 SPI", mc33972spiDevice panel = allPinsSensors dialog = allPins1_2 @@ -2873,25 +3092,18 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" field = "Idle Solenoid Pin", idle_solenoidPin field = "Second Idle Solenoid Pin", secondSolenoidPin field = "Idle Stepper Dir", idle_stepperDirectionPin - field = "Idle Stepper Dir Mode", stepperDirectionPinMode field = "Idle Stepper Step", idle_stepperStepPin field = "Idle Stepper Enable", stepperEnablePin field = "Fuel Pump Pin", fuelPumpPin - field = "Fuel Pump Pin Mode", fuelPumpPinMode - field = "SD CS Pin", sdCardCsPin field = "MIL / Check Engine Pin", malfunctionIndicatorPin - field = "MIL / Check Engine Pin Mode", malfunctionIndicatorPinMode field = "Aux Pin #1", auxPidPins1 field = "Aux Pin #2", auxPidPins2 field = "Aux Pin #3", auxPidPins3 field = "Aux Pin #4", auxPidPins4 field = "test557pin", test557pin field = "Fan Pin", fanPin - field = "Fan Pin Mode", fanPinMode field = "Main Relay Pin", mainRelayPin - field = "Main Relay Mode", mainRelayPinMode - field = "Starter Relay Pin", starterRelayPin - field = "Starter Relay Mode", starterRelayPinMode + field = "Starter Relay Pin", starterRelayDisablePin field = "aux valve #1", auxValves1 field = "aux valve #2", auxValves2 @@ -2957,9 +3169,12 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" field = "output #16", fsioOutputPins16 dialog = allPins2_3 + field = "LCD E pin", HD44780_e + field = "LCD D4 pin", HD44780_db4 + field = "LCD D5 pin", HD44780_db5 + field = "LCD D6 pin", HD44780_db6 + field = "LCD D7 pin", HD44780_db7 field = "Debug Trigger Sync", debugTriggerSync - field = "Debug Timer Callback", debugTimerCallback - field = "Debug Set Timer", debugSetTimer field = "Aux Fast Analog", auxFastSensor1_adcChannel dialog = allPins1_3 @@ -2967,31 +3182,19 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" field = "FSIO ADC #2", fsioAdc2 field = "FSIO ADC #3", fsioAdc3 field = "FSIO ADC #4", fsioAdc4 - field = "CAN RX pin", canRxPin - field = "CAN TX pin", canTxPin - field = "SPI1 MOSI", spi1mosiPin, {is_enabled_spi_1 == 1} - field = "SPI1 MISO", spi1misoPin, {is_enabled_spi_1 == 1} - field = "SPI1 SCK", spi1sckPin, {is_enabled_spi_1 == 1} - field = "SPI2 MOSI", spi2mosiPin, {is_enabled_spi_2 == 1} - field = "SPI2 MISO", spi2misoPin, {is_enabled_spi_2 == 1} - field = "SPI2 SCK", spi2sckPin, {is_enabled_spi_2 == 1} - field = "SPI3 MOSI", spi3mosiPin, {is_enabled_spi_3 == 1} - field = "SPI3 MISO", spi3misoPin, {is_enabled_spi_3 == 1} - field = "SPI3 SCK", spi3sckPin, {is_enabled_spi_3 == 1} field = "hip9011CsPin", hip9011CsPin field = "LIS302DLCsPin", LIS302DLCsPin field = "MIL / Check Engine", malfunctionIndicatorPin field = "Saab CDM knock", cdmInputPin field = "comm status light", communicationLedPin field = "running status light", runningLedPin - field = "TLE8888 Chip Select", tle8888_cs - field = "TLE8888 CS Mode", tle8888_csPinMode - field = "TLE 8888 spi", tle8888spiDevice field = "servo#1", servoOutputPins1 field = "servo#2", servoOutputPins2 field = "servo#3", servoOutputPins3 field = "servo#4", servoOutputPins4 field = "servo#5", servoOutputPins5 + field = "AUX Serial TX", auxSerialTxPin + field = "AUX Serial RX", auxSerialRxPin dialog = allPins1_1_and_2, "", xAxis @@ -3125,9 +3328,10 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" field = "Heater pin", o2heaterPin dialog = egoSettings, "", yAxis - panel = egoSettings_IO, {enableAemXSeries == 0} - panel = egoSettings_sensor, {afr_hwChannel != 16 && enableAemXSeries == 0} + panel = egoSettings_IO + panel = egoSettings_sensor, {afr_hwChannel != 16 && enableAemXSeries == 0 && !auxSerialRxPin && !auxSerialTxPin} field = "Enable AEM X-Series CANbus", enableAemXSeries, { canReadEnabled } + field = "Enable Innovate LC-2 Serial", enableInnovateLC2, { auxSerialRxPin && auxSerialTxPin } ; Engine->EGT inputs dialog = egtInputs, "EGT inputs" @@ -3154,9 +3358,11 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" field = "No1 Direction #1", etbIo1_directionPin1 field = "No1 Direction #2", etbIo1_directionPin2 field = "No1 Control #1", etbIo1_controlPin1, { etb_use_two_wires == 0 } + field = "No1 Disable", etbIo1_disablePin field = "No2 Direction #1", etbIo2_directionPin1 field = "No2 Direction #2", etbIo2_directionPin2 field = "No2 Control #1", etbIo2_controlPin1, { etb_use_two_wires == 0} + field = "No2 Disable", etbIo2_disablePin dialog = idleStepperHw, "Stepper Hardware" field = "Idle Stepper Step Pin", idle_stepperStepPin @@ -3241,27 +3447,33 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" field = "On temperature", fanOnTemperature field = "Off temperature", fanOffTemperature - dialog = fuelPump, "Fuel Rail" + dialog = fuelPumpConfig, "Fuel Pump" field = "Pin", fuelPumpPin field = "Pin mode", fuelPumpPinMode field = "Prime duration", startUpFuelPumpDuration + + dialog = fuelRailConfig, "Fuel Rail" field = "Absolute Fuel Pressure", absoluteFuelPressure field = "Fuel Rail pressure", fuelRailPressure, {absoluteFuelPressure == 1} + dialog = fuelPump, "" + panel = fuelPumpConfig + panel = fuelRailConfig + + ; Controller->Actuator Outputs dialog = mainRelay, "Main relay output" field = "Pin", mainRelayPin field = "Pin mode", mainRelayPinMode dialog = starterRelay, "Starter relay output" - field = "Pin", starterRelayPin - field = "Pin mode", starterRelayPinMode + field = "Pin", starterRelayDisablePin + field = "Pin mode", starterRelayDisableMode dialog = statusLeds, "Status LEDs" field = "Running status LED", runningLedPin field = "TS communication status LED", communicationLedPin field = "Trigger error LED", triggerErrorPin - ; field = "Fatal Error Led", fatalErrorPin ; Engine->MIL Settings dialog = malfunction, "Check Engine Settings" @@ -3387,33 +3599,39 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" field = "Min", alternatorControl_minValue, {isAlternatorControlEnabled == 1 && onOffAlternatorLogic == 0} field = "Max", alternatorControl_maxValue, {isAlternatorControlEnabled == 1 && onOffAlternatorLogic == 0} field = "#% duty = Pterm + Iterm + Dterm + offset%" - field = "Start/Stop Button Pin", startStopButtonPin - field = "Start/Stop Button Mode", startStopButtonMode + dialog = startStopDialog, "Start/Stop Button" + field = "Start/Stop Button Pin", startStopButtonPin + field = "Start/Stop Button Mode", startStopButtonMode + field = "Starter Control", starterControlPin, {startStopButtonPin != 0} + field = "Start cranking maximum time", startCrankingDuration, {startStopButtonPin != 0} dialog = energySystems, "Battery and Alternator Settings", yAxis panel = batteryDialog panel = alternator - - dialog = speedSensorLeft + panel = startStopDialog + + dialog = speedSensorAnalog field = "Input pin", vehicleSpeedSensorInputPin field = "revolution to speed mult", vehicleSpeedCoef + dialog = speedSensorCan + field = "Vss Car Type", canVssNbcType, { enableCanVss } + + dialog = speedSensorLeft, "Speed sensor config", yAxis + panel = speedSensorCan, { enableCanVss } + panel = speedSensorAnalog, { enableCanVss == 0 } + field = "Enable CANbus VSS values", enableCanVss, { canReadEnabled } + dialog = speedSensor, "Speed sensor", xAxis panel = speedSensorLeft gauge = VSSGauge - + ; Engine->Other inputs dialog = analogInputSettings, "Analog Input Settings" field = "!ECU reboot needed to apply these settings" field = "Use fixed baro corr from MAP", useFixedBaroCorrFromMap - field = "Use BiQuad averaging", useBiQuadAnalogFiltering - field = "Smoothing factor", slowAdcAlpha, {useBiQuadAnalogFiltering == 0} - field = "Bi_Q a0", biQuad_a0, {useBiQuadAnalogFiltering == 1} - field = "Bi_Q a1", biQuad_a1, {useBiQuadAnalogFiltering == 1} - field = "Bi_Q a2", biQuad_a2, {useBiQuadAnalogFiltering == 1} - field = "Bi_Q b1", biQuad_b1, {useBiQuadAnalogFiltering == 1} - field = "Bi_Q b2", biQuad_b2, {useBiQuadAnalogFiltering == 1} + field = "Smoothing factor", slowAdcAlpha dialog = tachSettings, "Tachometer output" field = "!See also dizzySparkOutputPin" @@ -3441,8 +3659,11 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" field = "Enable rusEfi CAN data", enableVerboseCanTx field = "rusEfi CAN data base address", verboseCanBaseAddress field = "Can Sleep Period", canSleepPeriodMs - field = "RX pin", canRxPin - field = "TX pin", canTxPin + + dialog = auxSerial, "AUX Serial" + field = "RX pin", auxSerialRxPin + field = "TX pin", auxSerialTxPin + field = "Serial Baud Rate", auxSerialSpeed dialog = sdCard, "SD Card Logger" field = "SdCard", isSdCardEnabled @@ -3469,18 +3690,14 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" field = "D7 pin", HD44780_db7 dialog = tle8888, "TLE8888", yAxis - field = "TLE8888 Chip Select", tle8888_cs - field = "TLE8888 SPI", tle8888spiDevice - field = "useTLE8888_hall_mode", useTLE8888_hall_mode + field = "Mode", tle8888mode field = "useTLE8888 cranking reset hack", useTLE8888_cranking_hack commandButton = "Reinit", cmd_tle8888_init dialog = connection, "", yAxis field = "ADC vRef voltage", adcVcc - panel = tsPort panel = canBus - panel = sdCard - panel = tle8888 + panel = auxSerial dialog = joystickPanel, "Joystick" field = "joustick center button", joystickCenterPin @@ -3503,6 +3720,8 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" dialog = debugging, "Debug" field = "!https://rusefi.com/s/debugmode" field = "Debug mode", debugMode + field = "Warning Text", warning_message + field = "showHumanReadableWarning (affects Burn)", showHumanReadableWarning dialog = limits, "Limits" @@ -3608,7 +3827,7 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" field = "aux valve #1", auxValves1 field = "aux valve #2", auxValves2 field = "Start/Stop Button", startStopButtonPin - field = "" + field = "External Knock", externalKnockSenseAdc dialog = fsioFrequency, "Frequency" field = "freq #1", fsioFrequency1 @@ -3657,6 +3876,7 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" dialog = fsioFormulas, "FSIO Formulas" field = "!FSIO uses Reverse Polish Notation. Please read http://rusefi.com/s/fsio" + field = "#fsioinfo command in rusEfi console could be useful while troubleshooting those" field = "#1", fsioFormulas1 field = "#2", fsioFormulas2 field = "#3", fsioFormulas3 @@ -3753,43 +3973,37 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" field = "pFactor", etb_pFactor, {throttlePedalPositionAdcChannel != 16} field = "iFactor", etb_iFactor, {throttlePedalPositionAdcChannel != 16} field = "dFactor", etb_dFactor, {throttlePedalPositionAdcChannel != 16} - field = "offset", etb_offset, {throttlePedalPositionAdcChannel != 16} field = "control period", etb_periodMs, {throttlePedalPositionAdcChannel != 16} field = "pid min", etb_minValue, {throttlePedalPositionAdcChannel != 16} field = "pid max", etb_maxValue, {throttlePedalPositionAdcChannel != 16} field = "iTermMin", etb_iTermMin, {throttlePedalPositionAdcChannel != 16} field = "iTermMax", etb_iTermMax, {throttlePedalPositionAdcChannel != 16} + dialog = etbIdleDialog, "ETB Idle" + field = "use ETB for idle", useETBforIdleControl + field = "ETB idle maximum angle", etbIdleThrottleRange dialog = etbDialogLeft field = "https://rusefi.com/s/etb" field = "Detailed status in console", isVerboseETB field = "Pause ETB control", pauseEtbControl - field = "Throttle Pedal Up", throttlePedalUpVoltage - field = "Throttle Pedal Wide Open", throttlePedalWOTVoltage field = etbCalibrationOnStart, etbCalibrationOnStart - field = "TPS#2 min", tps2Min, { tps2_1AdcChannel != 16 } - field = "TPS#2 max", tps2Max, { tps2_1AdcChannel != 16 } ; we need the term about stepper idle in here, because there's a bug in TS that you can't have different visibility ; criteria for the same panel when used in multiple places panel = hbridgeHardware, { throttlePedalPositionAdcChannel != 16 || useStepperIdle && useHbridges } - panel = etbPidDialog + + dialog = etbAutotune, "PID Autotune" + field = "!Set debug mode below to 'ETB Autotune' to show results" + field = "Debug mode", debugMode + commandButton = "ETB PID Autotune", cmd_etb_autotune dialog = etbDialogRight - field = "!https://rusefi.com/s/debugmode" - field = "Neutral Position", etbNeutralPosition - field = "Debug mode", debugMode - field = "use ETB for idle", useETBforIdleControl - field = "ETB idle maximum angle", etbIdleThrottleRange - field = "Press buttons to calibrate sensors" - field = "You would have to remove air filter to move throttle manually" - commandButton = "TPS#1 closed position", cmd_calibrate_tps_1_closed - commandButton = "TPS#1 wide open position", cmd_calibrate_tps_1_wot - field = "Not many vehicles have two throttle bodies but some do" - commandButton = "TPS#2 closed position", cmd_calibrate_tps_2_closed - commandButton = "TPS#2 wide open position", cmd_calibrate_tps_2_wot - commandButton = "Pedal Up", cmd_calibrate_pedal_up - commandButton = "Pedal Down", cmd_calibrate_pedal_down + panel = etbIdleDialog + panel = etbPidDialog + panel = etbAutotune + + ; Neutral position handling not yet implemented! + ;field = "Neutral Position", etbNeutralPosition dialog = etbDialog, "Electronic Throttle Body (beta)", border topicHelp = "etbHelp" @@ -3818,12 +4032,13 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" commandButton = "Injector #8", cmd_test_inj8 dialog = testMisc, "Misc" - commandButton = "Come To Pit", cmd_call_from_pit +; commandButton = "Come To Pit", cmd_call_from_pit commandButton = "Fuel Pump", cmd_test_fuel_pump commandButton = "Radiator Fan", cmd_test_radiator_fan commandButton = "Check Engine", cmd_test_check_engine_light commandButton = "Idle Air Valve", cmd_test_idle_valve commandButton = "A/C Relay", cmd_test_ac_relay + commandButton = "Starter Relay", cmd_test_starter_relay commandButton = "Stop Engine", cmd_stop_engine commandButton = "Write Config", cmd_write_config commandButton = "Reset ECU", cmd_reset_controller @@ -3849,7 +4064,7 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" ; Board->ECU stimulator dialog = ecuStimulator, "ECU stimulator" field = "Trigger Simulator", triggerSimulatorFrequency - field = "self-stimulation", directSelfStimulation + commandButton = "Enable Internal Trigger Simulation", cmd_enable_self_stim field = "" field = "digipot spi", digitalPotentiometerSpiDevice field = "digipot CS #0", digitalPotentiometerChipSelect1 @@ -3926,7 +4141,94 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" field = "Ignition Math Logic @", ignMathCalculateAtIndex field = "MAP Averaging Logic @", mapAveragingSchedulingAtIndex - field = "Target temperature", postCrankingTargetClt + + help = helpGeneral, "rusEfi General Help" + webHelp = "http://www.rusefi.com/" + text = "" + + dialog = gppwm1left, "" + field = "Pin", gppwm1_pin + field = "" + field = "Set frequency to 0hz for on-off mode" + field = "Frequency", gppwm1_pwmFrequency, {gppwm1_pin != 0} + field = "" + field = "On above duty", gppwm1_onAboveDuty, {gppwm1_pin != 0 && gppwm1_pwmFrequency == 0} + field = "Off below duty", gppwm1_offBelowDuty, {gppwm1_pin != 0 && gppwm1_pwmFrequency == 0} + field = "Duty if error", gppwm1_dutyIfError, {gppwm1_pin != 0} + field = "" + field = "Load Axis", gppwm1_loadAxis, {gppwm1_pin != 0} + field = "" + field = "" + field = "" + field = "" + field = "" + + dialog = gppwm1, "General Purpose PWM 1", xAxis + panel = gppwm1left + panel = gppwm1Tbl, {gppwm1_pin != 0} + + dialog = gppwm2left, "" + field = "Pin", gppwm2_pin + field = "" + field = "Set frequency to 0hz for on-off mode" + field = "Frequency", gppwm2_pwmFrequency, {gppwm2_pin != 0} + field = "" + field = "On above duty", gppwm2_onAboveDuty, {gppwm2_pin != 0 && gppwm2_pwmFrequency == 0} + field = "Off below duty", gppwm2_offBelowDuty, {gppwm2_pin != 0 && gppwm2_pwmFrequency == 0} + field = "Duty if error", gppwm2_dutyIfError, {gppwm2_pin != 0} + field = "" + field = "Load Axis", gppwm2_loadAxis, {gppwm2_pin != 0} + field = "" + field = "" + field = "" + field = "" + field = "" + + dialog = gppwm2, "General Purpose PWM 2", xAxis + panel = gppwm2left + panel = gppwm2Tbl, {gppwm2_pin != 0} + + dialog = gppwm3left, "" + field = "Pin", gppwm3_pin + field = "" + field = "Set frequency to 0hz for on-off mode" + field = "Frequency", gppwm3_pwmFrequency, {gppwm3_pin != 0} + field = "" + field = "On above duty", gppwm3_onAboveDuty, {gppwm3_pin != 0 && gppwm3_pwmFrequency == 0} + field = "Off below duty", gppwm3_offBelowDuty, {gppwm3_pin != 0 && gppwm3_pwmFrequency == 0} + field = "Duty if error", gppwm3_dutyIfError, {gppwm3_pin != 0} + field = "" + field = "Load Axis", gppwm3_loadAxis, {gppwm3_pin != 0} + field = "" + field = "" + field = "" + field = "" + field = "" + + dialog = gppwm3, "General Purpose PWM 3", xAxis + panel = gppwm3left + panel = gppwm3Tbl, {gppwm3_pin != 0} + + dialog = gppwm4left, "" + field = "Pin", gppwm4_pin + field = "" + field = "Set frequency to 0hz for on-off mode" + field = "Frequency", gppwm4_pwmFrequency, {gppwm4_pin != 0} + field = "" + field = "On above duty", gppwm4_onAboveDuty, {gppwm4_pin != 0 && gppwm4_pwmFrequency == 0} + field = "Off below duty", gppwm4_offBelowDuty, {gppwm4_pin != 0 && gppwm4_pwmFrequency == 0} + field = "Duty if error", gppwm4_dutyIfError, {gppwm4_pin != 0} + field = "" + field = "Load Axis", gppwm4_loadAxis, {gppwm4_pin != 0} + field = "" + field = "" + field = "" + field = "" + field = "" + + dialog = gppwm4, "General Purpose PWM 4", xAxis + panel = gppwm4left + panel = gppwm4Tbl, {gppwm4_pin != 0} [Tools] ;addTool = toolName, PanelName diff --git a/firmware/tunerstudio/rusefi_prometheus.ini b/firmware/tunerstudio/rusefi_prometheus.ini index ebde5c8259..357b2aef50 100644 --- a/firmware/tunerstudio/rusefi_prometheus.ini +++ b/firmware/tunerstudio/rusefi_prometheus.ini @@ -40,11 +40,14 @@ enable2ndByteCanID = false ; settingOption = DEFAULT, "Speed Density" ; DEFAULT will be over looked and this will fall into the #else block of the statement. +[MegaTune] + ; https://rusefi.com/forum/viewtopic.php?p=36201#p36201 + signature = "rusEFI v1.2020.4" [TunerStudio] queryCommand = "S" versionInfo = "V" ; firmwave version for title bar. - signature = "rusEFI v1.2020.3" ; signature is expected to be 7 or more characters. + signature = "rusEFI v1.2020.4" ; signature is expected to be 7 or more characters. [Constants] ; new packet serial format with CRC @@ -66,6 +69,7 @@ enable2ndByteCanID = false ; we have current pageSize or (pageSize + 8) here? ; crc32CheckCommand = "k\x00\x00\x00\x00\x36\xB8" + retrieveConfigError = "e" ;communication settings pageActivationDelay = 500 ; Milliseconds delay after burn command. See https://sourceforge.net/p/rusefi/tickets/77/ @@ -85,7 +89,7 @@ enable2ndByteCanID = false ; see PAGE_0_SIZE in C source code ; CONFIG_DEFINITION_START -; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on integration\rusefi_config.txt Fri Mar 20 19:58:56 EDT 2020 +; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.bat integration\rusefi_config.txt Sun Apr 26 14:17:43 EDT 2020 pageSize = 20000 page = 1 @@ -94,7 +98,7 @@ page = 1 injector_flow = scalar, F32, 8, "cm3/min", 1, 0, 0, 99999, 2 injector_battLagCorrBins = array, F32, 12, [8], "volts", 1, 0, 0.0, 20.0, 2 injector_battLagCorr = array, F32, 44, [8], "ms", 1, 0, 0.0, 50.0, 2 - directSelfStimulation = bits, U32, 76, [0:0], "false", "true" + unused76b0 = bits, U32, 76, [0:0], "false", "true" activateAuxPid1 = bits, U32, 76, [1:1], "false", "true" isVerboseAuxPid1 = bits, U32, 76, [2:2], "false", "true" activateAuxPid2 = bits, U32, 76, [3:3], "false", "true" @@ -103,14 +107,14 @@ page = 1 isVerboseAuxPid3 = bits, U32, 76, [6:6], "false", "true" activateAuxPid4 = bits, U32, 76, [7:7], "false", "true" isVerboseAuxPid4 = bits, U32, 76, [8:8], "false", "true" - useBiQuadAnalogFiltering= bits, U32, 76, [9:9], "false", "true" + isCJ125Verbose = bits, U32, 76, [9:9], "false", "true" cj125isUaDivided = bits, U32, 76, [10:10], "false", "true" cj125isLsu49 = bits, U32, 76, [11:11], "false", "true" etb_use_two_wires = bits, U32, 76, [12:12], "false", "true" isDoubleSolenoidIdle = bits, U32, 76, [13:13], "false", "true" showSdCardWarning = bits, U32, 76, [14:14], "false", "true" cj125isUrDivided = bits, U32, 76, [15:15], "false", "true" - useTLE8888_hall_mode = bits, U32, 76, [16:16], "false", "true" + issue_294_unused = bits, U32, 76, [16:16], "false", "true" useTLE8888_cranking_hack= bits, U32, 76, [17:17], "false", "true" useInstantRpmForIdle = bits, U32, 76, [18:18], "false", "true" absoluteFuelPressure = bits, U32, 76, [19:19], "false", "true" @@ -118,7 +122,7 @@ page = 1 rollingLaunchEnabled = bits, U32, 76, [21:21], "false", "true" antiLagEnabled = bits, U32, 76, [22:22], "false", "true" useRunningMathForCranking= bits, U32, 76, [23:23], "Fixed", "Fuel Map" - issue_294_25 = bits, U32, 76, [24:24], "false", "true" + displayLogicLevelsInEngineSniffer= bits, U32, 76, [24:24], "false", "true" issue_294_26 = bits, U32, 76, [25:25], "false", "true" issue_294_27 = bits, U32, 76, [26:26], "false", "true" issue_294_28 = bits, U32, 76, [27:27], "false", "true" @@ -190,7 +194,7 @@ page = 1 fanOnTemperature = scalar, F32, 468, "*C", 1, 0, 0, 1000.0, 0 fanOffTemperature = scalar, F32, 472, "*C", 1, 0, 0, 1000.0, 0 vehicleSpeedCoef = scalar, F32, 476, "coef", 1, 0, 0.01, 2000.0, 2 - canNbcType = bits, U32, 480, [0:7], "BMW", "FIAT", "VAG" , "MAZDA RX8" + canNbcType = bits, U32, 480, [0:7], "None", "FIAT", "VAG" , "MAZDA RX8", "BMW", "W202" canSleepPeriodMs = scalar, S32, 484, "ms", 1, 0, 0, 1000.0, 2 ambiguousOperationMode = bits, U32, 488, [0:7], "INVALID", "4 stroke without cam sensor", "4 stroke with cam sensor", "2 stroke", "4 stroke with symmetrical crank (requires VVT input)", "INVALID", "INVALID", "INVALID" displayMode = bits, U32, 492, [0:7], "none", "hd44780", "hd44780 over pcf8574", "INVALID" @@ -204,9 +208,9 @@ page = 1 tps2_1AdcChannel = bits, U08, 515, [0:7] "Analog 3O","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","NONE","INVALID","INVALID","INVALID" ;no TS info - skipping overrideCrankingIgnition offset 516 sensorChartFrequency = scalar, S32, 520, "index", 1, 0, 0, 300, 0 ; size 4 - trigger_type = bits, U32, 524, [0:7], "custom toothed wheel", "Ford Aspire", "Dodge Neon 1995", "Miata NA", "Miata NB", "GM_7X", "Cooper R50", "Mazda SOHC 4", "60/2", "36/1", "Honda 4+24+1", "Mitsubishi", "Honda 4+24", "Honda 1+4+24", "Dodge Neon 2003", "Mazda DOHC 1+4", "1+1", "1+60/2", "Single Tooth", "Dodge Ram 1+16", "60/2 VW", "Honda 1+24", "Dodge Stratus", "36_2_2_2", "Nissan Primera", "2JZ", "Rover K", "GM LS 24", "Honda CBR 600", "2JZ_1_12", "Honda CBR 600 custom", "3/1 skipped" , "Dodge Neon 2003 crank", "Miata VVT", "trg34", "trg35", "Subaru 7+6", "Jeep 18-2-2-2", "WIP", "Dodge Neon 1995 crank only", "Jeep XJ 4 cyl", "FiatIAQ_P8", "Mazda Z5", "trg43", "trg44", "trg45", "INVALID" - trigger_unusedTriggerBit0= bits, U32, 528, [0:0], "false", "true" - trigger_unusedTriggerBit1= bits, U32, 528, [1:1], "false", "true" + trigger_type = bits, U32, 524, [0:7], "custom toothed wheel", "Ford Aspire", "Dodge Neon 1995", "Miata NA", "Miata NB", "GM_7X", "Cooper R50", "Mazda SOHC 4", "60/2", "36/1", "Honda 4+24+1", "Mitsubishi", "Honda 4+24", "Honda 1+4+24", "Dodge Neon 2003", "Mazda DOHC 1+4", "1+1", "1+60/2", "Single Tooth", "Dodge Ram 1+16", "60/2 VW", "Honda 1+24", "Dodge Stratus", "36_2_2_2", "Nissan Primera", "2JZ", "Rover K", "GM LS 24", "Honda CBR 600", "2JZ_1_12", "Honda CBR 600 custom", "3/1 skipped" , "Dodge Neon 2003 crank", "Miata VVT", "trg34", "trg35", "Subaru 7+6", "Jeep 18-2-2-2", "WIP", "Dodge Neon 1995 crank only", "Jeep XJ 4 cyl", "FiatIAQ_P8", "Mazda Z5", "trg43", "Renix 44-2-2", "Renix 66-2-2-2", "Honda K 12+1", "trg47", "trg48", "INVALID" + trigger_todoRemoveMeOneDay0= bits, U32, 528, [0:0], "false", "true" + trigger_todoRemoveMeOneDay1= bits, U32, 528, [1:1], "false", "true" trigger_useOnlyFirstChannel= bits, U32, 528, [2:2], "false", "true" trigger_unusedBit_4_3 = bits, U32, 528, [3:3], "false", "true" trigger_unusedBit_4_4 = bits, U32, 528, [4:4], "false", "true" @@ -245,7 +249,7 @@ page = 1 mafAdcChannel = bits, U08, 543, [0:7] "Analog 3O","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","NONE","INVALID","INVALID","INVALID" globalFuelCorrection = scalar, F32, 544, "coef", 1, 0.0, 0, 1000.0, 2 adcVcc = scalar, F32, 548, "volts", 1, 0.0, 0, 6.0, 3 -;no TS info - skipping maxKnockSubDeg offset 552 + maxKnockSubDeg = scalar, F32, 552, "Deg", 1, 0, 0, 100, 0 camInputs1 = bits, U08, 556, [0:7], "NONE", "INVALID", "INVALID", "PA1", "PA2", "PA3", "INVALID", "PA5", "PA6", "PA7", "PA8", "PA9", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "PA15", "INVALID", "INVALID", "INVALID", "PB3", "PB4", "PB5", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "PC6", "PC7", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "PE5", "PE6", "INVALID", "INVALID", "PE9", "INVALID", "PE11", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" camInputs2 = bits, U08, 557, [0:7], "NONE", "INVALID", "INVALID", "PA1", "PA2", "PA3", "INVALID", "PA5", "PA6", "PA7", "PA8", "PA9", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "PA15", "INVALID", "INVALID", "INVALID", "PB3", "PB4", "PB5", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "PC6", "PC7", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "PE5", "PE6", "INVALID", "INVALID", "PE9", "INVALID", "PE11", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" camInputs3 = bits, U08, 558, [0:7], "NONE", "INVALID", "INVALID", "PA1", "PA2", "PA3", "INVALID", "PA5", "PA6", "PA7", "PA8", "PA9", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "PA15", "INVALID", "INVALID", "INVALID", "PB3", "PB4", "PB5", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "PC6", "PC7", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "PE5", "PE6", "INVALID", "INVALID", "PE9", "INVALID", "PE11", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" @@ -349,13 +353,13 @@ page = 1 canTxPin = bits, U08, 708, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" canRxPin = bits, U08, 709, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" throttlePedalUpPinMode = scalar, U08, 710, "todo", 1, 0, 0, 20, 1 - debugTimerCallback = bits, U08, 711, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" +;no TS info - skipping unused711 offset 711 ;no TS info - skipping idleThreadPeriodMs offset 712 ;no TS info - skipping consoleLoopPeriodMs offset 716 ;no TS info - skipping lcdThreadPeriodMs offset 720 ;no TS info - skipping generalPeriodicThreadPeriodMs offset 724 tunerStudioSerialSpeed = scalar, U32, 728, "BPs", 1, 0, 0,1000000, 0 - canDeviceMode = bits, U32, 732, [0:7], "v0", "v1" +;no TS info - skipping anUnused4Bytes offset 732 triggerSimulatorPins1 = bits, U08, 736, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" triggerSimulatorPins2 = bits, U08, 737, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" triggerSimulatorPins3 = bits, U08, 738, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" @@ -405,7 +409,8 @@ page = 1 hip9011IntHoldPin = bits, U08, 754, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" hip9011IntHoldPinMode = bits, U08, 755, [0:7], "default", "default inverted", "open collector", "open collector inverted" verboseCanBaseAddress = scalar, U32, 756, "", 1, 0, 0, 536870911, 0 -;no TS info - skipping unrealisticRpmThreashold offset 760 + mc33_hvolt = scalar, U08, 760, "v", 1, 0, 0, 100, 0 +;no TS info - skipping unusedHere offset 761 gpioPinModes1 = bits, U08, 764, [0:7], "default", "default inverted", "open collector", "open collector inverted" gpioPinModes2 = bits, U08, 765, [0:7], "default", "default inverted", "open collector", "open collector inverted" gpioPinModes3 = bits, U08, 766, [0:7], "default", "default inverted", "open collector", "open collector inverted" @@ -447,7 +452,7 @@ page = 1 max31855_cs7 = bits, U08, 802, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" max31855_cs8 = bits, U08, 803, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" sdCardPeriodMs = scalar, S16, 804, "ms", 1, 0, 0, 30000, 0 - debugSetTimer = bits, U08, 806, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" +;no TS info - skipping unused806 offset 806 debugMapAveraging = bits, U08, 807, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" starterRelayDisablePin = bits, U08, 808, [0:7], "NONE","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","Injector 3Z","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID" starterRelayDisableMode = bits, U08, 809, [0:7], "default", "default inverted", "open collector", "open collector inverted" @@ -456,8 +461,9 @@ page = 1 mapMinBufferLength = scalar, S32, 812, "count", 1, 0, 0, 24, 0 idlePidDeactivationTpsThreshold = scalar, S16, 816, "%", 1, 0, 0, 100.0, 0 stepperParkingExtraSteps = scalar, S16, 818, "%", 1, 0, 0, 3000.0, 0 - unusedmiataNb2VVTRatioFrom = scalar, F32, 820, "value", 1, 0, 0, 1000, 5 - unusedmiataNb2VVTRatioTo = scalar, F32, 824, "value", 1, 0, 0, 1000, 5 +;no TS info - skipping unusedAntilagTimeout offset 820 +;no TS info - skipping antiLagRpmTreshold offset 824 + startCrankingDuration = scalar, S16, 826, "Seconds", 1, 0, 0, 30, 0 triggerErrorPin = bits, U08, 828, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" triggerErrorPinMode = bits, U08, 829, [0:7], "default", "default inverted", "open collector", "open collector inverted" acRelayPin = bits, U08, 830, [0:7], "NONE","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","Injector 3Z","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID" @@ -539,12 +545,12 @@ page = 1 todoClutchDownPinInverted= bits, U32, 976, [1:1], "false", "true" useHbridges = bits, U32, 976, [2:2], "false", "true" multisparkEnable = bits, U32, 976, [3:3], "false", "true" - unusedBit_251_4 = bits, U32, 976, [4:4], "false", "true" - unusedBit_251_5 = bits, U32, 976, [5:5], "false", "true" - unusedBit_251_6 = bits, U32, 976, [6:6], "false", "true" - unusedBit_251_7 = bits, U32, 976, [7:7], "false", "true" - unusedBit_251_8 = bits, U32, 976, [8:8], "false", "true" - unusedBit_251_9 = bits, U32, 976, [9:9], "false", "true" + enableLaunchRetard = bits, U32, 976, [4:4], "false", "true" + enableLaunchBoost = bits, U32, 976, [5:5], "false", "true" + launchDisableBySpeed = bits, U32, 976, [6:6], "false", "true" + enableCanVss = bits, U32, 976, [7:7], "false", "true" + enableInnovateLC2 = bits, U32, 976, [8:8], "false", "true" + showHumanReadableWarning= bits, U32, 976, [9:9], "false", "true" unusedBit_251_10 = bits, U32, 976, [10:10], "false", "true" unusedBit_251_11 = bits, U32, 976, [11:11], "false", "true" unusedBit_251_12 = bits, U32, 976, [12:12], "false", "true" @@ -565,16 +571,16 @@ page = 1 unusedBit_251_27 = bits, U32, 976, [27:27], "false", "true" unusedBit_251_28 = bits, U32, 976, [28:28], "false", "true" unusedBit_251_29 = bits, U32, 976, [29:29], "false", "true" - unusedBit_280_30 = bits, U32, 976, [30:30], "false", "true" - unusedBit_280_31 = bits, U32, 976, [31:31], "false", "true" + unusedBit_282_30 = bits, U32, 976, [30:30], "false", "true" + unusedBit_282_31 = bits, U32, 976, [31:31], "false", "true" etbIo1_directionPin1 = bits, U08, 980, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" etbIo1_directionPin2 = bits, U08, 981, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" etbIo1_controlPin1 = bits, U08, 982, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" - etbIo1_controlPinMode = bits, U08, 983, [0:7], "default", "default inverted", "open collector", "open collector inverted" + etbIo1_disablePin = bits, U08, 983, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" etbIo2_directionPin1 = bits, U08, 984, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" etbIo2_directionPin2 = bits, U08, 985, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" etbIo2_controlPin1 = bits, U08, 986, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" - etbIo2_controlPinMode = bits, U08, 987, [0:7], "default", "default inverted", "open collector", "open collector inverted" + etbIo2_disablePin = bits, U08, 987, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" boostControlPin = bits, U08, 988, [0:7], "NONE","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","Injector 3Z","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID" boostControlPinMode = bits, U08, 989, [0:7], "default", "default inverted", "open collector", "open collector inverted" antiLagActivatePin = bits, U08, 990, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" @@ -596,7 +602,30 @@ page = 1 launchFuelAdded = scalar, S32, 1040, "%", 1, 0, 0, 100.0, 0 launchBoostDuty = scalar, S32, 1044, "%", 1, 0, 0, 100.0, 0 hardCutRpmRange = scalar, S32, 1048, "rpm", 1, 0, 0, 3000.0, 2 -;no TS info - skipping unusedAtOldBoardConfigurationEnd offset 1052 +;no TS info - skipping launchAdvanceRpmRange offset 1052 +;no TS info - skipping launchTpsTreshold offset 1056 +;no TS info - skipping launchActivateDelay offset 1060 + stft_maxIdleRegionRpm = scalar, U08, 1064, "RPM", 50, 0, 0.0, 12000.0, 0 + stft_maxOverrunLoad = scalar, U08, 1065, "load", 1, 0, 0.0, 250, 0 + stft_minPowerLoad = scalar, U08, 1066, "load", 1, 0, 0.0, 250, 0 + stft_deadband = scalar, U08, 1067, "%", 0.1, 0, 0, 3, 1 + stft_minClt = scalar, S08, 1068, "C", 1, 0, -20, 100, 0 + stft_minAfr = scalar, U08, 1069, "afr", 0.1, 0, 10, 20, 1 + stft_maxAfr = scalar, U08, 1070, "afr", 0.1, 0, 10, 20, 1 + stft_startupDelay = scalar, U08, 1071, "seconds", 1, 0, 0, 250, 0 + stft_cellCfgs1_maxAdd = scalar, S08, 1072, "%", 1, 0, 0, 25, 0 + stft_cellCfgs1_maxRemove = scalar, S08, 1073, "%", 1, 0, -25, 0, 0 + stft_cellCfgs1_timeConstant = scalar, U16, 1074, "sec", 0.1, 0, 0.1, 100, 2 + stft_cellCfgs2_maxAdd = scalar, S08, 1076, "%", 1, 0, 0, 25, 0 + stft_cellCfgs2_maxRemove = scalar, S08, 1077, "%", 1, 0, -25, 0, 0 + stft_cellCfgs2_timeConstant = scalar, U16, 1078, "sec", 0.1, 0, 0.1, 100, 2 + stft_cellCfgs3_maxAdd = scalar, S08, 1080, "%", 1, 0, 0, 25, 0 + stft_cellCfgs3_maxRemove = scalar, S08, 1081, "%", 1, 0, -25, 0, 0 + stft_cellCfgs3_timeConstant = scalar, U16, 1082, "sec", 0.1, 0, 0.1, 100, 2 + stft_cellCfgs4_maxAdd = scalar, S08, 1084, "%", 1, 0, 0, 25, 0 + stft_cellCfgs4_maxRemove = scalar, S08, 1085, "%", 1, 0, -25, 0, 0 + stft_cellCfgs4_timeConstant = scalar, U16, 1086, "sec", 0.1, 0, 0.1, 100, 2 +;no TS info - skipping unusedAtOldBoardConfigurationEnd offset 1088 vvtDisplayInverted = bits, U32, 1464, [0:0], "false", "true" fuelClosedLoopCorrectionEnabled= bits, U32, 1464, [1:1], "false", "true" isVerboseIAC = bits, U32, 1464, [2:2], "false", "true" @@ -726,7 +755,7 @@ page = 1 tps2Max = scalar, S16, 1770, "ADC", 1, 0, 0, 1023, 0 starterControlPin = bits, U08, 1772, [0:7], "NONE","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","Injector 3Z","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID" startStopButtonMode = scalar, U08, 1773, "todo", 1, 0, 0, 20, 1 -;no TS info - skipping unusedFormerWarmupAfrPid offset 1774 + mc33816_flag0 = bits, U08, 1774, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" tachPulsePerRev = scalar, U08, 1775, "Pulse", 1, 0, 1.0, 255.0, 0 mapErrorDetectionTooLow = scalar, F32, 1776, "kPa", 1, 0, -100.0, 100.0, 2 mapErrorDetectionTooHigh = scalar, F32, 1780, "kPa", 1, 0, -100.0, 800.0, 2 @@ -761,9 +790,9 @@ page = 1 startOfCrankingPrimingPulse = scalar, F32, 2032, "ms", 1, 0, 0, 200, 1 afterCrankingIACtaperDuration = scalar, S16, 2036, "cycles", 1, 0, 0, 5000, 0 iacByTpsTaper = scalar, S16, 2038, "percent", 1, 0, 0, 500, 0 - unusedErrorPin = bits, U08, 2040, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" + auxSerialTxPin = bits, U08, 2040, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" warningLedPin = bits, U08, 2041, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" - unused1234234 = bits, U08, 2042, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" + auxSerialRxPin = bits, U08, 2042, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" LIS302DLCsPin = bits, U08, 2043, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" tpsAccelLength = scalar, S32, 2044, "cycles", 1, 0, 1, 200, 0 tpsAccelEnrichmentThreshold = scalar, F32, 2048, "roc", 1, 0, 0, 200, 3 @@ -777,8 +806,9 @@ page = 1 tpsDecelEnleanmentThreshold = scalar, F32, 2080, "roc", 1, 0, 0, 200, 3 tpsDecelEnleanmentMultiplier = scalar, F32, 2084, "coeff", 1, 0, 0, 200, 3 slowAdcAlpha = scalar, F32, 2088, "coeff", 1, 0, 0, 200, 3 - debugMode = bits, U32, 2092, [0:7], "Alternator PID", "TPS acceleration enrichment", "INVALID", "Idle Control", "Engine Load accl enrich", "Trigger Counters", "FSIO_ADC", "AUX_PID_1", "VVT input", "Cranking", "Timing", "Closed-loop fuel corr PID", "VSS", "SD card", "sr5", "Knock", "Trigger Sync", "Electronic Throttle", "Executor", "Bench Test / TS commands", "Aux Valves", "Analog inputs #1", "INSTANT_RPM", "FSIO_EXPRESSION", "Status", "CJ125", "CAN", "MAP", "Metrics", "ETB#2", "Ion Sense", "TLE8888", "Analog inputs #2", "Dwell Metric", "Aux Temperature", "ETB Logic", "Boost Control" -;no TS info - skipping unused_former_warmup_target_afr offset 2096 + debugMode = bits, U32, 2092, [0:7], "Alternator PID", "TPS acceleration enrichment", "INVALID", "Idle Control", "Engine Load accl enrich", "Trigger Counters", "FSIO_ADC", "AUX_PID_1", "VVT input", "Cranking", "Timing", "Closed-loop fuel corr PID", "VSS", "SD card", "sr5", "Knock", "mode16", "Electronic Throttle", "Executor", "Bench Test / TS commands", "Aux Valves", "Analog inputs #1", "INSTANT_RPM", "FSIO_EXPRESSION", "Status", "CJ125", "CAN", "MAP", "Metrics", "ETB#2", "Ion Sense", "TLE8888", "Analog inputs #2", "Dwell Metric", "INVALID", "ETB Logic", "Boost Control", "Start/Stop", "Launch", "ETB Autotune", "Mode40" + auxSerialSpeed = scalar, U32, 2096, "BPs", 1, 0, 0,1000000, 0 +;no TS info - skipping unused_former_warmup_target_afr offset 2100 boostCutPressure = scalar, F32, 2132, "kPa", 1, 0, 0, 500, 0 mapAccelTaperBins = array, F32, 2136, [8], "counter", 1, 0, 0.0, 300, 0 mapAccelTaperMult = array, F32, 2168, [8], "mult", 1, 0, 0.0, 300, 2 @@ -812,18 +842,15 @@ page = 1 narrowToWideOxygenBins = array, F32, 2264, [8], "V", 1, 0, -10.0, 10.0, 3 narrowToWideOxygen = array, F32, 2296, [8], "ratio", 1, 0, -40.0, 40.0, 2 vvtMode = bits, U32, 2328, [0:7], "First half", "Second half", "2GZ", "Miata NB2", "mode4", "mode5", "mode6", "mode7" - biQuad_a0 = scalar, F32, 2332, "v", 1, 0, -1000, 1000, 9 - biQuad_a1 = scalar, F32, 2336, "v", 1, 0, -1000, 1000, 9 - biQuad_a2 = scalar, F32, 2340, "v", 1, 0, -1000, 1000, 9 - biQuad_b1 = scalar, F32, 2344, "v", 1, 0, -1000, 1000, 9 - biQuad_b2 = scalar, F32, 2348, "v", 1, 0, -1000, 1000, 9 +;no TS info - skipping unusedOldBiquad offset 2332 cltTimingBins = array, F32, 2352, [8], "C", 1, 0, -100.0, 250.0, 1 cltTimingExtra = array, F32, 2384, [8], "degree", 1, 0, -400.0, 400.0, 0 - nbVvtIndex = scalar, S32, 2416, "index", 1, 0, 0, 4.0, 0 + tle8888mode = bits, U08, 2416, [0:7], "Auto", "SemiAuto", "Manual", "Hall" +;no TS info - skipping unusedSomethingWasHere offset 2417 ;no TS info - skipping autoTuneCltThreshold offset 2420 ;no TS info - skipping autoTuneTpsRocThreshold offset 2424 ;no TS info - skipping autoTuneTpsQuietPeriod offset 2428 - postCrankingTargetClt = scalar, F32, 2432, "C", 1, 0, 0, 100, 0 +;no TS info - skipping unused2432 offset 2432 postCrankingFactor = scalar, F32, 2436, "mult", 1, 0, 0, 100, 4 postCrankingDurationSec = scalar, F32, 2440, "seconds", 1, 0, 0, 100, 2 auxTempSensor1_tempC_1 = scalar, F32, 2444, "*C", 1, 0, -40, 200, 1 @@ -1010,13 +1037,59 @@ page = 1 iacPidMultTable = array, U08, 4060, [8x8],"%", 1, 0, 0, 999, 2 iacPidMultLoadBins = array, U08, 4124, [8], "Load", 1, 0.0, 0, 500.0, 2 iacPidMultRpmBins = array, U08, 4132, [8], "RPM", 50, 0, 0.0, 12000.0, 0 -;no TS info - skipping mainUnusedEnd offset 4140 + canVssNbcType = bits, U32, 4140, [0:7], "BMW_e46", "W202" + gppwm1_pin = bits, U08, 4144, [0:7], "NONE","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","Injector 3Z","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID" + gppwm1_dutyIfError = scalar, U08, 4145, "%", 1, 0, 0, 100, 0 + gppwm1_pwmFrequency = scalar, U16, 4146, "hz", 1, 0, 0, 500, 0 + gppwm1_onAboveDuty = scalar, U08, 4148, "%", 1, 0, 0, 100, 0 + gppwm1_offBelowDuty = scalar, U08, 4149, "%", 1, 0, 0, 100, 0 + gppwm1_loadAxis = bits, U08, 4150, [0:1], "TPS", "MAP", "CLT", "IAT" +;no TS info - skipping gppwm1_pad offset 4151 + gppwm1_loadBins = array, U08, 4152, [8], "load", 1, 0, 0.0, 250, 0 + gppwm1_rpmBins = array, U08, 4160, [8], "RPM", 50, 0, 0.0, 12000.0, 0 + gppwm1_table = array, U08, 4168, [8x8], "duty", 1, 0, 0, 100, 0 + gppwm2_pin = bits, U08, 4232, [0:7], "NONE","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","Injector 3Z","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID" + gppwm2_dutyIfError = scalar, U08, 4233, "%", 1, 0, 0, 100, 0 + gppwm2_pwmFrequency = scalar, U16, 4234, "hz", 1, 0, 0, 500, 0 + gppwm2_onAboveDuty = scalar, U08, 4236, "%", 1, 0, 0, 100, 0 + gppwm2_offBelowDuty = scalar, U08, 4237, "%", 1, 0, 0, 100, 0 + gppwm2_loadAxis = bits, U08, 4238, [0:1], "TPS", "MAP", "CLT", "IAT" +;no TS info - skipping gppwm2_pad offset 4239 + gppwm2_loadBins = array, U08, 4240, [8], "load", 1, 0, 0.0, 250, 0 + gppwm2_rpmBins = array, U08, 4248, [8], "RPM", 50, 0, 0.0, 12000.0, 0 + gppwm2_table = array, U08, 4256, [8x8], "duty", 1, 0, 0, 100, 0 + gppwm3_pin = bits, U08, 4320, [0:7], "NONE","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","Injector 3Z","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID" + gppwm3_dutyIfError = scalar, U08, 4321, "%", 1, 0, 0, 100, 0 + gppwm3_pwmFrequency = scalar, U16, 4322, "hz", 1, 0, 0, 500, 0 + gppwm3_onAboveDuty = scalar, U08, 4324, "%", 1, 0, 0, 100, 0 + gppwm3_offBelowDuty = scalar, U08, 4325, "%", 1, 0, 0, 100, 0 + gppwm3_loadAxis = bits, U08, 4326, [0:1], "TPS", "MAP", "CLT", "IAT" +;no TS info - skipping gppwm3_pad offset 4327 + gppwm3_loadBins = array, U08, 4328, [8], "load", 1, 0, 0.0, 250, 0 + gppwm3_rpmBins = array, U08, 4336, [8], "RPM", 50, 0, 0.0, 12000.0, 0 + gppwm3_table = array, U08, 4344, [8x8], "duty", 1, 0, 0, 100, 0 + gppwm4_pin = bits, U08, 4408, [0:7], "NONE","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","Injector 3Z","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID" + gppwm4_dutyIfError = scalar, U08, 4409, "%", 1, 0, 0, 100, 0 + gppwm4_pwmFrequency = scalar, U16, 4410, "hz", 1, 0, 0, 500, 0 + gppwm4_onAboveDuty = scalar, U08, 4412, "%", 1, 0, 0, 100, 0 + gppwm4_offBelowDuty = scalar, U08, 4413, "%", 1, 0, 0, 100, 0 + gppwm4_loadAxis = bits, U08, 4414, [0:1], "TPS", "MAP", "CLT", "IAT" +;no TS info - skipping gppwm4_pad offset 4415 + gppwm4_loadBins = array, U08, 4416, [8], "load", 1, 0, 0.0, 250, 0 + gppwm4_rpmBins = array, U08, 4424, [8], "RPM", 50, 0, 0.0, 12000.0, 0 + gppwm4_table = array, U08, 4432, [8x8], "duty", 1, 0, 0, 100, 0 +;no TS info - skipping mainUnusedEnd offset 4496 + warning_message = string, ASCII, 6000, 120 + afterstartCoolantBins = array, F32, 6120, [8], "C", 1, 0, -100.0, 250.0, 0 + afterstartHoldTime = array, F32, 6152, [8], "Seconds", 1, 0, 0, 100, 1 + afterstartEnrich = array, F32, 6184, [8], "%", 1, 0, 0, 600, 1 + afterstartDecayTime = array, F32, 6216, [8], "Seconds", 1, 0, 0, 100, 1 boostTableOpenLoop = array, U08, 6248, [8x8],"", 2, 0 , 0, 3000, 0 boostMapBins = array, U08, 6312, [8], "", 2, 0, 0, 600.0, 1 boostRpmBins = array, U08, 6320, [8], "RPM", 50, 0, 0.0, 12000.0, 0 boostTableClosedLoop = array, U08, 6328, [8x8],"", 2, 0 , 0, 3000, 0 boostTpsBins = array, U08, 6392, [8], "%", 2, 0.0, 0, 100.0, 2 - pedalToTpsTable = array, U08, 6400, [8x8],"deg", 1, 0, -720, 720, 2 + pedalToTpsTable = array, U08, 6400, [8x8],"%", 1, 0, 0, 100, 0 pedalToTpsPedalBins = array, U08, 6464, [8], "%", 1, 0, 0.0, 120.0, 0 pedalToTpsRpmBins = array, U08, 6472, [8], "RPM", 50, 0, 0.0, 12000.0, 0 cltCrankingCorrBins = array, F32, 6480, [8], "C", 1, 0, -100.0, 250.0, 2 @@ -1091,8 +1164,8 @@ page = 1 ; total TS size = 20000 [SettingContextHelp] injector_flow = "This is your injector flow at the fuel pressure used in the vehicle. cc/min, cubic centimetre per minute\nBy the way, g/s = 0.125997881 * (lb/hr)\ng/s = 0.125997881 * (cc/min)/10.5\ng/s = 0.0119997981 * cc/min" - directSelfStimulation = "Should trigger emulator push data right into trigger handling logic, eliminating the need for physical jumper wires?\nSee also triggerSimulatorPins\nPS: Funny name, right? :)" cj125isUaDivided = "Is your UA CJ125 output wired to MCU via resistor divider?" + etb_use_two_wires = "TLE7209 uses two-wire mode. TLE9201 and VNH2SP30 do NOT use two wire mode." cj125isUrDivided = "Is your UR CJ125 output wired to MCU via resistor divider?\nLooks like 3v range should be enough, divider generally not needed." absoluteFuelPressure = "If your fuel regulator does not have vacuum line" tpsErrorDetectionTooLow = "TPS error detection, what TPS % value is unrealistically low" @@ -1150,6 +1223,14 @@ page = 1 launchFuelAdded = "Extra Fuel Added" launchBoostDuty = "Duty Cycle for the Boost Solenoid" hardCutRpmRange = "RPM Range for Hard Cut" + stft_maxIdleRegionRpm = "Below this RPM, the idle region is active" + stft_maxOverrunLoad = "Below this engine load, the overrun region is active" + stft_minPowerLoad = "Above this engine load, the power region is active" + stft_deadband = "When close to correct AFR, pause correction. This can improve stability by not changing the adjustment if the error is extremely small, but is not required." + stft_minClt = "Below this temperature, correction is disabled." + stft_minAfr = "Below this AFR, correction is paused" + stft_maxAfr = "Above this AFR, correction is paused" + stft_startupDelay = "Delay after starting the engine before beginning closed loop correction." fuelClosedLoopCorrectionEnabled = "Enables lambda sensor closed loop feedback for fuelling." isVerboseIAC = "Print details into rusEfi console" isVerboseETB = "Prints ETB details to rusEFI console" @@ -1218,6 +1299,30 @@ page = 1 triggerCompHystMin = "Trigger comparator hysteresis voltage (Min)" triggerCompHystMax = "Trigger comparator hysteresis voltage (Max)" triggerCompSensorSatRpm = "VR-sensor saturation RPM" + gppwm1_pin = "Select a pin to use for PWM or on-off output." + gppwm1_dutyIfError = "If an error (with a sensor, etc) is detected, this value is used instead of reading from the table.\nThis should be a safe value for whatever hardware is connected to prevent damage." + gppwm1_pwmFrequency = "Select a frequency to run PWM at.\nSet this to 0hz to enable on-off mode." + gppwm1_onAboveDuty = "In on-off mode, turn the output on when the table value is above this duty." + gppwm1_offBelowDuty = "In on-off mode, turn the output off when the table value is below this duty." + gppwm1_loadAxis = "Selects the load axis to use for the table." + gppwm2_pin = "Select a pin to use for PWM or on-off output." + gppwm2_dutyIfError = "If an error (with a sensor, etc) is detected, this value is used instead of reading from the table.\nThis should be a safe value for whatever hardware is connected to prevent damage." + gppwm2_pwmFrequency = "Select a frequency to run PWM at.\nSet this to 0hz to enable on-off mode." + gppwm2_onAboveDuty = "In on-off mode, turn the output on when the table value is above this duty." + gppwm2_offBelowDuty = "In on-off mode, turn the output off when the table value is below this duty." + gppwm2_loadAxis = "Selects the load axis to use for the table." + gppwm3_pin = "Select a pin to use for PWM or on-off output." + gppwm3_dutyIfError = "If an error (with a sensor, etc) is detected, this value is used instead of reading from the table.\nThis should be a safe value for whatever hardware is connected to prevent damage." + gppwm3_pwmFrequency = "Select a frequency to run PWM at.\nSet this to 0hz to enable on-off mode." + gppwm3_onAboveDuty = "In on-off mode, turn the output on when the table value is above this duty." + gppwm3_offBelowDuty = "In on-off mode, turn the output off when the table value is below this duty." + gppwm3_loadAxis = "Selects the load axis to use for the table." + gppwm4_pin = "Select a pin to use for PWM or on-off output." + gppwm4_dutyIfError = "If an error (with a sensor, etc) is detected, this value is used instead of reading from the table.\nThis should be a safe value for whatever hardware is connected to prevent damage." + gppwm4_pwmFrequency = "Select a frequency to run PWM at.\nSet this to 0hz to enable on-off mode." + gppwm4_onAboveDuty = "In on-off mode, turn the output on when the table value is above this duty." + gppwm4_offBelowDuty = "In on-off mode, turn the output off when the table value is below this duty." + gppwm4_loadAxis = "Selects the load axis to use for the table." ; CONFIG_DEFINITION_END @@ -1240,20 +1345,39 @@ page = 1 [LoggerDefinition] ; valid logger types: composite, tooth, trigger, csv - loggerDef = compositeLogger, "Primary Trigger Logger", tooth +; loggerDef = compositeLogger, "Primary Trigger Logger", tooth + loggerDef = compositeLogger, "Trigger Logger", composite startCommand = "l\x01" stopCommand = "l\x02" dataReadCommand = "L" dataReadTimeout = 10000 ; time in ms dataReadyCondition = { toothLogReady } + continuousRead = true + ; each packet is 5 and we have 500 of those + dataLength = 2500 +;tooth ; recordDef = headerLen, footerLen, recordLen - recordDef = 0, 0, 2; in bytes, the recordLen is for each record, currently limited to 4 bytes +; recordDef = 0, 0, 5 ; uint16 that stores 1/100 second - recordField = toothTime, "tooth", 0, 16, 0.01, "ms" +; recordField = toothTime, "tooth", 0, 16, 0.01, "ms" + + ; recordDef = headerLen, footerLen, recordLen + recordDef = 0, 0, 5 + + ; these names are hard-coded inside TS + recordField = priLevel, "PriLevel", 0, 1, 1.0, "Flag" + recordField = secLevel, "SecLevel", 1, 1, 1.0, "Flag" + recordField = trigger, "Trigger", 2, 1, 1.0, "Flag" + recordField = sync, "Sync", 3, 1, 1.0, "Flag" + recordField = time, "Time", 8, 32, 0.01, "ms" + + ; it seems that TS also needs to know the diff.size of a tooth + calcField = toothTime, "ToothTime", "ms", { time - pastValue(time, 1) } + [VeAnalyze] ; tableName, lambdaTargetTableName, lambdaChannel, egoCorrectionChannel, activeCondition @@ -1267,11 +1391,7 @@ page = 1 ; filter = Name, "DisplayName", outputChannel, operator, defaultVal, userAdjustable filter = minRPMFilter, "Minimum RPM", RPMValue, < , 500, , true -#if CELSIUS filter = minCltFilter, "Minimum CLT", coolant, < , 60, , true -#else - filter = minCltFilter, "Minimum CLT", coolant, < , 160, , true -#endif filter = deltaTps, "dTPS", deltaTps > , 50, , true @@ -1293,7 +1413,7 @@ fileVersion = { 20200310 } ochGetCommand = "O%2o%2c" ; see TS_OUTPUT_SIZE in console source code - ochBlockSize = 240 + ochBlockSize = 244 ; ; see TunerStudioOutputChannels struct @@ -1325,6 +1445,7 @@ fileVersion = { 20200310 } ind_isTriggerError = bits, U32, 0, [23:23], "true", "false"; ind_hasFatalError=bits, U32, 0, [24:24], "true", "false"; ind_isWarnNow =bits, U32, 0, [25:25], "true", "false"; + ind_pedal_error =bits, U32, 0, [26:26], "true", "false"; ; RPM, vss RPMValue = scalar, U16, 4, "RPM", 1, 0.00000 @@ -1334,16 +1455,8 @@ fileVersion = { 20200310 } ; temperatures internalMcuTemperature = scalar,S08, 11, "deg C", 1, 0 -#if CELSIUS coolant = scalar, S16, 12, "deg C",{1/100}, 0.0 -#else - coolant = scalar, S16, 12, "deg F",{9/(5 * 100)}, 17.77777 -#endif -#if CELSIUS intake = scalar, S16, 14, "deg C",{1/100}, 0.0 -#else - intake = scalar, S16, 14, "deg F",{9/(5 * 100)}, 17.77777 -#endif ; todo: aux1 ; todo: aux2 @@ -1418,55 +1531,66 @@ fileVersion = { 20200310 } knockLevel = scalar, F32, 108, "Volts", 1, 0 ; Mode, firmware, protocol, run time - timeSeconds = scalar, U32, 112, "sec", 1, 0.0 +; TS requires 'seconds' name since it has special internal meaning + seconds = scalar, U32, 112, "sec", 1, 0.0 engineMode = scalar, U32, 116, "em", 1, 0.0; firmwareVersion = scalar, U32, 120,"version_f", 1, 0 firmwareTsVersion=scalar, U32, 124,"version_p", 1, 0 +; calibation helpers + calibrationValue = scalar, F32, 128, "", 1, 0 + calibrationMode = scalar, U08, 132, "", 1, 0 + ; 3 bytes padding1 + ; Errors - totalTriggerErrorCounter=scalar,U32, 128,"counter", 1, 0 - ; orderingErrorCounter 132 - warningCounter = scalar, U16, 136, "count", 1, 0 - lastErrorCode = scalar, U16, 138, "error", 1, 0 - recentErrorCode0= scalar, U16, 140, "error", 1, 0 - recentErrorCode1= scalar, U16, 142, "error", 1, 0 - recentErrorCode2= scalar, U16, 144, "error", 1, 0 - recentErrorCode3= scalar, U16, 146, "error", 1, 0 - recentErrorCode4= scalar, U16, 148, "error", 1, 0 - recentErrorCode5= scalar, U16, 150, "error", 1, 0 - recentErrorCode6= scalar, U16, 152, "error", 1, 0 - recentErrorCode7= scalar, U16, 154, "error", 1, 0 + totalTriggerErrorCounter=scalar,U32, 136,"counter", 1, 0 + ; orderingErrorCounter 140 + warningCounter = scalar, U16, 144, "count", 1, 0 + lastErrorCode = scalar, U16, 146, "error", 1, 0 + recentErrorCode0= scalar, U16, 148, "error", 1, 0 + recentErrorCode1= scalar, U16, 150, "error", 1, 0 + recentErrorCode2= scalar, U16, 152, "error", 1, 0 + recentErrorCode3= scalar, U16, 154, "error", 1, 0 + recentErrorCode4= scalar, U16, 156, "error", 1, 0 + recentErrorCode5= scalar, U16, 158, "error", 1, 0 + recentErrorCode6= scalar, U16, 160, "error", 1, 0 + recentErrorCode7= scalar, U16, 162, "error", 1, 0 ; Debug - debugFloatField1= scalar, F32, 156, "val", 1, 0.0 - debugFloatField2= scalar, F32, 160, "val", 1, 0.0 - debugFloatField3= scalar, F32, 164, "val", 1, 0.0 - debugFloatField4= scalar, F32, 168, "val", 1, 0.0 - debugFloatField5= scalar, F32, 172, "val", 1, 0.0 - debugFloatField6= scalar, F32, 176, "val", 1, 0.0 - debugFloatField7= scalar, F32, 180, "val", 1, 0.0 - debugIntField1 = scalar, S32, 184, "val", 1, 0.0 - debugIntField2 = scalar, S32, 188, "val", 1, 0.0 - debugIntField3 = scalar, S32, 192, "val", 1, 0.0 - debugIntField4 = scalar, S16, 196, "val", 1, 0.0 - debugIntField5 = scalar, S16, 198, "val", 1, 0.0 + debugFloatField1= scalar, F32, 164, "val", 1, 0.0 + debugFloatField2= scalar, F32, 168, "val", 1, 0.0 + debugFloatField3= scalar, F32, 172, "val", 1, 0.0 + debugFloatField4= scalar, F32, 176, "val", 1, 0.0 + debugFloatField5= scalar, F32, 180, "val", 1, 0.0 + debugFloatField6= scalar, F32, 184, "val", 1, 0.0 + debugFloatField7= scalar, F32, 188, "val", 1, 0.0 + debugIntField1 = scalar, S32, 192, "val", 1, 0.0 + debugIntField2 = scalar, S32, 196, "val", 1, 0.0 + debugIntField3 = scalar, S32, 200, "val", 1, 0.0 + debugIntField4 = scalar, S16, 204, "val", 1, 0.0 + debugIntField5 = scalar, S16, 206, "val", 1, 0.0 ; Accel - accelerationX = scalar, S16, 200, "G", 0.01, 0 - accelerationY = scalar, S16, 202, "G", 0.01, 0 + accelerationX = scalar, S16, 208, "G", 0.01, 0 + accelerationY = scalar, S16, 210, "G", 0.01, 0 ; egt - egt1 = scalar, S16, 204, "deg C", 1, 0 - egt2 = scalar, S16, 206, "deg C", 1, 0 - egt3 = scalar, S16, 208, "deg C", 1, 0 - egt4 = scalar, S16, 210, "deg C", 1, 0 - egt5 = scalar, S16, 212, "deg C", 1, 0 - egt6 = scalar, S16, 214, "deg C", 1, 0 - egt7 = scalar, S16, 216, "deg C", 1, 0 - egt8 = scalar, S16, 218, "deg C", 1, 0 -; - TPS2Value = scalar, S16, 220, "%",{1/100}, 0 + egt1 = scalar, S16, 212, "deg C", 1, 0 + egt2 = scalar, S16, 214, "deg C", 1, 0 + egt3 = scalar, S16, 216, "deg C", 1, 0 + egt4 = scalar, S16, 218, "deg C", 1, 0 + egt5 = scalar, S16, 220, "deg C", 1, 0 + egt6 = scalar, S16, 222, "deg C", 1, 0 + egt7 = scalar, S16, 224, "deg C", 1, 0 + egt8 = scalar, S16, 226, "deg C", 1, 0 + TPS2Value = scalar, S16, 228, "%",{1/100}, 0 + + rawTps1Primary = scalar, U16, 230, "V",{1/1000}, 0.0 + rawPpsPrimary = scalar, U16, 232, "V",{1/1000}, 0.0 + rawClt = scalar, U16, 234, "V",{1/1000}, 0.0 + rawIat = scalar, U16, 236, "V",{1/1000}, 0.0 + rawOilPressure = scalar, U16, 238, "V",{1/1000}, 0.0 ; ; see TunerStudioOutputChannels struct @@ -1483,6 +1607,12 @@ fileVersion = { 20200310 } time = { timeNow } ; engineLoad = { fuleAlgorithm == 0 ? MAF : TPS } + ; These "synthetic" channels provide the Y-axis (load) value for gen purp PWM table's Y axes + gppwm1_load = {(gppwm1_loadAxis == 0) ? TPSValue : ((gppwm1_loadAxis == 1) ? MAPValue : ((gppwm1_loadAxis == 2) ? coolant : intake))} + gppwm2_load = {(gppwm2_loadAxis == 0) ? TPSValue : ((gppwm2_loadAxis == 1) ? MAPValue : ((gppwm2_loadAxis == 2) ? coolant : intake))} + gppwm3_load = {(gppwm3_loadAxis == 0) ? TPSValue : ((gppwm3_loadAxis == 1) ? MAPValue : ((gppwm3_loadAxis == 2) ? coolant : intake))} + gppwm4_load = {(gppwm4_loadAxis == 0) ? TPSValue : ((gppwm4_loadAxis == 1) ? MAPValue : ((gppwm4_loadAxis == 2) ? coolant : intake))} + [PcVariables] wueAfrTargetOffset = array, S16, [ 16], ":1", 0.1, 0.0, -3.0, 3.0, 1; wueAnalRecommend = array, U08, [ 16], "%", 1.00, 0.0, 100, 255.00, 0 @@ -1491,24 +1621,89 @@ fileVersion = { 20200310 } enableLogDebugChannels = bits, U08, [0:0], "Yes", "No" enableLogErrorList = bits, U08, [0:0], "Yes", "No" -; 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 -; Alternator TPS Acceleration Warmup-Pid Idle Engine Load Acc Trigger Counters ETB PID TLE8888 Boost - debugFieldF1List = bits, U08, [0:7], "Controller Output", "From TPS", "", "Controller Output", "", "Channel 1 Rise Counter", "", "", "", "", "", "", "", "", "", "", "", "ETB Controller Output", "", "", "df1", "df1", "22df1", "", "", "", "", "", "", "", "", "", "", "", "", "", "Open Loop Duty", "" - debugFieldF2List = bits, U08, [0:7], "I-Term", "To TPS", "", "I-Term", "", "Channel 2 Rise Counter", "", "", "", "", "", "", "", "", "", "", "", "ETB I-Term", "", "", "df2", "df2", "22df2", "", "", "", "", "", "", "", "", "", "", "", "", "", "Closed Loop Duty","" - debugFieldF3List = bits, U08, [0:7], "Previous Error", "Current TPS<>TPS", "", "", "", "Channel 3 Rise Counter", "", "", "", "", "", "", "", "", "", "", "", "ETB Previous Error", "", "", "df3", "df3", "22df3", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" - debugFieldF4List = bits, U08, [0:7], "I Gain", "Extra Fuel", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "ETB df4", "", "", "df4", "df4", "22df4", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" - debugFieldF5List = bits, U08, [0:7], "D Gain", "df5", "df5", "df5", "df5", "df5", "df5", "", "", "", "", "", "", "", "", "", "", "ETB df5", "df5", "df5", "df5", "df5", "22df5", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" - debugFieldF6List = bits, U08, [0:7], "D Term", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "ETB df6", "", "", "df6", "df6", "22df6", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" - debugFieldF7List = bits, U08, [0:7], "Max-Value", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "ETB df7", "", "", "df7", "df7", "22df7", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" - - debugFieldI1List = bits, U08, [0:7], "P-Gain", "", "", "", "", "Channel 2 Fall Counter", "", "", "", "", "", "", "", "", "", "", "", "ETB P-Gain", "", "", "di1", "di1", "22", "", "", "", "", "", "", "", "", "SPI Counter", "", "", "", "", "", "" - debugFieldI2List = bits, U08, [0:7], "Offset", "", "", "", "", "Channel 3 Fall Counter", "", "", "", "", "", "", "", "", "", "", "", "ETB di2", "", "", "di2", "di2", "22", "", "", "", "", "", "", "", "", "Latest Transmit","", "", "", "", "", "" - debugFieldI3List = bits, U08, [0:7], "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "ETB di3", "", "", "di3", "di3", "22", "", "", "", "", "", "", "", "", "Latest Received","", "", "", "", "", "" - debugFieldI4List = bits, U08, [0:7], "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "ETB di4", "", "", "di4", "di4", "22", "", "", "", "", "", "", "", "", "Init Count", "", "", "", "", "", "" - debugFieldI5List = bits, U08, [0:7], "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "di5", "di5", "ETB di5", "di5", "di5", "di5", "di5", "22di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5" +; wall of debug mode :) +; https://rusefi.com/wiki/index.php?title=Manual:Debug_fields +; 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 +; Alternator TPS Acceleration Warmup-Pid Idle Engine Load Acc Trigger Counters VVT Cranking Ignition Timing ETB PID CJ125 CAN TLE8888 Boost Start Launcher ETB Autotune + debugFieldF1List = bits, U08, [0:7], "Controller Output", "From TPS", "", "Controller Output", "Idle output", "Channel 1 Rise Counter", "", "", "", "", "Ign IAT Corr", "", "", "", "", "", "", "ETB Controller Output", "", "", "df1", "df1", "22df1", "", "23:df1", "CJ125: output", "", "", "", "", "", "", "", "", "", "", "Boost Open Loop Duty", "S unused" "", "Osc Amplitude" + debugFieldF2List = bits, U08, [0:7], "I-Term", "To TPS", "", "I-Term", "Idle df2", "Channel 2 Rise Counter", "", "", "", "", "Ign CLT Corr", "", "", "", "", "", "", "ETB I-Term", "", "", "df2", "df2", "22df2", "", "23:df2", "CJ125: i-term", "", "", "", "", "", "", "", "", "", "", "Boost Closed Loop Duty","S unused" "", "Duty Amplitude" + debugFieldF3List = bits, U08, [0:7], "Previous Error", "Current TPS<>TPS", "", "", "Idle df3", "ICU sum", "", "", "", "", "Ign FSIO Adj", "", "", "", "", "", "", "ETB err", "", "", "df3", "df3", "22df3", "", "23:df3", "CJ125: err", "", "", "", "", "", "", "", "", "", "", "", "S unused" "", "Tu" + debugFieldF4List = bits, U08, [0:7], "I Gain", "Extra Fuel", "", "", "Idle df4", "VVT rise", "", "", "", "", "Ign PID Adj", "", "", "", "", "", "", "ETB I setting", "", "", "df4", "df4", "22df4", "", "23:df4", "CJ125: UA", "", "", "", "", "", "", "", "", "", "", "", "S unused" "", "Ku" + debugFieldF5List = bits, U08, [0:7], "D Gain", "df5", "df5", "df5", "Idle df5", "VVT fall", "df5", "", "", "", "", "", "", "", "", "", "", "ETB D setting", "df5", "df5", "df5", "df5", "22df5", "", "23:df5", "CJ125: UR", "", "", "", "", "", "", "", "", "", "", "", "S unused" "", "Kp" + debugFieldF6List = bits, U08, [0:7], "D Term", "", "", "", "Idle df6", "Current Gap", "", "", "", "", "", "", "", "", "", "", "", "ETB df6", "", "", "df6", "df6", "22df6", "", "23:df6", "cj: f7", "", "", "", "", "", "", "", "", "", "", "", "S unused" "", "Ki" + debugFieldF7List = bits, U08, [0:7], "Max-Value", "", "", "", "Idle df7", "", "", "", "", "", "", "", "", "", "", "", "", "ETB df7", "", "", "df7", "df7", "22df7", "", "23:df7", "cj: f7", "", "", "", "", "", "", "", "", "", "", "", "S unused" "", "Kd" + debugFieldI1List = bits, U08, [0:7], "P-Gain", "", "", "", "Idle di1", "Channel 1 Fall Counter", "", "", "", "", "Multispark Count", "", "", "", "", "", "", "ETB P-Gain", "", "", "di1", "di1", "22di1", "", "23:di1", "CJ125: state", "read count","", "", "", "", "SPI Counter", "", "", "", "", "", "Start Count" "", "" + debugFieldI2List = bits, U08, [0:7], "Offset", "", "", "", "Idle di2", "Channel 2 Fall Counter", "", "", "", "", "", "", "", "", "", "", "", "ETB di2", "", "", "di2", "di2", "22di2", "", "23:di2", "", "", "", "", "", "", "Latest Transmit","", "", "", "", "", "S unused" "", "" + debugFieldI3List = bits, U08, [0:7], "", "", "", "", "Idle di3", "Cycle Index", "", "", "", "", "", "", "", "", "", "", "", "ETB di3", "", "", "di3", "di3", "22di3", "", "23:di3", "", "", "", "", "", "", "Latest Received","", "", "", "", "", "S unused" "", "" + debugFieldI4List = bits, U08, [0:7], "", "", "", "", "Idle di4", "Cycle Cnt 1", "", "", "", "", "", "", "", "", "", "", "", "ETB di4", "", "", "di4", "di4", "22di4", "", "23:di4", "", "", "", "", "", "", "Init Count", "", "", "", "", "", "S unused" "", "" + debugFieldI5List = bits, U08, [0:7], "", "", "", "", "Idle di5", "Cycle Cnt 2", "", "", "", "", "", "", "", "", "", "di5", "di5", "ETB di5", "di5", "di5", "di5", "di5", "22di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "S di5" "", "" + [ConstantsExtensions] + ; defaultValue is used to provide TunerStudio with a value to use in the case of + ; the constant not yet being initialized. This is primarily important if the + ; constant is used as a variable in the ini. + ; defaultValue = constantName, value; defaultValue = wueAfrTargetOffset, -1.5 -1.4 -1.15 -0.95 -0.775 -0.65 -0.5625 -0.5 -0.4375 -0.375 -0.3125 -0.25 -0.1875 -0.125 -0.0625 0 + + requiresPowerCycle = warningLedPin + requiresPowerCycle = runningLedPin + requiresPowerCycle = binarySerialTxPin + requiresPowerCycle = binarySerialRxPin + + requiresPowerCycle = etb_use_two_wires + requiresPowerCycle = etbFreq + + requiresPowerCycle = idle_solenoidFrequency + requiresPowerCycle = boostPwmFrequency + requiresPowerCycle = alternatorPwmFrequency + requiresPowerCycle = auxPidFrequency1 + requiresPowerCycle = auxPidFrequency2 + requiresPowerCycle = auxPidFrequency3 + requiresPowerCycle = auxPidFrequency4 + + requiresPowerCycle = fsioOutputPins1 + requiresPowerCycle = fsioOutputPins2 + requiresPowerCycle = fsioOutputPins3 + requiresPowerCycle = fsioOutputPins4 + requiresPowerCycle = fsioOutputPins5 + requiresPowerCycle = fsioOutputPins6 + requiresPowerCycle = fsioOutputPins7 + requiresPowerCycle = fsioOutputPins8 + requiresPowerCycle = fsioOutputPins9 + requiresPowerCycle = fsioOutputPins10 + requiresPowerCycle = fsioOutputPins11 + requiresPowerCycle = fsioOutputPins12 + requiresPowerCycle = fsioOutputPins13 + requiresPowerCycle = fsioOutputPins14 + requiresPowerCycle = fsioOutputPins15 + requiresPowerCycle = fsioOutputPins16 + + requiresPowerCycle = fsioFrequency1 + requiresPowerCycle = fsioFrequency2 + requiresPowerCycle = fsioFrequency3 + requiresPowerCycle = fsioFrequency4 + requiresPowerCycle = fsioFrequency5 + requiresPowerCycle = fsioFrequency6 + requiresPowerCycle = fsioFrequency7 + requiresPowerCycle = fsioFrequency8 + requiresPowerCycle = fsioFrequency9 + requiresPowerCycle = fsioFrequency10 + requiresPowerCycle = fsioFrequency11 + requiresPowerCycle = fsioFrequency12 + requiresPowerCycle = fsioFrequency13 + requiresPowerCycle = fsioFrequency14 + requiresPowerCycle = fsioFrequency15 + requiresPowerCycle = fsioFrequency16 + + requiresPowerCycle = fsioAdc1 + requiresPowerCycle = fsioAdc2 + requiresPowerCycle = fsioAdc3 + requiresPowerCycle = fsioAdc4 + + readOnly = warning_message + + [CurveEditor] ; xAxis = leftValue, rightValue, step ; yAxis = bottomValue, topValue, step @@ -1607,11 +1802,7 @@ fileVersion = { 20200310 } curve = iatFuelCorrCurve, "Intake air temperature fuel Multiplier" columnLabel = "Coolant", "Multiplier" -#if CELSIUS xAxis = -40, 120, 10 -#else - xAxis = -40, 250, 10 -#endif yAxis = 0, 2, 11 xBins = iatFuelCorrBins, intake yBins = iatFuelCorr @@ -1619,11 +1810,7 @@ fileVersion = { 20200310 } curve = cltTimingCorrCurve, "Warmup timing correction" columnLabel = "Coolant", "Extra" -#if CELSIUS xAxis = -40, 120, 10 -#else - xAxis = -40, 250, 10 -#endif yAxis = 0, 50, 10 xBins = cltTimingBins, coolant yBins = cltTimingExtra @@ -1631,11 +1818,7 @@ fileVersion = { 20200310 } curve = cltFuelCorrCurve, "Warmup fuel manual Multiplier" columnLabel = "Coolant", "Multiplier" -#if CELSIUS xAxis = -40, 100, 10 -#else - xAxis = -40, 210, 10 -#endif yAxis = 0, 3, 10 xBins = cltFuelCorrBins, coolant yBins = cltFuelCorr @@ -1643,11 +1826,7 @@ fileVersion = { 20200310 } curve = crankingCltCurve, "Cranking Coolant Temperature Multiplier" columnLabel = "Coolant", "Multiplier" -#if CELSIUS xAxis = -40, 100, 10 -#else - xAxis = -40, 210, 10 -#endif yAxis = 0, 3, 10 xBins = crankingFuelBins, coolant yBins = crankingFuelCoef @@ -1655,8 +1834,8 @@ fileVersion = { 20200310 } curve = etbTpsBiasCurve, "Electronic TB Bias Curve" columnLabel = "TPS", "duty bias" - xAxis = 0, 100, 10 - yAxis = 0, 100, 10 + xAxis = 0, 50, 11 + yAxis = -40, 40, 9 xBins = etbBiasBins, TPSValue yBins = etbBiasValues gauge = TPSGauge @@ -1679,11 +1858,7 @@ fileVersion = { 20200310 } curve = cltIdleCurve, "Warmup Idle multiplier" columnLabel = "Coolant", "Multiplier" -#if CELSIUS xAxis = -40, 120, 10 -#else - xAxis = -40, 250, 10 -#endif yAxis = 0, 3, 10 xBins = cltIdleCorrBins, coolant yBins = cltIdleCorr @@ -1691,11 +1866,7 @@ fileVersion = { 20200310 } curve = iacCoastingCurve, "Coasting IAC Position for Auto-Idle" columnLabel = "Coolant", "Multiplier" -#if CELSIUS xAxis = -40, 120, 10 -#else - xAxis = -40, 250, 10 -#endif yAxis = 0, 100, 10 xBins = iacCoastingBins, coolant yBins = iacCoasting @@ -1703,11 +1874,7 @@ fileVersion = { 20200310 } curve = cltCrankingCurve, "Cranking Idle Air multiplier" columnLabel = "Coolant", "Multiplier" -#if CELSIUS xAxis = -40, 120, 10 -#else - xAxis = -40, 250, 10 -#endif yAxis = 0, 3, 10 xBins = cltCrankingCorrBins, coolant yBins = cltCrankingCorr @@ -1715,11 +1882,7 @@ fileVersion = { 20200310 } curve = cltIdleRPMCurve, "Idle Target RPM" columnLabel = "Coolant", "RPM" -#if CELSIUS xAxis = -40, 120, 10 -#else - xAxis = -40, 250, 10 -#endif yAxis = 0, 8000, 10 xBins = cltIdleRpmBins, coolant yBins = cltIdleRpm, RPMValue @@ -1751,11 +1914,7 @@ fileVersion = { 20200310 } curve = wueAfrTargetOffsetCurve, "AFR Target Temperature Adjustment" columnLabel = "Coolant", "AFR Offset" -#if CELSIUS xAxis = -40, 200, 9 -#else - xAxis = -40, 400, 9 -#endif yAxis = -3, 1, 5 xBins = cltFuelCorrBins, coolant yBins = wueAfrTargetOffset @@ -1763,11 +1922,7 @@ fileVersion = { 20200310 } curve = wueAnalyzer_warmup_curve, "Warmup Enrichment" columnLabel = "Coolant", "Current WUE", "Coolant", "Corrected" -#if CELSIUS xAxis = -40, 200, 9 -#else - xAxis = -40, 400, 9 -#endif yAxis = 90, 500, 6 xBins = cltFuelCorrBins, coolant yBins = cltFuelCorr @@ -1945,6 +2100,30 @@ fileVersion = { 20200310 } gridOrient = 250, 0, 340 ; Space 123 rotation of grid in degrees. upDownLabel = "(Later)", "(Sooner)" + table = gppwm1Tbl, gppwm1Map, "", 1 + xyLabels = "RPM", "" + xBins = gppwm1_rpmBins, RPMValue + yBins = gppwm1_loadBins, gppwm1_load + zBins = gppwm1_table + + table = gppwm2Tbl, gppwm2Map, "", 1 + xyLabels = "RPM", "" + xBins = gppwm2_rpmBins, RPMValue + yBins = gppwm2_loadBins, gppwm2_load + zBins = gppwm2_table + + table = gppwm3Tbl, gppwm3Map, "", 1 + xyLabels = "RPM", "" + xBins = gppwm3_rpmBins, RPMValue + yBins = gppwm3_loadBins, gppwm3_load + zBins = gppwm3_table + + table = gppwm4Tbl, gppwm4Map, "", 1 + xyLabels = "RPM", "" + xBins = gppwm4_rpmBins, RPMValue + yBins = gppwm4_loadBins, gppwm4_load + zBins = gppwm4_table + [GaugeConfigurations] gaugeCategory = Sensors - Extra 2 @@ -1975,7 +2154,7 @@ gaugeCategory = ECU Status recentErrorCode6Gauge = recentErrorCode6, "Error#7", "", 0, 18000, 0, 0, 18000, 18000, 0, 0 recentErrorCode7Gauge = recentErrorCode7, "Error#8", "", 0, 18000, 0, 0, 18000, 18000, 0, 0 firmwareVersionGauge = firmwareVersion , "ECU Software Version", "%", 0, 100, 0, 0, 100, 100, 0, 0 - timeSecondsGauge = timeSeconds, "Uptime", "sec", 0, 100, 0, 0, 100, 100, 0, 0 + timeSecondsGauge = seconds, "Uptime", "sec", 0, 100, 0, 0, 100, 100, 0, 0 gaugeCategory = Debug @@ -1995,16 +2174,8 @@ gaugeCategory = Debug gaugeCategory = Sensors - Basic RPMGauge = RPMValue, "RPM - engine speed", "RPM", 0, 15000, 200, 500, 6000, 6000, 0, 0 -#if CELSIUS CLTGauge = coolant, "Coolant temp", "deg C", -40, 140, -15, 1, 95, 110, 1, 1 -#else - CLTGauge = coolant, "Coolant temp", "deg F", -40, 285, 5, 35, 205, 230, 1, 1 -#endif -#if CELSIUS IATGauge = intake, "Intake air temp", "deg C", -40, 140, -15, 1, 95, 110, 1, 1 -#else - IATGauge = intake, "Intake air temp", "deg F", -40, 285, 5, 35, 205, 230, 1, 1 -#endif afr1Gauge = AFRValue, "Air fuel ratio", "", 10, 19.4, 12, 13, 15, 16, 2, 2 MAFGauge = MAFValue, "Mass air flow", "v", 0, 5, 0, 1, 3, 4, 1, 1 VBattGauge = VBatt, "Battery voltage", "V", 8, 21, 9, 10, 17, 19, 1, 1 @@ -2037,11 +2208,7 @@ gaugeCategory = Acceleration Enrichment gaugeCategory = Fueling ;Name Var Title Units Lo Hi LoD LoW HiW HiD vd ld -#if CELSIUS tChargeGauge = tCharge, "fuel: Estimated charge temperature", "deg C", -40, 140, -15, 1, 95, 110, 1, 1 -#else - tChargeGauge = tCharge, "fuel: Estimated charge temperature", "deg F", -40, 285, 5, 35, 205, 230, 1, 1 -#endif baroCorrectionGauge = baroCorrection,"fuel: Barometric pressure correction", "ratio", 0.5, 1.5, 0.6, 0.7, 1.3, 1.4, 1, 1 crankingFuelGauge = crankingFuelMs, "fuel: cranking", "mSec", 0, 25.5, 1.0, 1.2, 20, 25, 3, 1 iatCorrectionGauge = iatCorrection, "fuel: IAT correction", "mult", 0, 3, 0, 0, 3, 3, 2, 2 @@ -2065,6 +2232,12 @@ gaugeCategory = Throttle Body (incl. ETB) etbErrorGauge = etb1Error, "ETB position error", "%", -20, 20, -10, -5, 5, 10, 2, 0 etbDutyCycleGauge = etb1DutyCycle, "ETB duty cycle", "%", -100, 100, -75, -50, 50, 75, 0, 0 +gaugeCategory = Sensors - Raw + rawTps1PrimaryGauge = rawTps1Primary, "Raw TPS 1 Primary", "volts", 0, 5, 0, 0, 5, 5, 3, 0 + rawPpsPrimaryGauge = rawPpsPrimary , "Raw Pedal Primary", "volts", 0, 5, 0, 0, 5, 5, 3, 0 + rawCltGauge = rawClt , "Raw CLT", "volts", 0, 5, 0, 0, 5, 5, 3, 0 + rawIatGauge = rawIat , "Raw IAT", "volts", 0, 5, 0, 0, 5, 5, 3, 0 + rawOilPressureGauge = rawOilPressure, "Raw Oil Pressure", "volts", 0, 5, 0, 0, 5, 5, 3, 0 [WueAnalyze] @@ -2098,11 +2271,10 @@ gaugeCategory = Throttle Body (incl. ETB) ; 1 2 3 4 ; 5 6 7 8 - ; currently a minimum of 6 gauges must be on the dash, this appears to be an old not needed limitation. next release 1 will work. gauge1 = RPMGauge gauge2 = CLTGauge gauge3 = TPSGauge - gauge4 = MAFGauge + gauge4 = MAPGauge gauge5 = afr1Gauge gauge6 = VBattGauge gauge7 = dwellGauge @@ -2112,36 +2284,45 @@ gaugeCategory = Throttle Body (incl. ETB) ; = expression, off-label, on-label, off-bg, off-fg, on-bg, on-fg ; important status - indicator = { ind_hasFatalError }, "", "FATAL ERROR", green, black, red, black - indicator = { firmwareTsVersion == fileVersion }, "WRONG VERSION", "version", red, black, green, black - indicator = { ind_isWarnNow }, "", "warn", green, black, red, black - indicator = { ind_check_engine }, "ok", "Check engine", green, black, red, black - indicator = { isIgnitionEnabledIndicator}, "no ignition", "ignition", red, black, green, black - indicator = { ind_injection_enabled}, "no injection", "injection", red, black, green, black - indicator = { ind_isTriggerError}, "ok", "trg err", green, black, red, black + indicator = { ind_hasFatalError }, "", "CRITICAL ERROR", white, black, red, black + indicator = { firmwareTsVersion == fileVersion }, "WRONG VERSION", "version ok", red, black, white, black + indicator = { ind_isWarnNow }, "", "WARNING", white, black, yellow, black + indicator = { ind_check_engine }, "", "Check Engine", white, black, red, black + indicator = { isIgnitionEnabledIndicator}, "no ignition", "ignition", yellow, black, white, black + indicator = { ind_injection_enabled}, "no injection", "injection", yellow, black, white, black + indicator = { ind_isTriggerError}, "trigger ok", "trigger err", white, black, red, black + ; this is required so that the "config error" feature works in TS + ; don't change this line - TS is looking for an indicator with particular text/styling + ; you don't even have to show it by default + indicator = { ind_hasFatalError }, "Config Error", "Config Error", white, black, red, black ; minor info - indicator = { ind_fan}, "no fan", "fan", white, black, green, black - indicator = { isCylinderCleanupActivated}, "no cyl cleanup", "cyl cleanup", white, black, green, black + indicator = { ind_fan}, "fan off", "fan on", white, black, green, black + indicator = { isCylinderCleanupActivated}, "no cyl cleanup", "cyl cleanup", white, black, yellow, black indicator = { needBurn }, "config ok", "unsaved changes", white, black, yellow, black indicator = { hasSdCard}, "no SD", "with SD", white, black, green, black - indicator = { ind_fuel_pump}, "no pump", "pump", white, black, green, black + indicator = { ind_fuel_pump}, "pump off", "pump on", white, black, green, black indicator = { clutchUpState }, "clutch", "cltch Up", white, black, red, black indicator = { clutchDownState }, "clutch", "cltch Down", white, black, yellow, black indicator = { brakePedalIndicator }, "brake", "brake down", white, black, red, black - indicator = { acSwitchIndicator }, "AC on", "AC off", yellow, black, white, black + indicator = { acSwitchIndicator }, "AC off", "AC on", white, black, blue, white ; error codes indicator = { ind_tps_error}, "tps", "tps error", white, black, red, black indicator = { ind_clt_error}, "clt", "clt error", white, black, red, black indicator = { ind_iat_error}, "iat", "iat error", white, black, red, black indicator = { ind_map_error}, "map", "map error", white, black, red, black + indicator = { ind_pedal_error}, "pedal", "pedal error", white, black, red, black indicator = { knockEverIndicator }, "", "Knock recently", white, black, red, black indicator = { knockNowIndicator }, "no knock", "Knock NOW", white, black, red, black +[KeyActions] + showPanel = spi, spiFunction + showPanel = con, connection + [Datalog] ; Channel Label Type Format entry = time, "Time", float, "%.3f" @@ -2295,7 +2476,7 @@ menuDialog = main # Digital outputs subMenu = mainRelay, "Main relay" subMenu = starterRelay, "Starter Disable relay" - subMenu = fuelPump, "Fuel rail" + subMenu = fuelPump, "Fuel pump & rail" subMenu = fanSetting, "Fan" subMenu = tachSettings, "Tachometer" subMenu = malfunction, "Check engine light" @@ -2308,14 +2489,14 @@ menuDialog = main subMenu = std_separator # Targets & closed loop - subMenu = afrTableTbl, "Target AFR", 0, {isInjectionEnabled == 1 && fuelAlgorithm == LM_SPEED_DENSITY} + subMenu = afrTableTbl, "Target AFR", 0, {isInjectionEnabled == 1 && (fuelAlgorithm == LM_SPEED_DENSITY || fuelAlgorithm == LM_REAL_MAF)} subMenu = fuelClosedLoopDialog, "Closed loop correction", 0, {isInjectionEnabled == 1} subMenu = coastingFuelCutControl, "Deceleration fuel cutoff (DFCO)", 0, {isInjectionEnabled == 1} subMenu = std_separator # Fuel table/VE - subMenu = fuelTableDialog, "Fuel table", 0, {isInjectionEnabled == 1 && fuelAlgorithm != LM_SPEED_DENSITY} - subMenu = veTableDialog, "VE", 0, {isInjectionEnabled == 1 && fuelAlgorithm == LM_SPEED_DENSITY} + subMenu = fuelTableDialog, "Fuel table", 0, {isInjectionEnabled == 1 && fuelAlgorithm != LM_SPEED_DENSITY && fuelAlgorithm != LM_REAL_MAF} + subMenu = veTableDialog, "VE", 0, {isInjectionEnabled == 1 && (fuelAlgorithm == LM_SPEED_DENSITY || fuelAlgorithm == LM_REAL_MAF)} subMenu = injPhaseTableTbl, "Injection phase", 0, {isInjectionEnabled == 1} subMenu = std_separator @@ -2381,7 +2562,14 @@ menuDialog = main menu = "&Advanced" subMenu = boostDialog, "Boost Control" subMenu = boostPidDialog, "Closed Loop Boost", { boostType == 1 } - subMenu = std_separator + + subMenu = std_separator + subMenu = gppwm1, "General Purpose PWM 1" + subMenu = gppwm2, "General Purpose PWM 2" + subMenu = gppwm3, "General Purpose PWM 3" + subMenu = gppwm4, "General Purpose PWM 4" + + subMenu = std_separator subMenu = fsioInputsDialog, "FSIO inputs" subMenu = auxPidDialog, "Aux PID" subMenu = fsioOutputsDialog, "FSIO outputs" @@ -2450,6 +2638,8 @@ menuDialog = main subMenu = std_separator subMenu = connection, "Connection" + subMenu = tle8888, "TLE8888" + subMenu = allPins1, "Full pinout 1/2" subMenu = allPins2, "Full pinout 2/2" subMenu = std_separator @@ -2458,6 +2648,7 @@ menuDialog = main # EXPERIMENTAL FEATURES subMenu = parkingLot, "Experimental/Broken" subMenu = multisparkSettings, "Multispark", 0, {isIgnitionEnabled == 1} + subMenu = mc33Dialog, "GDI Dreams" subMenu = std_separator subMenu = std_separator @@ -2471,6 +2662,10 @@ menuDialog = main subMenu = std_separator + menu = "Help" + subMenu = helpGeneral, "rusEfi Info" + + [ControllerCommands] ; commandName = command1, command2, commandn... ; command in standard ini format, a command name can be assigned to 1 to n commands that will be executed in order. @@ -2531,6 +2726,9 @@ cmd_calibrate_pedal_down = "w\x00\x14\x00\x07" cmd_tle8888_init = "w\x00\x14\x00\x08" cmd_test_ac_relay = "w\x00\x14\x00\x09" cmd_write_config = "w\x00\x14\x00\x0A" +cmd_test_starter_relay = "w\x00\x14\x00\x0B" +cmd_etb_autotune = "w\x00\x14\x00\x0C" +cmd_enable_self_stim = "w\x00\x14\x00\x0D" cmd_test_radiator_fan = "w\x00\x15\x00\x01" cmd_test_check_engine_light = "w\x00\x16\x00\x01" @@ -2668,6 +2866,7 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" field = "!Reminder that 4-stroke cycle is 720 degrees" field = "!For well-known trigger types use '0' trigger angle offset" field = "Trigger Angle Offset", globalTriggerAngleOffset + field = "Display only interesting", displayLogicLevelsInEngineSniffer field = "#Custom Trigger" field = "total Tooth Count", trigger_customTotalToothCount, {trigger_type == 0} field = "skipped Tooth Count", trigger_customSkippedToothCount, {trigger_type == 0} @@ -2678,7 +2877,6 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" field = "VVT use rise front", vvtCamSensorUseRise, {trigger_type != 80} field = "VVT position display offset", vvtOffset field = "VVT display inverted", vvtDisplayInverted - field = "nbVvtIndex", nbVvtIndex field = "print verbose sync details to console",verboseTriggerSynchDetails field = "Do not print messages in case of sync error", silentTriggerError field = "Enable noise filtering", useNoiselessTriggerDecoder, {trigger_type == 8 || trigger_type == 9} @@ -2798,11 +2996,27 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" field = "TPS low value detection threshold", tpsErrorDetectionTooLow, {tps1_1AdcChannel != 16} field = "TPS high value detection threshold", tpsErrorDetectionTooHigh, {tps1_1AdcChannel != 16} - dialog = pedalSensor, "Accelerator pedal" + dialog = pedalSensorLeft, "Accelerator pedal" field = "Accelerator position sensor", throttlePedalPositionAdcChannel + field = "Up voltage", throttlePedalUpVoltage + field = "Down (WOT) voltage", throttlePedalWOTVoltage field = "Accelerator position 2nd sensor", throttlePedalPositionSecondAdcChannel - field = "Up voltage", throttlePedalUpVoltage - field = "Down (WOT) voltage", throttlePedalWOTVoltage + + dialog = pedalGauges + gauge = pedalPositionGauge + gauge = rawPpsPrimaryGauge + + dialog = pedalSensor, "Accelerator pedal", border + panel = pedalSensorLeft, West + panel = pedalGauges, East + + dialog = mc33Dialog, "GDI Dreams" + field = mc33816_cs, mc33816_cs + field = mc33816_rstb, mc33816_rstb + field = mc33816_flag0, mc33816_flag0 + field = "mc33972 SPI", mc33972spiDevice + field = mc33_hvolt, mc33_hvolt + ; Sensor Inputs dialog = otherSensorInputs, "Other Sensor Inputs" @@ -2829,8 +3043,11 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" field = "Secondary channel", triggerInputPins2, { trigger_type != 0 && trigger_type != 8 && trigger_type != 9 && trigger_type != 18 && trigger_type != 20} field = "Invert Secondary", invertSecondaryTriggerSignal, { trigger_type != 0 && trigger_type != 8 && trigger_type != 9 && trigger_type != 18 && trigger_type != 20} field = "Cam Sync/VVT input", camInputs1 - panel = triggerInputComparator - + +; +; allXXX sections allows a quick overview of used I/O in order to address conflicts mostly, not really to +; configure the features. +; dialog = allPinsSensors, "Sensors" field = "Throttle pedal Position Channel", throttlePedalPositionAdcChannel field = "Primary input channel", triggerInputPins1 @@ -2858,16 +3075,18 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" dialog = allPins1_1 field = mc33816_cs, mc33816_cs field = mc33816_rstb, mc33816_rstb + field = mc33816_flag0, mc33816_flag0 + field = "trigger stimulator pin #1", triggerSimulatorPins1 + field = "trigger stimulator pin #2", triggerSimulatorPins2 + field = "trigger stimulator pin #2", triggerSimulatorPins3 field = high_fuel_pressure_sensor_1, high_fuel_pressure_sensor_1 field = high_fuel_pressure_sensor_2, high_fuel_pressure_sensor_2 field = mc33816_driven, mc33816_driven field = mc33816spiDevice, mc33816spiDevice field = "Warning Led", warningLedPin - ; field = "Fatal Error Led", fatalErrorPin field = "tle6240_cs", tle6240_cs field = "tle6240 SPI", tle6240spiDevice field = "mc33972_cs", mc33972_cs - field = "mc33972 SPI", mc33972spiDevice panel = allPinsSensors dialog = allPins1_2 @@ -2877,32 +3096,27 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" field = "Idle Solenoid Pin", idle_solenoidPin field = "Second Idle Solenoid Pin", secondSolenoidPin field = "Idle Stepper Dir", idle_stepperDirectionPin - field = "Idle Stepper Dir Mode", stepperDirectionPinMode field = "Idle Stepper Step", idle_stepperStepPin field = "Idle Stepper Enable", stepperEnablePin field = "Fuel Pump Pin", fuelPumpPin - field = "Fuel Pump Pin Mode", fuelPumpPinMode field = "ETB#1 Dir #1", etbIo1_directionPin1 field = "ETB#1 Dir #2", etbIo1_directionPin2 field = "ETB#1 Control #1", etbIo1_controlPin1 - field = "etb1_controlPinMode", etbIo1_controlPinMode + field = "ETB#1 Disable", etbIo1_disablePin field = "ETB#2 Dir #1", etbIo2_directionPin1 field = "ETB#2 Dir #2", etbIo2_directionPin2 field = "ETB#2 Control #1", etbIo2_controlPin1 - field = "SD CS Pin", sdCardCsPin + field = "ETB#2 Disable", etbIo2_disablePin + field = "SD CS Pin", sdCardCsPin field = "MIL / Check Engine Pin", malfunctionIndicatorPin - field = "MIL / Check Engine Pin Mode", malfunctionIndicatorPinMode field = "Aux Pin #1", auxPidPins1 field = "Aux Pin #2", auxPidPins2 field = "Aux Pin #3", auxPidPins3 field = "Aux Pin #4", auxPidPins4 field = "test557pin", test557pin field = "Fan Pin", fanPin - field = "Fan Pin Mode", fanPinMode field = "Main Relay Pin", mainRelayPin - field = "Main Relay Mode", mainRelayPinMode - field = "Starter Relay Pin", starterRelayPin - field = "Starter Relay Mode", starterRelayPinMode + field = "Starter Relay Pin", starterRelayDisablePin field = "aux valve #1", auxValves1 field = "aux valve #2", auxValves2 @@ -2968,9 +3182,12 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" field = "output #16", fsioOutputPins16 dialog = allPins2_3 + field = "LCD E pin", HD44780_e + field = "LCD D4 pin", HD44780_db4 + field = "LCD D5 pin", HD44780_db5 + field = "LCD D6 pin", HD44780_db6 + field = "LCD D7 pin", HD44780_db7 field = "Debug Trigger Sync", debugTriggerSync - field = "Debug Timer Callback", debugTimerCallback - field = "Debug Set Timer", debugSetTimer field = "Aux Fast Analog", auxFastSensor1_adcChannel dialog = allPins1_3 @@ -2980,31 +3197,32 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" field = "FSIO ADC #4", fsioAdc4 field = "GPS RX", gps_rx_pin field = "GPS TX", gps_tx_pin - field = "CAN RX pin", canRxPin - field = "CAN TX pin", canTxPin - field = "SPI1 MOSI", spi1mosiPin, {is_enabled_spi_1 == 1} - field = "SPI1 MISO", spi1misoPin, {is_enabled_spi_1 == 1} - field = "SPI1 SCK", spi1sckPin, {is_enabled_spi_1 == 1} - field = "SPI2 MOSI", spi2mosiPin, {is_enabled_spi_2 == 1} - field = "SPI2 MISO", spi2misoPin, {is_enabled_spi_2 == 1} - field = "SPI2 SCK", spi2sckPin, {is_enabled_spi_2 == 1} - field = "SPI3 MOSI", spi3mosiPin, {is_enabled_spi_3 == 1} - field = "SPI3 MISO", spi3misoPin, {is_enabled_spi_3 == 1} - field = "SPI3 SCK", spi3sckPin, {is_enabled_spi_3 == 1} + field = "CAN RX pin", canRxPin + field = "CAN TX pin", canTxPin + field = "SPI1 MOSI", spi1mosiPin, {is_enabled_spi_1 == 1} + field = "SPI1 MISO", spi1misoPin, {is_enabled_spi_1 == 1} + field = "SPI1 SCK", spi1sckPin, {is_enabled_spi_1 == 1} + field = "SPI2 MOSI", spi2mosiPin, {is_enabled_spi_2 == 1} + field = "SPI2 MISO", spi2misoPin, {is_enabled_spi_2 == 1} + field = "SPI2 SCK", spi2sckPin, {is_enabled_spi_2 == 1} + field = "SPI3 MOSI", spi3mosiPin, {is_enabled_spi_3 == 1} + field = "SPI3 MISO", spi3misoPin, {is_enabled_spi_3 == 1} + field = "SPI3 SCK", spi3sckPin, {is_enabled_spi_3 == 1} field = "hip9011CsPin", hip9011CsPin field = "LIS302DLCsPin", LIS302DLCsPin field = "MIL / Check Engine", malfunctionIndicatorPin field = "Saab CDM knock", cdmInputPin field = "comm status light", communicationLedPin field = "running status light", runningLedPin - field = "TLE8888 Chip Select", tle8888_cs - field = "TLE8888 CS Mode", tle8888_csPinMode - field = "TLE 8888 spi", tle8888spiDevice + field = "TLE8888 Chip Select", tle8888_cs + field = "TLE 8888 spi", tle8888spiDevice field = "servo#1", servoOutputPins1 field = "servo#2", servoOutputPins2 field = "servo#3", servoOutputPins3 field = "servo#4", servoOutputPins4 field = "servo#5", servoOutputPins5 + field = "AUX Serial TX", auxSerialTxPin + field = "AUX Serial RX", auxSerialRxPin dialog = allPins1_1_and_2, "", xAxis @@ -3138,9 +3356,10 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" field = "Heater pin", o2heaterPin dialog = egoSettings, "", yAxis - panel = egoSettings_IO, {enableAemXSeries == 0} - panel = egoSettings_sensor, {afr_hwChannel != 16 && enableAemXSeries == 0} + panel = egoSettings_IO + panel = egoSettings_sensor, {afr_hwChannel != 16 && enableAemXSeries == 0 && !auxSerialRxPin && !auxSerialTxPin} field = "Enable AEM X-Series CANbus", enableAemXSeries, { canReadEnabled } + field = "Enable Innovate LC-2 Serial", enableInnovateLC2, { auxSerialRxPin && auxSerialTxPin } ; Engine->EGT inputs dialog = egtInputs, "EGT inputs" @@ -3167,9 +3386,11 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" field = "No1 Direction #1", etbIo1_directionPin1 field = "No1 Direction #2", etbIo1_directionPin2 field = "No1 Control #1", etbIo1_controlPin1, { etb_use_two_wires == 0 } + field = "No1 Disable", etbIo1_disablePin field = "No2 Direction #1", etbIo2_directionPin1 field = "No2 Direction #2", etbIo2_directionPin2 field = "No2 Control #1", etbIo2_controlPin1, { etb_use_two_wires == 0} + field = "No2 Disable", etbIo2_disablePin dialog = idleStepperHw, "Stepper Hardware" field = "Idle Stepper Step Pin", idle_stepperStepPin @@ -3254,27 +3475,33 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" field = "On temperature", fanOnTemperature field = "Off temperature", fanOffTemperature - dialog = fuelPump, "Fuel Rail" + dialog = fuelPumpConfig, "Fuel Pump" field = "Pin", fuelPumpPin field = "Pin mode", fuelPumpPinMode field = "Prime duration", startUpFuelPumpDuration + + dialog = fuelRailConfig, "Fuel Rail" field = "Absolute Fuel Pressure", absoluteFuelPressure field = "Fuel Rail pressure", fuelRailPressure, {absoluteFuelPressure == 1} + dialog = fuelPump, "" + panel = fuelPumpConfig + panel = fuelRailConfig + + ; Controller->Actuator Outputs dialog = mainRelay, "Main relay output" field = "Pin", mainRelayPin field = "Pin mode", mainRelayPinMode dialog = starterRelay, "Starter relay output" - field = "Pin", starterRelayPin - field = "Pin mode", starterRelayPinMode + field = "Pin", starterRelayDisablePin + field = "Pin mode", starterRelayDisableMode dialog = statusLeds, "Status LEDs" field = "Running status LED", runningLedPin field = "TS communication status LED", communicationLedPin field = "Trigger error LED", triggerErrorPin - ; field = "Fatal Error Led", fatalErrorPin ; Engine->MIL Settings dialog = malfunction, "Check Engine Settings" @@ -3400,34 +3627,40 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" field = "Min", alternatorControl_minValue, {isAlternatorControlEnabled == 1 && onOffAlternatorLogic == 0} field = "Max", alternatorControl_maxValue, {isAlternatorControlEnabled == 1 && onOffAlternatorLogic == 0} field = "#% duty = Pterm + Iterm + Dterm + offset%" - field = "Start/Stop Button Pin", startStopButtonPin - field = "Start/Stop Button Mode", startStopButtonMode + dialog = startStopDialog, "Start/Stop Button" + field = "Start/Stop Button Pin", startStopButtonPin + field = "Start/Stop Button Mode", startStopButtonMode + field = "Starter Control", starterControlPin, {startStopButtonPin != 0} + field = "Start cranking maximum time", startCrankingDuration, {startStopButtonPin != 0} dialog = energySystems, "Battery and Alternator Settings", yAxis panel = batteryDialog panel = alternator - - dialog = speedSensorLeft + panel = startStopDialog + + dialog = speedSensorAnalog field = "Input pin", vehicleSpeedSensorInputPin field = "revolution to speed mult", vehicleSpeedCoef + dialog = speedSensorCan + field = "Vss Car Type", canVssNbcType, { enableCanVss } + + dialog = speedSensorLeft, "Speed sensor config", yAxis + panel = speedSensorCan, { enableCanVss } + panel = speedSensorAnalog, { enableCanVss == 0 } + field = "Enable CANbus VSS values", enableCanVss, { canReadEnabled } + dialog = speedSensor, "Speed sensor", xAxis panel = speedSensorLeft gauge = VSSGauge - + ; Engine->Other inputs dialog = analogInputSettings, "Analog Input Settings" field = "!ECU reboot needed to apply these settings" field = "Use fixed baro corr from MAP", useFixedBaroCorrFromMap field = "Analog divider ratio", analogInputDividerCoefficient - field = "Use BiQuad averaging", useBiQuadAnalogFiltering - field = "Smoothing factor", slowAdcAlpha, {useBiQuadAnalogFiltering == 0} - field = "Bi_Q a0", biQuad_a0, {useBiQuadAnalogFiltering == 1} - field = "Bi_Q a1", biQuad_a1, {useBiQuadAnalogFiltering == 1} - field = "Bi_Q a2", biQuad_a2, {useBiQuadAnalogFiltering == 1} - field = "Bi_Q b1", biQuad_b1, {useBiQuadAnalogFiltering == 1} - field = "Bi_Q b2", biQuad_b2, {useBiQuadAnalogFiltering == 1} + field = "Smoothing factor", slowAdcAlpha dialog = tachSettings, "Tachometer output" field = "!See also dizzySparkOutputPin" @@ -3455,8 +3688,13 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" field = "Enable rusEfi CAN data", enableVerboseCanTx field = "rusEfi CAN data base address", verboseCanBaseAddress field = "Can Sleep Period", canSleepPeriodMs - field = "RX pin", canRxPin - field = "TX pin", canTxPin + field = "RX pin", canRxPin + field = "TX pin", canTxPin + + dialog = auxSerial, "AUX Serial" + field = "RX pin", auxSerialRxPin + field = "TX pin", auxSerialTxPin + field = "Serial Baud Rate", auxSerialSpeed dialog = sdCard, "SD Card Logger" field = "SdCard", isSdCardEnabled @@ -3483,19 +3721,19 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" field = "D7 pin", HD44780_db7 dialog = tle8888, "TLE8888", yAxis - field = "TLE8888 Chip Select", tle8888_cs - field = "TLE8888 SPI", tle8888spiDevice - field = "useTLE8888_hall_mode", useTLE8888_hall_mode + field = "TLE8888 Chip Select", tle8888_cs + field = "TLE8888 SPI", tle8888spiDevice + field = "Mode", tle8888mode field = "useTLE8888 cranking reset hack", useTLE8888_cranking_hack commandButton = "Reinit", cmd_tle8888_init dialog = connection, "", yAxis field = "ADC vRef voltage", adcVcc - panel = tsPort + panel = tsPort panel = canBus - panel = sdCard + panel = auxSerial + panel = sdCard panel = gpsReceiver - panel = tle8888 dialog = joystickPanel, "Joystick" field = "joustick center button", joystickCenterPin @@ -3518,6 +3756,8 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" dialog = debugging, "Debug" field = "!https://rusefi.com/s/debugmode" field = "Debug mode", debugMode + field = "Warning Text", warning_message + field = "showHumanReadableWarning (affects Burn)", showHumanReadableWarning dialog = limits, "Limits" @@ -3623,7 +3863,7 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" field = "aux valve #1", auxValves1 field = "aux valve #2", auxValves2 field = "Start/Stop Button", startStopButtonPin - field = "" + field = "External Knock", externalKnockSenseAdc dialog = fsioFrequency, "Frequency" field = "freq #1", fsioFrequency1 @@ -3672,6 +3912,7 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" dialog = fsioFormulas, "FSIO Formulas" field = "!FSIO uses Reverse Polish Notation. Please read http://rusefi.com/s/fsio" + field = "#fsioinfo command in rusEfi console could be useful while troubleshooting those" field = "#1", fsioFormulas1 field = "#2", fsioFormulas2 field = "#3", fsioFormulas3 @@ -3768,43 +4009,37 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" field = "pFactor", etb_pFactor, {throttlePedalPositionAdcChannel != 16} field = "iFactor", etb_iFactor, {throttlePedalPositionAdcChannel != 16} field = "dFactor", etb_dFactor, {throttlePedalPositionAdcChannel != 16} - field = "offset", etb_offset, {throttlePedalPositionAdcChannel != 16} field = "control period", etb_periodMs, {throttlePedalPositionAdcChannel != 16} field = "pid min", etb_minValue, {throttlePedalPositionAdcChannel != 16} field = "pid max", etb_maxValue, {throttlePedalPositionAdcChannel != 16} field = "iTermMin", etb_iTermMin, {throttlePedalPositionAdcChannel != 16} field = "iTermMax", etb_iTermMax, {throttlePedalPositionAdcChannel != 16} + dialog = etbIdleDialog, "ETB Idle" + field = "use ETB for idle", useETBforIdleControl + field = "ETB idle maximum angle", etbIdleThrottleRange dialog = etbDialogLeft field = "https://rusefi.com/s/etb" field = "Detailed status in console", isVerboseETB field = "Pause ETB control", pauseEtbControl - field = "Throttle Pedal Up", throttlePedalUpVoltage - field = "Throttle Pedal Wide Open", throttlePedalWOTVoltage field = etbCalibrationOnStart, etbCalibrationOnStart - field = "TPS#2 min", tps2Min, { tps2_1AdcChannel != 16 } - field = "TPS#2 max", tps2Max, { tps2_1AdcChannel != 16 } ; we need the term about stepper idle in here, because there's a bug in TS that you can't have different visibility ; criteria for the same panel when used in multiple places panel = hbridgeHardware, { throttlePedalPositionAdcChannel != 16 || useStepperIdle && useHbridges } - panel = etbPidDialog + + dialog = etbAutotune, "PID Autotune" + field = "!Set debug mode below to 'ETB Autotune' to show results" + field = "Debug mode", debugMode + commandButton = "ETB PID Autotune", cmd_etb_autotune dialog = etbDialogRight - field = "!https://rusefi.com/s/debugmode" - field = "Neutral Position", etbNeutralPosition - field = "Debug mode", debugMode - field = "use ETB for idle", useETBforIdleControl - field = "ETB idle maximum angle", etbIdleThrottleRange - field = "Press buttons to calibrate sensors" - field = "You would have to remove air filter to move throttle manually" - commandButton = "TPS#1 closed position", cmd_calibrate_tps_1_closed - commandButton = "TPS#1 wide open position", cmd_calibrate_tps_1_wot - field = "Not many vehicles have two throttle bodies but some do" - commandButton = "TPS#2 closed position", cmd_calibrate_tps_2_closed - commandButton = "TPS#2 wide open position", cmd_calibrate_tps_2_wot - commandButton = "Pedal Up", cmd_calibrate_pedal_up - commandButton = "Pedal Down", cmd_calibrate_pedal_down + panel = etbIdleDialog + panel = etbPidDialog + panel = etbAutotune + + ; Neutral position handling not yet implemented! + ;field = "Neutral Position", etbNeutralPosition dialog = etbDialog, "Electronic Throttle Body (beta)", border topicHelp = "etbHelp" @@ -3833,12 +4068,13 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" commandButton = "Injector #8", cmd_test_inj8 dialog = testMisc, "Misc" - commandButton = "Come To Pit", cmd_call_from_pit +; commandButton = "Come To Pit", cmd_call_from_pit commandButton = "Fuel Pump", cmd_test_fuel_pump commandButton = "Radiator Fan", cmd_test_radiator_fan commandButton = "Check Engine", cmd_test_check_engine_light commandButton = "Idle Air Valve", cmd_test_idle_valve commandButton = "A/C Relay", cmd_test_ac_relay + commandButton = "Starter Relay", cmd_test_starter_relay commandButton = "Stop Engine", cmd_stop_engine commandButton = "Write Config", cmd_write_config commandButton = "Reset ECU", cmd_reset_controller @@ -3864,7 +4100,7 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" ; Board->ECU stimulator dialog = ecuStimulator, "ECU stimulator" field = "Trigger Simulator", triggerSimulatorFrequency - field = "self-stimulation", directSelfStimulation + commandButton = "Enable Internal Trigger Simulation", cmd_enable_self_stim field = "" field = "digipot spi", digitalPotentiometerSpiDevice field = "digipot CS #0", digitalPotentiometerChipSelect1 @@ -3941,7 +4177,94 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" field = "Ignition Math Logic @", ignMathCalculateAtIndex field = "MAP Averaging Logic @", mapAveragingSchedulingAtIndex - field = "Target temperature", postCrankingTargetClt + + help = helpGeneral, "rusEfi General Help" + webHelp = "http://www.rusefi.com/" + text = "" + + dialog = gppwm1left, "" + field = "Pin", gppwm1_pin + field = "" + field = "Set frequency to 0hz for on-off mode" + field = "Frequency", gppwm1_pwmFrequency, {gppwm1_pin != 0} + field = "" + field = "On above duty", gppwm1_onAboveDuty, {gppwm1_pin != 0 && gppwm1_pwmFrequency == 0} + field = "Off below duty", gppwm1_offBelowDuty, {gppwm1_pin != 0 && gppwm1_pwmFrequency == 0} + field = "Duty if error", gppwm1_dutyIfError, {gppwm1_pin != 0} + field = "" + field = "Load Axis", gppwm1_loadAxis, {gppwm1_pin != 0} + field = "" + field = "" + field = "" + field = "" + field = "" + + dialog = gppwm1, "General Purpose PWM 1", xAxis + panel = gppwm1left + panel = gppwm1Tbl, {gppwm1_pin != 0} + + dialog = gppwm2left, "" + field = "Pin", gppwm2_pin + field = "" + field = "Set frequency to 0hz for on-off mode" + field = "Frequency", gppwm2_pwmFrequency, {gppwm2_pin != 0} + field = "" + field = "On above duty", gppwm2_onAboveDuty, {gppwm2_pin != 0 && gppwm2_pwmFrequency == 0} + field = "Off below duty", gppwm2_offBelowDuty, {gppwm2_pin != 0 && gppwm2_pwmFrequency == 0} + field = "Duty if error", gppwm2_dutyIfError, {gppwm2_pin != 0} + field = "" + field = "Load Axis", gppwm2_loadAxis, {gppwm2_pin != 0} + field = "" + field = "" + field = "" + field = "" + field = "" + + dialog = gppwm2, "General Purpose PWM 2", xAxis + panel = gppwm2left + panel = gppwm2Tbl, {gppwm2_pin != 0} + + dialog = gppwm3left, "" + field = "Pin", gppwm3_pin + field = "" + field = "Set frequency to 0hz for on-off mode" + field = "Frequency", gppwm3_pwmFrequency, {gppwm3_pin != 0} + field = "" + field = "On above duty", gppwm3_onAboveDuty, {gppwm3_pin != 0 && gppwm3_pwmFrequency == 0} + field = "Off below duty", gppwm3_offBelowDuty, {gppwm3_pin != 0 && gppwm3_pwmFrequency == 0} + field = "Duty if error", gppwm3_dutyIfError, {gppwm3_pin != 0} + field = "" + field = "Load Axis", gppwm3_loadAxis, {gppwm3_pin != 0} + field = "" + field = "" + field = "" + field = "" + field = "" + + dialog = gppwm3, "General Purpose PWM 3", xAxis + panel = gppwm3left + panel = gppwm3Tbl, {gppwm3_pin != 0} + + dialog = gppwm4left, "" + field = "Pin", gppwm4_pin + field = "" + field = "Set frequency to 0hz for on-off mode" + field = "Frequency", gppwm4_pwmFrequency, {gppwm4_pin != 0} + field = "" + field = "On above duty", gppwm4_onAboveDuty, {gppwm4_pin != 0 && gppwm4_pwmFrequency == 0} + field = "Off below duty", gppwm4_offBelowDuty, {gppwm4_pin != 0 && gppwm4_pwmFrequency == 0} + field = "Duty if error", gppwm4_dutyIfError, {gppwm4_pin != 0} + field = "" + field = "Load Axis", gppwm4_loadAxis, {gppwm4_pin != 0} + field = "" + field = "" + field = "" + field = "" + field = "" + + dialog = gppwm4, "General Purpose PWM 4", xAxis + panel = gppwm4left + panel = gppwm4Tbl, {gppwm4_pin != 0} [Tools] ;addTool = toolName, PanelName diff --git a/firmware/tunerstudio/rusefi_proteus.ini b/firmware/tunerstudio/rusefi_proteus.ini index 5d71a983f3..d934842142 100644 --- a/firmware/tunerstudio/rusefi_proteus.ini +++ b/firmware/tunerstudio/rusefi_proteus.ini @@ -40,11 +40,14 @@ enable2ndByteCanID = false ; settingOption = DEFAULT, "Speed Density" ; DEFAULT will be over looked and this will fall into the #else block of the statement. +[MegaTune] + ; https://rusefi.com/forum/viewtopic.php?p=36201#p36201 + signature = "rusEFI v1.2020.4" [TunerStudio] queryCommand = "S" versionInfo = "V" ; firmwave version for title bar. - signature = "rusEFI v1.2020.3" ; signature is expected to be 7 or more characters. + signature = "rusEFI v1.2020.4" ; signature is expected to be 7 or more characters. [Constants] ; new packet serial format with CRC @@ -66,6 +69,7 @@ enable2ndByteCanID = false ; we have current pageSize or (pageSize + 8) here? ; crc32CheckCommand = "k\x00\x00\x00\x00\x36\xB8" + retrieveConfigError = "e" ;communication settings pageActivationDelay = 500 ; Milliseconds delay after burn command. See https://sourceforge.net/p/rusefi/tickets/77/ @@ -85,7 +89,7 @@ enable2ndByteCanID = false ; see PAGE_0_SIZE in C source code ; CONFIG_DEFINITION_START -; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on integration\rusefi_config.txt Fri Mar 20 19:58:59 EDT 2020 +; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.bat integration\rusefi_config.txt Sun Apr 26 14:18:02 EDT 2020 pageSize = 20000 page = 1 @@ -94,7 +98,7 @@ page = 1 injector_flow = scalar, F32, 8, "cm3/min", 1, 0, 0, 99999, 2 injector_battLagCorrBins = array, F32, 12, [8], "volts", 1, 0, 0.0, 20.0, 2 injector_battLagCorr = array, F32, 44, [8], "ms", 1, 0, 0.0, 50.0, 2 - directSelfStimulation = bits, U32, 76, [0:0], "false", "true" + unused76b0 = bits, U32, 76, [0:0], "false", "true" activateAuxPid1 = bits, U32, 76, [1:1], "false", "true" isVerboseAuxPid1 = bits, U32, 76, [2:2], "false", "true" activateAuxPid2 = bits, U32, 76, [3:3], "false", "true" @@ -103,14 +107,14 @@ page = 1 isVerboseAuxPid3 = bits, U32, 76, [6:6], "false", "true" activateAuxPid4 = bits, U32, 76, [7:7], "false", "true" isVerboseAuxPid4 = bits, U32, 76, [8:8], "false", "true" - useBiQuadAnalogFiltering= bits, U32, 76, [9:9], "false", "true" + isCJ125Verbose = bits, U32, 76, [9:9], "false", "true" cj125isUaDivided = bits, U32, 76, [10:10], "false", "true" cj125isLsu49 = bits, U32, 76, [11:11], "false", "true" etb_use_two_wires = bits, U32, 76, [12:12], "false", "true" isDoubleSolenoidIdle = bits, U32, 76, [13:13], "false", "true" showSdCardWarning = bits, U32, 76, [14:14], "false", "true" cj125isUrDivided = bits, U32, 76, [15:15], "false", "true" - useTLE8888_hall_mode = bits, U32, 76, [16:16], "false", "true" + issue_294_unused = bits, U32, 76, [16:16], "false", "true" useTLE8888_cranking_hack= bits, U32, 76, [17:17], "false", "true" useInstantRpmForIdle = bits, U32, 76, [18:18], "false", "true" absoluteFuelPressure = bits, U32, 76, [19:19], "false", "true" @@ -118,7 +122,7 @@ page = 1 rollingLaunchEnabled = bits, U32, 76, [21:21], "false", "true" antiLagEnabled = bits, U32, 76, [22:22], "false", "true" useRunningMathForCranking= bits, U32, 76, [23:23], "Fixed", "Fuel Map" - issue_294_25 = bits, U32, 76, [24:24], "false", "true" + displayLogicLevelsInEngineSniffer= bits, U32, 76, [24:24], "false", "true" issue_294_26 = bits, U32, 76, [25:25], "false", "true" issue_294_27 = bits, U32, 76, [26:26], "false", "true" issue_294_28 = bits, U32, 76, [27:27], "false", "true" @@ -190,7 +194,7 @@ page = 1 fanOnTemperature = scalar, F32, 468, "*C", 1, 0, 0, 1000.0, 0 fanOffTemperature = scalar, F32, 472, "*C", 1, 0, 0, 1000.0, 0 vehicleSpeedCoef = scalar, F32, 476, "coef", 1, 0, 0.01, 2000.0, 2 - canNbcType = bits, U32, 480, [0:7], "BMW", "FIAT", "VAG" , "MAZDA RX8" + canNbcType = bits, U32, 480, [0:7], "None", "FIAT", "VAG" , "MAZDA RX8", "BMW", "W202" canSleepPeriodMs = scalar, S32, 484, "ms", 1, 0, 0, 1000.0, 2 ambiguousOperationMode = bits, U32, 488, [0:7], "INVALID", "4 stroke without cam sensor", "4 stroke with cam sensor", "2 stroke", "4 stroke with symmetrical crank (requires VVT input)", "INVALID", "INVALID", "INVALID" displayMode = bits, U32, 492, [0:7], "none", "hd44780", "hd44780 over pcf8574", "INVALID" @@ -204,9 +208,9 @@ page = 1 tps2_1AdcChannel = bits, U08, 515, [0:7] "Analog Volt 5","Analog Volt 6","Analog Volt 7","Analog Volt 8","Analog Volt 9","Analog Volt 10","Analog Volt 11","Analog Volt 12","Analog Temp 3","Analog Temp 4","Analog Volt 1","Analog Volt 2","Analog Volt 3","Analog Volt 4","Analog Temp 1","Analog Temp 2","NONE","INVALID","INVALID","INVALID" ;no TS info - skipping overrideCrankingIgnition offset 516 sensorChartFrequency = scalar, S32, 520, "index", 1, 0, 0, 300, 0 ; size 4 - trigger_type = bits, U32, 524, [0:7], "custom toothed wheel", "Ford Aspire", "Dodge Neon 1995", "Miata NA", "Miata NB", "GM_7X", "Cooper R50", "Mazda SOHC 4", "60/2", "36/1", "Honda 4+24+1", "Mitsubishi", "Honda 4+24", "Honda 1+4+24", "Dodge Neon 2003", "Mazda DOHC 1+4", "1+1", "1+60/2", "Single Tooth", "Dodge Ram 1+16", "60/2 VW", "Honda 1+24", "Dodge Stratus", "36_2_2_2", "Nissan Primera", "2JZ", "Rover K", "GM LS 24", "Honda CBR 600", "2JZ_1_12", "Honda CBR 600 custom", "3/1 skipped" , "Dodge Neon 2003 crank", "Miata VVT", "trg34", "trg35", "Subaru 7+6", "Jeep 18-2-2-2", "WIP", "Dodge Neon 1995 crank only", "Jeep XJ 4 cyl", "FiatIAQ_P8", "Mazda Z5", "trg43", "trg44", "trg45", "INVALID" - trigger_unusedTriggerBit0= bits, U32, 528, [0:0], "false", "true" - trigger_unusedTriggerBit1= bits, U32, 528, [1:1], "false", "true" + trigger_type = bits, U32, 524, [0:7], "custom toothed wheel", "Ford Aspire", "Dodge Neon 1995", "Miata NA", "Miata NB", "GM_7X", "Cooper R50", "Mazda SOHC 4", "60/2", "36/1", "Honda 4+24+1", "Mitsubishi", "Honda 4+24", "Honda 1+4+24", "Dodge Neon 2003", "Mazda DOHC 1+4", "1+1", "1+60/2", "Single Tooth", "Dodge Ram 1+16", "60/2 VW", "Honda 1+24", "Dodge Stratus", "36_2_2_2", "Nissan Primera", "2JZ", "Rover K", "GM LS 24", "Honda CBR 600", "2JZ_1_12", "Honda CBR 600 custom", "3/1 skipped" , "Dodge Neon 2003 crank", "Miata VVT", "trg34", "trg35", "Subaru 7+6", "Jeep 18-2-2-2", "WIP", "Dodge Neon 1995 crank only", "Jeep XJ 4 cyl", "FiatIAQ_P8", "Mazda Z5", "trg43", "Renix 44-2-2", "Renix 66-2-2-2", "Honda K 12+1", "trg47", "trg48", "INVALID" + trigger_todoRemoveMeOneDay0= bits, U32, 528, [0:0], "false", "true" + trigger_todoRemoveMeOneDay1= bits, U32, 528, [1:1], "false", "true" trigger_useOnlyFirstChannel= bits, U32, 528, [2:2], "false", "true" trigger_unusedBit_4_3 = bits, U32, 528, [3:3], "false", "true" trigger_unusedBit_4_4 = bits, U32, 528, [4:4], "false", "true" @@ -245,7 +249,7 @@ page = 1 mafAdcChannel = bits, U08, 543, [0:7] "Analog Volt 5","Analog Volt 6","Analog Volt 7","Analog Volt 8","Analog Volt 9","Analog Volt 10","Analog Volt 11","Analog Volt 12","Analog Temp 3","Analog Temp 4","Analog Volt 1","Analog Volt 2","Analog Volt 3","Analog Volt 4","Analog Temp 1","Analog Temp 2","NONE","INVALID","INVALID","INVALID" globalFuelCorrection = scalar, F32, 544, "coef", 1, 0.0, 0, 1000.0, 2 adcVcc = scalar, F32, 548, "volts", 1, 0.0, 0, 6.0, 3 -;no TS info - skipping maxKnockSubDeg offset 552 + maxKnockSubDeg = scalar, F32, 552, "Deg", 1, 0, 0, 100, 0 camInputs1 = bits, U08, 556, [0:7], "NONE","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","Digital 1","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","VR 1","VR 2","INVALID","INVALID","Digital 2","Digital 3","Digital 4","Digital 5","Digital 6","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID" camInputs2 = bits, U08, 557, [0:7], "NONE","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","Digital 1","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","VR 1","VR 2","INVALID","INVALID","Digital 2","Digital 3","Digital 4","Digital 5","Digital 6","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID" camInputs3 = bits, U08, 558, [0:7], "NONE","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","Digital 1","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","VR 1","VR 2","INVALID","INVALID","Digital 2","Digital 3","Digital 4","Digital 5","Digital 6","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID" @@ -349,13 +353,13 @@ page = 1 canTxPin = bits, U08, 708, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" canRxPin = bits, U08, 709, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" throttlePedalUpPinMode = scalar, U08, 710, "todo", 1, 0, 0, 20, 1 - debugTimerCallback = bits, U08, 711, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" +;no TS info - skipping unused711 offset 711 ;no TS info - skipping idleThreadPeriodMs offset 712 ;no TS info - skipping consoleLoopPeriodMs offset 716 ;no TS info - skipping lcdThreadPeriodMs offset 720 ;no TS info - skipping generalPeriodicThreadPeriodMs offset 724 tunerStudioSerialSpeed = scalar, U32, 728, "BPs", 1, 0, 0,1000000, 0 - canDeviceMode = bits, U32, 732, [0:7], "v0", "v1" +;no TS info - skipping anUnused4Bytes offset 732 triggerSimulatorPins1 = bits, U08, 736, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" triggerSimulatorPins2 = bits, U08, 737, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" triggerSimulatorPins3 = bits, U08, 738, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" @@ -405,7 +409,8 @@ page = 1 hip9011IntHoldPin = bits, U08, 754, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" hip9011IntHoldPinMode = bits, U08, 755, [0:7], "default", "default inverted", "open collector", "open collector inverted" verboseCanBaseAddress = scalar, U32, 756, "", 1, 0, 0, 536870911, 0 -;no TS info - skipping unrealisticRpmThreashold offset 760 + mc33_hvolt = scalar, U08, 760, "v", 1, 0, 0, 100, 0 +;no TS info - skipping unusedHere offset 761 gpioPinModes1 = bits, U08, 764, [0:7], "default", "default inverted", "open collector", "open collector inverted" gpioPinModes2 = bits, U08, 765, [0:7], "default", "default inverted", "open collector", "open collector inverted" gpioPinModes3 = bits, U08, 766, [0:7], "default", "default inverted", "open collector", "open collector inverted" @@ -447,7 +452,7 @@ page = 1 max31855_cs7 = bits, U08, 802, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" max31855_cs8 = bits, U08, 803, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" sdCardPeriodMs = scalar, S16, 804, "ms", 1, 0, 0, 30000, 0 - debugSetTimer = bits, U08, 806, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" +;no TS info - skipping unused806 offset 806 debugMapAveraging = bits, U08, 807, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" starterRelayDisablePin = bits, U08, 808, [0:7], "NONE","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","Highside 2","Highside 1","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","Lowside 8","Lowside 9","Lowside 10","Lowside 11","Lowside 12","Lowside 13","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","Ign 5","Ign 4","Ign 3","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","Ign 2","Ign 1","INVALID","INVALID","Lowside 1","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","Highside 4","Highside 3","Lowside 14","Lowside 15","Lowside 16","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","Ign 12","Ign 11","Ign 10","Ign 9","Ign 8","Ign 7","Ign 6","Lowside 2","Lowside 3","Lowside 4","Lowside 5","Lowside 6","Lowside 7","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID" starterRelayDisableMode = bits, U08, 809, [0:7], "default", "default inverted", "open collector", "open collector inverted" @@ -456,8 +461,9 @@ page = 1 mapMinBufferLength = scalar, S32, 812, "count", 1, 0, 0, 24, 0 idlePidDeactivationTpsThreshold = scalar, S16, 816, "%", 1, 0, 0, 100.0, 0 stepperParkingExtraSteps = scalar, S16, 818, "%", 1, 0, 0, 3000.0, 0 - unusedmiataNb2VVTRatioFrom = scalar, F32, 820, "value", 1, 0, 0, 1000, 5 - unusedmiataNb2VVTRatioTo = scalar, F32, 824, "value", 1, 0, 0, 1000, 5 +;no TS info - skipping unusedAntilagTimeout offset 820 +;no TS info - skipping antiLagRpmTreshold offset 824 + startCrankingDuration = scalar, S16, 826, "Seconds", 1, 0, 0, 30, 0 triggerErrorPin = bits, U08, 828, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" triggerErrorPinMode = bits, U08, 829, [0:7], "default", "default inverted", "open collector", "open collector inverted" acRelayPin = bits, U08, 830, [0:7], "NONE","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","Highside 2","Highside 1","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","Lowside 8","Lowside 9","Lowside 10","Lowside 11","Lowside 12","Lowside 13","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","Ign 5","Ign 4","Ign 3","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","Ign 2","Ign 1","INVALID","INVALID","Lowside 1","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","Highside 4","Highside 3","Lowside 14","Lowside 15","Lowside 16","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","Ign 12","Ign 11","Ign 10","Ign 9","Ign 8","Ign 7","Ign 6","Lowside 2","Lowside 3","Lowside 4","Lowside 5","Lowside 6","Lowside 7","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID" @@ -539,12 +545,12 @@ page = 1 todoClutchDownPinInverted= bits, U32, 976, [1:1], "false", "true" useHbridges = bits, U32, 976, [2:2], "false", "true" multisparkEnable = bits, U32, 976, [3:3], "false", "true" - unusedBit_251_4 = bits, U32, 976, [4:4], "false", "true" - unusedBit_251_5 = bits, U32, 976, [5:5], "false", "true" - unusedBit_251_6 = bits, U32, 976, [6:6], "false", "true" - unusedBit_251_7 = bits, U32, 976, [7:7], "false", "true" - unusedBit_251_8 = bits, U32, 976, [8:8], "false", "true" - unusedBit_251_9 = bits, U32, 976, [9:9], "false", "true" + enableLaunchRetard = bits, U32, 976, [4:4], "false", "true" + enableLaunchBoost = bits, U32, 976, [5:5], "false", "true" + launchDisableBySpeed = bits, U32, 976, [6:6], "false", "true" + enableCanVss = bits, U32, 976, [7:7], "false", "true" + enableInnovateLC2 = bits, U32, 976, [8:8], "false", "true" + showHumanReadableWarning= bits, U32, 976, [9:9], "false", "true" unusedBit_251_10 = bits, U32, 976, [10:10], "false", "true" unusedBit_251_11 = bits, U32, 976, [11:11], "false", "true" unusedBit_251_12 = bits, U32, 976, [12:12], "false", "true" @@ -565,16 +571,16 @@ page = 1 unusedBit_251_27 = bits, U32, 976, [27:27], "false", "true" unusedBit_251_28 = bits, U32, 976, [28:28], "false", "true" unusedBit_251_29 = bits, U32, 976, [29:29], "false", "true" - unusedBit_280_30 = bits, U32, 976, [30:30], "false", "true" - unusedBit_280_31 = bits, U32, 976, [31:31], "false", "true" + unusedBit_282_30 = bits, U32, 976, [30:30], "false", "true" + unusedBit_282_31 = bits, U32, 976, [31:31], "false", "true" etbIo1_directionPin1 = bits, U08, 980, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" etbIo1_directionPin2 = bits, U08, 981, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" etbIo1_controlPin1 = bits, U08, 982, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" - etbIo1_controlPinMode = bits, U08, 983, [0:7], "default", "default inverted", "open collector", "open collector inverted" + etbIo1_disablePin = bits, U08, 983, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" etbIo2_directionPin1 = bits, U08, 984, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" etbIo2_directionPin2 = bits, U08, 985, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" etbIo2_controlPin1 = bits, U08, 986, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" - etbIo2_controlPinMode = bits, U08, 987, [0:7], "default", "default inverted", "open collector", "open collector inverted" + etbIo2_disablePin = bits, U08, 987, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" boostControlPin = bits, U08, 988, [0:7], "NONE","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","Highside 2","Highside 1","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","Lowside 8","Lowside 9","Lowside 10","Lowside 11","Lowside 12","Lowside 13","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","Ign 5","Ign 4","Ign 3","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","Ign 2","Ign 1","INVALID","INVALID","Lowside 1","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","Highside 4","Highside 3","Lowside 14","Lowside 15","Lowside 16","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","Ign 12","Ign 11","Ign 10","Ign 9","Ign 8","Ign 7","Ign 6","Lowside 2","Lowside 3","Lowside 4","Lowside 5","Lowside 6","Lowside 7","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID" boostControlPinMode = bits, U08, 989, [0:7], "default", "default inverted", "open collector", "open collector inverted" antiLagActivatePin = bits, U08, 990, [0:7], "NONE","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","Digital 1","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","Digital 2","Digital 3","Digital 4","Digital 5","Digital 6","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID" @@ -596,7 +602,30 @@ page = 1 launchFuelAdded = scalar, S32, 1040, "%", 1, 0, 0, 100.0, 0 launchBoostDuty = scalar, S32, 1044, "%", 1, 0, 0, 100.0, 0 hardCutRpmRange = scalar, S32, 1048, "rpm", 1, 0, 0, 3000.0, 2 -;no TS info - skipping unusedAtOldBoardConfigurationEnd offset 1052 +;no TS info - skipping launchAdvanceRpmRange offset 1052 +;no TS info - skipping launchTpsTreshold offset 1056 +;no TS info - skipping launchActivateDelay offset 1060 + stft_maxIdleRegionRpm = scalar, U08, 1064, "RPM", 50, 0, 0.0, 12000.0, 0 + stft_maxOverrunLoad = scalar, U08, 1065, "load", 1, 0, 0.0, 250, 0 + stft_minPowerLoad = scalar, U08, 1066, "load", 1, 0, 0.0, 250, 0 + stft_deadband = scalar, U08, 1067, "%", 0.1, 0, 0, 3, 1 + stft_minClt = scalar, S08, 1068, "C", 1, 0, -20, 100, 0 + stft_minAfr = scalar, U08, 1069, "afr", 0.1, 0, 10, 20, 1 + stft_maxAfr = scalar, U08, 1070, "afr", 0.1, 0, 10, 20, 1 + stft_startupDelay = scalar, U08, 1071, "seconds", 1, 0, 0, 250, 0 + stft_cellCfgs1_maxAdd = scalar, S08, 1072, "%", 1, 0, 0, 25, 0 + stft_cellCfgs1_maxRemove = scalar, S08, 1073, "%", 1, 0, -25, 0, 0 + stft_cellCfgs1_timeConstant = scalar, U16, 1074, "sec", 0.1, 0, 0.1, 100, 2 + stft_cellCfgs2_maxAdd = scalar, S08, 1076, "%", 1, 0, 0, 25, 0 + stft_cellCfgs2_maxRemove = scalar, S08, 1077, "%", 1, 0, -25, 0, 0 + stft_cellCfgs2_timeConstant = scalar, U16, 1078, "sec", 0.1, 0, 0.1, 100, 2 + stft_cellCfgs3_maxAdd = scalar, S08, 1080, "%", 1, 0, 0, 25, 0 + stft_cellCfgs3_maxRemove = scalar, S08, 1081, "%", 1, 0, -25, 0, 0 + stft_cellCfgs3_timeConstant = scalar, U16, 1082, "sec", 0.1, 0, 0.1, 100, 2 + stft_cellCfgs4_maxAdd = scalar, S08, 1084, "%", 1, 0, 0, 25, 0 + stft_cellCfgs4_maxRemove = scalar, S08, 1085, "%", 1, 0, -25, 0, 0 + stft_cellCfgs4_timeConstant = scalar, U16, 1086, "sec", 0.1, 0, 0.1, 100, 2 +;no TS info - skipping unusedAtOldBoardConfigurationEnd offset 1088 vvtDisplayInverted = bits, U32, 1464, [0:0], "false", "true" fuelClosedLoopCorrectionEnabled= bits, U32, 1464, [1:1], "false", "true" isVerboseIAC = bits, U32, 1464, [2:2], "false", "true" @@ -726,7 +755,7 @@ page = 1 tps2Max = scalar, S16, 1770, "ADC", 1, 0, 0, 1023, 0 starterControlPin = bits, U08, 1772, [0:7], "NONE","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","Highside 2","Highside 1","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","Lowside 8","Lowside 9","Lowside 10","Lowside 11","Lowside 12","Lowside 13","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","Ign 5","Ign 4","Ign 3","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","Ign 2","Ign 1","INVALID","INVALID","Lowside 1","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","Highside 4","Highside 3","Lowside 14","Lowside 15","Lowside 16","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","Ign 12","Ign 11","Ign 10","Ign 9","Ign 8","Ign 7","Ign 6","Lowside 2","Lowside 3","Lowside 4","Lowside 5","Lowside 6","Lowside 7","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID" startStopButtonMode = scalar, U08, 1773, "todo", 1, 0, 0, 20, 1 -;no TS info - skipping unusedFormerWarmupAfrPid offset 1774 + mc33816_flag0 = bits, U08, 1774, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" tachPulsePerRev = scalar, U08, 1775, "Pulse", 1, 0, 1.0, 255.0, 0 mapErrorDetectionTooLow = scalar, F32, 1776, "kPa", 1, 0, -100.0, 100.0, 2 mapErrorDetectionTooHigh = scalar, F32, 1780, "kPa", 1, 0, -100.0, 800.0, 2 @@ -761,9 +790,9 @@ page = 1 startOfCrankingPrimingPulse = scalar, F32, 2032, "ms", 1, 0, 0, 200, 1 afterCrankingIACtaperDuration = scalar, S16, 2036, "cycles", 1, 0, 0, 5000, 0 iacByTpsTaper = scalar, S16, 2038, "percent", 1, 0, 0, 500, 0 - unusedErrorPin = bits, U08, 2040, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" + auxSerialTxPin = bits, U08, 2040, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" warningLedPin = bits, U08, 2041, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" - unused1234234 = bits, U08, 2042, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" + auxSerialRxPin = bits, U08, 2042, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" LIS302DLCsPin = bits, U08, 2043, [0:7], "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6","PE7","PE8","PE9","PE10","PE11","PE12","PE13","PE14","PE15", "PF0","PF1","PF2","PF3","PF4","PF5","PF6","PF7","PF8","PF9","PF10","PF11","PF12","PF13","PF14","PF15", "PG0","PG1","PG2","PG3","PG4","PG5","PG6","PG7","PG8","PG9","PG10","PG11","PG12","PG13","PG14","PG15", "PH0","PH1","PH2","PH3","PH4","PH5","PH6","PH7","PH8","PH9","PH10","PH11","PH12","PH13","PH14","PH15","INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" tpsAccelLength = scalar, S32, 2044, "cycles", 1, 0, 1, 200, 0 tpsAccelEnrichmentThreshold = scalar, F32, 2048, "roc", 1, 0, 0, 200, 3 @@ -777,8 +806,9 @@ page = 1 tpsDecelEnleanmentThreshold = scalar, F32, 2080, "roc", 1, 0, 0, 200, 3 tpsDecelEnleanmentMultiplier = scalar, F32, 2084, "coeff", 1, 0, 0, 200, 3 slowAdcAlpha = scalar, F32, 2088, "coeff", 1, 0, 0, 200, 3 - debugMode = bits, U32, 2092, [0:7], "Alternator PID", "TPS acceleration enrichment", "INVALID", "Idle Control", "Engine Load accl enrich", "Trigger Counters", "FSIO_ADC", "AUX_PID_1", "VVT input", "Cranking", "Timing", "Closed-loop fuel corr PID", "VSS", "SD card", "sr5", "Knock", "Trigger Sync", "Electronic Throttle", "Executor", "Bench Test / TS commands", "Aux Valves", "Analog inputs #1", "INSTANT_RPM", "FSIO_EXPRESSION", "Status", "CJ125", "CAN", "MAP", "Metrics", "ETB#2", "Ion Sense", "TLE8888", "Analog inputs #2", "Dwell Metric", "Aux Temperature", "ETB Logic", "Boost Control" -;no TS info - skipping unused_former_warmup_target_afr offset 2096 + debugMode = bits, U32, 2092, [0:7], "Alternator PID", "TPS acceleration enrichment", "INVALID", "Idle Control", "Engine Load accl enrich", "Trigger Counters", "FSIO_ADC", "AUX_PID_1", "VVT input", "Cranking", "Timing", "Closed-loop fuel corr PID", "VSS", "SD card", "sr5", "Knock", "mode16", "Electronic Throttle", "Executor", "Bench Test / TS commands", "Aux Valves", "Analog inputs #1", "INSTANT_RPM", "FSIO_EXPRESSION", "Status", "CJ125", "CAN", "MAP", "Metrics", "ETB#2", "Ion Sense", "TLE8888", "Analog inputs #2", "Dwell Metric", "INVALID", "ETB Logic", "Boost Control", "Start/Stop", "Launch", "ETB Autotune", "Mode40" + auxSerialSpeed = scalar, U32, 2096, "BPs", 1, 0, 0,1000000, 0 +;no TS info - skipping unused_former_warmup_target_afr offset 2100 boostCutPressure = scalar, F32, 2132, "kPa", 1, 0, 0, 500, 0 mapAccelTaperBins = array, F32, 2136, [8], "counter", 1, 0, 0.0, 300, 0 mapAccelTaperMult = array, F32, 2168, [8], "mult", 1, 0, 0.0, 300, 2 @@ -812,18 +842,15 @@ page = 1 narrowToWideOxygenBins = array, F32, 2264, [8], "V", 1, 0, -10.0, 10.0, 3 narrowToWideOxygen = array, F32, 2296, [8], "ratio", 1, 0, -40.0, 40.0, 2 vvtMode = bits, U32, 2328, [0:7], "First half", "Second half", "2GZ", "Miata NB2", "mode4", "mode5", "mode6", "mode7" - biQuad_a0 = scalar, F32, 2332, "v", 1, 0, -1000, 1000, 9 - biQuad_a1 = scalar, F32, 2336, "v", 1, 0, -1000, 1000, 9 - biQuad_a2 = scalar, F32, 2340, "v", 1, 0, -1000, 1000, 9 - biQuad_b1 = scalar, F32, 2344, "v", 1, 0, -1000, 1000, 9 - biQuad_b2 = scalar, F32, 2348, "v", 1, 0, -1000, 1000, 9 +;no TS info - skipping unusedOldBiquad offset 2332 cltTimingBins = array, F32, 2352, [8], "C", 1, 0, -100.0, 250.0, 1 cltTimingExtra = array, F32, 2384, [8], "degree", 1, 0, -400.0, 400.0, 0 - nbVvtIndex = scalar, S32, 2416, "index", 1, 0, 0, 4.0, 0 + tle8888mode = bits, U08, 2416, [0:7], "Auto", "SemiAuto", "Manual", "Hall" +;no TS info - skipping unusedSomethingWasHere offset 2417 ;no TS info - skipping autoTuneCltThreshold offset 2420 ;no TS info - skipping autoTuneTpsRocThreshold offset 2424 ;no TS info - skipping autoTuneTpsQuietPeriod offset 2428 - postCrankingTargetClt = scalar, F32, 2432, "C", 1, 0, 0, 100, 0 +;no TS info - skipping unused2432 offset 2432 postCrankingFactor = scalar, F32, 2436, "mult", 1, 0, 0, 100, 4 postCrankingDurationSec = scalar, F32, 2440, "seconds", 1, 0, 0, 100, 2 auxTempSensor1_tempC_1 = scalar, F32, 2444, "*C", 1, 0, -40, 200, 1 @@ -1010,13 +1037,59 @@ page = 1 iacPidMultTable = array, U08, 4060, [8x8],"%", 1, 0, 0, 999, 2 iacPidMultLoadBins = array, U08, 4124, [8], "Load", 1, 0.0, 0, 500.0, 2 iacPidMultRpmBins = array, U08, 4132, [8], "RPM", 50, 0, 0.0, 12000.0, 0 -;no TS info - skipping mainUnusedEnd offset 4140 + canVssNbcType = bits, U32, 4140, [0:7], "BMW_e46", "W202" + gppwm1_pin = bits, U08, 4144, [0:7], "NONE","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","Highside 2","Highside 1","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","Lowside 8","Lowside 9","Lowside 10","Lowside 11","Lowside 12","Lowside 13","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","Ign 5","Ign 4","Ign 3","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","Ign 2","Ign 1","INVALID","INVALID","Lowside 1","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","Highside 4","Highside 3","Lowside 14","Lowside 15","Lowside 16","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","Ign 12","Ign 11","Ign 10","Ign 9","Ign 8","Ign 7","Ign 6","Lowside 2","Lowside 3","Lowside 4","Lowside 5","Lowside 6","Lowside 7","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID" + gppwm1_dutyIfError = scalar, U08, 4145, "%", 1, 0, 0, 100, 0 + gppwm1_pwmFrequency = scalar, U16, 4146, "hz", 1, 0, 0, 500, 0 + gppwm1_onAboveDuty = scalar, U08, 4148, "%", 1, 0, 0, 100, 0 + gppwm1_offBelowDuty = scalar, U08, 4149, "%", 1, 0, 0, 100, 0 + gppwm1_loadAxis = bits, U08, 4150, [0:1], "TPS", "MAP", "CLT", "IAT" +;no TS info - skipping gppwm1_pad offset 4151 + gppwm1_loadBins = array, U08, 4152, [8], "load", 1, 0, 0.0, 250, 0 + gppwm1_rpmBins = array, U08, 4160, [8], "RPM", 50, 0, 0.0, 12000.0, 0 + gppwm1_table = array, U08, 4168, [8x8], "duty", 1, 0, 0, 100, 0 + gppwm2_pin = bits, U08, 4232, [0:7], "NONE","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","Highside 2","Highside 1","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","Lowside 8","Lowside 9","Lowside 10","Lowside 11","Lowside 12","Lowside 13","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","Ign 5","Ign 4","Ign 3","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","Ign 2","Ign 1","INVALID","INVALID","Lowside 1","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","Highside 4","Highside 3","Lowside 14","Lowside 15","Lowside 16","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","Ign 12","Ign 11","Ign 10","Ign 9","Ign 8","Ign 7","Ign 6","Lowside 2","Lowside 3","Lowside 4","Lowside 5","Lowside 6","Lowside 7","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID" + gppwm2_dutyIfError = scalar, U08, 4233, "%", 1, 0, 0, 100, 0 + gppwm2_pwmFrequency = scalar, U16, 4234, "hz", 1, 0, 0, 500, 0 + gppwm2_onAboveDuty = scalar, U08, 4236, "%", 1, 0, 0, 100, 0 + gppwm2_offBelowDuty = scalar, U08, 4237, "%", 1, 0, 0, 100, 0 + gppwm2_loadAxis = bits, U08, 4238, [0:1], "TPS", "MAP", "CLT", "IAT" +;no TS info - skipping gppwm2_pad offset 4239 + gppwm2_loadBins = array, U08, 4240, [8], "load", 1, 0, 0.0, 250, 0 + gppwm2_rpmBins = array, U08, 4248, [8], "RPM", 50, 0, 0.0, 12000.0, 0 + gppwm2_table = array, U08, 4256, [8x8], "duty", 1, 0, 0, 100, 0 + gppwm3_pin = bits, U08, 4320, [0:7], "NONE","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","Highside 2","Highside 1","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","Lowside 8","Lowside 9","Lowside 10","Lowside 11","Lowside 12","Lowside 13","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","Ign 5","Ign 4","Ign 3","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","Ign 2","Ign 1","INVALID","INVALID","Lowside 1","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","Highside 4","Highside 3","Lowside 14","Lowside 15","Lowside 16","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","Ign 12","Ign 11","Ign 10","Ign 9","Ign 8","Ign 7","Ign 6","Lowside 2","Lowside 3","Lowside 4","Lowside 5","Lowside 6","Lowside 7","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID" + gppwm3_dutyIfError = scalar, U08, 4321, "%", 1, 0, 0, 100, 0 + gppwm3_pwmFrequency = scalar, U16, 4322, "hz", 1, 0, 0, 500, 0 + gppwm3_onAboveDuty = scalar, U08, 4324, "%", 1, 0, 0, 100, 0 + gppwm3_offBelowDuty = scalar, U08, 4325, "%", 1, 0, 0, 100, 0 + gppwm3_loadAxis = bits, U08, 4326, [0:1], "TPS", "MAP", "CLT", "IAT" +;no TS info - skipping gppwm3_pad offset 4327 + gppwm3_loadBins = array, U08, 4328, [8], "load", 1, 0, 0.0, 250, 0 + gppwm3_rpmBins = array, U08, 4336, [8], "RPM", 50, 0, 0.0, 12000.0, 0 + gppwm3_table = array, U08, 4344, [8x8], "duty", 1, 0, 0, 100, 0 + gppwm4_pin = bits, U08, 4408, [0:7], "NONE","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","Highside 2","Highside 1","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","Lowside 8","Lowside 9","Lowside 10","Lowside 11","Lowside 12","Lowside 13","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","Ign 5","Ign 4","Ign 3","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","Ign 2","Ign 1","INVALID","INVALID","Lowside 1","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","Highside 4","Highside 3","Lowside 14","Lowside 15","Lowside 16","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","Ign 12","Ign 11","Ign 10","Ign 9","Ign 8","Ign 7","Ign 6","Lowside 2","Lowside 3","Lowside 4","Lowside 5","Lowside 6","Lowside 7","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID" + gppwm4_dutyIfError = scalar, U08, 4409, "%", 1, 0, 0, 100, 0 + gppwm4_pwmFrequency = scalar, U16, 4410, "hz", 1, 0, 0, 500, 0 + gppwm4_onAboveDuty = scalar, U08, 4412, "%", 1, 0, 0, 100, 0 + gppwm4_offBelowDuty = scalar, U08, 4413, "%", 1, 0, 0, 100, 0 + gppwm4_loadAxis = bits, U08, 4414, [0:1], "TPS", "MAP", "CLT", "IAT" +;no TS info - skipping gppwm4_pad offset 4415 + gppwm4_loadBins = array, U08, 4416, [8], "load", 1, 0, 0.0, 250, 0 + gppwm4_rpmBins = array, U08, 4424, [8], "RPM", 50, 0, 0.0, 12000.0, 0 + gppwm4_table = array, U08, 4432, [8x8], "duty", 1, 0, 0, 100, 0 +;no TS info - skipping mainUnusedEnd offset 4496 + warning_message = string, ASCII, 6000, 120 + afterstartCoolantBins = array, F32, 6120, [8], "C", 1, 0, -100.0, 250.0, 0 + afterstartHoldTime = array, F32, 6152, [8], "Seconds", 1, 0, 0, 100, 1 + afterstartEnrich = array, F32, 6184, [8], "%", 1, 0, 0, 600, 1 + afterstartDecayTime = array, F32, 6216, [8], "Seconds", 1, 0, 0, 100, 1 boostTableOpenLoop = array, U08, 6248, [8x8],"", 2, 0 , 0, 3000, 0 boostMapBins = array, U08, 6312, [8], "", 2, 0, 0, 600.0, 1 boostRpmBins = array, U08, 6320, [8], "RPM", 50, 0, 0.0, 12000.0, 0 boostTableClosedLoop = array, U08, 6328, [8x8],"", 2, 0 , 0, 3000, 0 boostTpsBins = array, U08, 6392, [8], "%", 2, 0.0, 0, 100.0, 2 - pedalToTpsTable = array, U08, 6400, [8x8],"deg", 1, 0, -720, 720, 2 + pedalToTpsTable = array, U08, 6400, [8x8],"%", 1, 0, 0, 100, 0 pedalToTpsPedalBins = array, U08, 6464, [8], "%", 1, 0, 0.0, 120.0, 0 pedalToTpsRpmBins = array, U08, 6472, [8], "RPM", 50, 0, 0.0, 12000.0, 0 cltCrankingCorrBins = array, F32, 6480, [8], "C", 1, 0, -100.0, 250.0, 2 @@ -1091,8 +1164,8 @@ page = 1 ; total TS size = 20000 [SettingContextHelp] injector_flow = "This is your injector flow at the fuel pressure used in the vehicle. cc/min, cubic centimetre per minute\nBy the way, g/s = 0.125997881 * (lb/hr)\ng/s = 0.125997881 * (cc/min)/10.5\ng/s = 0.0119997981 * cc/min" - directSelfStimulation = "Should trigger emulator push data right into trigger handling logic, eliminating the need for physical jumper wires?\nSee also triggerSimulatorPins\nPS: Funny name, right? :)" cj125isUaDivided = "Is your UA CJ125 output wired to MCU via resistor divider?" + etb_use_two_wires = "TLE7209 uses two-wire mode. TLE9201 and VNH2SP30 do NOT use two wire mode." cj125isUrDivided = "Is your UR CJ125 output wired to MCU via resistor divider?\nLooks like 3v range should be enough, divider generally not needed." absoluteFuelPressure = "If your fuel regulator does not have vacuum line" tpsErrorDetectionTooLow = "TPS error detection, what TPS % value is unrealistically low" @@ -1150,6 +1223,14 @@ page = 1 launchFuelAdded = "Extra Fuel Added" launchBoostDuty = "Duty Cycle for the Boost Solenoid" hardCutRpmRange = "RPM Range for Hard Cut" + stft_maxIdleRegionRpm = "Below this RPM, the idle region is active" + stft_maxOverrunLoad = "Below this engine load, the overrun region is active" + stft_minPowerLoad = "Above this engine load, the power region is active" + stft_deadband = "When close to correct AFR, pause correction. This can improve stability by not changing the adjustment if the error is extremely small, but is not required." + stft_minClt = "Below this temperature, correction is disabled." + stft_minAfr = "Below this AFR, correction is paused" + stft_maxAfr = "Above this AFR, correction is paused" + stft_startupDelay = "Delay after starting the engine before beginning closed loop correction." fuelClosedLoopCorrectionEnabled = "Enables lambda sensor closed loop feedback for fuelling." isVerboseIAC = "Print details into rusEfi console" isVerboseETB = "Prints ETB details to rusEFI console" @@ -1218,6 +1299,30 @@ page = 1 triggerCompHystMin = "Trigger comparator hysteresis voltage (Min)" triggerCompHystMax = "Trigger comparator hysteresis voltage (Max)" triggerCompSensorSatRpm = "VR-sensor saturation RPM" + gppwm1_pin = "Select a pin to use for PWM or on-off output." + gppwm1_dutyIfError = "If an error (with a sensor, etc) is detected, this value is used instead of reading from the table.\nThis should be a safe value for whatever hardware is connected to prevent damage." + gppwm1_pwmFrequency = "Select a frequency to run PWM at.\nSet this to 0hz to enable on-off mode." + gppwm1_onAboveDuty = "In on-off mode, turn the output on when the table value is above this duty." + gppwm1_offBelowDuty = "In on-off mode, turn the output off when the table value is below this duty." + gppwm1_loadAxis = "Selects the load axis to use for the table." + gppwm2_pin = "Select a pin to use for PWM or on-off output." + gppwm2_dutyIfError = "If an error (with a sensor, etc) is detected, this value is used instead of reading from the table.\nThis should be a safe value for whatever hardware is connected to prevent damage." + gppwm2_pwmFrequency = "Select a frequency to run PWM at.\nSet this to 0hz to enable on-off mode." + gppwm2_onAboveDuty = "In on-off mode, turn the output on when the table value is above this duty." + gppwm2_offBelowDuty = "In on-off mode, turn the output off when the table value is below this duty." + gppwm2_loadAxis = "Selects the load axis to use for the table." + gppwm3_pin = "Select a pin to use for PWM or on-off output." + gppwm3_dutyIfError = "If an error (with a sensor, etc) is detected, this value is used instead of reading from the table.\nThis should be a safe value for whatever hardware is connected to prevent damage." + gppwm3_pwmFrequency = "Select a frequency to run PWM at.\nSet this to 0hz to enable on-off mode." + gppwm3_onAboveDuty = "In on-off mode, turn the output on when the table value is above this duty." + gppwm3_offBelowDuty = "In on-off mode, turn the output off when the table value is below this duty." + gppwm3_loadAxis = "Selects the load axis to use for the table." + gppwm4_pin = "Select a pin to use for PWM or on-off output." + gppwm4_dutyIfError = "If an error (with a sensor, etc) is detected, this value is used instead of reading from the table.\nThis should be a safe value for whatever hardware is connected to prevent damage." + gppwm4_pwmFrequency = "Select a frequency to run PWM at.\nSet this to 0hz to enable on-off mode." + gppwm4_onAboveDuty = "In on-off mode, turn the output on when the table value is above this duty." + gppwm4_offBelowDuty = "In on-off mode, turn the output off when the table value is below this duty." + gppwm4_loadAxis = "Selects the load axis to use for the table." ; CONFIG_DEFINITION_END @@ -1240,20 +1345,39 @@ page = 1 [LoggerDefinition] ; valid logger types: composite, tooth, trigger, csv - loggerDef = compositeLogger, "Primary Trigger Logger", tooth +; loggerDef = compositeLogger, "Primary Trigger Logger", tooth + loggerDef = compositeLogger, "Trigger Logger", composite startCommand = "l\x01" stopCommand = "l\x02" dataReadCommand = "L" dataReadTimeout = 10000 ; time in ms dataReadyCondition = { toothLogReady } + continuousRead = true + ; each packet is 5 and we have 500 of those + dataLength = 2500 +;tooth ; recordDef = headerLen, footerLen, recordLen - recordDef = 0, 0, 2; in bytes, the recordLen is for each record, currently limited to 4 bytes +; recordDef = 0, 0, 5 ; uint16 that stores 1/100 second - recordField = toothTime, "tooth", 0, 16, 0.01, "ms" +; recordField = toothTime, "tooth", 0, 16, 0.01, "ms" + + ; recordDef = headerLen, footerLen, recordLen + recordDef = 0, 0, 5 + + ; these names are hard-coded inside TS + recordField = priLevel, "PriLevel", 0, 1, 1.0, "Flag" + recordField = secLevel, "SecLevel", 1, 1, 1.0, "Flag" + recordField = trigger, "Trigger", 2, 1, 1.0, "Flag" + recordField = sync, "Sync", 3, 1, 1.0, "Flag" + recordField = time, "Time", 8, 32, 0.01, "ms" + + ; it seems that TS also needs to know the diff.size of a tooth + calcField = toothTime, "ToothTime", "ms", { time - pastValue(time, 1) } + [VeAnalyze] ; tableName, lambdaTargetTableName, lambdaChannel, egoCorrectionChannel, activeCondition @@ -1267,11 +1391,7 @@ page = 1 ; filter = Name, "DisplayName", outputChannel, operator, defaultVal, userAdjustable filter = minRPMFilter, "Minimum RPM", RPMValue, < , 500, , true -#if CELSIUS filter = minCltFilter, "Minimum CLT", coolant, < , 60, , true -#else - filter = minCltFilter, "Minimum CLT", coolant, < , 160, , true -#endif filter = deltaTps, "dTPS", deltaTps > , 50, , true @@ -1293,7 +1413,7 @@ fileVersion = { 20200310 } ochGetCommand = "O%2o%2c" ; see TS_OUTPUT_SIZE in console source code - ochBlockSize = 240 + ochBlockSize = 244 ; ; see TunerStudioOutputChannels struct @@ -1325,6 +1445,7 @@ fileVersion = { 20200310 } ind_isTriggerError = bits, U32, 0, [23:23], "true", "false"; ind_hasFatalError=bits, U32, 0, [24:24], "true", "false"; ind_isWarnNow =bits, U32, 0, [25:25], "true", "false"; + ind_pedal_error =bits, U32, 0, [26:26], "true", "false"; ; RPM, vss RPMValue = scalar, U16, 4, "RPM", 1, 0.00000 @@ -1334,16 +1455,8 @@ fileVersion = { 20200310 } ; temperatures internalMcuTemperature = scalar,S08, 11, "deg C", 1, 0 -#if CELSIUS coolant = scalar, S16, 12, "deg C",{1/100}, 0.0 -#else - coolant = scalar, S16, 12, "deg F",{9/(5 * 100)}, 17.77777 -#endif -#if CELSIUS intake = scalar, S16, 14, "deg C",{1/100}, 0.0 -#else - intake = scalar, S16, 14, "deg F",{9/(5 * 100)}, 17.77777 -#endif ; todo: aux1 ; todo: aux2 @@ -1418,55 +1531,66 @@ fileVersion = { 20200310 } knockLevel = scalar, F32, 108, "Volts", 1, 0 ; Mode, firmware, protocol, run time - timeSeconds = scalar, U32, 112, "sec", 1, 0.0 +; TS requires 'seconds' name since it has special internal meaning + seconds = scalar, U32, 112, "sec", 1, 0.0 engineMode = scalar, U32, 116, "em", 1, 0.0; firmwareVersion = scalar, U32, 120,"version_f", 1, 0 firmwareTsVersion=scalar, U32, 124,"version_p", 1, 0 +; calibation helpers + calibrationValue = scalar, F32, 128, "", 1, 0 + calibrationMode = scalar, U08, 132, "", 1, 0 + ; 3 bytes padding1 + ; Errors - totalTriggerErrorCounter=scalar,U32, 128,"counter", 1, 0 - ; orderingErrorCounter 132 - warningCounter = scalar, U16, 136, "count", 1, 0 - lastErrorCode = scalar, U16, 138, "error", 1, 0 - recentErrorCode0= scalar, U16, 140, "error", 1, 0 - recentErrorCode1= scalar, U16, 142, "error", 1, 0 - recentErrorCode2= scalar, U16, 144, "error", 1, 0 - recentErrorCode3= scalar, U16, 146, "error", 1, 0 - recentErrorCode4= scalar, U16, 148, "error", 1, 0 - recentErrorCode5= scalar, U16, 150, "error", 1, 0 - recentErrorCode6= scalar, U16, 152, "error", 1, 0 - recentErrorCode7= scalar, U16, 154, "error", 1, 0 + totalTriggerErrorCounter=scalar,U32, 136,"counter", 1, 0 + ; orderingErrorCounter 140 + warningCounter = scalar, U16, 144, "count", 1, 0 + lastErrorCode = scalar, U16, 146, "error", 1, 0 + recentErrorCode0= scalar, U16, 148, "error", 1, 0 + recentErrorCode1= scalar, U16, 150, "error", 1, 0 + recentErrorCode2= scalar, U16, 152, "error", 1, 0 + recentErrorCode3= scalar, U16, 154, "error", 1, 0 + recentErrorCode4= scalar, U16, 156, "error", 1, 0 + recentErrorCode5= scalar, U16, 158, "error", 1, 0 + recentErrorCode6= scalar, U16, 160, "error", 1, 0 + recentErrorCode7= scalar, U16, 162, "error", 1, 0 ; Debug - debugFloatField1= scalar, F32, 156, "val", 1, 0.0 - debugFloatField2= scalar, F32, 160, "val", 1, 0.0 - debugFloatField3= scalar, F32, 164, "val", 1, 0.0 - debugFloatField4= scalar, F32, 168, "val", 1, 0.0 - debugFloatField5= scalar, F32, 172, "val", 1, 0.0 - debugFloatField6= scalar, F32, 176, "val", 1, 0.0 - debugFloatField7= scalar, F32, 180, "val", 1, 0.0 - debugIntField1 = scalar, S32, 184, "val", 1, 0.0 - debugIntField2 = scalar, S32, 188, "val", 1, 0.0 - debugIntField3 = scalar, S32, 192, "val", 1, 0.0 - debugIntField4 = scalar, S16, 196, "val", 1, 0.0 - debugIntField5 = scalar, S16, 198, "val", 1, 0.0 + debugFloatField1= scalar, F32, 164, "val", 1, 0.0 + debugFloatField2= scalar, F32, 168, "val", 1, 0.0 + debugFloatField3= scalar, F32, 172, "val", 1, 0.0 + debugFloatField4= scalar, F32, 176, "val", 1, 0.0 + debugFloatField5= scalar, F32, 180, "val", 1, 0.0 + debugFloatField6= scalar, F32, 184, "val", 1, 0.0 + debugFloatField7= scalar, F32, 188, "val", 1, 0.0 + debugIntField1 = scalar, S32, 192, "val", 1, 0.0 + debugIntField2 = scalar, S32, 196, "val", 1, 0.0 + debugIntField3 = scalar, S32, 200, "val", 1, 0.0 + debugIntField4 = scalar, S16, 204, "val", 1, 0.0 + debugIntField5 = scalar, S16, 206, "val", 1, 0.0 ; Accel - accelerationX = scalar, S16, 200, "G", 0.01, 0 - accelerationY = scalar, S16, 202, "G", 0.01, 0 + accelerationX = scalar, S16, 208, "G", 0.01, 0 + accelerationY = scalar, S16, 210, "G", 0.01, 0 ; egt - egt1 = scalar, S16, 204, "deg C", 1, 0 - egt2 = scalar, S16, 206, "deg C", 1, 0 - egt3 = scalar, S16, 208, "deg C", 1, 0 - egt4 = scalar, S16, 210, "deg C", 1, 0 - egt5 = scalar, S16, 212, "deg C", 1, 0 - egt6 = scalar, S16, 214, "deg C", 1, 0 - egt7 = scalar, S16, 216, "deg C", 1, 0 - egt8 = scalar, S16, 218, "deg C", 1, 0 -; - TPS2Value = scalar, S16, 220, "%",{1/100}, 0 + egt1 = scalar, S16, 212, "deg C", 1, 0 + egt2 = scalar, S16, 214, "deg C", 1, 0 + egt3 = scalar, S16, 216, "deg C", 1, 0 + egt4 = scalar, S16, 218, "deg C", 1, 0 + egt5 = scalar, S16, 220, "deg C", 1, 0 + egt6 = scalar, S16, 222, "deg C", 1, 0 + egt7 = scalar, S16, 224, "deg C", 1, 0 + egt8 = scalar, S16, 226, "deg C", 1, 0 + TPS2Value = scalar, S16, 228, "%",{1/100}, 0 + + rawTps1Primary = scalar, U16, 230, "V",{1/1000}, 0.0 + rawPpsPrimary = scalar, U16, 232, "V",{1/1000}, 0.0 + rawClt = scalar, U16, 234, "V",{1/1000}, 0.0 + rawIat = scalar, U16, 236, "V",{1/1000}, 0.0 + rawOilPressure = scalar, U16, 238, "V",{1/1000}, 0.0 ; ; see TunerStudioOutputChannels struct @@ -1483,6 +1607,12 @@ fileVersion = { 20200310 } time = { timeNow } ; engineLoad = { fuleAlgorithm == 0 ? MAF : TPS } + ; These "synthetic" channels provide the Y-axis (load) value for gen purp PWM table's Y axes + gppwm1_load = {(gppwm1_loadAxis == 0) ? TPSValue : ((gppwm1_loadAxis == 1) ? MAPValue : ((gppwm1_loadAxis == 2) ? coolant : intake))} + gppwm2_load = {(gppwm2_loadAxis == 0) ? TPSValue : ((gppwm2_loadAxis == 1) ? MAPValue : ((gppwm2_loadAxis == 2) ? coolant : intake))} + gppwm3_load = {(gppwm3_loadAxis == 0) ? TPSValue : ((gppwm3_loadAxis == 1) ? MAPValue : ((gppwm3_loadAxis == 2) ? coolant : intake))} + gppwm4_load = {(gppwm4_loadAxis == 0) ? TPSValue : ((gppwm4_loadAxis == 1) ? MAPValue : ((gppwm4_loadAxis == 2) ? coolant : intake))} + [PcVariables] wueAfrTargetOffset = array, S16, [ 16], ":1", 0.1, 0.0, -3.0, 3.0, 1; wueAnalRecommend = array, U08, [ 16], "%", 1.00, 0.0, 100, 255.00, 0 @@ -1491,24 +1621,89 @@ fileVersion = { 20200310 } enableLogDebugChannels = bits, U08, [0:0], "Yes", "No" enableLogErrorList = bits, U08, [0:0], "Yes", "No" -; 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 -; Alternator TPS Acceleration Warmup-Pid Idle Engine Load Acc Trigger Counters ETB PID TLE8888 Boost - debugFieldF1List = bits, U08, [0:7], "Controller Output", "From TPS", "", "Controller Output", "", "Channel 1 Rise Counter", "", "", "", "", "", "", "", "", "", "", "", "ETB Controller Output", "", "", "df1", "df1", "22df1", "", "", "", "", "", "", "", "", "", "", "", "", "", "Open Loop Duty", "" - debugFieldF2List = bits, U08, [0:7], "I-Term", "To TPS", "", "I-Term", "", "Channel 2 Rise Counter", "", "", "", "", "", "", "", "", "", "", "", "ETB I-Term", "", "", "df2", "df2", "22df2", "", "", "", "", "", "", "", "", "", "", "", "", "", "Closed Loop Duty","" - debugFieldF3List = bits, U08, [0:7], "Previous Error", "Current TPS<>TPS", "", "", "", "Channel 3 Rise Counter", "", "", "", "", "", "", "", "", "", "", "", "ETB Previous Error", "", "", "df3", "df3", "22df3", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" - debugFieldF4List = bits, U08, [0:7], "I Gain", "Extra Fuel", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "ETB df4", "", "", "df4", "df4", "22df4", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" - debugFieldF5List = bits, U08, [0:7], "D Gain", "df5", "df5", "df5", "df5", "df5", "df5", "", "", "", "", "", "", "", "", "", "", "ETB df5", "df5", "df5", "df5", "df5", "22df5", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" - debugFieldF6List = bits, U08, [0:7], "D Term", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "ETB df6", "", "", "df6", "df6", "22df6", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" - debugFieldF7List = bits, U08, [0:7], "Max-Value", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "ETB df7", "", "", "df7", "df7", "22df7", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" - - debugFieldI1List = bits, U08, [0:7], "P-Gain", "", "", "", "", "Channel 2 Fall Counter", "", "", "", "", "", "", "", "", "", "", "", "ETB P-Gain", "", "", "di1", "di1", "22", "", "", "", "", "", "", "", "", "SPI Counter", "", "", "", "", "", "" - debugFieldI2List = bits, U08, [0:7], "Offset", "", "", "", "", "Channel 3 Fall Counter", "", "", "", "", "", "", "", "", "", "", "", "ETB di2", "", "", "di2", "di2", "22", "", "", "", "", "", "", "", "", "Latest Transmit","", "", "", "", "", "" - debugFieldI3List = bits, U08, [0:7], "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "ETB di3", "", "", "di3", "di3", "22", "", "", "", "", "", "", "", "", "Latest Received","", "", "", "", "", "" - debugFieldI4List = bits, U08, [0:7], "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "ETB di4", "", "", "di4", "di4", "22", "", "", "", "", "", "", "", "", "Init Count", "", "", "", "", "", "" - debugFieldI5List = bits, U08, [0:7], "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "di5", "di5", "ETB di5", "di5", "di5", "di5", "di5", "22di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5" +; wall of debug mode :) +; https://rusefi.com/wiki/index.php?title=Manual:Debug_fields +; 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 +; Alternator TPS Acceleration Warmup-Pid Idle Engine Load Acc Trigger Counters VVT Cranking Ignition Timing ETB PID CJ125 CAN TLE8888 Boost Start Launcher ETB Autotune + debugFieldF1List = bits, U08, [0:7], "Controller Output", "From TPS", "", "Controller Output", "Idle output", "Channel 1 Rise Counter", "", "", "", "", "Ign IAT Corr", "", "", "", "", "", "", "ETB Controller Output", "", "", "df1", "df1", "22df1", "", "23:df1", "CJ125: output", "", "", "", "", "", "", "", "", "", "", "Boost Open Loop Duty", "S unused" "", "Osc Amplitude" + debugFieldF2List = bits, U08, [0:7], "I-Term", "To TPS", "", "I-Term", "Idle df2", "Channel 2 Rise Counter", "", "", "", "", "Ign CLT Corr", "", "", "", "", "", "", "ETB I-Term", "", "", "df2", "df2", "22df2", "", "23:df2", "CJ125: i-term", "", "", "", "", "", "", "", "", "", "", "Boost Closed Loop Duty","S unused" "", "Duty Amplitude" + debugFieldF3List = bits, U08, [0:7], "Previous Error", "Current TPS<>TPS", "", "", "Idle df3", "ICU sum", "", "", "", "", "Ign FSIO Adj", "", "", "", "", "", "", "ETB err", "", "", "df3", "df3", "22df3", "", "23:df3", "CJ125: err", "", "", "", "", "", "", "", "", "", "", "", "S unused" "", "Tu" + debugFieldF4List = bits, U08, [0:7], "I Gain", "Extra Fuel", "", "", "Idle df4", "VVT rise", "", "", "", "", "Ign PID Adj", "", "", "", "", "", "", "ETB I setting", "", "", "df4", "df4", "22df4", "", "23:df4", "CJ125: UA", "", "", "", "", "", "", "", "", "", "", "", "S unused" "", "Ku" + debugFieldF5List = bits, U08, [0:7], "D Gain", "df5", "df5", "df5", "Idle df5", "VVT fall", "df5", "", "", "", "", "", "", "", "", "", "", "ETB D setting", "df5", "df5", "df5", "df5", "22df5", "", "23:df5", "CJ125: UR", "", "", "", "", "", "", "", "", "", "", "", "S unused" "", "Kp" + debugFieldF6List = bits, U08, [0:7], "D Term", "", "", "", "Idle df6", "Current Gap", "", "", "", "", "", "", "", "", "", "", "", "ETB df6", "", "", "df6", "df6", "22df6", "", "23:df6", "cj: f7", "", "", "", "", "", "", "", "", "", "", "", "S unused" "", "Ki" + debugFieldF7List = bits, U08, [0:7], "Max-Value", "", "", "", "Idle df7", "", "", "", "", "", "", "", "", "", "", "", "", "ETB df7", "", "", "df7", "df7", "22df7", "", "23:df7", "cj: f7", "", "", "", "", "", "", "", "", "", "", "", "S unused" "", "Kd" + debugFieldI1List = bits, U08, [0:7], "P-Gain", "", "", "", "Idle di1", "Channel 1 Fall Counter", "", "", "", "", "Multispark Count", "", "", "", "", "", "", "ETB P-Gain", "", "", "di1", "di1", "22di1", "", "23:di1", "CJ125: state", "read count","", "", "", "", "SPI Counter", "", "", "", "", "", "Start Count" "", "" + debugFieldI2List = bits, U08, [0:7], "Offset", "", "", "", "Idle di2", "Channel 2 Fall Counter", "", "", "", "", "", "", "", "", "", "", "", "ETB di2", "", "", "di2", "di2", "22di2", "", "23:di2", "", "", "", "", "", "", "Latest Transmit","", "", "", "", "", "S unused" "", "" + debugFieldI3List = bits, U08, [0:7], "", "", "", "", "Idle di3", "Cycle Index", "", "", "", "", "", "", "", "", "", "", "", "ETB di3", "", "", "di3", "di3", "22di3", "", "23:di3", "", "", "", "", "", "", "Latest Received","", "", "", "", "", "S unused" "", "" + debugFieldI4List = bits, U08, [0:7], "", "", "", "", "Idle di4", "Cycle Cnt 1", "", "", "", "", "", "", "", "", "", "", "", "ETB di4", "", "", "di4", "di4", "22di4", "", "23:di4", "", "", "", "", "", "", "Init Count", "", "", "", "", "", "S unused" "", "" + debugFieldI5List = bits, U08, [0:7], "", "", "", "", "Idle di5", "Cycle Cnt 2", "", "", "", "", "", "", "", "", "", "di5", "di5", "ETB di5", "di5", "di5", "di5", "di5", "22di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "di5", "S di5" "", "" + [ConstantsExtensions] + ; defaultValue is used to provide TunerStudio with a value to use in the case of + ; the constant not yet being initialized. This is primarily important if the + ; constant is used as a variable in the ini. + ; defaultValue = constantName, value; defaultValue = wueAfrTargetOffset, -1.5 -1.4 -1.15 -0.95 -0.775 -0.65 -0.5625 -0.5 -0.4375 -0.375 -0.3125 -0.25 -0.1875 -0.125 -0.0625 0 + + requiresPowerCycle = warningLedPin + requiresPowerCycle = runningLedPin + requiresPowerCycle = binarySerialTxPin + requiresPowerCycle = binarySerialRxPin + + requiresPowerCycle = etb_use_two_wires + requiresPowerCycle = etbFreq + + requiresPowerCycle = idle_solenoidFrequency + requiresPowerCycle = boostPwmFrequency + requiresPowerCycle = alternatorPwmFrequency + requiresPowerCycle = auxPidFrequency1 + requiresPowerCycle = auxPidFrequency2 + requiresPowerCycle = auxPidFrequency3 + requiresPowerCycle = auxPidFrequency4 + + requiresPowerCycle = fsioOutputPins1 + requiresPowerCycle = fsioOutputPins2 + requiresPowerCycle = fsioOutputPins3 + requiresPowerCycle = fsioOutputPins4 + requiresPowerCycle = fsioOutputPins5 + requiresPowerCycle = fsioOutputPins6 + requiresPowerCycle = fsioOutputPins7 + requiresPowerCycle = fsioOutputPins8 + requiresPowerCycle = fsioOutputPins9 + requiresPowerCycle = fsioOutputPins10 + requiresPowerCycle = fsioOutputPins11 + requiresPowerCycle = fsioOutputPins12 + requiresPowerCycle = fsioOutputPins13 + requiresPowerCycle = fsioOutputPins14 + requiresPowerCycle = fsioOutputPins15 + requiresPowerCycle = fsioOutputPins16 + + requiresPowerCycle = fsioFrequency1 + requiresPowerCycle = fsioFrequency2 + requiresPowerCycle = fsioFrequency3 + requiresPowerCycle = fsioFrequency4 + requiresPowerCycle = fsioFrequency5 + requiresPowerCycle = fsioFrequency6 + requiresPowerCycle = fsioFrequency7 + requiresPowerCycle = fsioFrequency8 + requiresPowerCycle = fsioFrequency9 + requiresPowerCycle = fsioFrequency10 + requiresPowerCycle = fsioFrequency11 + requiresPowerCycle = fsioFrequency12 + requiresPowerCycle = fsioFrequency13 + requiresPowerCycle = fsioFrequency14 + requiresPowerCycle = fsioFrequency15 + requiresPowerCycle = fsioFrequency16 + + requiresPowerCycle = fsioAdc1 + requiresPowerCycle = fsioAdc2 + requiresPowerCycle = fsioAdc3 + requiresPowerCycle = fsioAdc4 + + readOnly = warning_message + + [CurveEditor] ; xAxis = leftValue, rightValue, step ; yAxis = bottomValue, topValue, step @@ -1607,11 +1802,7 @@ fileVersion = { 20200310 } curve = iatFuelCorrCurve, "Intake air temperature fuel Multiplier" columnLabel = "Coolant", "Multiplier" -#if CELSIUS xAxis = -40, 120, 10 -#else - xAxis = -40, 250, 10 -#endif yAxis = 0, 2, 11 xBins = iatFuelCorrBins, intake yBins = iatFuelCorr @@ -1619,11 +1810,7 @@ fileVersion = { 20200310 } curve = cltTimingCorrCurve, "Warmup timing correction" columnLabel = "Coolant", "Extra" -#if CELSIUS xAxis = -40, 120, 10 -#else - xAxis = -40, 250, 10 -#endif yAxis = 0, 50, 10 xBins = cltTimingBins, coolant yBins = cltTimingExtra @@ -1631,11 +1818,7 @@ fileVersion = { 20200310 } curve = cltFuelCorrCurve, "Warmup fuel manual Multiplier" columnLabel = "Coolant", "Multiplier" -#if CELSIUS xAxis = -40, 100, 10 -#else - xAxis = -40, 210, 10 -#endif yAxis = 0, 3, 10 xBins = cltFuelCorrBins, coolant yBins = cltFuelCorr @@ -1643,11 +1826,7 @@ fileVersion = { 20200310 } curve = crankingCltCurve, "Cranking Coolant Temperature Multiplier" columnLabel = "Coolant", "Multiplier" -#if CELSIUS xAxis = -40, 100, 10 -#else - xAxis = -40, 210, 10 -#endif yAxis = 0, 3, 10 xBins = crankingFuelBins, coolant yBins = crankingFuelCoef @@ -1655,8 +1834,8 @@ fileVersion = { 20200310 } curve = etbTpsBiasCurve, "Electronic TB Bias Curve" columnLabel = "TPS", "duty bias" - xAxis = 0, 100, 10 - yAxis = 0, 100, 10 + xAxis = 0, 50, 11 + yAxis = -40, 40, 9 xBins = etbBiasBins, TPSValue yBins = etbBiasValues gauge = TPSGauge @@ -1679,11 +1858,7 @@ fileVersion = { 20200310 } curve = cltIdleCurve, "Warmup Idle multiplier" columnLabel = "Coolant", "Multiplier" -#if CELSIUS xAxis = -40, 120, 10 -#else - xAxis = -40, 250, 10 -#endif yAxis = 0, 3, 10 xBins = cltIdleCorrBins, coolant yBins = cltIdleCorr @@ -1691,11 +1866,7 @@ fileVersion = { 20200310 } curve = iacCoastingCurve, "Coasting IAC Position for Auto-Idle" columnLabel = "Coolant", "Multiplier" -#if CELSIUS xAxis = -40, 120, 10 -#else - xAxis = -40, 250, 10 -#endif yAxis = 0, 100, 10 xBins = iacCoastingBins, coolant yBins = iacCoasting @@ -1703,11 +1874,7 @@ fileVersion = { 20200310 } curve = cltCrankingCurve, "Cranking Idle Air multiplier" columnLabel = "Coolant", "Multiplier" -#if CELSIUS xAxis = -40, 120, 10 -#else - xAxis = -40, 250, 10 -#endif yAxis = 0, 3, 10 xBins = cltCrankingCorrBins, coolant yBins = cltCrankingCorr @@ -1715,11 +1882,7 @@ fileVersion = { 20200310 } curve = cltIdleRPMCurve, "Idle Target RPM" columnLabel = "Coolant", "RPM" -#if CELSIUS xAxis = -40, 120, 10 -#else - xAxis = -40, 250, 10 -#endif yAxis = 0, 8000, 10 xBins = cltIdleRpmBins, coolant yBins = cltIdleRpm, RPMValue @@ -1751,11 +1914,7 @@ fileVersion = { 20200310 } curve = wueAfrTargetOffsetCurve, "AFR Target Temperature Adjustment" columnLabel = "Coolant", "AFR Offset" -#if CELSIUS xAxis = -40, 200, 9 -#else - xAxis = -40, 400, 9 -#endif yAxis = -3, 1, 5 xBins = cltFuelCorrBins, coolant yBins = wueAfrTargetOffset @@ -1763,11 +1922,7 @@ fileVersion = { 20200310 } curve = wueAnalyzer_warmup_curve, "Warmup Enrichment" columnLabel = "Coolant", "Current WUE", "Coolant", "Corrected" -#if CELSIUS xAxis = -40, 200, 9 -#else - xAxis = -40, 400, 9 -#endif yAxis = 90, 500, 6 xBins = cltFuelCorrBins, coolant yBins = cltFuelCorr @@ -1945,6 +2100,30 @@ fileVersion = { 20200310 } gridOrient = 250, 0, 340 ; Space 123 rotation of grid in degrees. upDownLabel = "(Later)", "(Sooner)" + table = gppwm1Tbl, gppwm1Map, "", 1 + xyLabels = "RPM", "" + xBins = gppwm1_rpmBins, RPMValue + yBins = gppwm1_loadBins, gppwm1_load + zBins = gppwm1_table + + table = gppwm2Tbl, gppwm2Map, "", 1 + xyLabels = "RPM", "" + xBins = gppwm2_rpmBins, RPMValue + yBins = gppwm2_loadBins, gppwm2_load + zBins = gppwm2_table + + table = gppwm3Tbl, gppwm3Map, "", 1 + xyLabels = "RPM", "" + xBins = gppwm3_rpmBins, RPMValue + yBins = gppwm3_loadBins, gppwm3_load + zBins = gppwm3_table + + table = gppwm4Tbl, gppwm4Map, "", 1 + xyLabels = "RPM", "" + xBins = gppwm4_rpmBins, RPMValue + yBins = gppwm4_loadBins, gppwm4_load + zBins = gppwm4_table + [GaugeConfigurations] gaugeCategory = Sensors - Extra 2 @@ -1975,7 +2154,7 @@ gaugeCategory = ECU Status recentErrorCode6Gauge = recentErrorCode6, "Error#7", "", 0, 18000, 0, 0, 18000, 18000, 0, 0 recentErrorCode7Gauge = recentErrorCode7, "Error#8", "", 0, 18000, 0, 0, 18000, 18000, 0, 0 firmwareVersionGauge = firmwareVersion , "ECU Software Version", "%", 0, 100, 0, 0, 100, 100, 0, 0 - timeSecondsGauge = timeSeconds, "Uptime", "sec", 0, 100, 0, 0, 100, 100, 0, 0 + timeSecondsGauge = seconds, "Uptime", "sec", 0, 100, 0, 0, 100, 100, 0, 0 gaugeCategory = Debug @@ -1995,16 +2174,8 @@ gaugeCategory = Debug gaugeCategory = Sensors - Basic RPMGauge = RPMValue, "RPM - engine speed", "RPM", 0, 15000, 200, 500, 6000, 6000, 0, 0 -#if CELSIUS CLTGauge = coolant, "Coolant temp", "deg C", -40, 140, -15, 1, 95, 110, 1, 1 -#else - CLTGauge = coolant, "Coolant temp", "deg F", -40, 285, 5, 35, 205, 230, 1, 1 -#endif -#if CELSIUS IATGauge = intake, "Intake air temp", "deg C", -40, 140, -15, 1, 95, 110, 1, 1 -#else - IATGauge = intake, "Intake air temp", "deg F", -40, 285, 5, 35, 205, 230, 1, 1 -#endif afr1Gauge = AFRValue, "Air fuel ratio", "", 10, 19.4, 12, 13, 15, 16, 2, 2 MAFGauge = MAFValue, "Mass air flow", "v", 0, 5, 0, 1, 3, 4, 1, 1 VBattGauge = VBatt, "Battery voltage", "V", 8, 21, 9, 10, 17, 19, 1, 1 @@ -2037,11 +2208,7 @@ gaugeCategory = Acceleration Enrichment gaugeCategory = Fueling ;Name Var Title Units Lo Hi LoD LoW HiW HiD vd ld -#if CELSIUS tChargeGauge = tCharge, "fuel: Estimated charge temperature", "deg C", -40, 140, -15, 1, 95, 110, 1, 1 -#else - tChargeGauge = tCharge, "fuel: Estimated charge temperature", "deg F", -40, 285, 5, 35, 205, 230, 1, 1 -#endif baroCorrectionGauge = baroCorrection,"fuel: Barometric pressure correction", "ratio", 0.5, 1.5, 0.6, 0.7, 1.3, 1.4, 1, 1 crankingFuelGauge = crankingFuelMs, "fuel: cranking", "mSec", 0, 25.5, 1.0, 1.2, 20, 25, 3, 1 iatCorrectionGauge = iatCorrection, "fuel: IAT correction", "mult", 0, 3, 0, 0, 3, 3, 2, 2 @@ -2065,6 +2232,12 @@ gaugeCategory = Throttle Body (incl. ETB) etbErrorGauge = etb1Error, "ETB position error", "%", -20, 20, -10, -5, 5, 10, 2, 0 etbDutyCycleGauge = etb1DutyCycle, "ETB duty cycle", "%", -100, 100, -75, -50, 50, 75, 0, 0 +gaugeCategory = Sensors - Raw + rawTps1PrimaryGauge = rawTps1Primary, "Raw TPS 1 Primary", "volts", 0, 5, 0, 0, 5, 5, 3, 0 + rawPpsPrimaryGauge = rawPpsPrimary , "Raw Pedal Primary", "volts", 0, 5, 0, 0, 5, 5, 3, 0 + rawCltGauge = rawClt , "Raw CLT", "volts", 0, 5, 0, 0, 5, 5, 3, 0 + rawIatGauge = rawIat , "Raw IAT", "volts", 0, 5, 0, 0, 5, 5, 3, 0 + rawOilPressureGauge = rawOilPressure, "Raw Oil Pressure", "volts", 0, 5, 0, 0, 5, 5, 3, 0 [WueAnalyze] @@ -2098,11 +2271,10 @@ gaugeCategory = Throttle Body (incl. ETB) ; 1 2 3 4 ; 5 6 7 8 - ; currently a minimum of 6 gauges must be on the dash, this appears to be an old not needed limitation. next release 1 will work. gauge1 = RPMGauge gauge2 = CLTGauge gauge3 = TPSGauge - gauge4 = MAFGauge + gauge4 = MAPGauge gauge5 = afr1Gauge gauge6 = VBattGauge gauge7 = dwellGauge @@ -2112,36 +2284,45 @@ gaugeCategory = Throttle Body (incl. ETB) ; = expression, off-label, on-label, off-bg, off-fg, on-bg, on-fg ; important status - indicator = { ind_hasFatalError }, "", "FATAL ERROR", green, black, red, black - indicator = { firmwareTsVersion == fileVersion }, "WRONG VERSION", "version", red, black, green, black - indicator = { ind_isWarnNow }, "", "warn", green, black, red, black - indicator = { ind_check_engine }, "ok", "Check engine", green, black, red, black - indicator = { isIgnitionEnabledIndicator}, "no ignition", "ignition", red, black, green, black - indicator = { ind_injection_enabled}, "no injection", "injection", red, black, green, black - indicator = { ind_isTriggerError}, "ok", "trg err", green, black, red, black + indicator = { ind_hasFatalError }, "", "CRITICAL ERROR", white, black, red, black + indicator = { firmwareTsVersion == fileVersion }, "WRONG VERSION", "version ok", red, black, white, black + indicator = { ind_isWarnNow }, "", "WARNING", white, black, yellow, black + indicator = { ind_check_engine }, "", "Check Engine", white, black, red, black + indicator = { isIgnitionEnabledIndicator}, "no ignition", "ignition", yellow, black, white, black + indicator = { ind_injection_enabled}, "no injection", "injection", yellow, black, white, black + indicator = { ind_isTriggerError}, "trigger ok", "trigger err", white, black, red, black + ; this is required so that the "config error" feature works in TS + ; don't change this line - TS is looking for an indicator with particular text/styling + ; you don't even have to show it by default + indicator = { ind_hasFatalError }, "Config Error", "Config Error", white, black, red, black ; minor info - indicator = { ind_fan}, "no fan", "fan", white, black, green, black - indicator = { isCylinderCleanupActivated}, "no cyl cleanup", "cyl cleanup", white, black, green, black + indicator = { ind_fan}, "fan off", "fan on", white, black, green, black + indicator = { isCylinderCleanupActivated}, "no cyl cleanup", "cyl cleanup", white, black, yellow, black indicator = { needBurn }, "config ok", "unsaved changes", white, black, yellow, black indicator = { hasSdCard}, "no SD", "with SD", white, black, green, black - indicator = { ind_fuel_pump}, "no pump", "pump", white, black, green, black + indicator = { ind_fuel_pump}, "pump off", "pump on", white, black, green, black indicator = { clutchUpState }, "clutch", "cltch Up", white, black, red, black indicator = { clutchDownState }, "clutch", "cltch Down", white, black, yellow, black indicator = { brakePedalIndicator }, "brake", "brake down", white, black, red, black - indicator = { acSwitchIndicator }, "AC on", "AC off", yellow, black, white, black + indicator = { acSwitchIndicator }, "AC off", "AC on", white, black, blue, white ; error codes indicator = { ind_tps_error}, "tps", "tps error", white, black, red, black indicator = { ind_clt_error}, "clt", "clt error", white, black, red, black indicator = { ind_iat_error}, "iat", "iat error", white, black, red, black indicator = { ind_map_error}, "map", "map error", white, black, red, black + indicator = { ind_pedal_error}, "pedal", "pedal error", white, black, red, black indicator = { knockEverIndicator }, "", "Knock recently", white, black, red, black indicator = { knockNowIndicator }, "no knock", "Knock NOW", white, black, red, black +[KeyActions] + showPanel = spi, spiFunction + showPanel = con, connection + [Datalog] ; Channel Label Type Format entry = time, "Time", float, "%.3f" @@ -2295,7 +2476,7 @@ menuDialog = main # Digital outputs subMenu = mainRelay, "Main relay" subMenu = starterRelay, "Starter Disable relay" - subMenu = fuelPump, "Fuel rail" + subMenu = fuelPump, "Fuel pump & rail" subMenu = fanSetting, "Fan" subMenu = tachSettings, "Tachometer" subMenu = malfunction, "Check engine light" @@ -2308,14 +2489,14 @@ menuDialog = main subMenu = std_separator # Targets & closed loop - subMenu = afrTableTbl, "Target AFR", 0, {isInjectionEnabled == 1 && fuelAlgorithm == LM_SPEED_DENSITY} + subMenu = afrTableTbl, "Target AFR", 0, {isInjectionEnabled == 1 && (fuelAlgorithm == LM_SPEED_DENSITY || fuelAlgorithm == LM_REAL_MAF)} subMenu = fuelClosedLoopDialog, "Closed loop correction", 0, {isInjectionEnabled == 1} subMenu = coastingFuelCutControl, "Deceleration fuel cutoff (DFCO)", 0, {isInjectionEnabled == 1} subMenu = std_separator # Fuel table/VE - subMenu = fuelTableDialog, "Fuel table", 0, {isInjectionEnabled == 1 && fuelAlgorithm != LM_SPEED_DENSITY} - subMenu = veTableDialog, "VE", 0, {isInjectionEnabled == 1 && fuelAlgorithm == LM_SPEED_DENSITY} + subMenu = fuelTableDialog, "Fuel table", 0, {isInjectionEnabled == 1 && fuelAlgorithm != LM_SPEED_DENSITY && fuelAlgorithm != LM_REAL_MAF} + subMenu = veTableDialog, "VE", 0, {isInjectionEnabled == 1 && (fuelAlgorithm == LM_SPEED_DENSITY || fuelAlgorithm == LM_REAL_MAF)} subMenu = injPhaseTableTbl, "Injection phase", 0, {isInjectionEnabled == 1} subMenu = std_separator @@ -2381,7 +2562,14 @@ menuDialog = main menu = "&Advanced" subMenu = boostDialog, "Boost Control" subMenu = boostPidDialog, "Closed Loop Boost", { boostType == 1 } - subMenu = std_separator + + subMenu = std_separator + subMenu = gppwm1, "General Purpose PWM 1" + subMenu = gppwm2, "General Purpose PWM 2" + subMenu = gppwm3, "General Purpose PWM 3" + subMenu = gppwm4, "General Purpose PWM 4" + + subMenu = std_separator subMenu = fsioInputsDialog, "FSIO inputs" subMenu = auxPidDialog, "Aux PID" subMenu = fsioOutputsDialog, "FSIO outputs" @@ -2441,17 +2629,19 @@ menuDialog = main subMenu = engineTypeDialog, "Popular vehicles" subMenu = std_separator - subMenu = spiFunction, "SPI" subMenu = monitoringSettings, "rusEfi console" subMenu = std_separator subMenu = connection, "Connection" + subMenu = tle8888, "TLE8888" + subMenu = std_separator # EXPERIMENTAL FEATURES subMenu = parkingLot, "Experimental/Broken" subMenu = multisparkSettings, "Multispark", 0, {isIgnitionEnabled == 1} + subMenu = mc33Dialog, "GDI Dreams" subMenu = std_separator subMenu = std_separator @@ -2468,6 +2658,10 @@ menuDialog = main subMenu = std_separator + menu = "Help" + subMenu = helpGeneral, "rusEfi Info" + + [ControllerCommands] ; commandName = command1, command2, commandn... ; command in standard ini format, a command name can be assigned to 1 to n commands that will be executed in order. @@ -2528,6 +2722,9 @@ cmd_calibrate_pedal_down = "w\x00\x14\x00\x07" cmd_tle8888_init = "w\x00\x14\x00\x08" cmd_test_ac_relay = "w\x00\x14\x00\x09" cmd_write_config = "w\x00\x14\x00\x0A" +cmd_test_starter_relay = "w\x00\x14\x00\x0B" +cmd_etb_autotune = "w\x00\x14\x00\x0C" +cmd_enable_self_stim = "w\x00\x14\x00\x0D" cmd_test_radiator_fan = "w\x00\x15\x00\x01" cmd_test_check_engine_light = "w\x00\x16\x00\x01" @@ -2665,6 +2862,7 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" field = "!Reminder that 4-stroke cycle is 720 degrees" field = "!For well-known trigger types use '0' trigger angle offset" field = "Trigger Angle Offset", globalTriggerAngleOffset + field = "Display only interesting", displayLogicLevelsInEngineSniffer field = "#Custom Trigger" field = "total Tooth Count", trigger_customTotalToothCount, {trigger_type == 0} field = "skipped Tooth Count", trigger_customSkippedToothCount, {trigger_type == 0} @@ -2675,7 +2873,6 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" field = "VVT use rise front", vvtCamSensorUseRise, {trigger_type != 80} field = "VVT position display offset", vvtOffset field = "VVT display inverted", vvtDisplayInverted - field = "nbVvtIndex", nbVvtIndex field = "print verbose sync details to console",verboseTriggerSynchDetails field = "Do not print messages in case of sync error", silentTriggerError field = "Enable noise filtering", useNoiselessTriggerDecoder, {trigger_type == 8 || trigger_type == 9} @@ -2795,11 +2992,27 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" field = "TPS low value detection threshold", tpsErrorDetectionTooLow, {tps1_1AdcChannel != 16} field = "TPS high value detection threshold", tpsErrorDetectionTooHigh, {tps1_1AdcChannel != 16} - dialog = pedalSensor, "Accelerator pedal" + dialog = pedalSensorLeft, "Accelerator pedal" field = "Accelerator position sensor", throttlePedalPositionAdcChannel + field = "Up voltage", throttlePedalUpVoltage + field = "Down (WOT) voltage", throttlePedalWOTVoltage field = "Accelerator position 2nd sensor", throttlePedalPositionSecondAdcChannel - field = "Up voltage", throttlePedalUpVoltage - field = "Down (WOT) voltage", throttlePedalWOTVoltage + + dialog = pedalGauges + gauge = pedalPositionGauge + gauge = rawPpsPrimaryGauge + + dialog = pedalSensor, "Accelerator pedal", border + panel = pedalSensorLeft, West + panel = pedalGauges, East + + dialog = mc33Dialog, "GDI Dreams" + field = mc33816_cs, mc33816_cs + field = mc33816_rstb, mc33816_rstb + field = mc33816_flag0, mc33816_flag0 + field = "mc33972 SPI", mc33972spiDevice + field = mc33_hvolt, mc33_hvolt + ; Sensor Inputs dialog = otherSensorInputs, "Other Sensor Inputs" @@ -2826,8 +3039,11 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" field = "Secondary channel", triggerInputPins2, { trigger_type != 0 && trigger_type != 8 && trigger_type != 9 && trigger_type != 18 && trigger_type != 20} field = "Invert Secondary", invertSecondaryTriggerSignal, { trigger_type != 0 && trigger_type != 8 && trigger_type != 9 && trigger_type != 18 && trigger_type != 20} field = "Cam Sync/VVT input", camInputs1 - panel = triggerInputComparator - + +; +; allXXX sections allows a quick overview of used I/O in order to address conflicts mostly, not really to +; configure the features. +; dialog = allPinsSensors, "Sensors" field = "Throttle pedal Position Channel", throttlePedalPositionAdcChannel field = "Primary input channel", triggerInputPins1 @@ -2855,16 +3071,18 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" dialog = allPins1_1 field = mc33816_cs, mc33816_cs field = mc33816_rstb, mc33816_rstb + field = mc33816_flag0, mc33816_flag0 + field = "trigger stimulator pin #1", triggerSimulatorPins1 + field = "trigger stimulator pin #2", triggerSimulatorPins2 + field = "trigger stimulator pin #2", triggerSimulatorPins3 field = high_fuel_pressure_sensor_1, high_fuel_pressure_sensor_1 field = high_fuel_pressure_sensor_2, high_fuel_pressure_sensor_2 field = mc33816_driven, mc33816_driven field = mc33816spiDevice, mc33816spiDevice field = "Warning Led", warningLedPin - ; field = "Fatal Error Led", fatalErrorPin field = "tle6240_cs", tle6240_cs field = "tle6240 SPI", tle6240spiDevice field = "mc33972_cs", mc33972_cs - field = "mc33972 SPI", mc33972spiDevice panel = allPinsSensors dialog = allPins1_2 @@ -2874,32 +3092,26 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" field = "Idle Solenoid Pin", idle_solenoidPin field = "Second Idle Solenoid Pin", secondSolenoidPin field = "Idle Stepper Dir", idle_stepperDirectionPin - field = "Idle Stepper Dir Mode", stepperDirectionPinMode field = "Idle Stepper Step", idle_stepperStepPin field = "Idle Stepper Enable", stepperEnablePin field = "Fuel Pump Pin", fuelPumpPin - field = "Fuel Pump Pin Mode", fuelPumpPinMode field = "ETB#1 Dir #1", etbIo1_directionPin1 field = "ETB#1 Dir #2", etbIo1_directionPin2 field = "ETB#1 Control #1", etbIo1_controlPin1 - field = "etb1_controlPinMode", etbIo1_controlPinMode + field = "ETB#1 Disable", etbIo1_disablePin field = "ETB#2 Dir #1", etbIo2_directionPin1 field = "ETB#2 Dir #2", etbIo2_directionPin2 field = "ETB#2 Control #1", etbIo2_controlPin1 - field = "SD CS Pin", sdCardCsPin + field = "ETB#2 Disable", etbIo2_disablePin field = "MIL / Check Engine Pin", malfunctionIndicatorPin - field = "MIL / Check Engine Pin Mode", malfunctionIndicatorPinMode field = "Aux Pin #1", auxPidPins1 field = "Aux Pin #2", auxPidPins2 field = "Aux Pin #3", auxPidPins3 field = "Aux Pin #4", auxPidPins4 field = "test557pin", test557pin field = "Fan Pin", fanPin - field = "Fan Pin Mode", fanPinMode field = "Main Relay Pin", mainRelayPin - field = "Main Relay Mode", mainRelayPinMode - field = "Starter Relay Pin", starterRelayPin - field = "Starter Relay Mode", starterRelayPinMode + field = "Starter Relay Pin", starterRelayDisablePin field = "aux valve #1", auxValves1 field = "aux valve #2", auxValves2 @@ -2965,9 +3177,12 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" field = "output #16", fsioOutputPins16 dialog = allPins2_3 + field = "LCD E pin", HD44780_e + field = "LCD D4 pin", HD44780_db4 + field = "LCD D5 pin", HD44780_db5 + field = "LCD D6 pin", HD44780_db6 + field = "LCD D7 pin", HD44780_db7 field = "Debug Trigger Sync", debugTriggerSync - field = "Debug Timer Callback", debugTimerCallback - field = "Debug Set Timer", debugSetTimer field = "Aux Fast Analog", auxFastSensor1_adcChannel dialog = allPins1_3 @@ -2975,31 +3190,19 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" field = "FSIO ADC #2", fsioAdc2 field = "FSIO ADC #3", fsioAdc3 field = "FSIO ADC #4", fsioAdc4 - field = "CAN RX pin", canRxPin - field = "CAN TX pin", canTxPin - field = "SPI1 MOSI", spi1mosiPin, {is_enabled_spi_1 == 1} - field = "SPI1 MISO", spi1misoPin, {is_enabled_spi_1 == 1} - field = "SPI1 SCK", spi1sckPin, {is_enabled_spi_1 == 1} - field = "SPI2 MOSI", spi2mosiPin, {is_enabled_spi_2 == 1} - field = "SPI2 MISO", spi2misoPin, {is_enabled_spi_2 == 1} - field = "SPI2 SCK", spi2sckPin, {is_enabled_spi_2 == 1} - field = "SPI3 MOSI", spi3mosiPin, {is_enabled_spi_3 == 1} - field = "SPI3 MISO", spi3misoPin, {is_enabled_spi_3 == 1} - field = "SPI3 SCK", spi3sckPin, {is_enabled_spi_3 == 1} field = "hip9011CsPin", hip9011CsPin field = "LIS302DLCsPin", LIS302DLCsPin field = "MIL / Check Engine", malfunctionIndicatorPin field = "Saab CDM knock", cdmInputPin field = "comm status light", communicationLedPin field = "running status light", runningLedPin - field = "TLE8888 Chip Select", tle8888_cs - field = "TLE8888 CS Mode", tle8888_csPinMode - field = "TLE 8888 spi", tle8888spiDevice field = "servo#1", servoOutputPins1 field = "servo#2", servoOutputPins2 field = "servo#3", servoOutputPins3 field = "servo#4", servoOutputPins4 field = "servo#5", servoOutputPins5 + field = "AUX Serial TX", auxSerialTxPin + field = "AUX Serial RX", auxSerialRxPin dialog = allPins1_1_and_2, "", xAxis @@ -3133,9 +3336,10 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" field = "Heater pin", o2heaterPin dialog = egoSettings, "", yAxis - panel = egoSettings_IO, {enableAemXSeries == 0} - panel = egoSettings_sensor, {afr_hwChannel != 16 && enableAemXSeries == 0} + panel = egoSettings_IO + panel = egoSettings_sensor, {afr_hwChannel != 16 && enableAemXSeries == 0 && !auxSerialRxPin && !auxSerialTxPin} field = "Enable AEM X-Series CANbus", enableAemXSeries, { canReadEnabled } + field = "Enable Innovate LC-2 Serial", enableInnovateLC2, { auxSerialRxPin && auxSerialTxPin } ; Engine->EGT inputs dialog = egtInputs, "EGT inputs" @@ -3162,9 +3366,11 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" field = "No1 Direction #1", etbIo1_directionPin1 field = "No1 Direction #2", etbIo1_directionPin2 field = "No1 Control #1", etbIo1_controlPin1, { etb_use_two_wires == 0 } + field = "No1 Disable", etbIo1_disablePin field = "No2 Direction #1", etbIo2_directionPin1 field = "No2 Direction #2", etbIo2_directionPin2 field = "No2 Control #1", etbIo2_controlPin1, { etb_use_two_wires == 0} + field = "No2 Disable", etbIo2_disablePin dialog = idleStepperHw, "Stepper Hardware" field = "Idle Stepper Step Pin", idle_stepperStepPin @@ -3249,27 +3455,33 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" field = "On temperature", fanOnTemperature field = "Off temperature", fanOffTemperature - dialog = fuelPump, "Fuel Rail" + dialog = fuelPumpConfig, "Fuel Pump" field = "Pin", fuelPumpPin field = "Pin mode", fuelPumpPinMode field = "Prime duration", startUpFuelPumpDuration + + dialog = fuelRailConfig, "Fuel Rail" field = "Absolute Fuel Pressure", absoluteFuelPressure field = "Fuel Rail pressure", fuelRailPressure, {absoluteFuelPressure == 1} + dialog = fuelPump, "" + panel = fuelPumpConfig + panel = fuelRailConfig + + ; Controller->Actuator Outputs dialog = mainRelay, "Main relay output" field = "Pin", mainRelayPin field = "Pin mode", mainRelayPinMode dialog = starterRelay, "Starter relay output" - field = "Pin", starterRelayPin - field = "Pin mode", starterRelayPinMode + field = "Pin", starterRelayDisablePin + field = "Pin mode", starterRelayDisableMode dialog = statusLeds, "Status LEDs" field = "Running status LED", runningLedPin field = "TS communication status LED", communicationLedPin field = "Trigger error LED", triggerErrorPin - ; field = "Fatal Error Led", fatalErrorPin ; Engine->MIL Settings dialog = malfunction, "Check Engine Settings" @@ -3395,33 +3607,39 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" field = "Min", alternatorControl_minValue, {isAlternatorControlEnabled == 1 && onOffAlternatorLogic == 0} field = "Max", alternatorControl_maxValue, {isAlternatorControlEnabled == 1 && onOffAlternatorLogic == 0} field = "#% duty = Pterm + Iterm + Dterm + offset%" - field = "Start/Stop Button Pin", startStopButtonPin - field = "Start/Stop Button Mode", startStopButtonMode + dialog = startStopDialog, "Start/Stop Button" + field = "Start/Stop Button Pin", startStopButtonPin + field = "Start/Stop Button Mode", startStopButtonMode + field = "Starter Control", starterControlPin, {startStopButtonPin != 0} + field = "Start cranking maximum time", startCrankingDuration, {startStopButtonPin != 0} dialog = energySystems, "Battery and Alternator Settings", yAxis panel = batteryDialog panel = alternator - - dialog = speedSensorLeft + panel = startStopDialog + + dialog = speedSensorAnalog field = "Input pin", vehicleSpeedSensorInputPin field = "revolution to speed mult", vehicleSpeedCoef + dialog = speedSensorCan + field = "Vss Car Type", canVssNbcType, { enableCanVss } + + dialog = speedSensorLeft, "Speed sensor config", yAxis + panel = speedSensorCan, { enableCanVss } + panel = speedSensorAnalog, { enableCanVss == 0 } + field = "Enable CANbus VSS values", enableCanVss, { canReadEnabled } + dialog = speedSensor, "Speed sensor", xAxis panel = speedSensorLeft gauge = VSSGauge - + ; Engine->Other inputs dialog = analogInputSettings, "Analog Input Settings" field = "!ECU reboot needed to apply these settings" field = "Use fixed baro corr from MAP", useFixedBaroCorrFromMap - field = "Use BiQuad averaging", useBiQuadAnalogFiltering - field = "Smoothing factor", slowAdcAlpha, {useBiQuadAnalogFiltering == 0} - field = "Bi_Q a0", biQuad_a0, {useBiQuadAnalogFiltering == 1} - field = "Bi_Q a1", biQuad_a1, {useBiQuadAnalogFiltering == 1} - field = "Bi_Q a2", biQuad_a2, {useBiQuadAnalogFiltering == 1} - field = "Bi_Q b1", biQuad_b1, {useBiQuadAnalogFiltering == 1} - field = "Bi_Q b2", biQuad_b2, {useBiQuadAnalogFiltering == 1} + field = "Smoothing factor", slowAdcAlpha dialog = tachSettings, "Tachometer output" field = "!See also dizzySparkOutputPin" @@ -3449,8 +3667,11 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" field = "Enable rusEfi CAN data", enableVerboseCanTx field = "rusEfi CAN data base address", verboseCanBaseAddress field = "Can Sleep Period", canSleepPeriodMs - field = "RX pin", canRxPin - field = "TX pin", canTxPin + + dialog = auxSerial, "AUX Serial" + field = "RX pin", auxSerialRxPin + field = "TX pin", auxSerialTxPin + field = "Serial Baud Rate", auxSerialSpeed dialog = sdCard, "SD Card Logger" field = "SdCard", isSdCardEnabled @@ -3477,18 +3698,14 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" field = "D7 pin", HD44780_db7 dialog = tle8888, "TLE8888", yAxis - field = "TLE8888 Chip Select", tle8888_cs - field = "TLE8888 SPI", tle8888spiDevice - field = "useTLE8888_hall_mode", useTLE8888_hall_mode + field = "Mode", tle8888mode field = "useTLE8888 cranking reset hack", useTLE8888_cranking_hack commandButton = "Reinit", cmd_tle8888_init dialog = connection, "", yAxis field = "ADC vRef voltage", adcVcc - panel = tsPort panel = canBus - panel = sdCard - panel = tle8888 + panel = auxSerial dialog = joystickPanel, "Joystick" field = "joustick center button", joystickCenterPin @@ -3511,6 +3728,8 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" dialog = debugging, "Debug" field = "!https://rusefi.com/s/debugmode" field = "Debug mode", debugMode + field = "Warning Text", warning_message + field = "showHumanReadableWarning (affects Burn)", showHumanReadableWarning dialog = limits, "Limits" @@ -3616,7 +3835,7 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" field = "aux valve #1", auxValves1 field = "aux valve #2", auxValves2 field = "Start/Stop Button", startStopButtonPin - field = "" + field = "External Knock", externalKnockSenseAdc dialog = fsioFrequency, "Frequency" field = "freq #1", fsioFrequency1 @@ -3665,6 +3884,7 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" dialog = fsioFormulas, "FSIO Formulas" field = "!FSIO uses Reverse Polish Notation. Please read http://rusefi.com/s/fsio" + field = "#fsioinfo command in rusEfi console could be useful while troubleshooting those" field = "#1", fsioFormulas1 field = "#2", fsioFormulas2 field = "#3", fsioFormulas3 @@ -3761,43 +3981,37 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" field = "pFactor", etb_pFactor, {throttlePedalPositionAdcChannel != 16} field = "iFactor", etb_iFactor, {throttlePedalPositionAdcChannel != 16} field = "dFactor", etb_dFactor, {throttlePedalPositionAdcChannel != 16} - field = "offset", etb_offset, {throttlePedalPositionAdcChannel != 16} field = "control period", etb_periodMs, {throttlePedalPositionAdcChannel != 16} field = "pid min", etb_minValue, {throttlePedalPositionAdcChannel != 16} field = "pid max", etb_maxValue, {throttlePedalPositionAdcChannel != 16} field = "iTermMin", etb_iTermMin, {throttlePedalPositionAdcChannel != 16} field = "iTermMax", etb_iTermMax, {throttlePedalPositionAdcChannel != 16} + dialog = etbIdleDialog, "ETB Idle" + field = "use ETB for idle", useETBforIdleControl + field = "ETB idle maximum angle", etbIdleThrottleRange dialog = etbDialogLeft field = "https://rusefi.com/s/etb" field = "Detailed status in console", isVerboseETB field = "Pause ETB control", pauseEtbControl - field = "Throttle Pedal Up", throttlePedalUpVoltage - field = "Throttle Pedal Wide Open", throttlePedalWOTVoltage field = etbCalibrationOnStart, etbCalibrationOnStart - field = "TPS#2 min", tps2Min, { tps2_1AdcChannel != 16 } - field = "TPS#2 max", tps2Max, { tps2_1AdcChannel != 16 } ; we need the term about stepper idle in here, because there's a bug in TS that you can't have different visibility ; criteria for the same panel when used in multiple places panel = hbridgeHardware, { throttlePedalPositionAdcChannel != 16 || useStepperIdle && useHbridges } - panel = etbPidDialog + + dialog = etbAutotune, "PID Autotune" + field = "!Set debug mode below to 'ETB Autotune' to show results" + field = "Debug mode", debugMode + commandButton = "ETB PID Autotune", cmd_etb_autotune dialog = etbDialogRight - field = "!https://rusefi.com/s/debugmode" - field = "Neutral Position", etbNeutralPosition - field = "Debug mode", debugMode - field = "use ETB for idle", useETBforIdleControl - field = "ETB idle maximum angle", etbIdleThrottleRange - field = "Press buttons to calibrate sensors" - field = "You would have to remove air filter to move throttle manually" - commandButton = "TPS#1 closed position", cmd_calibrate_tps_1_closed - commandButton = "TPS#1 wide open position", cmd_calibrate_tps_1_wot - field = "Not many vehicles have two throttle bodies but some do" - commandButton = "TPS#2 closed position", cmd_calibrate_tps_2_closed - commandButton = "TPS#2 wide open position", cmd_calibrate_tps_2_wot - commandButton = "Pedal Up", cmd_calibrate_pedal_up - commandButton = "Pedal Down", cmd_calibrate_pedal_down + panel = etbIdleDialog + panel = etbPidDialog + panel = etbAutotune + + ; Neutral position handling not yet implemented! + ;field = "Neutral Position", etbNeutralPosition dialog = etbDialog, "Electronic Throttle Body (beta)", border topicHelp = "etbHelp" @@ -3826,12 +4040,13 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" commandButton = "Injector #8", cmd_test_inj8 dialog = testMisc, "Misc" - commandButton = "Come To Pit", cmd_call_from_pit +; commandButton = "Come To Pit", cmd_call_from_pit commandButton = "Fuel Pump", cmd_test_fuel_pump commandButton = "Radiator Fan", cmd_test_radiator_fan commandButton = "Check Engine", cmd_test_check_engine_light commandButton = "Idle Air Valve", cmd_test_idle_valve commandButton = "A/C Relay", cmd_test_ac_relay + commandButton = "Starter Relay", cmd_test_starter_relay commandButton = "Stop Engine", cmd_stop_engine commandButton = "Write Config", cmd_write_config commandButton = "Reset ECU", cmd_reset_controller @@ -3857,7 +4072,7 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" ; Board->ECU stimulator dialog = ecuStimulator, "ECU stimulator" field = "Trigger Simulator", triggerSimulatorFrequency - field = "self-stimulation", directSelfStimulation + commandButton = "Enable Internal Trigger Simulation", cmd_enable_self_stim field = "" field = "digipot spi", digitalPotentiometerSpiDevice field = "digipot CS #0", digitalPotentiometerChipSelect1 @@ -3934,7 +4149,94 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" field = "Ignition Math Logic @", ignMathCalculateAtIndex field = "MAP Averaging Logic @", mapAveragingSchedulingAtIndex - field = "Target temperature", postCrankingTargetClt + + help = helpGeneral, "rusEfi General Help" + webHelp = "http://www.rusefi.com/" + text = "" + + dialog = gppwm1left, "" + field = "Pin", gppwm1_pin + field = "" + field = "Set frequency to 0hz for on-off mode" + field = "Frequency", gppwm1_pwmFrequency, {gppwm1_pin != 0} + field = "" + field = "On above duty", gppwm1_onAboveDuty, {gppwm1_pin != 0 && gppwm1_pwmFrequency == 0} + field = "Off below duty", gppwm1_offBelowDuty, {gppwm1_pin != 0 && gppwm1_pwmFrequency == 0} + field = "Duty if error", gppwm1_dutyIfError, {gppwm1_pin != 0} + field = "" + field = "Load Axis", gppwm1_loadAxis, {gppwm1_pin != 0} + field = "" + field = "" + field = "" + field = "" + field = "" + + dialog = gppwm1, "General Purpose PWM 1", xAxis + panel = gppwm1left + panel = gppwm1Tbl, {gppwm1_pin != 0} + + dialog = gppwm2left, "" + field = "Pin", gppwm2_pin + field = "" + field = "Set frequency to 0hz for on-off mode" + field = "Frequency", gppwm2_pwmFrequency, {gppwm2_pin != 0} + field = "" + field = "On above duty", gppwm2_onAboveDuty, {gppwm2_pin != 0 && gppwm2_pwmFrequency == 0} + field = "Off below duty", gppwm2_offBelowDuty, {gppwm2_pin != 0 && gppwm2_pwmFrequency == 0} + field = "Duty if error", gppwm2_dutyIfError, {gppwm2_pin != 0} + field = "" + field = "Load Axis", gppwm2_loadAxis, {gppwm2_pin != 0} + field = "" + field = "" + field = "" + field = "" + field = "" + + dialog = gppwm2, "General Purpose PWM 2", xAxis + panel = gppwm2left + panel = gppwm2Tbl, {gppwm2_pin != 0} + + dialog = gppwm3left, "" + field = "Pin", gppwm3_pin + field = "" + field = "Set frequency to 0hz for on-off mode" + field = "Frequency", gppwm3_pwmFrequency, {gppwm3_pin != 0} + field = "" + field = "On above duty", gppwm3_onAboveDuty, {gppwm3_pin != 0 && gppwm3_pwmFrequency == 0} + field = "Off below duty", gppwm3_offBelowDuty, {gppwm3_pin != 0 && gppwm3_pwmFrequency == 0} + field = "Duty if error", gppwm3_dutyIfError, {gppwm3_pin != 0} + field = "" + field = "Load Axis", gppwm3_loadAxis, {gppwm3_pin != 0} + field = "" + field = "" + field = "" + field = "" + field = "" + + dialog = gppwm3, "General Purpose PWM 3", xAxis + panel = gppwm3left + panel = gppwm3Tbl, {gppwm3_pin != 0} + + dialog = gppwm4left, "" + field = "Pin", gppwm4_pin + field = "" + field = "Set frequency to 0hz for on-off mode" + field = "Frequency", gppwm4_pwmFrequency, {gppwm4_pin != 0} + field = "" + field = "On above duty", gppwm4_onAboveDuty, {gppwm4_pin != 0 && gppwm4_pwmFrequency == 0} + field = "Off below duty", gppwm4_offBelowDuty, {gppwm4_pin != 0 && gppwm4_pwmFrequency == 0} + field = "Duty if error", gppwm4_dutyIfError, {gppwm4_pin != 0} + field = "" + field = "Load Axis", gppwm4_loadAxis, {gppwm4_pin != 0} + field = "" + field = "" + field = "" + field = "" + field = "" + + dialog = gppwm4, "General Purpose PWM 4", xAxis + panel = gppwm4left + panel = gppwm4Tbl, {gppwm4_pin != 0} [Tools] ;addTool = toolName, PanelName diff --git a/firmware/util/cli_registry.h b/firmware/util/cli_registry.h index 6fddd12dc4..737f11b82c 100644 --- a/firmware/util/cli_registry.h +++ b/firmware/util/cli_registry.h @@ -6,8 +6,7 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ -#ifndef RFICONSOLE_LOGIC_H_ -#define RFICONSOLE_LOGIC_H_ +#pragma once #include "datalogging.h" #include "rusefi_types.h" @@ -85,5 +84,3 @@ void addConsoleActionSSSSS(const char *token, VoidCharPtrCharPtrCharPtrCharPtrCh #ifdef __cplusplus } #endif /* __cplusplus */ - -#endif /* RFICONSOLE_H_ */ diff --git a/firmware/util/containers/counter64.h b/firmware/util/containers/counter64.h index 963f738f2d..8696f654ff 100644 --- a/firmware/util/containers/counter64.h +++ b/firmware/util/containers/counter64.h @@ -5,8 +5,7 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ -#ifndef UTIL_CONTAINERS_COUNTER64_H_ -#define UTIL_CONTAINERS_COUNTER64_H_ +#pragma once #include "global.h" @@ -30,5 +29,3 @@ class Overflow64Counter State64 state; }; - -#endif /* UTIL_CONTAINERS_COUNTER64_H_ */ diff --git a/firmware/util/containers/data_buffer.h b/firmware/util/containers/data_buffer.h index c484113552..6aedb0977a 100644 --- a/firmware/util/containers/data_buffer.h +++ b/firmware/util/containers/data_buffer.h @@ -5,8 +5,7 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ -#ifndef DATA_BUFFER_H_ -#define DATA_BUFFER_H_ +#pragma once #define DB_MAX_SIZE 1024 @@ -23,5 +22,3 @@ void dbAdd(data_buffer_s *db, int value); void dbCopy(data_buffer_s *source, data_buffer_s *target); void dbPrint(data_buffer_s *db, char *message, int withDiff); void dbPrintTable(data_buffer_s *table[], char *caption[], int columns); - -#endif /* DATA_BUFFER_H_ */ diff --git a/firmware/util/containers/fl_stack.h b/firmware/util/containers/fl_stack.h index 65b3668502..3950725677 100644 --- a/firmware/util/containers/fl_stack.h +++ b/firmware/util/containers/fl_stack.h @@ -6,8 +6,7 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ -#ifndef FL_STACK_H_ -#define FL_STACK_H_ +#pragma once #include "global.h" @@ -122,5 +121,3 @@ Type * ArrayList::add(void) { efiAssert(CUSTOM_ERR_ASSERT, size < Dimention, "add() too many elements", (Type *)NULL); return &elements[size++]; } - -#endif /* FL_STACK_H_ */ diff --git a/firmware/util/containers/listener_array.h b/firmware/util/containers/listener_array.h index b599ab3b64..5cad89f629 100644 --- a/firmware/util/containers/listener_array.h +++ b/firmware/util/containers/listener_array.h @@ -5,8 +5,7 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ -#ifndef LISTENER_ARRAY_H_ -#define LISTENER_ARRAY_H_ +#pragma once #include #include "rusefi_types.h" @@ -121,5 +120,3 @@ void clearCallbacks(IntListenerArray *array) { array->currentListenersCount = 0; } - -#endif /* LISTENER_ARRAY_H_ */ diff --git a/firmware/util/containers/local_version_holder.h b/firmware/util/containers/local_version_holder.h index 9bcb9f1b5b..bbfbf56da7 100644 --- a/firmware/util/containers/local_version_holder.h +++ b/firmware/util/containers/local_version_holder.h @@ -5,8 +5,7 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ -#ifndef LOCALVERSIONHOLDER_H_ -#define LOCALVERSIONHOLDER_H_ +#pragma once #include "stdbool.h" @@ -31,5 +30,3 @@ private: int localVersion = -1; }; - -#endif /* LOCALVERSIONHOLDER_H_ */ diff --git a/firmware/util/containers/table_helper.h b/firmware/util/containers/table_helper.h index 21a5499f83..bc2842f7ca 100644 --- a/firmware/util/containers/table_helper.h +++ b/firmware/util/containers/table_helper.h @@ -4,8 +4,8 @@ * @date Jul 6, 2014 * @author Andrey Belomutskiy, (c) 2012-2020 */ -#ifndef TABLE_HELPER_H_ -#define TABLE_HELPER_H_ + +#pragma once #include #include "error_handling.h" @@ -30,7 +30,7 @@ public: explicit Map3D(const char*name); Map3D(const char*name, float multiplier); void init(vType table[RPM_BIN_SIZE][LOAD_BIN_SIZE], const kType loadBins[LOAD_BIN_SIZE], const kType rpmBins[RPM_BIN_SIZE]); - float getValue(float xRpm, float y) const; + float getValue(float xRpm, float y) const override; void setAll(vType value); vType *pointers[LOAD_BIN_SIZE]; private: @@ -161,6 +161,7 @@ typedef Map3D pedal2tps_ typedef Map3D boostOpenLoop_Map3D_t; typedef Map3D boostClosedLoop_Map3D_t; typedef Map3D iacPidMultiplier_t; +typedef Map3D gppwm_Map3D_t; void setRpmBin(float array[], int size, float idleRpm, float topRpm); @@ -187,5 +188,3 @@ void setArrayValues(TValue (&array)[TSize], TValue value) { } void setRpmTableBin(float array[], int size); - -#endif /* TABLE_HELPER_H_ */ diff --git a/firmware/util/datalogging.h b/firmware/util/datalogging.h index 2c3ffc1fbc..feb691ea37 100644 --- a/firmware/util/datalogging.h +++ b/firmware/util/datalogging.h @@ -6,8 +6,7 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ -#ifndef DATALOGGING_H_ -#define DATALOGGING_H_ +#pragma once #include #include @@ -99,5 +98,3 @@ void scheduleLogging(Logging *logging); #endif /* __cplusplus */ void printWithLength(char *line); - -#endif /* DATALOGGING_H_ */ diff --git a/firmware/util/efilib.cpp b/firmware/util/efilib.cpp index b8d4b1173c..8360321914 100644 --- a/firmware/util/efilib.cpp +++ b/firmware/util/efilib.cpp @@ -59,6 +59,10 @@ float minF(float i1, float i2) { return i1 < i2 ? i1 : i2; } +float clampF(float min, float clamp, float max) { + return maxF(min, minF(clamp, max)); +} + uint32_t efiStrlen(const char *param) { register const char *s; for (s = param; *s; ++s) diff --git a/firmware/util/efilib.h b/firmware/util/efilib.h index fa620373ba..8b142003cf 100644 --- a/firmware/util/efilib.h +++ b/firmware/util/efilib.h @@ -5,8 +5,7 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ -#ifndef EFILIB_H_ -#define EFILIB_H_ +#pragma once #include @@ -18,6 +17,8 @@ #define SWAP_UINT32(x) ((((x) >> 24) & 0xff) | (((x) << 8) & 0xff0000) | (((x) >> 8) & 0xff00) | (((x) << 24) & 0xff000000)) +#define BIT(n) (UINT32_C(1) << (n)) + // human-readable IDs start from 1 while computer-readbale indexes start from 0 #define ID2INDEX(id) ((id) - 1) @@ -45,19 +46,6 @@ int indexOf(const char *string, char ch); float atoff(const char *string); int atoi(const char *string); -#if defined(__cplusplus) && defined(__OPTIMIZE__) -#include -// "g++ -O2" version, adds more strict type check and yet no "strict-aliasing" warnings! -#define cisnan(f) ({ \ - static_assert(sizeof(f) == sizeof(int32_t)); \ - union cisnanu_t { std::remove_reference_t __f; int32_t __i; } __cisnan_u = { f }; \ - __cisnan_u.__i == 0x7FC00000; \ -}) -#else -// "g++ -O0" or other C++/C compilers -#define cisnan(f) (*(((int*) (&f))) == 0x7FC00000) -#endif /* __cplusplus && __OPTIMIZE__ */ - #define UNUSED(x) (void)(x) int absI(int32_t value); @@ -73,6 +61,12 @@ float maxF(float i1, float i2); float minF(float i1, float i2); char* itoa10(char *p, int num); bool isSameF(float v1, float v2); +float clampF(float min, float clamp, float max); + +/** + * clamps value into the [0, 100] range + */ +#define clampPercentValue(x) (clampF(0, x, 100)) bool strEqualCaseInsensitive(const char *str1, const char *str2); bool strEqual(const char *str1, const char *str2); @@ -124,4 +118,15 @@ constexpr void copyArrayPartial(TElement (&dest)[NDest], const TElement (&src)[N #endif /* __cplusplus */ -#endif /* EFILIB_H_ */ +#if defined(__cplusplus) && defined(__OPTIMIZE__) +#include +// "g++ -O2" version, adds more strict type check and yet no "strict-aliasing" warnings! +#define cisnan(f) ({ \ + static_assert(sizeof(f) == sizeof(int32_t)); \ + union cisnanu_t { std::remove_reference_t __f; int32_t __i; } __cisnan_u = { f }; \ + __cisnan_u.__i == 0x7FC00000; \ +}) +#else +// "g++ -O0" or other C++/C compilers +#define cisnan(f) (*(((int*) (&f))) == 0x7FC00000) +#endif /* __cplusplus && __OPTIMIZE__ */ diff --git a/firmware/util/expected.h b/firmware/util/expected.h new file mode 100644 index 0000000000..12f6da49f3 --- /dev/null +++ b/firmware/util/expected.h @@ -0,0 +1,61 @@ +/** + * @file expected.h + * @brief This utility class provides a way for a function to accept or return a value that may be invalid. + * + * For example, suppose there needs to be a solution for prevention of divide by zero. One could write this function: + * + * expected my_divide(int num, int denom) { + * if (denom == 0) return unexpected; + * return num / denom; + * } + * + * @date April 18, 2020 + * @author Matthew Kennedy, (c) 2020 + */ + +#pragma once + +struct unexpected_t {}; + +template +struct expected { + const bool Valid; + const TValue Value; + + // Implicit constructor to construct in the invalid state + constexpr expected(const unexpected_t&) : Valid(false), Value{} {} + + // Implicit constructor to convert from TValue (for valid values, so an expected behaves like a T) + constexpr expected(TValue validValue) + : Valid(true) + , Value(validValue) + { + } + + // Implicit conversion operator to bool, so you can do things like if (myResult) { ... } + constexpr explicit operator bool() const { + return Valid; + } + + // Easy default value handling + constexpr float value_or(TValue valueIfInvalid) const { + return Valid ? Value : valueIfInvalid; + } + + bool operator ==(const expected& other) const { + // If validity mismatch, not equal + if (Valid != other.Valid) { + return false; + } + + // If both are invalid, they are equal + if (!Valid && !other.Valid) { + return true; + } + + // Both are guaranteed valid - simply compare values + return Value == other.Value; + } +}; + +constexpr unexpected_t unexpected{}; diff --git a/firmware/util/histogram.h b/firmware/util/histogram.h index 2c3769d8b3..c4e87bc820 100644 --- a/firmware/util/histogram.h +++ b/firmware/util/histogram.h @@ -13,8 +13,7 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ -#ifndef HISTOGRAM_H_ -#define HISTOGRAM_H_ +#pragma once #ifdef __cplusplus extern "C" @@ -41,6 +40,3 @@ int hsReport(histogram_s *h, int* report); #ifdef __cplusplus } #endif /* __cplusplus */ - - -#endif /* HISTOGRAM_H_ */ diff --git a/firmware/util/loggingcentral.h b/firmware/util/loggingcentral.h index 8a99f7c99d..013677f79c 100644 --- a/firmware/util/loggingcentral.h +++ b/firmware/util/loggingcentral.h @@ -4,11 +4,10 @@ * @date Mar 8, 2015 * @author Andrey Belomutskiy, (c) 2012-2020 */ -#ifndef UTIL_LOGGINGCENTRAL_H_ -#define UTIL_LOGGINGCENTRAL_H_ +#pragma once + +class Logging; void initLoggingCentral(void); char * swapOutputBuffers(int *actualOutputBufferSize); void scheduleMsg(Logging *logging, const char *fmt, ...); - -#endif /* UTIL_LOGGINGCENTRAL_H_ */ diff --git a/firmware/util/math/avg_values.h b/firmware/util/math/avg_values.h index 69568454f1..c7e4133662 100644 --- a/firmware/util/math/avg_values.h +++ b/firmware/util/math/avg_values.h @@ -5,8 +5,7 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ -#ifndef AVG_VALUES_H_ -#define AVG_VALUES_H_ +#pragma once #define AVG_TAB_SIZE 48 @@ -26,5 +25,3 @@ void avgAddValue(AvgTable *table, int rpm, float key, float value); float avgGetValueByIndexes(AvgTable *table, int i, int j); float avgGetValue(AvgTable *table, int rpm, float key); int avgGetValuesCount(AvgTable *table, int rpm, float key); - -#endif /* AVG_VALUES_H_ */ diff --git a/firmware/util/math/biquad.h b/firmware/util/math/biquad.h index 38209bfa5f..d22d2a80dd 100644 --- a/firmware/util/math/biquad.h +++ b/firmware/util/math/biquad.h @@ -5,8 +5,7 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ -#ifndef CONTROLLERS_MATH_BIQUAD_H_ -#define CONTROLLERS_MATH_BIQUAD_H_ +#pragma once // todo: narrow this dependency further? only 'bi_quard_s' is needed, should it be extracted / moved to a smaller header? // todo: do we need to make code generation smarted and produce a larger number of smaller headers instead of one monster header? @@ -21,5 +20,3 @@ public: float a0, a1, a2, b1, b2; float z1, z2; }; - -#endif /* CONTROLLERS_MATH_BIQUAD_H_ */ diff --git a/firmware/util/math/crc.h b/firmware/util/math/crc.h index 0b6693da35..7e8d647548 100644 --- a/firmware/util/math/crc.h +++ b/firmware/util/math/crc.h @@ -5,8 +5,7 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ -#ifndef CRC_H_ -#define CRC_H_ +#pragma once #include "stdint.h" @@ -23,5 +22,3 @@ uint32_t crc32inc(const void *buf, uint32_t crc, uint32_t size); #ifdef __cplusplus } #endif /* __cplusplus */ - -#endif /* CRC_H_ */ diff --git a/firmware/util/math/deadband.h b/firmware/util/math/deadband.h new file mode 100644 index 0000000000..2a6a825fc8 --- /dev/null +++ b/firmware/util/math/deadband.h @@ -0,0 +1,29 @@ +/** + * @file deadband.h + * + * @date April 6, 2020 + * @author Matthew Kennedy, (c) 2020 + */ + +#pragma once + +#include "efilib.h" + +template +class Deadband { +public: + bool gt(float lhs, float rhs) { + // If we're within the deadband, be "sticky" with the previous value + float absError = absF(lhs - rhs); + + // If there's enough error, actually compare values + if (absError > TDeadband) { + m_lastState = lhs > rhs; + } + + return m_lastState; + } + +private: + bool m_lastState =false; +}; diff --git a/firmware/util/math/interpolation.h b/firmware/util/math/interpolation.h index 3322f89bd9..8e1267d9e0 100644 --- a/firmware/util/math/interpolation.h +++ b/firmware/util/math/interpolation.h @@ -5,8 +5,7 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ -#ifndef INTERPOLATION_3D_H_ -#define INTERPOLATION_3D_H_ +#pragma once #include #include "datalogging.h" @@ -133,10 +132,10 @@ float interpolate3d(float x, const kType xBin[], int xBinSize, float y, const kT #endif /* DEBUG_INTERPOLATION */ if (yIndex == yBinSize - 1) return map[0][yIndex]; - kType keyMin = yBin[yIndex]; - kType keyMax = yBin[yIndex + 1]; - vType rpmMinValue = map[0][yIndex]; - vType rpmMaxValue = map[0][yIndex + 1]; + float keyMin = yBin[yIndex]; + float keyMax = yBin[yIndex + 1]; + float rpmMinValue = map[0][yIndex]; + float rpmMaxValue = map[0][yIndex + 1]; return interpolateMsg("3d", keyMin, rpmMinValue, keyMax, rpmMaxValue, y); } @@ -148,10 +147,10 @@ float interpolate3d(float x, const kType xBin[], int xBinSize, float y, const kT #endif /* DEBUG_INTERPOLATION */ if (xIndex == xBinSize - 1) return map[xIndex][0]; - kType key1 = xBin[xIndex]; - kType key2 = xBin[xIndex + 1]; - vType value1 = map[xIndex][0]; - vType value2 = map[xIndex + 1][0]; + float key1 = xBin[xIndex]; + float key2 = xBin[xIndex + 1]; + float value1 = map[xIndex][0]; + float value2 = map[xIndex + 1][0]; return interpolateMsg("out3d", key1, value1, key2, value2, x); } @@ -171,10 +170,10 @@ float interpolate3d(float x, const kType xBin[], int xBinSize, float y, const kT #endif /* DEBUG_INTERPOLATION */ // here yIndex is less than yBinSize - 1, we've checked that condition already - kType key1 = yBin[yIndex]; - kType key2 = yBin[yIndex + 1]; - vType value1 = map[xIndex][yIndex]; - vType value2 = map[xIndex][yIndex + 1]; + float key1 = yBin[yIndex]; + float key2 = yBin[yIndex + 1]; + float value1 = map[xIndex][yIndex]; + float value2 = map[xIndex][yIndex + 1]; return interpolateMsg("out3d", key1, value1, key2, value2, y); } @@ -186,10 +185,10 @@ float interpolate3d(float x, const kType xBin[], int xBinSize, float y, const kT #endif /* DEBUG_INTERPOLATION */ // here xIndex is less than xBinSize - 1, we've checked that condition already - kType key1 = xBin[xIndex]; - kType key2 = xBin[xIndex + 1]; - vType value1 = map[xIndex][yIndex]; - vType value2 = map[xIndex + 1][yIndex]; + float key1 = xBin[xIndex]; + float key2 = xBin[xIndex + 1]; + float value1 = map[xIndex][yIndex]; + float value2 = map[xIndex + 1][yIndex]; return interpolateMsg("out3d", key1, value1, key2, value2, x); } @@ -199,10 +198,10 @@ float interpolate3d(float x, const kType xBin[], int xBinSize, float y, const kT */ int rpmMaxIndex = xIndex + 1; - kType xMin = xBin[xIndex]; - kType xMax = xBin[xIndex + 1]; - vType rpmMinKeyMinValue = map[xIndex][yIndex]; - vType rpmMaxKeyMinValue = map[xIndex + 1][yIndex]; + float xMin = xBin[xIndex]; + float xMax = xBin[xIndex + 1]; + float rpmMinKeyMinValue = map[xIndex][yIndex]; + float rpmMaxKeyMinValue = map[xIndex + 1][yIndex]; float keyMinValue = interpolateMsg("", xMin, rpmMinKeyMinValue, xMax, rpmMaxKeyMinValue, x); @@ -214,10 +213,10 @@ float interpolate3d(float x, const kType xBin[], int xBinSize, float y, const kT #endif /* DEBUG_INTERPOLATION */ int keyMaxIndex = yIndex + 1; - kType keyMin = yBin[yIndex]; - kType keyMax = yBin[keyMaxIndex]; - vType rpmMinKeyMaxValue = map[xIndex][keyMaxIndex]; - vType rpmMaxKeyMaxValue = map[rpmMaxIndex][keyMaxIndex]; + float keyMin = yBin[yIndex]; + float keyMax = yBin[keyMaxIndex]; + float rpmMinKeyMaxValue = map[xIndex][keyMaxIndex]; + float rpmMaxKeyMaxValue = map[rpmMaxIndex][keyMaxIndex]; float keyMaxValue = interpolateMsg("3d", xMin, rpmMinKeyMaxValue, xMax, rpmMaxKeyMaxValue, x); @@ -225,11 +224,14 @@ float interpolate3d(float x, const kType xBin[], int xBinSize, float y, const kT if (needInterpolationLogging()) { printf("key=%.2f:\r\nrange %.2f - %.2f\r\n", y, keyMin, keyMax); printf("key interpolation range %.2f %.2f result %.2f\r\n", rpmMinKeyMaxValue, rpmMaxKeyMaxValue, keyMaxValue); + + printf("%f", rpmMinKeyMaxValue); + printf("%f", rpmMaxKeyMaxValue); + printf("%f", keyMaxValue); } #endif /* DEBUG_INTERPOLATION */ - float result = interpolateMsg("3d", keyMin, keyMinValue, keyMax, keyMaxValue, y); - return result; + return interpolateMsg("3d", keyMin, keyMinValue, keyMax, keyMaxValue, y); } void setCurveValue(float bins[], float values[], int size, float key, float value); void initInterpolation(Logging *sharedLogger); @@ -243,5 +245,3 @@ public: private: float a, b; }; - -#endif /* INTERPOLATION_3D_H_ */ diff --git a/firmware/util/math/pid.cpp b/firmware/util/math/pid.cpp index 40ebc21531..937c5afa67 100644 --- a/firmware/util/math/pid.cpp +++ b/firmware/util/math/pid.cpp @@ -30,7 +30,10 @@ void Pid::initPidClass(pid_s *parameters) { } bool Pid::isSame(const pid_s *parameters) const { - efiAssert(OBD_PCM_Processor_Fault, this->parameters != NULL, "PID::isSame invalid", false); + if (!this->parameters) { + // this 'null' could happen on first execution during initialization + return false; + } efiAssert(OBD_PCM_Processor_Fault, parameters != NULL, "PID::isSame NULL", false); return this->parameters->pFactor == parameters->pFactor && this->parameters->iFactor == parameters->iFactor diff --git a/firmware/util/math/pid.h b/firmware/util/math/pid.h index 36c7f3bf45..ad7360a249 100644 --- a/firmware/util/math/pid.h +++ b/firmware/util/math/pid.h @@ -5,8 +5,7 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ -#ifndef PID_H_ -#define PID_H_ +#pragma once #include "engine_state_generated.h" #include "pid_state_generated.h" @@ -128,5 +127,3 @@ public: private: float limitOutput(float v) const; }; - -#endif /* PID_H_ */ diff --git a/firmware/util/math/signal_filtering.h b/firmware/util/math/signal_filtering.h index 7543eb9fe8..01df176e19 100644 --- a/firmware/util/math/signal_filtering.h +++ b/firmware/util/math/signal_filtering.h @@ -5,8 +5,7 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ -#ifndef SIGNAL_FILTERING_H_ -#define SIGNAL_FILTERING_H_ +#pragma once #define FILTER_SIZE 5 @@ -21,5 +20,3 @@ void sfInit(SignalFiltering *fs, float K, float initialValue); void sfAddValue(SignalFiltering *fs, float value); void sfAddValue2(SignalFiltering *fs, float value); float sfGetValue(SignalFiltering *fs); - -#endif /* SIGNAL_FILTERING_H_ */ diff --git a/firmware/util/os_util.h b/firmware/util/os_util.h index 207461909e..3124dc599e 100644 --- a/firmware/util/os_util.h +++ b/firmware/util/os_util.h @@ -6,8 +6,7 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ -#ifndef RFIUTIL_H_ -#define RFIUTIL_H_ +#pragma once #include "global.h" @@ -42,6 +41,3 @@ void printHistogram(Logging *logging, histogram_s *histogram); #endif /* __cplusplus */ #endif /* EFI_UNIT_TEST */ - -#endif /* RFIUTIL_H_ */ - diff --git a/firmware/util/rusefi_true.h b/firmware/util/rusefi_true.h index d6c2f00346..376bcc32a2 100644 --- a/firmware/util/rusefi_true.h +++ b/firmware/util/rusefi_true.h @@ -5,8 +5,7 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ -#ifndef CONTROLLERS_ALGO_RUSEFI_TRUE_H_ -#define CONTROLLERS_ALGO_RUSEFI_TRUE_H_ +#pragma once // we still have a minor mess with headers, this header should better be included as high as possible @@ -17,5 +16,3 @@ #ifndef TRUE #define TRUE (!(FALSE)) #endif /* TRUE */ - -#endif /* CONTROLLERS_ALGO_RUSEFI_TRUE_H_ */ diff --git a/firmware/util/util.mk b/firmware/util/util.mk index 5b47622abf..d70103429d 100644 --- a/firmware/util/util.mk +++ b/firmware/util/util.mk @@ -15,7 +15,6 @@ UTILSRC_CPP = \ $(UTIL_DIR)/math/pid.cpp \ $(UTIL_DIR)/math/avg_values.cpp \ $(UTIL_DIR)/math/interpolation.cpp \ - $(UTIL_DIR)/math/biquad.cpp \ $(PROJECT_DIR)/util/datalogging.cpp \ $(PROJECT_DIR)/util/loggingcentral.cpp \ $(PROJECT_DIR)/util/cli_registry.cpp \ diff --git a/hardware/1123038-2-connector/72_board_with_connector.jpg b/hardware/1123038-2-connector/72_board_with_connector.jpg new file mode 100644 index 0000000000..111860fa7c Binary files /dev/null and b/hardware/1123038-2-connector/72_board_with_connector.jpg differ diff --git a/hardware/176122-6-connector/64_board_with_connector.jpg b/hardware/176122-6-connector/64_board_with_connector.jpg new file mode 100644 index 0000000000..06678dfab0 Binary files /dev/null and b/hardware/176122-6-connector/64_board_with_connector.jpg differ diff --git a/hardware/284617-1-connector/154_board_with_connector.jpg b/hardware/284617-1-connector/154_board_with_connector.jpg new file mode 100644 index 0000000000..3fa6b7ce06 Binary files /dev/null and b/hardware/284617-1-connector/154_board_with_connector.jpg differ diff --git a/hardware/368255-2-connector/121_board_with_connector.jpg b/hardware/368255-2-connector/121_board_with_connector.jpg new file mode 100644 index 0000000000..760d6399f3 Binary files /dev/null and b/hardware/368255-2-connector/121_board_with_connector.jpg differ diff --git a/hardware/963063-15_55_pin_connector/55_board_with_connector.jpg b/hardware/963063-15_55_pin_connector/55_board_with_connector.jpg new file mode 100644 index 0000000000..f61683918e Binary files /dev/null and b/hardware/963063-15_55_pin_connector/55_board_with_connector.jpg differ diff --git a/hardware/963063-15_55_pin_connector/963063-board.jpg b/hardware/963063-15_55_pin_connector/963063-board.jpg index 33b57ba772..50e83d0b85 100644 Binary files a/hardware/963063-15_55_pin_connector/963063-board.jpg and b/hardware/963063-15_55_pin_connector/963063-board.jpg differ diff --git a/hardware/Breakout_134pin_7-967288-1/134_board_with_connector.jpg b/hardware/Breakout_134pin_7-967288-1/134_board_with_connector.jpg new file mode 100644 index 0000000000..6d64b79d72 Binary files /dev/null and b/hardware/Breakout_134pin_7-967288-1/134_board_with_connector.jpg differ diff --git a/hardware/CJ125_board/readme.md b/hardware/CJ125_board/readme.md index 641a30baa5..b84a48d254 100644 --- a/hardware/CJ125_board/readme.md +++ b/hardware/CJ125_board/readme.md @@ -1,3 +1,5 @@ ![img](cj125_02_t.jpg) +[iBom](https://rusefi.com/docs/ibom/O2_input_CJ125_latest.html) + 2019 status: known to work, but documentation is very limited :( \ No newline at end of file diff --git a/hardware/breakout_48_pin_174917/174917.kicad_pcb b/hardware/breakout_48_pin_174917/174917.kicad_pcb index 43ce817e7a..9c57f5500b 100644 --- a/hardware/breakout_48_pin_174917/174917.kicad_pcb +++ b/hardware/breakout_48_pin_174917/174917.kicad_pcb @@ -2,7 +2,7 @@ (general (thickness 1.6002) - (drawings 57) + (drawings 129) (tracks 380) (zones 0) (modules 39) @@ -61,8 +61,8 @@ (mod_edge_width 0.381) (mod_text_size 1.524 1.524) (mod_text_width 0.3048) - (pad_size 1.4224 1.4224) - (pad_drill 1.016) + (pad_size 1.7 1.7) + (pad_drill 1) (pad_to_mask_clearance 0.0762) (aux_axis_origin 0 0) (visible_elements 7FFFFF7F) @@ -314,6 +314,48 @@ (diff_pair_gap 0.25) ) + (module Connector_PinHeader_2.54mm:PinHeader_1x03_P2.54mm_Vertical (layer F.Cu) (tedit 59FED5CC) (tstamp 5E433C7A) + (at 139.7 69.469 270) + (descr "Through hole straight pin header, 1x03, 2.54mm pitch, single row") + (tags "Through hole pin header THT 1x03 2.54mm single row") + (path /52230CF7) + (fp_text reference P2 (at 0 -2.33 90) (layer F.SilkS) hide + (effects (font (size 1 1) (thickness 0.15))) + ) + (fp_text value CONN_3 (at 0 7.41 90) (layer F.Fab) + (effects (font (size 1 1) (thickness 0.15))) + ) + (fp_text user %R (at 0 2.54) (layer F.Fab) + (effects (font (size 1 1) (thickness 0.15))) + ) + (fp_line (start 1.8 -1.8) (end -1.8 -1.8) (layer F.CrtYd) (width 0.05)) + (fp_line (start 1.8 6.85) (end 1.8 -1.8) (layer F.CrtYd) (width 0.05)) + (fp_line (start -1.8 6.85) (end 1.8 6.85) (layer F.CrtYd) (width 0.05)) + (fp_line (start -1.8 -1.8) (end -1.8 6.85) (layer F.CrtYd) (width 0.05)) + (fp_line (start -1.33 -1.33) (end 0 -1.33) (layer F.SilkS) (width 0.12)) + (fp_line (start -1.33 0) (end -1.33 -1.33) (layer F.SilkS) (width 0.12)) + (fp_line (start -1.33 1.27) (end 1.33 1.27) (layer F.SilkS) (width 0.12)) + (fp_line (start 1.33 1.27) (end 1.33 6.41) (layer F.SilkS) (width 0.12)) + (fp_line (start -1.33 1.27) (end -1.33 6.41) (layer F.SilkS) (width 0.12)) + (fp_line (start -1.33 6.41) (end 1.33 6.41) (layer F.SilkS) (width 0.12)) + (fp_line (start -1.27 -0.635) (end -0.635 -1.27) (layer F.Fab) (width 0.1)) + (fp_line (start -1.27 6.35) (end -1.27 -0.635) (layer F.Fab) (width 0.1)) + (fp_line (start 1.27 6.35) (end -1.27 6.35) (layer F.Fab) (width 0.1)) + (fp_line (start 1.27 -1.27) (end 1.27 6.35) (layer F.Fab) (width 0.1)) + (fp_line (start -0.635 -1.27) (end 1.27 -1.27) (layer F.Fab) (width 0.1)) + (pad 3 thru_hole oval (at 0 5.08 270) (size 1.7 1.7) (drill 1) (layers *.Cu *.Mask) + (net 10 "Net-(P14-Pad3)")) + (pad 2 thru_hole oval (at 0 2.54 270) (size 1.7 1.7) (drill 1) (layers *.Cu *.Mask) + (net 9 "Net-(P14-Pad2)")) + (pad 1 thru_hole rect (at 0 0 270) (size 1.7 1.7) (drill 1) (layers *.Cu *.Mask) + (net 8 "Net-(P14-Pad1)")) + (model ${KISYS3DMOD}/Connector_PinHeader_2.54mm.3dshapes/PinHeader_1x03_P2.54mm_Vertical.wrl + (at (xyz 0 0 0)) + (scale (xyz 1 1 1)) + (rotate (xyz 0 0 0)) + ) + ) + (module connector:174917 (layer F.Cu) (tedit 5E763CAD) (tstamp 5E4376B2) (at 69.723 57.785) (path /52230AB7) @@ -581,7 +623,7 @@ (descr "Through hole straight pin header, 1x03, 2.54mm pitch, single row") (tags "Through hole pin header THT 1x03 2.54mm single row") (path /52230CDE) - (fp_text reference P1 (at 0 -2.33 90) (layer F.SilkS) + (fp_text reference P1 (at 0 -2.33 90) (layer F.SilkS) hide (effects (font (size 1 1) (thickness 0.15))) ) (fp_text value CONN_3 (at 0 7.41 90) (layer F.Fab) @@ -618,54 +660,12 @@ ) ) - (module Connector_PinHeader_2.54mm:PinHeader_1x03_P2.54mm_Vertical (layer F.Cu) (tedit 59FED5CC) (tstamp 5E433C7A) - (at 139.7 69.469 270) - (descr "Through hole straight pin header, 1x03, 2.54mm pitch, single row") - (tags "Through hole pin header THT 1x03 2.54mm single row") - (path /52230CF7) - (fp_text reference P2 (at 0 -2.33 90) (layer F.SilkS) - (effects (font (size 1 1) (thickness 0.15))) - ) - (fp_text value CONN_3 (at 0 7.41 90) (layer F.Fab) - (effects (font (size 1 1) (thickness 0.15))) - ) - (fp_text user %R (at 0 2.54) (layer F.Fab) - (effects (font (size 1 1) (thickness 0.15))) - ) - (fp_line (start 1.8 -1.8) (end -1.8 -1.8) (layer F.CrtYd) (width 0.05)) - (fp_line (start 1.8 6.85) (end 1.8 -1.8) (layer F.CrtYd) (width 0.05)) - (fp_line (start -1.8 6.85) (end 1.8 6.85) (layer F.CrtYd) (width 0.05)) - (fp_line (start -1.8 -1.8) (end -1.8 6.85) (layer F.CrtYd) (width 0.05)) - (fp_line (start -1.33 -1.33) (end 0 -1.33) (layer F.SilkS) (width 0.12)) - (fp_line (start -1.33 0) (end -1.33 -1.33) (layer F.SilkS) (width 0.12)) - (fp_line (start -1.33 1.27) (end 1.33 1.27) (layer F.SilkS) (width 0.12)) - (fp_line (start 1.33 1.27) (end 1.33 6.41) (layer F.SilkS) (width 0.12)) - (fp_line (start -1.33 1.27) (end -1.33 6.41) (layer F.SilkS) (width 0.12)) - (fp_line (start -1.33 6.41) (end 1.33 6.41) (layer F.SilkS) (width 0.12)) - (fp_line (start -1.27 -0.635) (end -0.635 -1.27) (layer F.Fab) (width 0.1)) - (fp_line (start -1.27 6.35) (end -1.27 -0.635) (layer F.Fab) (width 0.1)) - (fp_line (start 1.27 6.35) (end -1.27 6.35) (layer F.Fab) (width 0.1)) - (fp_line (start 1.27 -1.27) (end 1.27 6.35) (layer F.Fab) (width 0.1)) - (fp_line (start -0.635 -1.27) (end 1.27 -1.27) (layer F.Fab) (width 0.1)) - (pad 3 thru_hole oval (at 0 5.08 270) (size 1.7 1.7) (drill 1) (layers *.Cu *.Mask) - (net 10 "Net-(P14-Pad3)")) - (pad 2 thru_hole oval (at 0 2.54 270) (size 1.7 1.7) (drill 1) (layers *.Cu *.Mask) - (net 9 "Net-(P14-Pad2)")) - (pad 1 thru_hole rect (at 0 0 270) (size 1.7 1.7) (drill 1) (layers *.Cu *.Mask) - (net 8 "Net-(P14-Pad1)")) - (model ${KISYS3DMOD}/Connector_PinHeader_2.54mm.3dshapes/PinHeader_1x03_P2.54mm_Vertical.wrl - (at (xyz 0 0 0)) - (scale (xyz 1 1 1)) - (rotate (xyz 0 0 0)) - ) - ) - (module Connector_PinHeader_2.54mm:PinHeader_1x01_P2.54mm_Vertical (layer F.Cu) (tedit 59FED5CC) (tstamp 5E433C90) (at 110.236 72.136) (descr "Through hole straight pin header, 1x01, 2.54mm pitch, single row") (tags "Through hole pin header THT 1x01 2.54mm single row") (path /52230DFB) - (fp_text reference P3 (at 0 -2.33) (layer F.SilkS) + (fp_text reference P3 (at 0 -2.33) (layer F.SilkS) hide (effects (font (size 1 1) (thickness 0.15))) ) (fp_text value CONN_1 (at 0 2.33) (layer F.Fab) @@ -703,7 +703,7 @@ (descr "Through hole straight pin header, 1x01, 2.54mm pitch, single row") (tags "Through hole pin header THT 1x01 2.54mm single row") (path /52230DFA) - (fp_text reference P4 (at 0 -2.33) (layer F.SilkS) + (fp_text reference P4 (at 0 -2.33) (layer F.SilkS) hide (effects (font (size 1 1) (thickness 0.15))) ) (fp_text value CONN_1 (at 0 2.33) (layer F.Fab) @@ -741,7 +741,7 @@ (descr "Through hole straight pin header, 1x01, 2.54mm pitch, single row") (tags "Through hole pin header THT 1x01 2.54mm single row") (path /52230DF7) - (fp_text reference P5 (at 0 -2.33) (layer F.SilkS) + (fp_text reference P5 (at 0 -2.33) (layer F.SilkS) hide (effects (font (size 1 1) (thickness 0.15))) ) (fp_text value CONN_1 (at 0 2.33) (layer F.Fab) @@ -779,7 +779,7 @@ (descr "Through hole straight pin header, 1x01, 2.54mm pitch, single row") (tags "Through hole pin header THT 1x01 2.54mm single row") (path /52230DF8) - (fp_text reference P6 (at 0 -2.33) (layer F.SilkS) + (fp_text reference P6 (at 0 -2.33) (layer F.SilkS) hide (effects (font (size 1 1) (thickness 0.15))) ) (fp_text value CONN_1 (at 0 2.33) (layer F.Fab) @@ -817,7 +817,7 @@ (descr "Through hole straight pin header, 1x01, 2.54mm pitch, single row") (tags "Through hole pin header THT 1x01 2.54mm single row") (path /52230D10) - (fp_text reference P7 (at 0 -2.33) (layer F.SilkS) + (fp_text reference P7 (at 0 -2.33) (layer F.SilkS) hide (effects (font (size 1 1) (thickness 0.15))) ) (fp_text value CONN_1 (at 0 2.33) (layer F.Fab) @@ -855,7 +855,7 @@ (descr "Through hole straight pin header, 1x01, 2.54mm pitch, single row") (tags "Through hole pin header THT 1x01 2.54mm single row") (path /52230D09) - (fp_text reference P8 (at 0 -2.33) (layer F.SilkS) + (fp_text reference P8 (at 0 -2.33) (layer F.SilkS) hide (effects (font (size 1 1) (thickness 0.15))) ) (fp_text value CONN_1 (at 0 2.33) (layer F.Fab) @@ -893,7 +893,7 @@ (descr "Through hole straight pin header, 1x01, 2.54mm pitch, single row") (tags "Through hole pin header THT 1x01 2.54mm single row") (path /52230E01) - (fp_text reference P9 (at 0 -2.33) (layer F.SilkS) + (fp_text reference P9 (at 0 -2.33) (layer F.SilkS) hide (effects (font (size 1 1) (thickness 0.15))) ) (fp_text value CONN_1 (at 0 2.33) (layer F.Fab) @@ -931,7 +931,7 @@ (descr "Through hole straight pin header, 1x01, 2.54mm pitch, single row") (tags "Through hole pin header THT 1x01 2.54mm single row") (path /52230E00) - (fp_text reference P10 (at 0 -2.33) (layer F.SilkS) + (fp_text reference P10 (at 0 -2.33) (layer F.SilkS) hide (effects (font (size 1 1) (thickness 0.15))) ) (fp_text value CONN_1 (at 0 2.33) (layer F.Fab) @@ -969,7 +969,7 @@ (descr "Through hole straight pin header, 1x01, 2.54mm pitch, single row") (tags "Through hole pin header THT 1x01 2.54mm single row") (path /52230E02) - (fp_text reference P11 (at 0 -2.33) (layer F.SilkS) + (fp_text reference P11 (at 0 -2.33) (layer F.SilkS) hide (effects (font (size 1 1) (thickness 0.15))) ) (fp_text value CONN_1 (at 0 2.33) (layer F.Fab) @@ -1007,7 +1007,7 @@ (descr "Through hole straight pin header, 1x01, 2.54mm pitch, single row") (tags "Through hole pin header THT 1x01 2.54mm single row") (path /52230E03) - (fp_text reference P12 (at 0 -2.33) (layer F.SilkS) + (fp_text reference P12 (at 0 -2.33) (layer F.SilkS) hide (effects (font (size 1 1) (thickness 0.15))) ) (fp_text value CONN_1 (at 0 2.33) (layer F.Fab) @@ -1045,7 +1045,7 @@ (descr "Through hole straight pin header, 1x03, 2.54mm pitch, single row") (tags "Through hole pin header THT 1x03 2.54mm single row") (path /52230E1C) - (fp_text reference P13 (at 0 -2.33 90) (layer F.SilkS) + (fp_text reference P13 (at 0 -2.33 90) (layer F.SilkS) hide (effects (font (size 1 1) (thickness 0.15))) ) (fp_text value CONN_3 (at 0 7.41 90) (layer F.Fab) @@ -1087,7 +1087,7 @@ (descr "Through hole straight pin header, 1x03, 2.54mm pitch, single row") (tags "Through hole pin header THT 1x03 2.54mm single row") (path /52230E1B) - (fp_text reference P14 (at 0 -2.33 90) (layer F.SilkS) + (fp_text reference P14 (at 0 -2.33 90) (layer F.SilkS) hide (effects (font (size 1 1) (thickness 0.15))) ) (fp_text value CONN_3 (at 0 7.41 90) (layer F.Fab) @@ -1129,7 +1129,7 @@ (descr "Through hole straight pin header, 1x01, 2.54mm pitch, single row") (tags "Through hole pin header THT 1x01 2.54mm single row") (path /52230E15) - (fp_text reference P15 (at 0 -2.33) (layer F.SilkS) + (fp_text reference P15 (at 0 -2.33) (layer F.SilkS) hide (effects (font (size 1 1) (thickness 0.15))) ) (fp_text value CONN_1 (at 0 2.33) (layer F.Fab) @@ -1167,7 +1167,7 @@ (descr "Through hole straight pin header, 1x01, 2.54mm pitch, single row") (tags "Through hole pin header THT 1x01 2.54mm single row") (path /52230E16) - (fp_text reference P16 (at 0 -2.33) (layer F.SilkS) + (fp_text reference P16 (at 0 -2.33) (layer F.SilkS) hide (effects (font (size 1 1) (thickness 0.15))) ) (fp_text value CONN_1 (at 0 2.33) (layer F.Fab) @@ -1205,7 +1205,7 @@ (descr "Through hole straight pin header, 1x01, 2.54mm pitch, single row") (tags "Through hole pin header THT 1x01 2.54mm single row") (path /52230E18) - (fp_text reference P17 (at 0 -2.33) (layer F.SilkS) + (fp_text reference P17 (at 0 -2.33) (layer F.SilkS) hide (effects (font (size 1 1) (thickness 0.15))) ) (fp_text value CONN_1 (at 0 2.33) (layer F.Fab) @@ -1243,7 +1243,7 @@ (descr "Through hole straight pin header, 1x01, 2.54mm pitch, single row") (tags "Through hole pin header THT 1x01 2.54mm single row") (path /52230E17) - (fp_text reference P18 (at 0 -2.33) (layer F.SilkS) + (fp_text reference P18 (at 0 -2.33) (layer F.SilkS) hide (effects (font (size 1 1) (thickness 0.15))) ) (fp_text value CONN_1 (at 0 2.33) (layer F.Fab) @@ -1281,7 +1281,7 @@ (descr "Through hole straight pin header, 1x01, 2.54mm pitch, single row") (tags "Through hole pin header THT 1x01 2.54mm single row") (path /52230E19) - (fp_text reference P19 (at 0 -2.33) (layer F.SilkS) + (fp_text reference P19 (at 0 -2.33) (layer F.SilkS) hide (effects (font (size 1 1) (thickness 0.15))) ) (fp_text value CONN_1 (at 0 2.33) (layer F.Fab) @@ -1319,7 +1319,7 @@ (descr "Through hole straight pin header, 1x01, 2.54mm pitch, single row") (tags "Through hole pin header THT 1x01 2.54mm single row") (path /52230E1A) - (fp_text reference P20 (at 0 -2.33) (layer F.SilkS) + (fp_text reference P20 (at 0 -2.33) (layer F.SilkS) hide (effects (font (size 1 1) (thickness 0.15))) ) (fp_text value CONN_1 (at 0 2.33) (layer F.Fab) @@ -1357,7 +1357,7 @@ (descr "Through hole straight pin header, 1x01, 2.54mm pitch, single row") (tags "Through hole pin header THT 1x01 2.54mm single row") (path /52230E13) - (fp_text reference P21 (at 0 -2.33) (layer F.SilkS) + (fp_text reference P21 (at 0 -2.33) (layer F.SilkS) hide (effects (font (size 1 1) (thickness 0.15))) ) (fp_text value CONN_1 (at 0 2.33) (layer F.Fab) @@ -1395,7 +1395,7 @@ (descr "Through hole straight pin header, 1x01, 2.54mm pitch, single row") (tags "Through hole pin header THT 1x01 2.54mm single row") (path /52230E14) - (fp_text reference P22 (at 0 -2.33) (layer F.SilkS) + (fp_text reference P22 (at 0 -2.33) (layer F.SilkS) hide (effects (font (size 1 1) (thickness 0.15))) ) (fp_text value CONN_1 (at 0 2.33) (layer F.Fab) @@ -1433,7 +1433,7 @@ (descr "Through hole straight pin header, 1x01, 2.54mm pitch, single row") (tags "Through hole pin header THT 1x01 2.54mm single row") (path /52230E12) - (fp_text reference P23 (at 0 -2.33) (layer F.SilkS) + (fp_text reference P23 (at 0 -2.33) (layer F.SilkS) hide (effects (font (size 1 1) (thickness 0.15))) ) (fp_text value CONN_1 (at 0 2.33) (layer F.Fab) @@ -1471,7 +1471,7 @@ (descr "Through hole straight pin header, 1x01, 2.54mm pitch, single row") (tags "Through hole pin header THT 1x01 2.54mm single row") (path /52230E11) - (fp_text reference P24 (at 0 -2.33) (layer F.SilkS) + (fp_text reference P24 (at 0 -2.33) (layer F.SilkS) hide (effects (font (size 1 1) (thickness 0.15))) ) (fp_text value CONN_1 (at 0 2.33) (layer F.Fab) @@ -1509,7 +1509,7 @@ (descr "Through hole straight pin header, 1x08, 2.54mm pitch, single row") (tags "Through hole pin header THT 1x08 2.54mm single row") (path /52230991) - (fp_text reference P26 (at 0 -2.33 90) (layer F.SilkS) + (fp_text reference P26 (at 0 -2.33 90) (layer F.SilkS) hide (effects (font (size 1 1) (thickness 0.15))) ) (fp_text value CONN_8 (at 0 20.11 90) (layer F.Fab) @@ -1561,7 +1561,7 @@ (descr "Through hole straight pin header, 1x08, 2.54mm pitch, single row") (tags "Through hole pin header THT 1x08 2.54mm single row") (path /522309A0) - (fp_text reference P27 (at 0 -2.33 90) (layer F.SilkS) + (fp_text reference P27 (at 0 -2.33 90) (layer F.SilkS) hide (effects (font (size 1 1) (thickness 0.15))) ) (fp_text value CONN_8 (at 0 20.11 90) (layer F.Fab) @@ -1613,7 +1613,7 @@ (descr "Through hole straight pin header, 1x08, 2.54mm pitch, single row") (tags "Through hole pin header THT 1x08 2.54mm single row") (path /522309BE) - (fp_text reference P30 (at 0 -2.33 90) (layer F.SilkS) + (fp_text reference P30 (at 0 -2.33 90) (layer F.SilkS) hide (effects (font (size 1 1) (thickness 0.15))) ) (fp_text value CONN_8 (at 0 20.11 90) (layer F.Fab) @@ -1665,7 +1665,7 @@ (descr "Through hole straight pin header, 1x08, 2.54mm pitch, single row") (tags "Through hole pin header THT 1x08 2.54mm single row") (path /522309BF) - (fp_text reference P31 (at 0 -2.33 90) (layer F.SilkS) + (fp_text reference P31 (at 0 -2.33 90) (layer F.SilkS) hide (effects (font (size 1 1) (thickness 0.15))) ) (fp_text value CONN_8 (at 0 20.11 90) (layer F.Fab) @@ -1717,7 +1717,7 @@ (descr "Through hole straight pin header, 1x08, 2.54mm pitch, single row") (tags "Through hole pin header THT 1x08 2.54mm single row") (path /52230BEA) - (fp_text reference P32 (at 0 -2.33 90) (layer F.SilkS) + (fp_text reference P32 (at 0 -2.33 90) (layer F.SilkS) hide (effects (font (size 1 1) (thickness 0.15))) ) (fp_text value CONN_8 (at 0 20.11 90) (layer F.Fab) @@ -1769,7 +1769,7 @@ (descr "Through hole straight pin header, 1x08, 2.54mm pitch, single row") (tags "Through hole pin header THT 1x08 2.54mm single row") (path /52230BE9) - (fp_text reference P33 (at 0 -2.33 90) (layer F.SilkS) + (fp_text reference P33 (at 0 -2.33 90) (layer F.SilkS) hide (effects (font (size 1 1) (thickness 0.15))) ) (fp_text value CONN_8 (at 0 20.11 90) (layer F.Fab) @@ -1821,7 +1821,7 @@ (descr "Through hole straight pin header, 1x08, 2.54mm pitch, single row") (tags "Through hole pin header THT 1x08 2.54mm single row") (path /52230BE6) - (fp_text reference P36 (at 0 -2.33 90) (layer F.SilkS) + (fp_text reference P36 (at 0 -2.33 90) (layer F.SilkS) hide (effects (font (size 1 1) (thickness 0.15))) ) (fp_text value CONN_8 (at 0 20.11 90) (layer F.Fab) @@ -1873,7 +1873,7 @@ (descr "Through hole straight pin header, 1x08, 2.54mm pitch, single row") (tags "Through hole pin header THT 1x08 2.54mm single row") (path /52230BE5) - (fp_text reference P37 (at 0 -2.33 90) (layer F.SilkS) + (fp_text reference P37 (at 0 -2.33 90) (layer F.SilkS) hide (effects (font (size 1 1) (thickness 0.15))) ) (fp_text value CONN_8 (at 0 20.11 90) (layer F.Fab) @@ -1925,7 +1925,7 @@ (descr "Through hole straight pin header, 1x01, 2.54mm pitch, single row") (tags "Through hole pin header THT 1x01 2.54mm single row") (path /52231347) - (fp_text reference P38 (at 0 -2.33) (layer F.SilkS) + (fp_text reference P38 (at 0 -2.33) (layer F.SilkS) hide (effects (font (size 1 1) (thickness 0.15))) ) (fp_text value CONN_1 (at 0 2.33) (layer F.Fab) @@ -1963,7 +1963,7 @@ (descr "Through hole straight pin header, 1x01, 2.54mm pitch, single row") (tags "Through hole pin header THT 1x01 2.54mm single row") (path /52231348) - (fp_text reference P39 (at 0 -2.33) (layer F.SilkS) + (fp_text reference P39 (at 0 -2.33) (layer F.SilkS) hide (effects (font (size 1 1) (thickness 0.15))) ) (fp_text value CONN_1 (at 0 2.33) (layer F.Fab) @@ -2039,7 +2039,7 @@ (descr "Through hole straight pin header, 1x01, 2.54mm pitch, single row") (tags "Through hole pin header THT 1x01 2.54mm single row") (path /52231345) - (fp_text reference P41 (at 0 -2.33) (layer F.SilkS) + (fp_text reference P41 (at 0 -2.33) (layer F.SilkS) hide (effects (font (size 1 1) (thickness 0.15))) ) (fp_text value CONN_1 (at 0 2.33) (layer F.Fab) @@ -2072,6 +2072,242 @@ ) ) + (gr_text "T\n" (at 131 60.25) (layer B.SilkS) (tstamp 5E8B9AAD) + (effects (font (size 1.016 1.016) (thickness 0.22352)) (justify mirror)) + ) + (gr_text V (at 134.75 60.25) (layer B.SilkS) (tstamp 5E8B9AAC) + (effects (font (size 1.016 1.016) (thickness 0.22352)) (justify mirror)) + ) + (gr_text D (at 109.855 60.175) (layer B.SilkS) (tstamp 5E8B9AAB) + (effects (font (size 1.016 1.016) (thickness 0.22352)) (justify mirror)) + ) + (gr_text F (at 112.75 60.175) (layer B.SilkS) (tstamp 5E8B9AAA) + (effects (font (size 1.016 1.016) (thickness 0.22352)) (justify mirror)) + ) + (gr_text H (at 115.25 60.25) (layer B.SilkS) (tstamp 5E8B9AA9) + (effects (font (size 1.016 1.016) (thickness 0.22352)) (justify mirror)) + ) + (gr_text J (at 118 60.175) (layer B.SilkS) (tstamp 5E8B9AA8) + (effects (font (size 1.016 1.016) (thickness 0.22352)) (justify mirror)) + ) + (gr_text L (at 120.5 60.175) (layer B.SilkS) (tstamp 5E8B9AA7) + (effects (font (size 1.016 1.016) (thickness 0.22352)) (justify mirror)) + ) + (gr_text N (at 123 60.175) (layer B.SilkS) (tstamp 5E8B9AA6) + (effects (font (size 1.016 1.016) (thickness 0.22352)) (justify mirror)) + ) + (gr_text P (at 125.5 60.175) (layer B.SilkS) (tstamp 5E8B9AA5) + (effects (font (size 1.016 1.016) (thickness 0.22352)) (justify mirror)) + ) + (gr_text R (at 128 60.25) (layer B.SilkS) (tstamp 5E8B9AA3) + (effects (font (size 1.016 1.016) (thickness 0.22352)) (justify mirror)) + ) + (gr_text J (at 82.55 60.175) (layer B.SilkS) (tstamp 5E8B9AA2) + (effects (font (size 1.016 1.016) (thickness 0.22352)) (justify mirror)) + ) + (gr_text H (at 80.01 60.175) (layer B.SilkS) (tstamp 5E8B9AA1) + (effects (font (size 1.016 1.016) (thickness 0.22352)) (justify mirror)) + ) + (gr_text L (at 85.09 60.175) (layer B.SilkS) (tstamp 5E8B9AA0) + (effects (font (size 1.016 1.016) (thickness 0.22352)) (justify mirror)) + ) + (gr_text N (at 87.63 60.175) (layer B.SilkS) (tstamp 5E8B9A9F) + (effects (font (size 1.016 1.016) (thickness 0.22352)) (justify mirror)) + ) + (gr_text P (at 90.17 60.175) (layer B.SilkS) (tstamp 5E8B9A9E) + (effects (font (size 1.016 1.016) (thickness 0.22352)) (justify mirror)) + ) + (gr_text R (at 92.71 60.175) (layer B.SilkS) (tstamp 5E8B9A9D) + (effects (font (size 1.016 1.016) (thickness 0.22352)) (justify mirror)) + ) + (gr_text X (at 137 60.25) (layer B.SilkS) (tstamp 5E8B9A4A) + (effects (font (size 1.016 1.016) (thickness 0.22352)) (justify mirror)) + ) + (gr_line (start 64.5 59.25) (end 64.5 73.5) (layer B.SilkS) (width 0.1) (tstamp 5E8B91CC)) + (gr_line (start 104.5 73.5) (end 104.5 59.25) (layer B.SilkS) (width 0.1) (tstamp 5E8B91CB)) + (gr_line (start 143.5 73.5) (end 104.5 73.5) (layer B.SilkS) (width 0.1) (tstamp 5E8B91CA)) + (gr_line (start 104.5 59.25) (end 143.5 59.25) (layer B.SilkS) (width 0.1) (tstamp 5E8B91C9)) + (gr_line (start 143.5 59.25) (end 143.5 73.5) (layer B.SilkS) (width 0.1) (tstamp 5E8B91C8)) + (gr_line (start 64.5 73.5) (end 104.5 73.5) (layer B.SilkS) (width 0.1) (tstamp 5E8B91C7)) + (gr_line (start 104.5 59.25) (end 64.5 59.25) (layer B.SilkS) (width 0.1) (tstamp 5E8B91C6)) + (gr_text "T\n" (at 131 72.5) (layer B.SilkS) (tstamp 5E8B91C5) + (effects (font (size 1.016 1.016) (thickness 0.22352)) (justify mirror)) + ) + (gr_text V (at 134.75 72.5) (layer B.SilkS) (tstamp 5E8B91C4) + (effects (font (size 1.016 1.016) (thickness 0.22352)) (justify mirror)) + ) + (gr_text D (at 109.855 72.425) (layer B.SilkS) (tstamp 5E8B91C3) + (effects (font (size 1.016 1.016) (thickness 0.22352)) (justify mirror)) + ) + (gr_text F (at 112.75 72.425) (layer B.SilkS) (tstamp 5E8B91C2) + (effects (font (size 1.016 1.016) (thickness 0.22352)) (justify mirror)) + ) + (gr_text H (at 115.25 72.5) (layer B.SilkS) (tstamp 5E8B91C1) + (effects (font (size 1.016 1.016) (thickness 0.22352)) (justify mirror)) + ) + (gr_text J (at 118 72.425) (layer B.SilkS) (tstamp 5E8B91C0) + (effects (font (size 1.016 1.016) (thickness 0.22352)) (justify mirror)) + ) + (gr_text L (at 120.5 72.425) (layer B.SilkS) (tstamp 5E8B91BF) + (effects (font (size 1.016 1.016) (thickness 0.22352)) (justify mirror)) + ) + (gr_text N (at 123 72.425) (layer B.SilkS) (tstamp 5E8B91BE) + (effects (font (size 1.016 1.016) (thickness 0.22352)) (justify mirror)) + ) + (gr_text P (at 125.5 72.425) (layer B.SilkS) (tstamp 5E8B91BD) + (effects (font (size 1.016 1.016) (thickness 0.22352)) (justify mirror)) + ) + (gr_text Z (at 142 69.5) (layer B.SilkS) (tstamp 5E8B91BC) + (effects (font (size 1.016 1.016) (thickness 0.22352)) (justify mirror)) + ) + (gr_text Y (at 142 72) (layer B.SilkS) (tstamp 5E8B91BB) + (effects (font (size 1.016 1.016) (thickness 0.22352)) (justify mirror)) + ) + (gr_text Y (at 142 64.75) (layer B.SilkS) (tstamp 5E8B91BA) + (effects (font (size 1.016 1.016) (thickness 0.22352)) (justify mirror)) + ) + (gr_text Z (at 142 62.25) (layer B.SilkS) (tstamp 5E8B91B9) + (effects (font (size 1.016 1.016) (thickness 0.22352)) (justify mirror)) + ) + (gr_text R (at 128 72.5) (layer B.SilkS) (tstamp 5E8B91B8) + (effects (font (size 1.016 1.016) (thickness 0.22352)) (justify mirror)) + ) + (gr_text E (at 75.75 64.75) (layer B.SilkS) (tstamp 5E8B91B7) + (effects (font (size 1.016 1.016) (thickness 0.22352)) (justify mirror)) + ) + (gr_text V (at 103.5 69.75) (layer B.SilkS) (tstamp 5E8B91B6) + (effects (font (size 1.016 1.016) (thickness 0.22352)) (justify mirror)) + ) + (gr_text B (at 105.41 69.75) (layer B.SilkS) (tstamp 5E8B91B5) + (effects (font (size 1.016 1.016) (thickness 0.22352)) (justify mirror)) + ) + (gr_text B (at 66 62) (layer B.SilkS) (tstamp 5E8B91B4) + (effects (font (size 1.016 1.016) (thickness 0.22352)) (justify mirror)) + ) + (gr_text C (at 73.75 65) (layer B.SilkS) (tstamp 5E8B91B3) + (effects (font (size 1.016 1.016) (thickness 0.22352)) (justify mirror)) + ) + (gr_text F (at 75.565 62.25) (layer B.SilkS) (tstamp 5E8B91B2) + (effects (font (size 1.016 1.016) (thickness 0.22352)) (justify mirror)) + ) + (gr_text J (at 82.55 72.425) (layer B.SilkS) (tstamp 5E8B91B1) + (effects (font (size 1.016 1.016) (thickness 0.22352)) (justify mirror)) + ) + (gr_text C (at 73.66 72.25) (layer B.SilkS) (tstamp 5E8B91B0) + (effects (font (size 1.016 1.016) (thickness 0.22352)) (justify mirror)) + ) + (gr_text D (at 73.66 69.75) (layer B.SilkS) (tstamp 5E8B91AF) + (effects (font (size 1.016 1.016) (thickness 0.22352)) (justify mirror)) + ) + (gr_text B (at 105.41 62.25) (layer B.SilkS) (tstamp 5E8B91AE) + (effects (font (size 1.016 1.016) (thickness 0.22352)) (justify mirror)) + ) + (gr_text F (at 75.565 69.75) (layer B.SilkS) (tstamp 5E8B91AD) + (effects (font (size 1.016 1.016) (thickness 0.22352)) (justify mirror)) + ) + (gr_text E (at 75.565 72.25) (layer B.SilkS) (tstamp 5E8B91AC) + (effects (font (size 1.016 1.016) (thickness 0.22352)) (justify mirror)) + ) + (gr_text H (at 80.01 72.425) (layer B.SilkS) (tstamp 5E8B91AB) + (effects (font (size 1.016 1.016) (thickness 0.22352)) (justify mirror)) + ) + (gr_text U (at 103.505 64.75) (layer B.SilkS) (tstamp 5E8B91AA) + (effects (font (size 1.016 1.016) (thickness 0.22352)) (justify mirror)) + ) + (gr_text U (at 103.5 72) (layer B.SilkS) (tstamp 5E8B91A9) + (effects (font (size 1.016 1.016) (thickness 0.22352)) (justify mirror)) + ) + (gr_text L (at 85.09 72.425) (layer B.SilkS) (tstamp 5E8B91A8) + (effects (font (size 1.016 1.016) (thickness 0.22352)) (justify mirror)) + ) + (gr_text A (at 105.5 64.75) (layer B.SilkS) (tstamp 5E8B91A7) + (effects (font (size 1.016 1.016) (thickness 0.22352)) (justify mirror)) + ) + (gr_text A (at 105.5 72) (layer B.SilkS) (tstamp 5E8B91A6) + (effects (font (size 1.016 1.016) (thickness 0.22352)) (justify mirror)) + ) + (gr_text V (at 103.5 62.25) (layer B.SilkS) (tstamp 5E8B91A5) + (effects (font (size 1.016 1.016) (thickness 0.22352)) (justify mirror)) + ) + (gr_text S (at 97.79 65) (layer B.SilkS) (tstamp 5E8B91A4) + (effects (font (size 1.016 1.016) (thickness 0.22352)) (justify mirror)) + ) + (gr_text T (at 97.75 69.75) (layer B.SilkS) (tstamp 5E8B91A3) + (effects (font (size 1.016 1.016) (thickness 0.22352)) (justify mirror)) + ) + (gr_text T (at 97.75 62.25) (layer B.SilkS) (tstamp 5E8B91A2) + (effects (font (size 1.016 1.016) (thickness 0.22352)) (justify mirror)) + ) + (gr_text N (at 87.63 72.425) (layer B.SilkS) (tstamp 5E8B91A1) + (effects (font (size 1.016 1.016) (thickness 0.22352)) (justify mirror)) + ) + (gr_text P (at 90.17 72.425) (layer B.SilkS) (tstamp 5E8B91A0) + (effects (font (size 1.016 1.016) (thickness 0.22352)) (justify mirror)) + ) + (gr_text S (at 97.79 72.25) (layer B.SilkS) (tstamp 5E8B919F) + (effects (font (size 1.016 1.016) (thickness 0.22352)) (justify mirror)) + ) + (gr_text A (at 66 64.75) (layer B.SilkS) (tstamp 5E8B919E) + (effects (font (size 1.016 1.016) (thickness 0.22352)) (justify mirror)) + ) + (gr_text "A\n" (at 66 72.25) (layer B.SilkS) (tstamp 5E8B919D) + (effects (font (size 1.016 1.016) (thickness 0.22352)) (justify mirror)) + ) + (gr_text "B\n" (at 66.04 69.5) (layer B.SilkS) (tstamp 5E8B919C) + (effects (font (size 1.016 1.016) (thickness 0.22352)) (justify mirror)) + ) + (gr_text D (at 73.66 62.25) (layer B.SilkS) (tstamp 5E8B919B) + (effects (font (size 1.016 1.016) (thickness 0.22352)) (justify mirror)) + ) + (gr_text R (at 92.71 72.425) (layer B.SilkS) (tstamp 5E8B919A) + (effects (font (size 1.016 1.016) (thickness 0.22352)) (justify mirror)) + ) + (gr_text X (at 137 72.5) (layer B.SilkS) (tstamp 5E8B902D) + (effects (font (size 1.016 1.016) (thickness 0.22352)) (justify mirror)) + ) + (gr_line (start 64.5 59.25) (end 104.5 59.25) (layer F.SilkS) (width 0.1) (tstamp 5E8B8CEA)) + (gr_line (start 64.5 73.5) (end 64.5 59.25) (layer F.SilkS) (width 0.1)) + (gr_line (start 104.5 73.5) (end 64.5 73.5) (layer F.SilkS) (width 0.1)) + (gr_line (start 143.5 59.25) (end 104.5 59.25) (layer F.SilkS) (width 0.1)) + (gr_line (start 143.5 73.5) (end 143.5 59.25) (layer F.SilkS) (width 0.1)) + (gr_line (start 104.5 73.5) (end 143.5 73.5) (layer F.SilkS) (width 0.1)) + (gr_line (start 104.5 59.25) (end 104.5 73.5) (layer F.SilkS) (width 0.1)) + (gr_text X (at 137 60.25) (layer F.SilkS) (tstamp 5E8B8BCF) + (effects (font (size 1.016 1.016) (thickness 0.22352))) + ) + (gr_text V (at 134.75 60.25) (layer F.SilkS) (tstamp 5E8B8B96) + (effects (font (size 1.016 1.016) (thickness 0.22352))) + ) + (gr_text "T\n" (at 131 60.25) (layer F.SilkS) (tstamp 5E8B8B94) + (effects (font (size 1.016 1.016) (thickness 0.22352))) + ) + (gr_text Y (at 142 64.5) (layer F.SilkS) (tstamp 5E8B8A05) + (effects (font (size 1.016 1.016) (thickness 0.22352))) + ) + (gr_text Z (at 142 62) (layer F.SilkS) (tstamp 5E8B8A02) + (effects (font (size 1.016 1.016) (thickness 0.22352))) + ) + (gr_text Z (at 142 69.25) (layer F.SilkS) (tstamp 5E8B89FA) + (effects (font (size 1.016 1.016) (thickness 0.22352))) + ) + (gr_text Y (at 142 72.25) (layer F.SilkS) (tstamp 5E8B89F6) + (effects (font (size 1.016 1.016) (thickness 0.22352))) + ) + (gr_text R (at 128 60.25) (layer F.SilkS) (tstamp 5E8B89D1) + (effects (font (size 1.016 1.016) (thickness 0.22352))) + ) + (gr_text P (at 125.5 60.325) (layer F.SilkS) (tstamp 5E8B89CF) + (effects (font (size 1.016 1.016) (thickness 0.22352))) + ) + (gr_text GND (at 66 53) (layer F.SilkS) (tstamp 5E8B81BC) + (effects (font (size 1 1) (thickness 0.2))) + ) + (gr_text GND (at 150 72) (layer F.SilkS) (tstamp 5E8B81BA) + (effects (font (size 1 1) (thickness 0.2))) + ) + (gr_text GND (at 151 57) (layer F.SilkS) + (effects (font (size 1 1) (thickness 0.2))) + ) (gr_poly (pts (xy 153.5 40.5) (xy 53.5 40.5) (xy 53.5 74) (xy 153.5 74)) (layer Edge.Cuts) (width 0.1)) (dimension 100.00125 (width 0.381) (layer Cmts.User) (gr_text "100.001 mm" (at 103.48532 77.185962 359.7135235) (layer Cmts.User) @@ -2085,64 +2321,22 @@ (arrow2a (pts (xy 53.492975 75.404981) (xy 54.616533 75.997027))) (arrow2b (pts (xy 53.492975 75.404981) (xy 54.622397 74.8242))) ) - (gr_text "R0.1\n" (at 150.5 67) (layer F.SilkS) + (gr_text "R0.2\n\n" (at 150.5 67) (layer F.SilkS) (effects (font (size 2.032 1.524) (thickness 0.3048))) ) - (gr_text F (at 140.97 69.215) (layer F.SilkS) + (gr_text N (at 123 60.325) (layer F.SilkS) (effects (font (size 1.016 1.016) (thickness 0.22352))) ) - (gr_text F (at 140.97 62.23) (layer F.SilkS) + (gr_text L (at 120.5 60.325) (layer F.SilkS) (effects (font (size 1.016 1.016) (thickness 0.22352))) ) - (gr_text E (at 140.97 64.77) (layer F.SilkS) + (gr_text J (at 118 60.325) (layer F.SilkS) (effects (font (size 1.016 1.016) (thickness 0.22352))) ) - (gr_text E (at 140.97 71.755) (layer F.SilkS) + (gr_text H (at 115.25 60.25) (layer F.SilkS) (effects (font (size 1.016 1.016) (thickness 0.22352))) ) - (gr_text 3D (at 139.7 62.865) (layer F.SilkS) - (effects (font (size 1.016 1.016) (thickness 0.22352))) - ) - (gr_text 3D (at 139.7 69.85) (layer F.SilkS) - (effects (font (size 1.016 1.016) (thickness 0.22352))) - ) - (gr_text 3C (at 139.7 65.405) (layer F.SilkS) - (effects (font (size 1.016 1.016) (thickness 0.22352))) - ) - (gr_text 3C (at 139.7 72.39) (layer F.SilkS) - (effects (font (size 1.016 1.016) (thickness 0.22352))) - ) - (gr_text 3A (at 132.08 64.77) (layer F.SilkS) - (effects (font (size 1.016 1.016) (thickness 0.22352))) - ) - (gr_text 3B (at 132.08 62.23) (layer F.SilkS) - (effects (font (size 1.016 1.016) (thickness 0.22352))) - ) - (gr_text 2P (at 128.27 69.85) (layer F.SilkS) - (effects (font (size 1.016 1.016) (thickness 0.22352))) - ) - (gr_text 2O (at 128.27 72.39) (layer F.SilkS) - (effects (font (size 1.016 1.016) (thickness 0.22352))) - ) - (gr_text 2O (at 128.27 64.77) (layer F.SilkS) - (effects (font (size 1.016 1.016) (thickness 0.22352))) - ) - (gr_text 2P (at 128.27 62.23) (layer F.SilkS) - (effects (font (size 1.016 1.016) (thickness 0.22352))) - ) - (gr_text N (at 122.555 60.325) (layer F.SilkS) - (effects (font (size 1.016 1.016) (thickness 0.22352))) - ) - (gr_text L (at 120.015 60.325) (layer F.SilkS) - (effects (font (size 1.016 1.016) (thickness 0.22352))) - ) - (gr_text J (at 117.475 60.325) (layer F.SilkS) - (effects (font (size 1.016 1.016) (thickness 0.22352))) - ) - (gr_text H (at 114.935 60.325) (layer F.SilkS) - (effects (font (size 1.016 1.016) (thickness 0.22352))) - ) - (gr_text F (at 112.395 60.325) (layer F.SilkS) + (gr_text F (at 112.75 60.325) (layer F.SilkS) (effects (font (size 1.016 1.016) (thickness 0.22352))) ) (gr_text D (at 109.855 60.325) (layer F.SilkS) @@ -2184,16 +2378,16 @@ (gr_text V (at 103.505 62.23) (layer F.SilkS) (effects (font (size 1.016 1.016) (thickness 0.22352))) ) - (gr_text 2B (at 105.41 62.23) (layer F.SilkS) + (gr_text B (at 105.41 62.23) (layer F.SilkS) (effects (font (size 1.016 1.016) (thickness 0.22352))) ) - (gr_text 2B (at 105.41 69.85) (layer F.SilkS) + (gr_text B (at 105.41 69.85) (layer F.SilkS) (effects (font (size 1.016 1.016) (thickness 0.22352))) ) - (gr_text 2A (at 105.41 65.405) (layer F.SilkS) + (gr_text A (at 105.41 65.405) (layer F.SilkS) (effects (font (size 1.016 1.016) (thickness 0.22352))) ) - (gr_text 2A (at 105.41 72.39) (layer F.SilkS) + (gr_text A (at 105.41 72.39) (layer F.SilkS) (effects (font (size 1.016 1.016) (thickness 0.22352))) ) (gr_text U (at 103.505 65.405) (layer F.SilkS) @@ -2208,10 +2402,10 @@ (gr_text F (at 75.565 62.23) (layer F.SilkS) (effects (font (size 1.016 1.016) (thickness 0.22352))) ) - (gr_text 1D (at 73.66 62.23) (layer F.SilkS) + (gr_text D (at 73.66 62.23) (layer F.SilkS) (effects (font (size 1.016 1.016) (thickness 0.22352))) ) - (gr_text 1C (at 73.66 65.405) (layer F.SilkS) + (gr_text C (at 73.66 65.405) (layer F.SilkS) (effects (font (size 1.016 1.016) (thickness 0.22352))) ) (gr_text F (at 75.565 69.215) (layer F.SilkS) @@ -2220,28 +2414,22 @@ (gr_text E (at 75.565 72.39) (layer F.SilkS) (effects (font (size 1.016 1.016) (thickness 0.22352))) ) - (gr_text 1D (at 73.66 69.215) (layer F.SilkS) + (gr_text D (at 73.66 69.215) (layer F.SilkS) (effects (font (size 1.016 1.016) (thickness 0.22352))) ) - (gr_text 1C (at 73.66 72.39) (layer F.SilkS) + (gr_text C (at 73.66 72.39) (layer F.SilkS) (effects (font (size 1.016 1.016) (thickness 0.22352))) ) - (gr_text 1B (at 66.04 69.215) (layer F.SilkS) + (gr_text B (at 66.04 69.215) (layer F.SilkS) (effects (font (size 1.016 1.016) (thickness 0.22352))) ) - (gr_text 1B (at 66.04 62.23) (layer F.SilkS) + (gr_text "B\n" (at 66.04 62.23) (layer F.SilkS) (effects (font (size 1.016 1.016) (thickness 0.22352))) ) - (gr_text 1A (at 66.04 64.77) (layer F.SilkS) + (gr_text "A\n" (at 66.04 64.77) (layer F.SilkS) (effects (font (size 1.016 1.016) (thickness 0.22352))) ) - (gr_text 1A (at 66.04 72.39) (layer F.SilkS) - (effects (font (size 1.016 1.016) (thickness 0.22352))) - ) - (gr_text 3B (at 132.08 69.85) (layer F.SilkS) - (effects (font (size 1.016 1.016) (thickness 0.22352))) - ) - (gr_text 3A (at 132.08 72.39) (layer F.SilkS) + (gr_text A (at 66.04 72.39) (layer F.SilkS) (effects (font (size 1.016 1.016) (thickness 0.22352))) ) (dimension 33.02 (width 0.3048) (layer Cmts.User) diff --git a/hardware/breakout_48_pin_174917/export/V0.2/48 pins breakout GERBER V0.2.zip b/hardware/breakout_48_pin_174917/export/V0.2/48 pins breakout GERBER V0.2.zip new file mode 100644 index 0000000000..121817169d Binary files /dev/null and b/hardware/breakout_48_pin_174917/export/V0.2/48 pins breakout GERBER V0.2.zip differ diff --git a/hardware/breakout_55_pin/fp-lib-table b/hardware/breakout_55_pin/fp-lib-table new file mode 100644 index 0000000000..b5f87b931d --- /dev/null +++ b/hardware/breakout_55_pin/fp-lib-table @@ -0,0 +1,3 @@ +(fp_lib_table + (lib (name rusEFI_Modules)(type KiCad)(uri ${KIPRJMOD}/../rusefi_lib/rusefi_lib.pretty)(options "")(descr "")) +) diff --git a/hardware/breakout_55_pin/gerbers/motronic-wire-adapter-0.1.zip b/hardware/breakout_55_pin/gerbers/motronic-wire-adapter-0.1.zip index 3678ed616f..8affd6d751 100644 Binary files a/hardware/breakout_55_pin/gerbers/motronic-wire-adapter-0.1.zip and b/hardware/breakout_55_pin/gerbers/motronic-wire-adapter-0.1.zip differ diff --git a/hardware/breakout_55_pin/motronic-wire-adapter.kicad_pcb b/hardware/breakout_55_pin/motronic-wire-adapter.kicad_pcb index baa7e42318..106cacee0a 100644 --- a/hardware/breakout_55_pin/motronic-wire-adapter.kicad_pcb +++ b/hardware/breakout_55_pin/motronic-wire-adapter.kicad_pcb @@ -216,7 +216,7 @@ (add_net N-000009) ) - (module rusEFI_Modules:55pin_china_bosch_motronic (layer F.Cu) (tedit 5E763381) (tstamp 54212F31) + (module rusEFI_Modules:55pin_china_bosch_motronic (layer F.Cu) (tedit 5E77B154) (tstamp 54212F31) (at 220 168.5 180) (path /542111B3) (fp_text reference P1 (at 0 27.5) (layer F.SilkS) hide @@ -225,6 +225,7 @@ (fp_text value MOTRONIC (at 0 2.25) (layer F.SilkS) hide (effects (font (size 1 1) (thickness 0.15))) ) + (fp_circle (center -52 7) (end -50 7) (layer F.SilkS) (width 0.12)) (fp_line (start 52 4.5) (end 49.5 4.5) (layer F.SilkS) (width 0.12)) (fp_line (start 66.5 4.5) (end 74.5 4.5) (layer F.SilkS) (width 0.3)) (fp_line (start -75.5 4.5) (end -83 4.5) (layer F.SilkS) (width 0.3)) @@ -314,7 +315,7 @@ ) (pad "" np_thru_hole circle (at 68 10.5 180) (size 7 7) (drill 3.5) (layers *.Cu *.Mask)) (pad "" np_thru_hole circle (at -76.5 10.5 180) (size 7 7) (drill 3.5) (layers *.Cu *.Mask)) - (pad "" np_thru_hole circle (at -53 7 180) (size 2 2) (drill 2) (layers *.Cu *.Mask)) + (pad "" np_thru_hole oval (at -51.5 7 180) (size 3 2) (drill 2) (layers *.Cu *.Mask)) (pad "" np_thru_hole circle (at 47 15.5 180) (size 2 2) (drill 2) (layers *.Cu *.Mask)) (pad "" np_thru_hole circle (at 55 8.5 180) (size 4.5 4.5) (drill 4.5) (layers *.Cu *.Mask)) (pad "" np_thru_hole circle (at -63 8.5 180) (size 4.5 4.5) (drill 4.5) (layers *.Cu *.Mask)) @@ -1700,125 +1701,125 @@ (xy 262.337489 162.15) (xy 262.662511 162.15) (xy 262.981287 162.086592) (xy 263.281568 161.962211) (xy 263.551814 161.781639) (xy 263.609531 161.723922) (xy 263.684603 161.815397) (xy 263.859347 161.958805) (xy 264.058711 162.065367) (xy 264.275033 162.130988) (xy 264.5 162.153145) (xy 265.5 162.153145) (xy 265.724967 162.130988) (xy 265.941289 162.065367) (xy 266.140653 161.958805) - (xy 266.315397 161.815397) (xy 266.458805 161.640653) (xy 266.565367 161.441289) (xy 266.596854 161.337489) (xy 271.35 161.337489) - (xy 271.35 161.662511) (xy 271.413408 161.981287) (xy 271.537789 162.281568) (xy 271.718361 162.551814) (xy 271.948186 162.781639) - (xy 272.218432 162.962211) (xy 272.518713 163.086592) (xy 272.837489 163.15) (xy 273.162511 163.15) (xy 273.481287 163.086592) - (xy 273.781568 162.962211) (xy 274.051814 162.781639) (xy 274.281639 162.551814) (xy 274.462211 162.281568) (xy 274.586592 161.981287) - (xy 274.65 161.662511) (xy 274.65 161.337489) (xy 274.586592 161.018713) (xy 274.462211 160.718432) (xy 274.281639 160.448186) - (xy 274.051814 160.218361) (xy 273.781568 160.037789) (xy 273.481287 159.913408) (xy 273.162511 159.85) (xy 272.837489 159.85) - (xy 272.518713 159.913408) (xy 272.218432 160.037789) (xy 271.948186 160.218361) (xy 271.718361 160.448186) (xy 271.537789 160.718432) - (xy 271.413408 161.018713) (xy 271.35 161.337489) (xy 266.596854 161.337489) (xy 266.630988 161.224967) (xy 266.653145 161) - (xy 266.653145 160) (xy 266.630988 159.775033) (xy 266.612588 159.714375) (xy 280.1 159.714375) (xy 280.1 160.285625) - (xy 280.211445 160.845899) (xy 280.430053 161.373665) (xy 280.747423 161.848642) (xy 281.151358 162.252577) (xy 281.626335 162.569947) - (xy 282.154101 162.788555) (xy 282.714375 162.9) (xy 283.285625 162.9) (xy 283.845899 162.788555) (xy 284.373665 162.569947) - (xy 284.848642 162.252577) (xy 285.252577 161.848642) (xy 285.569947 161.373665) (xy 285.788555 160.845899) (xy 285.9 160.285625) - (xy 285.9 159.714375) (xy 285.788555 159.154101) (xy 285.569947 158.626335) (xy 285.252577 158.151358) (xy 284.848642 157.747423) - (xy 284.61493 157.591261) (xy 292.35 157.591261) (xy 292.35 158.408739) (xy 292.509482 159.21051) (xy 292.822318 159.965762) - (xy 293.276485 160.645471) (xy 293.854529 161.223515) (xy 294.534238 161.677682) (xy 295.28949 161.990518) (xy 296.091261 162.15) - (xy 296.908739 162.15) (xy 297.71051 161.990518) (xy 298.465762 161.677682) (xy 299.145471 161.223515) (xy 299.723515 160.645471) - (xy 300.177682 159.965762) (xy 300.490518 159.21051) (xy 300.65 158.408739) (xy 300.65 157.591261) (xy 300.490518 156.78949) - (xy 300.177682 156.034238) (xy 299.723515 155.354529) (xy 299.145471 154.776485) (xy 298.465762 154.322318) (xy 297.71051 154.009482) - (xy 296.908739 153.85) (xy 296.091261 153.85) (xy 295.28949 154.009482) (xy 294.534238 154.322318) (xy 293.854529 154.776485) - (xy 293.276485 155.354529) (xy 292.822318 156.034238) (xy 292.509482 156.78949) (xy 292.35 157.591261) (xy 284.61493 157.591261) - (xy 284.373665 157.430053) (xy 283.845899 157.211445) (xy 283.285625 157.1) (xy 282.714375 157.1) (xy 282.154101 157.211445) - (xy 281.626335 157.430053) (xy 281.151358 157.747423) (xy 280.747423 158.151358) (xy 280.430053 158.626335) (xy 280.211445 159.154101) - (xy 280.1 159.714375) (xy 266.612588 159.714375) (xy 266.565367 159.558711) (xy 266.458805 159.359347) (xy 266.4 159.287693) - (xy 266.4 148.787005) (xy 266.451159 148.735846) (xy 294.068 148.735846) (xy 294.068 149.264154) (xy 294.171068 149.782311) - (xy 294.373242 150.270403) (xy 294.666755 150.709675) (xy 295.040325 151.083245) (xy 295.479597 151.376758) (xy 295.967689 151.578932) - (xy 296.485846 151.682) (xy 297.014154 151.682) (xy 297.532311 151.578932) (xy 298.020403 151.376758) (xy 298.459675 151.083245) - (xy 298.833245 150.709675) (xy 299.126758 150.270403) (xy 299.328932 149.782311) (xy 299.432 149.264154) (xy 299.432 148.735846) - (xy 299.328932 148.217689) (xy 299.126758 147.729597) (xy 298.833245 147.290325) (xy 298.459675 146.916755) (xy 298.020403 146.623242) - (xy 297.532311 146.421068) (xy 297.014154 146.318) (xy 296.485846 146.318) (xy 295.967689 146.421068) (xy 295.479597 146.623242) - (xy 295.040325 146.916755) (xy 294.666755 147.290325) (xy 294.373242 147.729597) (xy 294.171068 148.217689) (xy 294.068 148.735846) - (xy 266.451159 148.735846) (xy 266.475826 148.711179) (xy 266.683758 148.399987) (xy 266.826984 148.054209) (xy 266.9 147.687134) - (xy 266.9 147.312866) (xy 266.826984 146.945791) (xy 266.683758 146.600013) (xy 266.475826 146.288821) (xy 266.4 146.212995) - (xy 266.4 143.787005) (xy 266.475826 143.711179) (xy 266.683758 143.399987) (xy 266.826984 143.054209) (xy 266.9 142.687134) - (xy 266.9 142.312866) (xy 266.826984 141.945791) (xy 266.683758 141.600013) (xy 266.475826 141.288821) (xy 266.211179 141.024174) - (xy 265.899987 140.816242) (xy 265.554209 140.673016) (xy 265.187134 140.6) (xy 264.812866 140.6) (xy 264.445791 140.673016) - (xy 264.100013 140.816242) (xy 263.901724 140.948735) (xy 263.9 140.931231) (xy 263.9 140.931223) (xy 263.879743 140.725552) - (xy 263.79969 140.461651) (xy 263.66969 140.218438) (xy 263.608907 140.144374) (xy 263.538582 140.058683) (xy 263.538576 140.058677) - (xy 263.494738 140.005261) (xy 263.441324 139.961425) (xy 262.847917 139.368018) (xy 263.054209 139.326984) (xy 263.399987 139.183758) - (xy 263.711179 138.975826) (xy 263.975826 138.711179) (xy 264.183758 138.399987) (xy 264.326984 138.054209) (xy 264.4 137.687134) - (xy 264.4 137.312866) (xy 264.326984 136.945791) (xy 264.183758 136.600013) (xy 263.975826 136.288821) (xy 263.711179 136.024174) - (xy 263.399987 135.816242) (xy 263.269036 135.762) (xy 281.332045 135.762) (xy 281.339845 135.841198) (xy 281.362946 135.917352) - (xy 281.400461 135.987537) (xy 281.450946 136.049054) (xy 281.512463 136.099539) (xy 281.582648 136.137054) (xy 281.658802 136.160155) - (xy 281.738 136.167955) (xy 282.099 136.166) (xy 282.2 136.065) (xy 282.2 135.3) (xy 282.8 135.3) - (xy 282.8 136.065) (xy 282.901 136.166) (xy 283.262 136.167955) (xy 283.341198 136.160155) (xy 283.417352 136.137054) - (xy 283.487537 136.099539) (xy 283.549054 136.049054) (xy 283.599539 135.987537) (xy 283.637054 135.917352) (xy 283.660155 135.841198) - (xy 283.667955 135.762) (xy 283.666 135.401) (xy 283.565 135.3) (xy 282.8 135.3) (xy 282.2 135.3) - (xy 281.435 135.3) (xy 281.334 135.401) (xy 281.332045 135.762) (xy 263.269036 135.762) (xy 263.054209 135.673016) - (xy 262.687134 135.6) (xy 262.312866 135.6) (xy 261.945791 135.673016) (xy 261.600013 135.816242) (xy 261.4 135.949887) - (xy 261.4 134.050113) (xy 261.600013 134.183758) (xy 261.945791 134.326984) (xy 262.312866 134.4) (xy 262.687134 134.4) - (xy 263.054209 134.326984) (xy 263.269035 134.238) (xy 281.332045 134.238) (xy 281.334 134.599) (xy 281.435 134.7) - (xy 282.2 134.7) (xy 282.2 133.935) (xy 282.8 133.935) (xy 282.8 134.7) (xy 283.565 134.7) - (xy 283.666 134.599) (xy 283.667955 134.238) (xy 283.660155 134.158802) (xy 283.637054 134.082648) (xy 283.599539 134.012463) - (xy 283.549054 133.950946) (xy 283.487537 133.900461) (xy 283.417352 133.862946) (xy 283.341198 133.839845) (xy 283.262 133.832045) - (xy 282.901 133.834) (xy 282.8 133.935) (xy 282.2 133.935) (xy 282.099 133.834) (xy 281.738 133.832045) - (xy 281.658802 133.839845) (xy 281.582648 133.862946) (xy 281.512463 133.900461) (xy 281.450946 133.950946) (xy 281.400461 134.012463) - (xy 281.362946 134.082648) (xy 281.339845 134.158802) (xy 281.332045 134.238) (xy 263.269035 134.238) (xy 263.399987 134.183758) - (xy 263.711179 133.975826) (xy 263.975826 133.711179) (xy 264.183758 133.399987) (xy 264.326984 133.054209) (xy 264.4 132.687134) - (xy 264.4 132.312866) (xy 264.326984 131.945791) (xy 264.183758 131.600013) (xy 263.975826 131.288821) (xy 263.711179 131.024174) - (xy 263.399987 130.816242) (xy 263.054209 130.673016) (xy 262.687134 130.6) (xy 262.312866 130.6) (xy 261.945791 130.673016) - (xy 261.600013 130.816242) (xy 261.4 130.949887) (xy 261.4 130.579898) (xy 262.579899 129.4) (xy 262.687134 129.4) - (xy 263.054209 129.326984) (xy 263.399987 129.183758) (xy 263.711179 128.975826) (xy 263.975826 128.711179) (xy 264.183758 128.399987) - (xy 264.326984 128.054209) (xy 264.4 127.687134) (xy 264.4 127.312866) (xy 264.326984 126.945791) (xy 264.183758 126.600013) - (xy 263.975826 126.288821) (xy 263.9 126.212995) (xy 263.9 123.787005) (xy 263.951159 123.735846) (xy 294.068 123.735846) - (xy 294.068 124.264154) (xy 294.171068 124.782311) (xy 294.373242 125.270403) (xy 294.666755 125.709675) (xy 295.040325 126.083245) - (xy 295.479597 126.376758) (xy 295.967689 126.578932) (xy 296.485846 126.682) (xy 297.014154 126.682) (xy 297.532311 126.578932) - (xy 298.020403 126.376758) (xy 298.459675 126.083245) (xy 298.833245 125.709675) (xy 299.126758 125.270403) (xy 299.328932 124.782311) - (xy 299.432 124.264154) (xy 299.432 123.735846) (xy 299.328932 123.217689) (xy 299.126758 122.729597) (xy 298.833245 122.290325) - (xy 298.459675 121.916755) (xy 298.020403 121.623242) (xy 297.532311 121.421068) (xy 297.014154 121.318) (xy 296.485846 121.318) - (xy 295.967689 121.421068) (xy 295.479597 121.623242) (xy 295.040325 121.916755) (xy 294.666755 122.290325) (xy 294.373242 122.729597) - (xy 294.171068 123.217689) (xy 294.068 123.735846) (xy 263.951159 123.735846) (xy 263.975826 123.711179) (xy 264.183758 123.399987) - (xy 264.326984 123.054209) (xy 264.4 122.687134) (xy 264.4 122.312866) (xy 264.326984 121.945791) (xy 264.183758 121.600013) - (xy 263.975826 121.288821) (xy 263.711179 121.024174) (xy 263.399987 120.816242) (xy 263.119354 120.7) (xy 302.300001 120.7) - (xy 302.3 163.3) (xy 295.534386 163.3) (xy 295.499999 163.296613) (xy 295.465612 163.3) (xy 295.46561 163.3) - (xy 295.362776 163.310128) (xy 295.230825 163.350155) (xy 295.109218 163.415155) (xy 295.029342 163.480708) (xy 295.00263 163.50263) - (xy 294.980709 163.529341) (xy 290.710051 167.8) (xy 158.28995 167.8) (xy 154.019296 163.529347) (xy 153.99737 163.50263) - (xy 153.890781 163.415155) (xy 153.769175 163.350155) (xy 153.637224 163.310128) (xy 153.53439 163.3) (xy 153.534387 163.3) - (xy 153.5 163.296613) (xy 153.465613 163.3) (xy 146.2 163.3) (xy 146.2 157.591261) (xy 147.85 157.591261) - (xy 147.85 158.408739) (xy 148.009482 159.21051) (xy 148.322318 159.965762) (xy 148.776485 160.645471) (xy 149.354529 161.223515) - (xy 150.034238 161.677682) (xy 150.78949 161.990518) (xy 151.591261 162.15) (xy 152.408739 162.15) (xy 153.21051 161.990518) - (xy 153.965762 161.677682) (xy 154.645471 161.223515) (xy 155.223515 160.645471) (xy 155.677682 159.965762) (xy 155.78181 159.714375) - (xy 162.1 159.714375) (xy 162.1 160.285625) (xy 162.211445 160.845899) (xy 162.430053 161.373665) (xy 162.747423 161.848642) - (xy 163.151358 162.252577) (xy 163.626335 162.569947) (xy 164.154101 162.788555) (xy 164.714375 162.9) (xy 165.285625 162.9) - (xy 165.845899 162.788555) (xy 166.373665 162.569947) (xy 166.848642 162.252577) (xy 167.252577 161.848642) (xy 167.569947 161.373665) - (xy 167.788555 160.845899) (xy 167.9 160.285625) (xy 167.9 159.714375) (xy 167.788555 159.154101) (xy 167.569947 158.626335) - (xy 167.252577 158.151358) (xy 166.848642 157.747423) (xy 166.373665 157.430053) (xy 165.845899 157.211445) (xy 165.285625 157.1) - (xy 164.714375 157.1) (xy 164.154101 157.211445) (xy 163.626335 157.430053) (xy 163.151358 157.747423) (xy 162.747423 158.151358) - (xy 162.430053 158.626335) (xy 162.211445 159.154101) (xy 162.1 159.714375) (xy 155.78181 159.714375) (xy 155.990518 159.21051) - (xy 156.15 158.408739) (xy 156.15 157.591261) (xy 155.990518 156.78949) (xy 155.677682 156.034238) (xy 155.223515 155.354529) - (xy 154.645471 154.776485) (xy 153.965762 154.322318) (xy 153.21051 154.009482) (xy 152.408739 153.85) (xy 151.591261 153.85) - (xy 150.78949 154.009482) (xy 150.034238 154.322318) (xy 149.354529 154.776485) (xy 148.776485 155.354529) (xy 148.322318 156.034238) - (xy 148.009482 156.78949) (xy 147.85 157.591261) (xy 146.2 157.591261) (xy 146.2 148.735846) (xy 149.068 148.735846) - (xy 149.068 149.264154) (xy 149.171068 149.782311) (xy 149.373242 150.270403) (xy 149.666755 150.709675) (xy 150.040325 151.083245) - (xy 150.479597 151.376758) (xy 150.967689 151.578932) (xy 151.485846 151.682) (xy 152.014154 151.682) (xy 152.532311 151.578932) - (xy 153.020403 151.376758) (xy 153.459675 151.083245) (xy 153.833245 150.709675) (xy 154.126758 150.270403) (xy 154.328932 149.782311) - (xy 154.432 149.264154) (xy 154.432 148.735846) (xy 154.328932 148.217689) (xy 154.126758 147.729597) (xy 153.833245 147.290325) - (xy 153.459675 146.916755) (xy 153.020403 146.623242) (xy 152.532311 146.421068) (xy 152.014154 146.318) (xy 151.485846 146.318) - (xy 150.967689 146.421068) (xy 150.479597 146.623242) (xy 150.040325 146.916755) (xy 149.666755 147.290325) (xy 149.373242 147.729597) - (xy 149.171068 148.217689) (xy 149.068 148.735846) (xy 146.2 148.735846) (xy 146.2 135.762) (xy 156.332045 135.762) - (xy 156.339845 135.841198) (xy 156.362946 135.917352) (xy 156.400461 135.987537) (xy 156.450946 136.049054) (xy 156.512463 136.099539) - (xy 156.582648 136.137054) (xy 156.658802 136.160155) (xy 156.738 136.167955) (xy 157.099 136.166) (xy 157.2 136.065) - (xy 157.2 135.3) (xy 157.8 135.3) (xy 157.8 136.065) (xy 157.901 136.166) (xy 158.262 136.167955) - (xy 158.341198 136.160155) (xy 158.417352 136.137054) (xy 158.487537 136.099539) (xy 158.549054 136.049054) (xy 158.599539 135.987537) - (xy 158.637054 135.917352) (xy 158.660155 135.841198) (xy 158.667955 135.762) (xy 158.666 135.401) (xy 158.565 135.3) - (xy 157.8 135.3) (xy 157.2 135.3) (xy 156.435 135.3) (xy 156.334 135.401) (xy 156.332045 135.762) - (xy 146.2 135.762) (xy 146.2 134.238) (xy 156.332045 134.238) (xy 156.334 134.599) (xy 156.435 134.7) - (xy 157.2 134.7) (xy 157.2 133.935) (xy 157.8 133.935) (xy 157.8 134.7) (xy 158.565 134.7) - (xy 158.666 134.599) (xy 158.667955 134.238) (xy 158.660155 134.158802) (xy 158.637054 134.082648) (xy 158.599539 134.012463) - (xy 158.549054 133.950946) (xy 158.487537 133.900461) (xy 158.417352 133.862946) (xy 158.341198 133.839845) (xy 158.262 133.832045) - (xy 157.901 133.834) (xy 157.8 133.935) (xy 157.2 133.935) (xy 157.099 133.834) (xy 156.738 133.832045) - (xy 156.658802 133.839845) (xy 156.582648 133.862946) (xy 156.512463 133.900461) (xy 156.450946 133.950946) (xy 156.400461 134.012463) - (xy 156.362946 134.082648) (xy 156.339845 134.158802) (xy 156.332045 134.238) (xy 146.2 134.238) (xy 146.2 123.735846) - (xy 149.068 123.735846) (xy 149.068 124.264154) (xy 149.171068 124.782311) (xy 149.373242 125.270403) (xy 149.666755 125.709675) - (xy 150.040325 126.083245) (xy 150.479597 126.376758) (xy 150.967689 126.578932) (xy 151.485846 126.682) (xy 152.014154 126.682) - (xy 152.532311 126.578932) (xy 153.020403 126.376758) (xy 153.459675 126.083245) (xy 153.833245 125.709675) (xy 154.126758 125.270403) - (xy 154.328932 124.782311) (xy 154.432 124.264154) (xy 154.432 123.735846) (xy 154.328932 123.217689) (xy 154.126758 122.729597) - (xy 153.833245 122.290325) (xy 153.459675 121.916755) (xy 153.020403 121.623242) (xy 152.532311 121.421068) (xy 152.014154 121.318) - (xy 151.485846 121.318) (xy 150.967689 121.421068) (xy 150.479597 121.623242) (xy 150.040325 121.916755) (xy 149.666755 122.290325) - (xy 149.373242 122.729597) (xy 149.171068 123.217689) (xy 149.068 123.735846) (xy 146.2 123.735846) (xy 146.2 120.7) - (xy 176.880646 120.7) + (xy 266.315397 161.815397) (xy 266.458805 161.640653) (xy 266.533985 161.5) (xy 269.342017 161.5) (xy 269.373875 161.823456) + (xy 269.468223 162.134483) (xy 269.621438 162.421126) (xy 269.827629 162.672371) (xy 270.078874 162.878562) (xy 270.365517 163.031777) + (xy 270.676544 163.126125) (xy 270.918948 163.15) (xy 272.081052 163.15) (xy 272.323456 163.126125) (xy 272.634483 163.031777) + (xy 272.921126 162.878562) (xy 273.172371 162.672371) (xy 273.378562 162.421126) (xy 273.531777 162.134483) (xy 273.626125 161.823456) + (xy 273.657983 161.5) (xy 273.626125 161.176544) (xy 273.531777 160.865517) (xy 273.378562 160.578874) (xy 273.172371 160.327629) + (xy 272.921126 160.121438) (xy 272.634483 159.968223) (xy 272.323456 159.873875) (xy 272.081052 159.85) (xy 270.918948 159.85) + (xy 270.676544 159.873875) (xy 270.365517 159.968223) (xy 270.078874 160.121438) (xy 269.827629 160.327629) (xy 269.621438 160.578874) + (xy 269.468223 160.865517) (xy 269.373875 161.176544) (xy 269.342017 161.5) (xy 266.533985 161.5) (xy 266.565367 161.441289) + (xy 266.630988 161.224967) (xy 266.653145 161) (xy 266.653145 160) (xy 266.630988 159.775033) (xy 266.612588 159.714375) + (xy 280.1 159.714375) (xy 280.1 160.285625) (xy 280.211445 160.845899) (xy 280.430053 161.373665) (xy 280.747423 161.848642) + (xy 281.151358 162.252577) (xy 281.626335 162.569947) (xy 282.154101 162.788555) (xy 282.714375 162.9) (xy 283.285625 162.9) + (xy 283.845899 162.788555) (xy 284.373665 162.569947) (xy 284.848642 162.252577) (xy 285.252577 161.848642) (xy 285.569947 161.373665) + (xy 285.788555 160.845899) (xy 285.9 160.285625) (xy 285.9 159.714375) (xy 285.788555 159.154101) (xy 285.569947 158.626335) + (xy 285.252577 158.151358) (xy 284.848642 157.747423) (xy 284.61493 157.591261) (xy 292.35 157.591261) (xy 292.35 158.408739) + (xy 292.509482 159.21051) (xy 292.822318 159.965762) (xy 293.276485 160.645471) (xy 293.854529 161.223515) (xy 294.534238 161.677682) + (xy 295.28949 161.990518) (xy 296.091261 162.15) (xy 296.908739 162.15) (xy 297.71051 161.990518) (xy 298.465762 161.677682) + (xy 299.145471 161.223515) (xy 299.723515 160.645471) (xy 300.177682 159.965762) (xy 300.490518 159.21051) (xy 300.65 158.408739) + (xy 300.65 157.591261) (xy 300.490518 156.78949) (xy 300.177682 156.034238) (xy 299.723515 155.354529) (xy 299.145471 154.776485) + (xy 298.465762 154.322318) (xy 297.71051 154.009482) (xy 296.908739 153.85) (xy 296.091261 153.85) (xy 295.28949 154.009482) + (xy 294.534238 154.322318) (xy 293.854529 154.776485) (xy 293.276485 155.354529) (xy 292.822318 156.034238) (xy 292.509482 156.78949) + (xy 292.35 157.591261) (xy 284.61493 157.591261) (xy 284.373665 157.430053) (xy 283.845899 157.211445) (xy 283.285625 157.1) + (xy 282.714375 157.1) (xy 282.154101 157.211445) (xy 281.626335 157.430053) (xy 281.151358 157.747423) (xy 280.747423 158.151358) + (xy 280.430053 158.626335) (xy 280.211445 159.154101) (xy 280.1 159.714375) (xy 266.612588 159.714375) (xy 266.565367 159.558711) + (xy 266.458805 159.359347) (xy 266.4 159.287693) (xy 266.4 148.787005) (xy 266.451159 148.735846) (xy 294.068 148.735846) + (xy 294.068 149.264154) (xy 294.171068 149.782311) (xy 294.373242 150.270403) (xy 294.666755 150.709675) (xy 295.040325 151.083245) + (xy 295.479597 151.376758) (xy 295.967689 151.578932) (xy 296.485846 151.682) (xy 297.014154 151.682) (xy 297.532311 151.578932) + (xy 298.020403 151.376758) (xy 298.459675 151.083245) (xy 298.833245 150.709675) (xy 299.126758 150.270403) (xy 299.328932 149.782311) + (xy 299.432 149.264154) (xy 299.432 148.735846) (xy 299.328932 148.217689) (xy 299.126758 147.729597) (xy 298.833245 147.290325) + (xy 298.459675 146.916755) (xy 298.020403 146.623242) (xy 297.532311 146.421068) (xy 297.014154 146.318) (xy 296.485846 146.318) + (xy 295.967689 146.421068) (xy 295.479597 146.623242) (xy 295.040325 146.916755) (xy 294.666755 147.290325) (xy 294.373242 147.729597) + (xy 294.171068 148.217689) (xy 294.068 148.735846) (xy 266.451159 148.735846) (xy 266.475826 148.711179) (xy 266.683758 148.399987) + (xy 266.826984 148.054209) (xy 266.9 147.687134) (xy 266.9 147.312866) (xy 266.826984 146.945791) (xy 266.683758 146.600013) + (xy 266.475826 146.288821) (xy 266.4 146.212995) (xy 266.4 143.787005) (xy 266.475826 143.711179) (xy 266.683758 143.399987) + (xy 266.826984 143.054209) (xy 266.9 142.687134) (xy 266.9 142.312866) (xy 266.826984 141.945791) (xy 266.683758 141.600013) + (xy 266.475826 141.288821) (xy 266.211179 141.024174) (xy 265.899987 140.816242) (xy 265.554209 140.673016) (xy 265.187134 140.6) + (xy 264.812866 140.6) (xy 264.445791 140.673016) (xy 264.100013 140.816242) (xy 263.901724 140.948735) (xy 263.9 140.931231) + (xy 263.9 140.931223) (xy 263.879743 140.725552) (xy 263.79969 140.461651) (xy 263.66969 140.218438) (xy 263.608907 140.144374) + (xy 263.538582 140.058683) (xy 263.538576 140.058677) (xy 263.494738 140.005261) (xy 263.441324 139.961425) (xy 262.847917 139.368018) + (xy 263.054209 139.326984) (xy 263.399987 139.183758) (xy 263.711179 138.975826) (xy 263.975826 138.711179) (xy 264.183758 138.399987) + (xy 264.326984 138.054209) (xy 264.4 137.687134) (xy 264.4 137.312866) (xy 264.326984 136.945791) (xy 264.183758 136.600013) + (xy 263.975826 136.288821) (xy 263.711179 136.024174) (xy 263.399987 135.816242) (xy 263.269036 135.762) (xy 281.332045 135.762) + (xy 281.339845 135.841198) (xy 281.362946 135.917352) (xy 281.400461 135.987537) (xy 281.450946 136.049054) (xy 281.512463 136.099539) + (xy 281.582648 136.137054) (xy 281.658802 136.160155) (xy 281.738 136.167955) (xy 282.099 136.166) (xy 282.2 136.065) + (xy 282.2 135.3) (xy 282.8 135.3) (xy 282.8 136.065) (xy 282.901 136.166) (xy 283.262 136.167955) + (xy 283.341198 136.160155) (xy 283.417352 136.137054) (xy 283.487537 136.099539) (xy 283.549054 136.049054) (xy 283.599539 135.987537) + (xy 283.637054 135.917352) (xy 283.660155 135.841198) (xy 283.667955 135.762) (xy 283.666 135.401) (xy 283.565 135.3) + (xy 282.8 135.3) (xy 282.2 135.3) (xy 281.435 135.3) (xy 281.334 135.401) (xy 281.332045 135.762) + (xy 263.269036 135.762) (xy 263.054209 135.673016) (xy 262.687134 135.6) (xy 262.312866 135.6) (xy 261.945791 135.673016) + (xy 261.600013 135.816242) (xy 261.4 135.949887) (xy 261.4 134.050113) (xy 261.600013 134.183758) (xy 261.945791 134.326984) + (xy 262.312866 134.4) (xy 262.687134 134.4) (xy 263.054209 134.326984) (xy 263.269035 134.238) (xy 281.332045 134.238) + (xy 281.334 134.599) (xy 281.435 134.7) (xy 282.2 134.7) (xy 282.2 133.935) (xy 282.8 133.935) + (xy 282.8 134.7) (xy 283.565 134.7) (xy 283.666 134.599) (xy 283.667955 134.238) (xy 283.660155 134.158802) + (xy 283.637054 134.082648) (xy 283.599539 134.012463) (xy 283.549054 133.950946) (xy 283.487537 133.900461) (xy 283.417352 133.862946) + (xy 283.341198 133.839845) (xy 283.262 133.832045) (xy 282.901 133.834) (xy 282.8 133.935) (xy 282.2 133.935) + (xy 282.099 133.834) (xy 281.738 133.832045) (xy 281.658802 133.839845) (xy 281.582648 133.862946) (xy 281.512463 133.900461) + (xy 281.450946 133.950946) (xy 281.400461 134.012463) (xy 281.362946 134.082648) (xy 281.339845 134.158802) (xy 281.332045 134.238) + (xy 263.269035 134.238) (xy 263.399987 134.183758) (xy 263.711179 133.975826) (xy 263.975826 133.711179) (xy 264.183758 133.399987) + (xy 264.326984 133.054209) (xy 264.4 132.687134) (xy 264.4 132.312866) (xy 264.326984 131.945791) (xy 264.183758 131.600013) + (xy 263.975826 131.288821) (xy 263.711179 131.024174) (xy 263.399987 130.816242) (xy 263.054209 130.673016) (xy 262.687134 130.6) + (xy 262.312866 130.6) (xy 261.945791 130.673016) (xy 261.600013 130.816242) (xy 261.4 130.949887) (xy 261.4 130.579898) + (xy 262.579899 129.4) (xy 262.687134 129.4) (xy 263.054209 129.326984) (xy 263.399987 129.183758) (xy 263.711179 128.975826) + (xy 263.975826 128.711179) (xy 264.183758 128.399987) (xy 264.326984 128.054209) (xy 264.4 127.687134) (xy 264.4 127.312866) + (xy 264.326984 126.945791) (xy 264.183758 126.600013) (xy 263.975826 126.288821) (xy 263.9 126.212995) (xy 263.9 123.787005) + (xy 263.951159 123.735846) (xy 294.068 123.735846) (xy 294.068 124.264154) (xy 294.171068 124.782311) (xy 294.373242 125.270403) + (xy 294.666755 125.709675) (xy 295.040325 126.083245) (xy 295.479597 126.376758) (xy 295.967689 126.578932) (xy 296.485846 126.682) + (xy 297.014154 126.682) (xy 297.532311 126.578932) (xy 298.020403 126.376758) (xy 298.459675 126.083245) (xy 298.833245 125.709675) + (xy 299.126758 125.270403) (xy 299.328932 124.782311) (xy 299.432 124.264154) (xy 299.432 123.735846) (xy 299.328932 123.217689) + (xy 299.126758 122.729597) (xy 298.833245 122.290325) (xy 298.459675 121.916755) (xy 298.020403 121.623242) (xy 297.532311 121.421068) + (xy 297.014154 121.318) (xy 296.485846 121.318) (xy 295.967689 121.421068) (xy 295.479597 121.623242) (xy 295.040325 121.916755) + (xy 294.666755 122.290325) (xy 294.373242 122.729597) (xy 294.171068 123.217689) (xy 294.068 123.735846) (xy 263.951159 123.735846) + (xy 263.975826 123.711179) (xy 264.183758 123.399987) (xy 264.326984 123.054209) (xy 264.4 122.687134) (xy 264.4 122.312866) + (xy 264.326984 121.945791) (xy 264.183758 121.600013) (xy 263.975826 121.288821) (xy 263.711179 121.024174) (xy 263.399987 120.816242) + (xy 263.119354 120.7) (xy 302.300001 120.7) (xy 302.3 163.3) (xy 295.534386 163.3) (xy 295.499999 163.296613) + (xy 295.465612 163.3) (xy 295.46561 163.3) (xy 295.362776 163.310128) (xy 295.230825 163.350155) (xy 295.109218 163.415155) + (xy 295.029342 163.480708) (xy 295.00263 163.50263) (xy 294.980709 163.529341) (xy 290.710051 167.8) (xy 158.28995 167.8) + (xy 154.019296 163.529347) (xy 153.99737 163.50263) (xy 153.890781 163.415155) (xy 153.769175 163.350155) (xy 153.637224 163.310128) + (xy 153.53439 163.3) (xy 153.534387 163.3) (xy 153.5 163.296613) (xy 153.465613 163.3) (xy 146.2 163.3) + (xy 146.2 157.591261) (xy 147.85 157.591261) (xy 147.85 158.408739) (xy 148.009482 159.21051) (xy 148.322318 159.965762) + (xy 148.776485 160.645471) (xy 149.354529 161.223515) (xy 150.034238 161.677682) (xy 150.78949 161.990518) (xy 151.591261 162.15) + (xy 152.408739 162.15) (xy 153.21051 161.990518) (xy 153.965762 161.677682) (xy 154.645471 161.223515) (xy 155.223515 160.645471) + (xy 155.677682 159.965762) (xy 155.78181 159.714375) (xy 162.1 159.714375) (xy 162.1 160.285625) (xy 162.211445 160.845899) + (xy 162.430053 161.373665) (xy 162.747423 161.848642) (xy 163.151358 162.252577) (xy 163.626335 162.569947) (xy 164.154101 162.788555) + (xy 164.714375 162.9) (xy 165.285625 162.9) (xy 165.845899 162.788555) (xy 166.373665 162.569947) (xy 166.848642 162.252577) + (xy 167.252577 161.848642) (xy 167.569947 161.373665) (xy 167.788555 160.845899) (xy 167.9 160.285625) (xy 167.9 159.714375) + (xy 167.788555 159.154101) (xy 167.569947 158.626335) (xy 167.252577 158.151358) (xy 166.848642 157.747423) (xy 166.373665 157.430053) + (xy 165.845899 157.211445) (xy 165.285625 157.1) (xy 164.714375 157.1) (xy 164.154101 157.211445) (xy 163.626335 157.430053) + (xy 163.151358 157.747423) (xy 162.747423 158.151358) (xy 162.430053 158.626335) (xy 162.211445 159.154101) (xy 162.1 159.714375) + (xy 155.78181 159.714375) (xy 155.990518 159.21051) (xy 156.15 158.408739) (xy 156.15 157.591261) (xy 155.990518 156.78949) + (xy 155.677682 156.034238) (xy 155.223515 155.354529) (xy 154.645471 154.776485) (xy 153.965762 154.322318) (xy 153.21051 154.009482) + (xy 152.408739 153.85) (xy 151.591261 153.85) (xy 150.78949 154.009482) (xy 150.034238 154.322318) (xy 149.354529 154.776485) + (xy 148.776485 155.354529) (xy 148.322318 156.034238) (xy 148.009482 156.78949) (xy 147.85 157.591261) (xy 146.2 157.591261) + (xy 146.2 148.735846) (xy 149.068 148.735846) (xy 149.068 149.264154) (xy 149.171068 149.782311) (xy 149.373242 150.270403) + (xy 149.666755 150.709675) (xy 150.040325 151.083245) (xy 150.479597 151.376758) (xy 150.967689 151.578932) (xy 151.485846 151.682) + (xy 152.014154 151.682) (xy 152.532311 151.578932) (xy 153.020403 151.376758) (xy 153.459675 151.083245) (xy 153.833245 150.709675) + (xy 154.126758 150.270403) (xy 154.328932 149.782311) (xy 154.432 149.264154) (xy 154.432 148.735846) (xy 154.328932 148.217689) + (xy 154.126758 147.729597) (xy 153.833245 147.290325) (xy 153.459675 146.916755) (xy 153.020403 146.623242) (xy 152.532311 146.421068) + (xy 152.014154 146.318) (xy 151.485846 146.318) (xy 150.967689 146.421068) (xy 150.479597 146.623242) (xy 150.040325 146.916755) + (xy 149.666755 147.290325) (xy 149.373242 147.729597) (xy 149.171068 148.217689) (xy 149.068 148.735846) (xy 146.2 148.735846) + (xy 146.2 135.762) (xy 156.332045 135.762) (xy 156.339845 135.841198) (xy 156.362946 135.917352) (xy 156.400461 135.987537) + (xy 156.450946 136.049054) (xy 156.512463 136.099539) (xy 156.582648 136.137054) (xy 156.658802 136.160155) (xy 156.738 136.167955) + (xy 157.099 136.166) (xy 157.2 136.065) (xy 157.2 135.3) (xy 157.8 135.3) (xy 157.8 136.065) + (xy 157.901 136.166) (xy 158.262 136.167955) (xy 158.341198 136.160155) (xy 158.417352 136.137054) (xy 158.487537 136.099539) + (xy 158.549054 136.049054) (xy 158.599539 135.987537) (xy 158.637054 135.917352) (xy 158.660155 135.841198) (xy 158.667955 135.762) + (xy 158.666 135.401) (xy 158.565 135.3) (xy 157.8 135.3) (xy 157.2 135.3) (xy 156.435 135.3) + (xy 156.334 135.401) (xy 156.332045 135.762) (xy 146.2 135.762) (xy 146.2 134.238) (xy 156.332045 134.238) + (xy 156.334 134.599) (xy 156.435 134.7) (xy 157.2 134.7) (xy 157.2 133.935) (xy 157.8 133.935) + (xy 157.8 134.7) (xy 158.565 134.7) (xy 158.666 134.599) (xy 158.667955 134.238) (xy 158.660155 134.158802) + (xy 158.637054 134.082648) (xy 158.599539 134.012463) (xy 158.549054 133.950946) (xy 158.487537 133.900461) (xy 158.417352 133.862946) + (xy 158.341198 133.839845) (xy 158.262 133.832045) (xy 157.901 133.834) (xy 157.8 133.935) (xy 157.2 133.935) + (xy 157.099 133.834) (xy 156.738 133.832045) (xy 156.658802 133.839845) (xy 156.582648 133.862946) (xy 156.512463 133.900461) + (xy 156.450946 133.950946) (xy 156.400461 134.012463) (xy 156.362946 134.082648) (xy 156.339845 134.158802) (xy 156.332045 134.238) + (xy 146.2 134.238) (xy 146.2 123.735846) (xy 149.068 123.735846) (xy 149.068 124.264154) (xy 149.171068 124.782311) + (xy 149.373242 125.270403) (xy 149.666755 125.709675) (xy 150.040325 126.083245) (xy 150.479597 126.376758) (xy 150.967689 126.578932) + (xy 151.485846 126.682) (xy 152.014154 126.682) (xy 152.532311 126.578932) (xy 153.020403 126.376758) (xy 153.459675 126.083245) + (xy 153.833245 125.709675) (xy 154.126758 125.270403) (xy 154.328932 124.782311) (xy 154.432 124.264154) (xy 154.432 123.735846) + (xy 154.328932 123.217689) (xy 154.126758 122.729597) (xy 153.833245 122.290325) (xy 153.459675 121.916755) (xy 153.020403 121.623242) + (xy 152.532311 121.421068) (xy 152.014154 121.318) (xy 151.485846 121.318) (xy 150.967689 121.421068) (xy 150.479597 121.623242) + (xy 150.040325 121.916755) (xy 149.666755 122.290325) (xy 149.373242 122.729597) (xy 149.171068 123.217689) (xy 149.068 123.735846) + (xy 146.2 123.735846) (xy 146.2 120.7) (xy 176.880646 120.7) ) ) ) @@ -2067,403 +2068,403 @@ (xy 262.662511 162.15) (xy 262.981287 162.086592) (xy 263.281568 161.962211) (xy 263.551814 161.781639) (xy 263.609531 161.723922) (xy 263.684603 161.815397) (xy 263.859347 161.958805) (xy 264.058711 162.065367) (xy 264.275033 162.130988) (xy 264.5 162.153145) (xy 265.5 162.153145) (xy 265.724967 162.130988) (xy 265.941289 162.065367) (xy 266.140653 161.958805) (xy 266.315397 161.815397) - (xy 266.458805 161.640653) (xy 266.565367 161.441289) (xy 266.596854 161.337489) (xy 271.35 161.337489) (xy 271.35 161.662511) - (xy 271.413408 161.981287) (xy 271.537789 162.281568) (xy 271.718361 162.551814) (xy 271.948186 162.781639) (xy 272.218432 162.962211) - (xy 272.518713 163.086592) (xy 272.837489 163.15) (xy 273.162511 163.15) (xy 273.481287 163.086592) (xy 273.781568 162.962211) - (xy 274.051814 162.781639) (xy 274.281639 162.551814) (xy 274.462211 162.281568) (xy 274.586592 161.981287) (xy 274.65 161.662511) - (xy 274.65 161.337489) (xy 274.586592 161.018713) (xy 274.462211 160.718432) (xy 274.281639 160.448186) (xy 274.051814 160.218361) - (xy 273.781568 160.037789) (xy 273.481287 159.913408) (xy 273.162511 159.85) (xy 272.837489 159.85) (xy 272.518713 159.913408) - (xy 272.218432 160.037789) (xy 271.948186 160.218361) (xy 271.718361 160.448186) (xy 271.537789 160.718432) (xy 271.413408 161.018713) - (xy 271.35 161.337489) (xy 266.596854 161.337489) (xy 266.630988 161.224967) (xy 266.653145 161) (xy 266.653145 160) - (xy 266.630988 159.775033) (xy 266.612588 159.714375) (xy 280.1 159.714375) (xy 280.1 160.285625) (xy 280.211445 160.845899) - (xy 280.430053 161.373665) (xy 280.747423 161.848642) (xy 281.151358 162.252577) (xy 281.626335 162.569947) (xy 282.154101 162.788555) - (xy 282.714375 162.9) (xy 283.285625 162.9) (xy 283.845899 162.788555) (xy 284.373665 162.569947) (xy 284.848642 162.252577) - (xy 285.252577 161.848642) (xy 285.569947 161.373665) (xy 285.788555 160.845899) (xy 285.9 160.285625) (xy 285.9 159.714375) - (xy 285.788555 159.154101) (xy 285.569947 158.626335) (xy 285.252577 158.151358) (xy 284.848642 157.747423) (xy 284.61493 157.591261) - (xy 292.35 157.591261) (xy 292.35 158.408739) (xy 292.509482 159.21051) (xy 292.822318 159.965762) (xy 293.276485 160.645471) - (xy 293.854529 161.223515) (xy 294.534238 161.677682) (xy 295.28949 161.990518) (xy 296.091261 162.15) (xy 296.908739 162.15) - (xy 297.71051 161.990518) (xy 298.465762 161.677682) (xy 299.145471 161.223515) (xy 299.723515 160.645471) (xy 300.177682 159.965762) - (xy 300.490518 159.21051) (xy 300.65 158.408739) (xy 300.65 157.591261) (xy 300.490518 156.78949) (xy 300.177682 156.034238) - (xy 299.723515 155.354529) (xy 299.145471 154.776485) (xy 298.465762 154.322318) (xy 297.71051 154.009482) (xy 296.908739 153.85) - (xy 296.091261 153.85) (xy 295.28949 154.009482) (xy 294.534238 154.322318) (xy 293.854529 154.776485) (xy 293.276485 155.354529) - (xy 292.822318 156.034238) (xy 292.509482 156.78949) (xy 292.35 157.591261) (xy 284.61493 157.591261) (xy 284.373665 157.430053) - (xy 283.845899 157.211445) (xy 283.285625 157.1) (xy 282.714375 157.1) (xy 282.154101 157.211445) (xy 281.626335 157.430053) - (xy 281.151358 157.747423) (xy 280.747423 158.151358) (xy 280.430053 158.626335) (xy 280.211445 159.154101) (xy 280.1 159.714375) - (xy 266.612588 159.714375) (xy 266.565367 159.558711) (xy 266.458805 159.359347) (xy 266.315397 159.184603) (xy 266.140653 159.041195) - (xy 265.941289 158.934633) (xy 265.724967 158.869012) (xy 265.5 158.846855) (xy 264.633043 158.846855) (xy 265.941319 157.53858) - (xy 265.994739 157.494739) (xy 266.066931 157.406774) (xy 266.129683 157.33031) (xy 266.16969 157.281562) (xy 266.29969 157.038349) - (xy 266.379743 156.774448) (xy 266.4 156.568777) (xy 266.4 156.568769) (xy 266.406773 156.5) (xy 266.4 156.431231) - (xy 266.4 152.068769) (xy 266.406773 152) (xy 266.4 151.931231) (xy 266.4 151.931223) (xy 266.379743 151.725552) - (xy 266.29969 151.461651) (xy 266.16969 151.218438) (xy 266.089114 151.120257) (xy 266.038582 151.058683) (xy 266.038576 151.058677) - (xy 265.994738 151.005261) (xy 265.941324 150.961425) (xy 264.208659 149.228761) (xy 264.445791 149.326984) (xy 264.812866 149.4) - (xy 265.187134 149.4) (xy 265.554209 149.326984) (xy 265.899987 149.183758) (xy 266.211179 148.975826) (xy 266.451159 148.735846) - (xy 294.068 148.735846) (xy 294.068 149.264154) (xy 294.171068 149.782311) (xy 294.373242 150.270403) (xy 294.666755 150.709675) - (xy 295.040325 151.083245) (xy 295.479597 151.376758) (xy 295.967689 151.578932) (xy 296.485846 151.682) (xy 297.014154 151.682) - (xy 297.532311 151.578932) (xy 298.020403 151.376758) (xy 298.459675 151.083245) (xy 298.833245 150.709675) (xy 299.126758 150.270403) - (xy 299.328932 149.782311) (xy 299.432 149.264154) (xy 299.432 148.735846) (xy 299.328932 148.217689) (xy 299.126758 147.729597) - (xy 298.833245 147.290325) (xy 298.459675 146.916755) (xy 298.020403 146.623242) (xy 297.532311 146.421068) (xy 297.014154 146.318) - (xy 296.485846 146.318) (xy 295.967689 146.421068) (xy 295.479597 146.623242) (xy 295.040325 146.916755) (xy 294.666755 147.290325) - (xy 294.373242 147.729597) (xy 294.171068 148.217689) (xy 294.068 148.735846) (xy 266.451159 148.735846) (xy 266.475826 148.711179) - (xy 266.683758 148.399987) (xy 266.826984 148.054209) (xy 266.9 147.687134) (xy 266.9 147.312866) (xy 266.826984 146.945791) - (xy 266.683758 146.600013) (xy 266.475826 146.288821) (xy 266.211179 146.024174) (xy 265.899987 145.816242) (xy 265.554209 145.673016) - (xy 265.187134 145.6) (xy 264.812866 145.6) (xy 264.445791 145.673016) (xy 264.100013 145.816242) (xy 263.9 145.949887) - (xy 263.9 144.050113) (xy 264.100013 144.183758) (xy 264.445791 144.326984) (xy 264.812866 144.4) (xy 265.187134 144.4) - (xy 265.554209 144.326984) (xy 265.899987 144.183758) (xy 266.211179 143.975826) (xy 266.475826 143.711179) (xy 266.683758 143.399987) - (xy 266.826984 143.054209) (xy 266.9 142.687134) (xy 266.9 142.312866) (xy 266.826984 141.945791) (xy 266.683758 141.600013) - (xy 266.475826 141.288821) (xy 266.211179 141.024174) (xy 265.899987 140.816242) (xy 265.554209 140.673016) (xy 265.187134 140.6) - (xy 264.812866 140.6) (xy 264.445791 140.673016) (xy 264.100013 140.816242) (xy 263.9 140.949887) (xy 263.9 138.787005) - (xy 263.975826 138.711179) (xy 264.183758 138.399987) (xy 264.326984 138.054209) (xy 264.4 137.687134) (xy 264.4 137.312866) - (xy 264.326984 136.945791) (xy 264.183758 136.600013) (xy 263.975826 136.288821) (xy 263.9 136.212995) (xy 263.9 135.762) - (xy 281.332045 135.762) (xy 281.339845 135.841198) (xy 281.362946 135.917352) (xy 281.400461 135.987537) (xy 281.450946 136.049054) - (xy 281.512463 136.099539) (xy 281.582648 136.137054) (xy 281.658802 136.160155) (xy 281.738 136.167955) (xy 282.099 136.166) - (xy 282.2 136.065) (xy 282.2 135.3) (xy 282.8 135.3) (xy 282.8 136.065) (xy 282.901 136.166) - (xy 283.262 136.167955) (xy 283.341198 136.160155) (xy 283.417352 136.137054) (xy 283.487537 136.099539) (xy 283.549054 136.049054) - (xy 283.599539 135.987537) (xy 283.637054 135.917352) (xy 283.660155 135.841198) (xy 283.667955 135.762) (xy 283.666 135.401) - (xy 283.565 135.3) (xy 282.8 135.3) (xy 282.2 135.3) (xy 281.435 135.3) (xy 281.334 135.401) - (xy 281.332045 135.762) (xy 263.9 135.762) (xy 263.9 134.238) (xy 281.332045 134.238) (xy 281.334 134.599) - (xy 281.435 134.7) (xy 282.2 134.7) (xy 282.2 133.935) (xy 282.8 133.935) (xy 282.8 134.7) - (xy 283.565 134.7) (xy 283.666 134.599) (xy 283.667955 134.238) (xy 283.660155 134.158802) (xy 283.637054 134.082648) - (xy 283.599539 134.012463) (xy 283.549054 133.950946) (xy 283.487537 133.900461) (xy 283.417352 133.862946) (xy 283.341198 133.839845) - (xy 283.262 133.832045) (xy 282.901 133.834) (xy 282.8 133.935) (xy 282.2 133.935) (xy 282.099 133.834) - (xy 281.738 133.832045) (xy 281.658802 133.839845) (xy 281.582648 133.862946) (xy 281.512463 133.900461) (xy 281.450946 133.950946) - (xy 281.400461 134.012463) (xy 281.362946 134.082648) (xy 281.339845 134.158802) (xy 281.332045 134.238) (xy 263.9 134.238) - (xy 263.9 133.787005) (xy 263.975826 133.711179) (xy 264.183758 133.399987) (xy 264.326984 133.054209) (xy 264.4 132.687134) - (xy 264.4 132.312866) (xy 264.326984 131.945791) (xy 264.183758 131.600013) (xy 263.975826 131.288821) (xy 263.711179 131.024174) - (xy 263.399987 130.816242) (xy 263.054209 130.673016) (xy 262.687134 130.6) (xy 262.312866 130.6) (xy 261.945791 130.673016) - (xy 261.600013 130.816242) (xy 261.288821 131.024174) (xy 261.024174 131.288821) (xy 260.816242 131.600013) (xy 260.673016 131.945791) - (xy 260.6 132.312866) (xy 260.6 132.687134) (xy 260.673016 133.054209) (xy 260.816242 133.399987) (xy 261.024174 133.711179) - (xy 261.100001 133.787006) (xy 261.1 136.212995) (xy 261.024174 136.288821) (xy 260.816242 136.600013) (xy 260.673016 136.945791) - (xy 260.6 137.312866) (xy 260.6 137.687134) (xy 260.673016 138.054209) (xy 260.816242 138.399987) (xy 261.024174 138.711179) - (xy 261.1 138.787005) (xy 261.1 140.949887) (xy 260.899987 140.816242) (xy 260.554209 140.673016) (xy 260.187134 140.6) - (xy 259.812866 140.6) (xy 259.445791 140.673016) (xy 259.100013 140.816242) (xy 258.9 140.949887) (xy 258.9 138.787005) - (xy 258.975826 138.711179) (xy 259.183758 138.399987) (xy 259.326984 138.054209) (xy 259.4 137.687134) (xy 259.4 137.312866) - (xy 259.326984 136.945791) (xy 259.183758 136.600013) (xy 258.975826 136.288821) (xy 258.9 136.212995) (xy 258.9 133.787005) - (xy 258.975826 133.711179) (xy 259.183758 133.399987) (xy 259.326984 133.054209) (xy 259.4 132.687134) (xy 259.4 132.312866) - (xy 259.326984 131.945791) (xy 259.183758 131.600013) (xy 258.975826 131.288821) (xy 258.711179 131.024174) (xy 258.399987 130.816242) - (xy 258.054209 130.673016) (xy 257.687134 130.6) (xy 257.312866 130.6) (xy 256.945791 130.673016) (xy 256.600013 130.816242) - (xy 256.288821 131.024174) (xy 256.024174 131.288821) (xy 255.816242 131.600013) (xy 255.673016 131.945791) (xy 255.6 132.312866) - (xy 255.6 132.687134) (xy 255.673016 133.054209) (xy 255.816242 133.399987) (xy 256.024174 133.711179) (xy 256.100001 133.787006) - (xy 256.1 136.212995) (xy 256.024174 136.288821) (xy 255.816242 136.600013) (xy 255.673016 136.945791) (xy 255.6 137.312866) - (xy 255.6 137.687134) (xy 255.673016 138.054209) (xy 255.816242 138.399987) (xy 256.024174 138.711179) (xy 256.1 138.787005) - (xy 256.1 140.949887) (xy 255.899987 140.816242) (xy 255.554209 140.673016) (xy 255.187134 140.6) (xy 254.812866 140.6) - (xy 254.445791 140.673016) (xy 254.100013 140.816242) (xy 253.9 140.949887) (xy 253.9 138.787005) (xy 253.975826 138.711179) - (xy 254.183758 138.399987) (xy 254.326984 138.054209) (xy 254.4 137.687134) (xy 254.4 137.312866) (xy 254.326984 136.945791) - (xy 254.183758 136.600013) (xy 253.975826 136.288821) (xy 253.9 136.212995) (xy 253.9 133.787005) (xy 253.975826 133.711179) - (xy 254.183758 133.399987) (xy 254.326984 133.054209) (xy 254.4 132.687134) (xy 254.4 132.312866) (xy 254.326984 131.945791) - (xy 254.183758 131.600013) (xy 253.975826 131.288821) (xy 253.711179 131.024174) (xy 253.399987 130.816242) (xy 253.054209 130.673016) - (xy 252.687134 130.6) (xy 252.312866 130.6) (xy 251.945791 130.673016) (xy 251.600013 130.816242) (xy 251.288821 131.024174) - (xy 251.024174 131.288821) (xy 250.816242 131.600013) (xy 250.673016 131.945791) (xy 250.6 132.312866) (xy 250.6 132.687134) - (xy 250.673016 133.054209) (xy 250.816242 133.399987) (xy 251.024174 133.711179) (xy 251.100001 133.787006) (xy 251.1 136.212995) - (xy 251.024174 136.288821) (xy 250.816242 136.600013) (xy 250.673016 136.945791) (xy 250.6 137.312866) (xy 250.6 137.687134) - (xy 250.673016 138.054209) (xy 250.816242 138.399987) (xy 251.024174 138.711179) (xy 251.1 138.787005) (xy 251.1 140.949887) - (xy 250.899987 140.816242) (xy 250.554209 140.673016) (xy 250.187134 140.6) (xy 249.812866 140.6) (xy 249.445791 140.673016) - (xy 249.100013 140.816242) (xy 248.9 140.949887) (xy 248.9 138.787005) (xy 248.975826 138.711179) (xy 249.183758 138.399987) - (xy 249.326984 138.054209) (xy 249.4 137.687134) (xy 249.4 137.312866) (xy 249.326984 136.945791) (xy 249.183758 136.600013) - (xy 248.975826 136.288821) (xy 248.9 136.212995) (xy 248.9 133.787005) (xy 248.975826 133.711179) (xy 249.183758 133.399987) - (xy 249.326984 133.054209) (xy 249.4 132.687134) (xy 249.4 132.312866) (xy 249.326984 131.945791) (xy 249.183758 131.600013) - (xy 248.975826 131.288821) (xy 248.711179 131.024174) (xy 248.399987 130.816242) (xy 248.054209 130.673016) (xy 247.687134 130.6) - (xy 247.312866 130.6) (xy 246.945791 130.673016) (xy 246.600013 130.816242) (xy 246.288821 131.024174) (xy 246.024174 131.288821) - (xy 245.816242 131.600013) (xy 245.673016 131.945791) (xy 245.6 132.312866) (xy 245.6 132.687134) (xy 245.673016 133.054209) - (xy 245.816242 133.399987) (xy 246.024174 133.711179) (xy 246.100001 133.787006) (xy 246.1 136.212995) (xy 246.024174 136.288821) - (xy 245.816242 136.600013) (xy 245.673016 136.945791) (xy 245.6 137.312866) (xy 245.6 137.687134) (xy 245.673016 138.054209) - (xy 245.816242 138.399987) (xy 246.024174 138.711179) (xy 246.1 138.787005) (xy 246.1 140.949887) (xy 245.899987 140.816242) - (xy 245.554209 140.673016) (xy 245.187134 140.6) (xy 244.812866 140.6) (xy 244.445791 140.673016) (xy 244.100013 140.816242) - (xy 243.9 140.949887) (xy 243.9 138.787005) (xy 243.975826 138.711179) (xy 244.183758 138.399987) (xy 244.326984 138.054209) - (xy 244.4 137.687134) (xy 244.4 137.312866) (xy 244.326984 136.945791) (xy 244.183758 136.600013) (xy 243.975826 136.288821) - (xy 243.9 136.212995) (xy 243.9 133.787005) (xy 243.975826 133.711179) (xy 244.183758 133.399987) (xy 244.326984 133.054209) - (xy 244.4 132.687134) (xy 244.4 132.312866) (xy 244.326984 131.945791) (xy 244.183758 131.600013) (xy 243.975826 131.288821) - (xy 243.711179 131.024174) (xy 243.399987 130.816242) (xy 243.054209 130.673016) (xy 242.687134 130.6) (xy 242.312866 130.6) - (xy 241.945791 130.673016) (xy 241.600013 130.816242) (xy 241.288821 131.024174) (xy 241.024174 131.288821) (xy 240.816242 131.600013) - (xy 240.673016 131.945791) (xy 240.6 132.312866) (xy 240.6 132.687134) (xy 240.673016 133.054209) (xy 240.816242 133.399987) - (xy 241.024174 133.711179) (xy 241.100001 133.787006) (xy 241.1 136.212995) (xy 241.024174 136.288821) (xy 240.816242 136.600013) - (xy 240.673016 136.945791) (xy 240.6 137.312866) (xy 240.6 137.687134) (xy 240.673016 138.054209) (xy 240.816242 138.399987) - (xy 241.024174 138.711179) (xy 241.1 138.787005) (xy 241.1 140.949887) (xy 240.899987 140.816242) (xy 240.554209 140.673016) - (xy 240.187134 140.6) (xy 239.812866 140.6) (xy 239.445791 140.673016) (xy 239.100013 140.816242) (xy 238.9 140.949887) - (xy 238.9 138.787005) (xy 238.975826 138.711179) (xy 239.183758 138.399987) (xy 239.326984 138.054209) (xy 239.4 137.687134) - (xy 239.4 137.312866) (xy 239.326984 136.945791) (xy 239.183758 136.600013) (xy 238.975826 136.288821) (xy 238.9 136.212995) - (xy 238.9 133.787005) (xy 238.975826 133.711179) (xy 239.183758 133.399987) (xy 239.326984 133.054209) (xy 239.4 132.687134) - (xy 239.4 132.312866) (xy 239.326984 131.945791) (xy 239.183758 131.600013) (xy 238.975826 131.288821) (xy 238.711179 131.024174) - (xy 238.399987 130.816242) (xy 238.054209 130.673016) (xy 237.687134 130.6) (xy 237.312866 130.6) (xy 236.945791 130.673016) - (xy 236.600013 130.816242) (xy 236.288821 131.024174) (xy 236.024174 131.288821) (xy 235.816242 131.600013) (xy 235.673016 131.945791) - (xy 235.6 132.312866) (xy 235.6 132.687134) (xy 235.673016 133.054209) (xy 235.816242 133.399987) (xy 236.024174 133.711179) - (xy 236.1 133.787005) (xy 236.100001 136.212994) (xy 236.024174 136.288821) (xy 235.816242 136.600013) (xy 235.673016 136.945791) - (xy 235.6 137.312866) (xy 235.6 137.687134) (xy 235.673016 138.054209) (xy 235.816242 138.399987) (xy 236.024174 138.711179) - (xy 236.1 138.787005) (xy 236.1 140.949887) (xy 235.899987 140.816242) (xy 235.554209 140.673016) (xy 235.187134 140.6) - (xy 234.812866 140.6) (xy 234.445791 140.673016) (xy 234.100013 140.816242) (xy 233.9 140.949887) (xy 233.9 138.787005) - (xy 233.975826 138.711179) (xy 234.183758 138.399987) (xy 234.326984 138.054209) (xy 234.4 137.687134) (xy 234.4 137.312866) - (xy 234.326984 136.945791) (xy 234.183758 136.600013) (xy 233.975826 136.288821) (xy 233.9 136.212995) (xy 233.9 133.787005) - (xy 233.975826 133.711179) (xy 234.183758 133.399987) (xy 234.326984 133.054209) (xy 234.4 132.687134) (xy 234.4 132.312866) - (xy 234.326984 131.945791) (xy 234.183758 131.600013) (xy 233.975826 131.288821) (xy 233.711179 131.024174) (xy 233.399987 130.816242) - (xy 233.054209 130.673016) (xy 232.687134 130.6) (xy 232.312866 130.6) (xy 231.945791 130.673016) (xy 231.600013 130.816242) - (xy 231.288821 131.024174) (xy 231.024174 131.288821) (xy 230.816242 131.600013) (xy 230.673016 131.945791) (xy 230.6 132.312866) - (xy 230.6 132.687134) (xy 230.673016 133.054209) (xy 230.816242 133.399987) (xy 231.024174 133.711179) (xy 231.100001 133.787006) - (xy 231.1 136.212995) (xy 231.024174 136.288821) (xy 230.816242 136.600013) (xy 230.673016 136.945791) (xy 230.6 137.312866) - (xy 230.6 137.687134) (xy 230.673016 138.054209) (xy 230.816242 138.399987) (xy 231.024174 138.711179) (xy 231.1 138.787005) - (xy 231.1 140.949887) (xy 230.899987 140.816242) (xy 230.554209 140.673016) (xy 230.187134 140.6) (xy 229.812866 140.6) - (xy 229.445791 140.673016) (xy 229.100013 140.816242) (xy 228.9 140.949887) (xy 228.9 138.787005) (xy 228.975826 138.711179) - (xy 229.183758 138.399987) (xy 229.326984 138.054209) (xy 229.4 137.687134) (xy 229.4 137.312866) (xy 229.326984 136.945791) - (xy 229.183758 136.600013) (xy 228.975826 136.288821) (xy 228.9 136.212995) (xy 228.9 133.787005) (xy 228.975826 133.711179) - (xy 229.183758 133.399987) (xy 229.326984 133.054209) (xy 229.4 132.687134) (xy 229.4 132.312866) (xy 229.326984 131.945791) - (xy 229.183758 131.600013) (xy 228.975826 131.288821) (xy 228.711179 131.024174) (xy 228.399987 130.816242) (xy 228.054209 130.673016) - (xy 227.687134 130.6) (xy 227.312866 130.6) (xy 226.945791 130.673016) (xy 226.600013 130.816242) (xy 226.288821 131.024174) - (xy 226.024174 131.288821) (xy 225.816242 131.600013) (xy 225.673016 131.945791) (xy 225.6 132.312866) (xy 225.6 132.687134) - (xy 225.673016 133.054209) (xy 225.816242 133.399987) (xy 226.024174 133.711179) (xy 226.1 133.787005) (xy 226.100001 136.212994) - (xy 226.024174 136.288821) (xy 225.816242 136.600013) (xy 225.673016 136.945791) (xy 225.6 137.312866) (xy 225.6 137.687134) - (xy 225.673016 138.054209) (xy 225.816242 138.399987) (xy 226.024174 138.711179) (xy 226.1 138.787005) (xy 226.1 140.949887) - (xy 225.899987 140.816242) (xy 225.554209 140.673016) (xy 225.187134 140.6) (xy 224.812866 140.6) (xy 224.445791 140.673016) - (xy 224.100013 140.816242) (xy 223.9 140.949887) (xy 223.9 138.787005) (xy 223.975826 138.711179) (xy 224.183758 138.399987) - (xy 224.326984 138.054209) (xy 224.4 137.687134) (xy 224.4 137.312866) (xy 224.326984 136.945791) (xy 224.183758 136.600013) - (xy 223.975826 136.288821) (xy 223.9 136.212995) (xy 223.9 133.787005) (xy 223.975826 133.711179) (xy 224.183758 133.399987) - (xy 224.326984 133.054209) (xy 224.4 132.687134) (xy 224.4 132.312866) (xy 224.326984 131.945791) (xy 224.183758 131.600013) - (xy 223.975826 131.288821) (xy 223.711179 131.024174) (xy 223.399987 130.816242) (xy 223.054209 130.673016) (xy 222.687134 130.6) - (xy 222.312866 130.6) (xy 221.945791 130.673016) (xy 221.600013 130.816242) (xy 221.288821 131.024174) (xy 221.024174 131.288821) - (xy 220.816242 131.600013) (xy 220.673016 131.945791) (xy 220.6 132.312866) (xy 220.6 132.687134) (xy 220.673016 133.054209) - (xy 220.816242 133.399987) (xy 221.024174 133.711179) (xy 221.100001 133.787006) (xy 221.1 136.212995) (xy 221.024174 136.288821) - (xy 220.816242 136.600013) (xy 220.673016 136.945791) (xy 220.6 137.312866) (xy 220.6 137.687134) (xy 220.673016 138.054209) - (xy 220.816242 138.399987) (xy 221.024174 138.711179) (xy 221.1 138.787005) (xy 221.1 140.949887) (xy 220.899987 140.816242) - (xy 220.554209 140.673016) (xy 220.187134 140.6) (xy 219.812866 140.6) (xy 219.445791 140.673016) (xy 219.100013 140.816242) - (xy 218.9 140.949887) (xy 218.9 138.787005) (xy 218.975826 138.711179) (xy 219.183758 138.399987) (xy 219.326984 138.054209) - (xy 219.4 137.687134) (xy 219.4 137.312866) (xy 219.326984 136.945791) (xy 219.183758 136.600013) (xy 218.975826 136.288821) - (xy 218.9 136.212995) (xy 218.9 133.787005) (xy 218.975826 133.711179) (xy 219.183758 133.399987) (xy 219.326984 133.054209) - (xy 219.4 132.687134) (xy 219.4 132.312866) (xy 219.326984 131.945791) (xy 219.183758 131.600013) (xy 218.975826 131.288821) - (xy 218.711179 131.024174) (xy 218.399987 130.816242) (xy 218.054209 130.673016) (xy 217.687134 130.6) (xy 217.312866 130.6) - (xy 216.945791 130.673016) (xy 216.600013 130.816242) (xy 216.288821 131.024174) (xy 216.024174 131.288821) (xy 215.816242 131.600013) - (xy 215.673016 131.945791) (xy 215.6 132.312866) (xy 215.6 132.687134) (xy 215.673016 133.054209) (xy 215.816242 133.399987) - (xy 216.024174 133.711179) (xy 216.100001 133.787006) (xy 216.1 136.212995) (xy 216.024174 136.288821) (xy 215.816242 136.600013) - (xy 215.673016 136.945791) (xy 215.6 137.312866) (xy 215.6 137.687134) (xy 215.673016 138.054209) (xy 215.816242 138.399987) - (xy 216.024174 138.711179) (xy 216.1 138.787005) (xy 216.1 140.949887) (xy 215.899987 140.816242) (xy 215.554209 140.673016) - (xy 215.187134 140.6) (xy 214.812866 140.6) (xy 214.445791 140.673016) (xy 214.100013 140.816242) (xy 213.9 140.949887) - (xy 213.9 138.787005) (xy 213.975826 138.711179) (xy 214.183758 138.399987) (xy 214.326984 138.054209) (xy 214.4 137.687134) - (xy 214.4 137.312866) (xy 214.326984 136.945791) (xy 214.183758 136.600013) (xy 213.975826 136.288821) (xy 213.9 136.212995) - (xy 213.9 133.787005) (xy 213.975826 133.711179) (xy 214.183758 133.399987) (xy 214.326984 133.054209) (xy 214.4 132.687134) - (xy 214.4 132.312866) (xy 214.326984 131.945791) (xy 214.183758 131.600013) (xy 213.975826 131.288821) (xy 213.711179 131.024174) - (xy 213.399987 130.816242) (xy 213.054209 130.673016) (xy 212.687134 130.6) (xy 212.312866 130.6) (xy 211.945791 130.673016) - (xy 211.600013 130.816242) (xy 211.288821 131.024174) (xy 211.024174 131.288821) (xy 210.816242 131.600013) (xy 210.673016 131.945791) - (xy 210.6 132.312866) (xy 210.6 132.687134) (xy 210.673016 133.054209) (xy 210.816242 133.399987) (xy 211.024174 133.711179) - (xy 211.100001 133.787006) (xy 211.1 136.212995) (xy 211.024174 136.288821) (xy 210.816242 136.600013) (xy 210.673016 136.945791) - (xy 210.6 137.312866) (xy 210.6 137.687134) (xy 210.673016 138.054209) (xy 210.816242 138.399987) (xy 211.024174 138.711179) - (xy 211.1 138.787005) (xy 211.1 140.949887) (xy 210.899987 140.816242) (xy 210.554209 140.673016) (xy 210.187134 140.6) - (xy 209.812866 140.6) (xy 209.445791 140.673016) (xy 209.100013 140.816242) (xy 208.9 140.949887) (xy 208.9 138.787005) - (xy 208.975826 138.711179) (xy 209.183758 138.399987) (xy 209.326984 138.054209) (xy 209.4 137.687134) (xy 209.4 137.312866) - (xy 209.326984 136.945791) (xy 209.183758 136.600013) (xy 208.975826 136.288821) (xy 208.9 136.212995) (xy 208.9 133.787005) - (xy 208.975826 133.711179) (xy 209.183758 133.399987) (xy 209.326984 133.054209) (xy 209.4 132.687134) (xy 209.4 132.312866) - (xy 209.326984 131.945791) (xy 209.183758 131.600013) (xy 208.975826 131.288821) (xy 208.711179 131.024174) (xy 208.399987 130.816242) - (xy 208.054209 130.673016) (xy 207.687134 130.6) (xy 207.312866 130.6) (xy 206.945791 130.673016) (xy 206.600013 130.816242) - (xy 206.288821 131.024174) (xy 206.024174 131.288821) (xy 205.816242 131.600013) (xy 205.673016 131.945791) (xy 205.6 132.312866) - (xy 205.6 132.687134) (xy 205.673016 133.054209) (xy 205.816242 133.399987) (xy 206.024174 133.711179) (xy 206.100001 133.787006) - (xy 206.1 136.212995) (xy 206.024174 136.288821) (xy 205.816242 136.600013) (xy 205.673016 136.945791) (xy 205.6 137.312866) - (xy 205.6 137.687134) (xy 205.673016 138.054209) (xy 205.816242 138.399987) (xy 206.024174 138.711179) (xy 206.1 138.787005) - (xy 206.1 140.949887) (xy 205.899987 140.816242) (xy 205.554209 140.673016) (xy 205.187134 140.6) (xy 204.812866 140.6) - (xy 204.445791 140.673016) (xy 204.100013 140.816242) (xy 203.9 140.949887) (xy 203.9 138.787005) (xy 203.975826 138.711179) - (xy 204.183758 138.399987) (xy 204.326984 138.054209) (xy 204.4 137.687134) (xy 204.4 137.312866) (xy 204.326984 136.945791) - (xy 204.183758 136.600013) (xy 203.975826 136.288821) (xy 203.9 136.212995) (xy 203.9 133.787005) (xy 203.975826 133.711179) - (xy 204.183758 133.399987) (xy 204.326984 133.054209) (xy 204.4 132.687134) (xy 204.4 132.312866) (xy 204.326984 131.945791) - (xy 204.183758 131.600013) (xy 203.975826 131.288821) (xy 203.711179 131.024174) (xy 203.399987 130.816242) (xy 203.054209 130.673016) - (xy 202.687134 130.6) (xy 202.312866 130.6) (xy 201.945791 130.673016) (xy 201.600013 130.816242) (xy 201.288821 131.024174) - (xy 201.024174 131.288821) (xy 200.816242 131.600013) (xy 200.673016 131.945791) (xy 200.6 132.312866) (xy 200.6 132.687134) - (xy 200.673016 133.054209) (xy 200.816242 133.399987) (xy 201.024174 133.711179) (xy 201.100001 133.787006) (xy 201.1 136.212995) - (xy 201.024174 136.288821) (xy 200.816242 136.600013) (xy 200.673016 136.945791) (xy 200.6 137.312866) (xy 200.6 137.687134) - (xy 200.673016 138.054209) (xy 200.816242 138.399987) (xy 201.024174 138.711179) (xy 201.1 138.787005) (xy 201.1 140.949887) - (xy 200.899987 140.816242) (xy 200.554209 140.673016) (xy 200.187134 140.6) (xy 199.812866 140.6) (xy 199.445791 140.673016) - (xy 199.100013 140.816242) (xy 198.9 140.949887) (xy 198.9 138.787005) (xy 198.975826 138.711179) (xy 199.183758 138.399987) - (xy 199.326984 138.054209) (xy 199.4 137.687134) (xy 199.4 137.312866) (xy 199.326984 136.945791) (xy 199.183758 136.600013) - (xy 198.975826 136.288821) (xy 198.9 136.212995) (xy 198.9 133.787005) (xy 198.975826 133.711179) (xy 199.183758 133.399987) - (xy 199.326984 133.054209) (xy 199.4 132.687134) (xy 199.4 132.312866) (xy 199.326984 131.945791) (xy 199.183758 131.600013) - (xy 198.975826 131.288821) (xy 198.711179 131.024174) (xy 198.399987 130.816242) (xy 198.054209 130.673016) (xy 197.687134 130.6) - (xy 197.312866 130.6) (xy 196.945791 130.673016) (xy 196.600013 130.816242) (xy 196.288821 131.024174) (xy 196.024174 131.288821) - (xy 195.816242 131.600013) (xy 195.673016 131.945791) (xy 195.6 132.312866) (xy 195.6 132.687134) (xy 195.673016 133.054209) - (xy 195.816242 133.399987) (xy 196.024174 133.711179) (xy 196.100001 133.787006) (xy 196.1 136.212995) (xy 196.024174 136.288821) - (xy 195.816242 136.600013) (xy 195.673016 136.945791) (xy 195.6 137.312866) (xy 195.6 137.687134) (xy 195.673016 138.054209) - (xy 195.816242 138.399987) (xy 196.024174 138.711179) (xy 196.1 138.787005) (xy 196.1 140.949887) (xy 195.899987 140.816242) - (xy 195.554209 140.673016) (xy 195.187134 140.6) (xy 194.812866 140.6) (xy 194.445791 140.673016) (xy 194.100013 140.816242) - (xy 193.9 140.949887) (xy 193.9 138.787005) (xy 193.975826 138.711179) (xy 194.183758 138.399987) (xy 194.326984 138.054209) - (xy 194.4 137.687134) (xy 194.4 137.312866) (xy 194.326984 136.945791) (xy 194.183758 136.600013) (xy 193.975826 136.288821) - (xy 193.9 136.212995) (xy 193.9 133.787005) (xy 193.975826 133.711179) (xy 194.183758 133.399987) (xy 194.326984 133.054209) - (xy 194.4 132.687134) (xy 194.4 132.312866) (xy 194.326984 131.945791) (xy 194.183758 131.600013) (xy 193.975826 131.288821) - (xy 193.711179 131.024174) (xy 193.399987 130.816242) (xy 193.054209 130.673016) (xy 192.687134 130.6) (xy 192.312866 130.6) - (xy 191.945791 130.673016) (xy 191.600013 130.816242) (xy 191.288821 131.024174) (xy 191.024174 131.288821) (xy 190.816242 131.600013) - (xy 190.673016 131.945791) (xy 190.6 132.312866) (xy 190.6 132.687134) (xy 190.673016 133.054209) (xy 190.816242 133.399987) - (xy 191.024174 133.711179) (xy 191.100001 133.787006) (xy 191.1 136.212995) (xy 191.024174 136.288821) (xy 190.816242 136.600013) - (xy 190.673016 136.945791) (xy 190.6 137.312866) (xy 190.6 137.687134) (xy 190.673016 138.054209) (xy 190.816242 138.399987) - (xy 191.024174 138.711179) (xy 191.1 138.787005) (xy 191.1 140.949887) (xy 190.899987 140.816242) (xy 190.554209 140.673016) - (xy 190.187134 140.6) (xy 189.812866 140.6) (xy 189.445791 140.673016) (xy 189.100013 140.816242) (xy 188.9 140.949887) - (xy 188.9 138.787005) (xy 188.975826 138.711179) (xy 189.183758 138.399987) (xy 189.326984 138.054209) (xy 189.4 137.687134) - (xy 189.4 137.312866) (xy 189.326984 136.945791) (xy 189.183758 136.600013) (xy 188.975826 136.288821) (xy 188.9 136.212995) - (xy 188.9 133.787005) (xy 188.975826 133.711179) (xy 189.183758 133.399987) (xy 189.326984 133.054209) (xy 189.4 132.687134) - (xy 189.4 132.312866) (xy 189.326984 131.945791) (xy 189.183758 131.600013) (xy 188.975826 131.288821) (xy 188.711179 131.024174) - (xy 188.399987 130.816242) (xy 188.054209 130.673016) (xy 187.687134 130.6) (xy 187.312866 130.6) (xy 186.945791 130.673016) - (xy 186.600013 130.816242) (xy 186.288821 131.024174) (xy 186.024174 131.288821) (xy 185.816242 131.600013) (xy 185.673016 131.945791) - (xy 185.6 132.312866) (xy 185.6 132.687134) (xy 185.673016 133.054209) (xy 185.816242 133.399987) (xy 186.024174 133.711179) - (xy 186.100001 133.787006) (xy 186.1 136.212995) (xy 186.024174 136.288821) (xy 185.816242 136.600013) (xy 185.673016 136.945791) - (xy 185.6 137.312866) (xy 185.6 137.687134) (xy 185.673016 138.054209) (xy 185.816242 138.399987) (xy 186.024174 138.711179) - (xy 186.1 138.787005) (xy 186.1 140.949887) (xy 185.899987 140.816242) (xy 185.554209 140.673016) (xy 185.187134 140.6) - (xy 184.812866 140.6) (xy 184.445791 140.673016) (xy 184.100013 140.816242) (xy 183.9 140.949887) (xy 183.9 138.787005) - (xy 183.975826 138.711179) (xy 184.183758 138.399987) (xy 184.326984 138.054209) (xy 184.4 137.687134) (xy 184.4 137.312866) - (xy 184.326984 136.945791) (xy 184.183758 136.600013) (xy 183.975826 136.288821) (xy 183.9 136.212995) (xy 183.9 133.787005) - (xy 183.975826 133.711179) (xy 184.183758 133.399987) (xy 184.326984 133.054209) (xy 184.4 132.687134) (xy 184.4 132.312866) - (xy 184.326984 131.945791) (xy 184.183758 131.600013) (xy 183.975826 131.288821) (xy 183.711179 131.024174) (xy 183.399987 130.816242) - (xy 183.054209 130.673016) (xy 182.687134 130.6) (xy 182.312866 130.6) (xy 181.945791 130.673016) (xy 181.600013 130.816242) - (xy 181.288821 131.024174) (xy 181.024174 131.288821) (xy 180.816242 131.600013) (xy 180.673016 131.945791) (xy 180.6 132.312866) - (xy 180.6 132.687134) (xy 180.673016 133.054209) (xy 180.816242 133.399987) (xy 181.024174 133.711179) (xy 181.100001 133.787006) - (xy 181.1 136.212995) (xy 181.024174 136.288821) (xy 180.816242 136.600013) (xy 180.673016 136.945791) (xy 180.6 137.312866) - (xy 180.6 137.687134) (xy 180.673016 138.054209) (xy 180.816242 138.399987) (xy 181.024174 138.711179) (xy 181.1 138.787005) - (xy 181.1 140.949887) (xy 180.899987 140.816242) (xy 180.554209 140.673016) (xy 180.187134 140.6) (xy 179.812866 140.6) - (xy 179.445791 140.673016) (xy 179.100013 140.816242) (xy 178.9 140.949887) (xy 178.9 138.787005) (xy 178.975826 138.711179) - (xy 179.183758 138.399987) (xy 179.326984 138.054209) (xy 179.4 137.687134) (xy 179.4 137.312866) (xy 179.326984 136.945791) - (xy 179.183758 136.600013) (xy 178.975826 136.288821) (xy 178.9 136.212995) (xy 178.9 133.787005) (xy 178.975826 133.711179) - (xy 179.183758 133.399987) (xy 179.326984 133.054209) (xy 179.4 132.687134) (xy 179.4 132.312866) (xy 179.326984 131.945791) - (xy 179.183758 131.600013) (xy 178.975826 131.288821) (xy 178.711179 131.024174) (xy 178.399987 130.816242) (xy 178.054209 130.673016) - (xy 177.687134 130.6) (xy 177.312866 130.6) (xy 176.945791 130.673016) (xy 176.600013 130.816242) (xy 176.288821 131.024174) - (xy 176.024174 131.288821) (xy 175.816242 131.600013) (xy 175.673016 131.945791) (xy 175.6 132.312866) (xy 175.6 132.687134) - (xy 175.673016 133.054209) (xy 175.816242 133.399987) (xy 176.024174 133.711179) (xy 176.100001 133.787006) (xy 176.1 136.212995) - (xy 176.024174 136.288821) (xy 175.816242 136.600013) (xy 175.673016 136.945791) (xy 175.6 137.312866) (xy 175.6 137.687134) - (xy 175.673016 138.054209) (xy 175.816242 138.399987) (xy 176.024174 138.711179) (xy 176.1 138.787005) (xy 176.1 140.949887) - (xy 175.899987 140.816242) (xy 175.554209 140.673016) (xy 175.187134 140.6) (xy 174.812866 140.6) (xy 174.445791 140.673016) - (xy 174.100013 140.816242) (xy 173.788821 141.024174) (xy 173.524174 141.288821) (xy 173.316242 141.600013) (xy 173.173016 141.945791) - (xy 173.1 142.312866) (xy 146.2 142.312866) (xy 146.2 135.762) (xy 156.332045 135.762) (xy 156.339845 135.841198) - (xy 156.362946 135.917352) (xy 156.400461 135.987537) (xy 156.450946 136.049054) (xy 156.512463 136.099539) (xy 156.582648 136.137054) - (xy 156.658802 136.160155) (xy 156.738 136.167955) (xy 157.099 136.166) (xy 157.2 136.065) (xy 157.2 135.3) - (xy 157.8 135.3) (xy 157.8 136.065) (xy 157.901 136.166) (xy 158.262 136.167955) (xy 158.341198 136.160155) - (xy 158.417352 136.137054) (xy 158.487537 136.099539) (xy 158.549054 136.049054) (xy 158.599539 135.987537) (xy 158.637054 135.917352) - (xy 158.660155 135.841198) (xy 158.667955 135.762) (xy 158.666 135.401) (xy 158.565 135.3) (xy 157.8 135.3) - (xy 157.2 135.3) (xy 156.435 135.3) (xy 156.334 135.401) (xy 156.332045 135.762) (xy 146.2 135.762) - (xy 146.2 134.238) (xy 156.332045 134.238) (xy 156.334 134.599) (xy 156.435 134.7) (xy 157.2 134.7) - (xy 157.2 133.935) (xy 157.8 133.935) (xy 157.8 134.7) (xy 158.565 134.7) (xy 158.666 134.599) - (xy 158.667955 134.238) (xy 158.660155 134.158802) (xy 158.637054 134.082648) (xy 158.599539 134.012463) (xy 158.549054 133.950946) - (xy 158.487537 133.900461) (xy 158.417352 133.862946) (xy 158.341198 133.839845) (xy 158.262 133.832045) (xy 157.901 133.834) - (xy 157.8 133.935) (xy 157.2 133.935) (xy 157.099 133.834) (xy 156.738 133.832045) (xy 156.658802 133.839845) - (xy 156.582648 133.862946) (xy 156.512463 133.900461) (xy 156.450946 133.950946) (xy 156.400461 134.012463) (xy 156.362946 134.082648) - (xy 156.339845 134.158802) (xy 156.332045 134.238) (xy 146.2 134.238) (xy 146.2 127.312866) (xy 175.6 127.312866) - (xy 175.6 127.687134) (xy 175.673016 128.054209) (xy 175.816242 128.399987) (xy 176.024174 128.711179) (xy 176.288821 128.975826) - (xy 176.600013 129.183758) (xy 176.945791 129.326984) (xy 177.312866 129.4) (xy 177.687134 129.4) (xy 178.054209 129.326984) - (xy 178.399987 129.183758) (xy 178.711179 128.975826) (xy 178.975826 128.711179) (xy 179.183758 128.399987) (xy 179.326984 128.054209) - (xy 179.4 127.687134) (xy 179.4 127.312866) (xy 180.6 127.312866) (xy 180.6 127.687134) (xy 180.673016 128.054209) - (xy 180.816242 128.399987) (xy 181.024174 128.711179) (xy 181.288821 128.975826) (xy 181.600013 129.183758) (xy 181.945791 129.326984) - (xy 182.312866 129.4) (xy 182.687134 129.4) (xy 183.054209 129.326984) (xy 183.399987 129.183758) (xy 183.711179 128.975826) - (xy 183.975826 128.711179) (xy 184.183758 128.399987) (xy 184.326984 128.054209) (xy 184.4 127.687134) (xy 184.4 127.312866) - (xy 185.6 127.312866) (xy 185.6 127.687134) (xy 185.673016 128.054209) (xy 185.816242 128.399987) (xy 186.024174 128.711179) - (xy 186.288821 128.975826) (xy 186.600013 129.183758) (xy 186.945791 129.326984) (xy 187.312866 129.4) (xy 187.687134 129.4) - (xy 188.054209 129.326984) (xy 188.399987 129.183758) (xy 188.711179 128.975826) (xy 188.975826 128.711179) (xy 189.183758 128.399987) - (xy 189.326984 128.054209) (xy 189.4 127.687134) (xy 189.4 127.312866) (xy 190.6 127.312866) (xy 190.6 127.687134) - (xy 190.673016 128.054209) (xy 190.816242 128.399987) (xy 191.024174 128.711179) (xy 191.288821 128.975826) (xy 191.600013 129.183758) - (xy 191.945791 129.326984) (xy 192.312866 129.4) (xy 192.687134 129.4) (xy 193.054209 129.326984) (xy 193.399987 129.183758) - (xy 193.711179 128.975826) (xy 193.975826 128.711179) (xy 194.183758 128.399987) (xy 194.326984 128.054209) (xy 194.4 127.687134) - (xy 194.4 127.312866) (xy 195.6 127.312866) (xy 195.6 127.687134) (xy 195.673016 128.054209) (xy 195.816242 128.399987) - (xy 196.024174 128.711179) (xy 196.288821 128.975826) (xy 196.600013 129.183758) (xy 196.945791 129.326984) (xy 197.312866 129.4) - (xy 197.687134 129.4) (xy 198.054209 129.326984) (xy 198.399987 129.183758) (xy 198.711179 128.975826) (xy 198.975826 128.711179) - (xy 199.183758 128.399987) (xy 199.326984 128.054209) (xy 199.4 127.687134) (xy 199.4 127.312866) (xy 200.6 127.312866) - (xy 200.6 127.687134) (xy 200.673016 128.054209) (xy 200.816242 128.399987) (xy 201.024174 128.711179) (xy 201.288821 128.975826) - (xy 201.600013 129.183758) (xy 201.945791 129.326984) (xy 202.312866 129.4) (xy 202.687134 129.4) (xy 203.054209 129.326984) - (xy 203.399987 129.183758) (xy 203.711179 128.975826) (xy 203.975826 128.711179) (xy 204.183758 128.399987) (xy 204.326984 128.054209) - (xy 204.4 127.687134) (xy 204.4 127.312866) (xy 205.6 127.312866) (xy 205.6 127.687134) (xy 205.673016 128.054209) - (xy 205.816242 128.399987) (xy 206.024174 128.711179) (xy 206.288821 128.975826) (xy 206.600013 129.183758) (xy 206.945791 129.326984) - (xy 207.312866 129.4) (xy 207.687134 129.4) (xy 208.054209 129.326984) (xy 208.399987 129.183758) (xy 208.711179 128.975826) - (xy 208.975826 128.711179) (xy 209.183758 128.399987) (xy 209.326984 128.054209) (xy 209.4 127.687134) (xy 209.4 127.312866) - (xy 210.6 127.312866) (xy 210.6 127.687134) (xy 210.673016 128.054209) (xy 210.816242 128.399987) (xy 211.024174 128.711179) - (xy 211.288821 128.975826) (xy 211.600013 129.183758) (xy 211.945791 129.326984) (xy 212.312866 129.4) (xy 212.687134 129.4) - (xy 213.054209 129.326984) (xy 213.399987 129.183758) (xy 213.711179 128.975826) (xy 213.975826 128.711179) (xy 214.183758 128.399987) - (xy 214.326984 128.054209) (xy 214.4 127.687134) (xy 214.4 127.312866) (xy 215.6 127.312866) (xy 215.6 127.687134) - (xy 215.673016 128.054209) (xy 215.816242 128.399987) (xy 216.024174 128.711179) (xy 216.288821 128.975826) (xy 216.600013 129.183758) - (xy 216.945791 129.326984) (xy 217.312866 129.4) (xy 217.687134 129.4) (xy 218.054209 129.326984) (xy 218.399987 129.183758) - (xy 218.711179 128.975826) (xy 218.975826 128.711179) (xy 219.183758 128.399987) (xy 219.326984 128.054209) (xy 219.4 127.687134) - (xy 219.4 127.312866) (xy 220.6 127.312866) (xy 220.6 127.687134) (xy 220.673016 128.054209) (xy 220.816242 128.399987) - (xy 221.024174 128.711179) (xy 221.288821 128.975826) (xy 221.600013 129.183758) (xy 221.945791 129.326984) (xy 222.312866 129.4) - (xy 222.687134 129.4) (xy 223.054209 129.326984) (xy 223.399987 129.183758) (xy 223.711179 128.975826) (xy 223.975826 128.711179) - (xy 224.183758 128.399987) (xy 224.326984 128.054209) (xy 224.4 127.687134) (xy 224.4 127.312866) (xy 225.6 127.312866) - (xy 225.6 127.687134) (xy 225.673016 128.054209) (xy 225.816242 128.399987) (xy 226.024174 128.711179) (xy 226.288821 128.975826) - (xy 226.600013 129.183758) (xy 226.945791 129.326984) (xy 227.312866 129.4) (xy 227.687134 129.4) (xy 228.054209 129.326984) - (xy 228.399987 129.183758) (xy 228.711179 128.975826) (xy 228.975826 128.711179) (xy 229.183758 128.399987) (xy 229.326984 128.054209) - (xy 229.4 127.687134) (xy 229.4 127.312866) (xy 230.6 127.312866) (xy 230.6 127.687134) (xy 230.673016 128.054209) - (xy 230.816242 128.399987) (xy 231.024174 128.711179) (xy 231.288821 128.975826) (xy 231.600013 129.183758) (xy 231.945791 129.326984) - (xy 232.312866 129.4) (xy 232.687134 129.4) (xy 233.054209 129.326984) (xy 233.399987 129.183758) (xy 233.711179 128.975826) - (xy 233.975826 128.711179) (xy 234.183758 128.399987) (xy 234.326984 128.054209) (xy 234.4 127.687134) (xy 234.4 127.312866) - (xy 235.6 127.312866) (xy 235.6 127.687134) (xy 235.673016 128.054209) (xy 235.816242 128.399987) (xy 236.024174 128.711179) - (xy 236.288821 128.975826) (xy 236.600013 129.183758) (xy 236.945791 129.326984) (xy 237.312866 129.4) (xy 237.687134 129.4) - (xy 238.054209 129.326984) (xy 238.399987 129.183758) (xy 238.711179 128.975826) (xy 238.975826 128.711179) (xy 239.183758 128.399987) - (xy 239.326984 128.054209) (xy 239.4 127.687134) (xy 239.4 127.312866) (xy 240.6 127.312866) (xy 240.6 127.687134) - (xy 240.673016 128.054209) (xy 240.816242 128.399987) (xy 241.024174 128.711179) (xy 241.288821 128.975826) (xy 241.600013 129.183758) - (xy 241.945791 129.326984) (xy 242.312866 129.4) (xy 242.687134 129.4) (xy 243.054209 129.326984) (xy 243.399987 129.183758) - (xy 243.711179 128.975826) (xy 243.975826 128.711179) (xy 244.183758 128.399987) (xy 244.326984 128.054209) (xy 244.4 127.687134) - (xy 244.4 127.312866) (xy 245.6 127.312866) (xy 245.6 127.687134) (xy 245.673016 128.054209) (xy 245.816242 128.399987) - (xy 246.024174 128.711179) (xy 246.288821 128.975826) (xy 246.600013 129.183758) (xy 246.945791 129.326984) (xy 247.312866 129.4) - (xy 247.687134 129.4) (xy 248.054209 129.326984) (xy 248.399987 129.183758) (xy 248.711179 128.975826) (xy 248.975826 128.711179) - (xy 249.183758 128.399987) (xy 249.326984 128.054209) (xy 249.4 127.687134) (xy 249.4 127.312866) (xy 250.6 127.312866) - (xy 250.6 127.687134) (xy 250.673016 128.054209) (xy 250.816242 128.399987) (xy 251.024174 128.711179) (xy 251.288821 128.975826) - (xy 251.600013 129.183758) (xy 251.945791 129.326984) (xy 252.312866 129.4) (xy 252.687134 129.4) (xy 253.054209 129.326984) - (xy 253.399987 129.183758) (xy 253.711179 128.975826) (xy 253.975826 128.711179) (xy 254.183758 128.399987) (xy 254.326984 128.054209) - (xy 254.4 127.687134) (xy 254.4 127.312866) (xy 255.6 127.312866) (xy 255.6 127.687134) (xy 255.673016 128.054209) - (xy 255.816242 128.399987) (xy 256.024174 128.711179) (xy 256.288821 128.975826) (xy 256.600013 129.183758) (xy 256.945791 129.326984) - (xy 257.312866 129.4) (xy 257.687134 129.4) (xy 258.054209 129.326984) (xy 258.399987 129.183758) (xy 258.711179 128.975826) - (xy 258.975826 128.711179) (xy 259.183758 128.399987) (xy 259.326984 128.054209) (xy 259.4 127.687134) (xy 259.4 127.312866) - (xy 260.6 127.312866) (xy 260.6 127.687134) (xy 260.673016 128.054209) (xy 260.816242 128.399987) (xy 261.024174 128.711179) - (xy 261.288821 128.975826) (xy 261.600013 129.183758) (xy 261.945791 129.326984) (xy 262.312866 129.4) (xy 262.687134 129.4) - (xy 263.054209 129.326984) (xy 263.399987 129.183758) (xy 263.711179 128.975826) (xy 263.975826 128.711179) (xy 264.183758 128.399987) - (xy 264.326984 128.054209) (xy 264.4 127.687134) (xy 264.4 127.312866) (xy 264.326984 126.945791) (xy 264.183758 126.600013) - (xy 263.975826 126.288821) (xy 263.711179 126.024174) (xy 263.399987 125.816242) (xy 263.054209 125.673016) (xy 262.687134 125.6) - (xy 262.312866 125.6) (xy 261.945791 125.673016) (xy 261.600013 125.816242) (xy 261.288821 126.024174) (xy 261.024174 126.288821) - (xy 260.816242 126.600013) (xy 260.673016 126.945791) (xy 260.6 127.312866) (xy 259.4 127.312866) (xy 259.326984 126.945791) - (xy 259.183758 126.600013) (xy 258.975826 126.288821) (xy 258.711179 126.024174) (xy 258.399987 125.816242) (xy 258.054209 125.673016) - (xy 257.687134 125.6) (xy 257.312866 125.6) (xy 256.945791 125.673016) (xy 256.600013 125.816242) (xy 256.288821 126.024174) - (xy 256.024174 126.288821) (xy 255.816242 126.600013) (xy 255.673016 126.945791) (xy 255.6 127.312866) (xy 254.4 127.312866) - (xy 254.326984 126.945791) (xy 254.183758 126.600013) (xy 253.975826 126.288821) (xy 253.711179 126.024174) (xy 253.399987 125.816242) - (xy 253.054209 125.673016) (xy 252.687134 125.6) (xy 252.312866 125.6) (xy 251.945791 125.673016) (xy 251.600013 125.816242) - (xy 251.288821 126.024174) (xy 251.024174 126.288821) (xy 250.816242 126.600013) (xy 250.673016 126.945791) (xy 250.6 127.312866) - (xy 249.4 127.312866) (xy 249.326984 126.945791) (xy 249.183758 126.600013) (xy 248.975826 126.288821) (xy 248.711179 126.024174) - (xy 248.399987 125.816242) (xy 248.054209 125.673016) (xy 247.687134 125.6) (xy 247.312866 125.6) (xy 246.945791 125.673016) - (xy 246.600013 125.816242) (xy 246.288821 126.024174) (xy 246.024174 126.288821) (xy 245.816242 126.600013) (xy 245.673016 126.945791) - (xy 245.6 127.312866) (xy 244.4 127.312866) (xy 244.326984 126.945791) (xy 244.183758 126.600013) (xy 243.975826 126.288821) - (xy 243.711179 126.024174) (xy 243.399987 125.816242) (xy 243.054209 125.673016) (xy 242.687134 125.6) (xy 242.312866 125.6) - (xy 241.945791 125.673016) (xy 241.600013 125.816242) (xy 241.288821 126.024174) (xy 241.024174 126.288821) (xy 240.816242 126.600013) - (xy 240.673016 126.945791) (xy 240.6 127.312866) (xy 239.4 127.312866) (xy 239.326984 126.945791) (xy 239.183758 126.600013) - (xy 238.975826 126.288821) (xy 238.711179 126.024174) (xy 238.399987 125.816242) (xy 238.054209 125.673016) (xy 237.687134 125.6) - (xy 237.312866 125.6) (xy 236.945791 125.673016) (xy 236.600013 125.816242) (xy 236.288821 126.024174) (xy 236.024174 126.288821) - (xy 235.816242 126.600013) (xy 235.673016 126.945791) (xy 235.6 127.312866) (xy 234.4 127.312866) (xy 234.326984 126.945791) - (xy 234.183758 126.600013) (xy 233.975826 126.288821) (xy 233.711179 126.024174) (xy 233.399987 125.816242) (xy 233.054209 125.673016) - (xy 232.687134 125.6) (xy 232.312866 125.6) (xy 231.945791 125.673016) (xy 231.600013 125.816242) (xy 231.288821 126.024174) - (xy 231.024174 126.288821) (xy 230.816242 126.600013) (xy 230.673016 126.945791) (xy 230.6 127.312866) (xy 229.4 127.312866) - (xy 229.326984 126.945791) (xy 229.183758 126.600013) (xy 228.975826 126.288821) (xy 228.711179 126.024174) (xy 228.399987 125.816242) - (xy 228.054209 125.673016) (xy 227.687134 125.6) (xy 227.312866 125.6) (xy 226.945791 125.673016) (xy 226.600013 125.816242) - (xy 226.288821 126.024174) (xy 226.024174 126.288821) (xy 225.816242 126.600013) (xy 225.673016 126.945791) (xy 225.6 127.312866) - (xy 224.4 127.312866) (xy 224.326984 126.945791) (xy 224.183758 126.600013) (xy 223.975826 126.288821) (xy 223.711179 126.024174) - (xy 223.399987 125.816242) (xy 223.054209 125.673016) (xy 222.687134 125.6) (xy 222.312866 125.6) (xy 221.945791 125.673016) - (xy 221.600013 125.816242) (xy 221.288821 126.024174) (xy 221.024174 126.288821) (xy 220.816242 126.600013) (xy 220.673016 126.945791) - (xy 220.6 127.312866) (xy 219.4 127.312866) (xy 219.326984 126.945791) (xy 219.183758 126.600013) (xy 218.975826 126.288821) - (xy 218.711179 126.024174) (xy 218.399987 125.816242) (xy 218.054209 125.673016) (xy 217.687134 125.6) (xy 217.312866 125.6) - (xy 216.945791 125.673016) (xy 216.600013 125.816242) (xy 216.288821 126.024174) (xy 216.024174 126.288821) (xy 215.816242 126.600013) - (xy 215.673016 126.945791) (xy 215.6 127.312866) (xy 214.4 127.312866) (xy 214.326984 126.945791) (xy 214.183758 126.600013) - (xy 213.975826 126.288821) (xy 213.711179 126.024174) (xy 213.399987 125.816242) (xy 213.054209 125.673016) (xy 212.687134 125.6) - (xy 212.312866 125.6) (xy 211.945791 125.673016) (xy 211.600013 125.816242) (xy 211.288821 126.024174) (xy 211.024174 126.288821) - (xy 210.816242 126.600013) (xy 210.673016 126.945791) (xy 210.6 127.312866) (xy 209.4 127.312866) (xy 209.326984 126.945791) - (xy 209.183758 126.600013) (xy 208.975826 126.288821) (xy 208.711179 126.024174) (xy 208.399987 125.816242) (xy 208.054209 125.673016) - (xy 207.687134 125.6) (xy 207.312866 125.6) (xy 206.945791 125.673016) (xy 206.600013 125.816242) (xy 206.288821 126.024174) - (xy 206.024174 126.288821) (xy 205.816242 126.600013) (xy 205.673016 126.945791) (xy 205.6 127.312866) (xy 204.4 127.312866) - (xy 204.326984 126.945791) (xy 204.183758 126.600013) (xy 203.975826 126.288821) (xy 203.711179 126.024174) (xy 203.399987 125.816242) - (xy 203.054209 125.673016) (xy 202.687134 125.6) (xy 202.312866 125.6) (xy 201.945791 125.673016) (xy 201.600013 125.816242) - (xy 201.288821 126.024174) (xy 201.024174 126.288821) (xy 200.816242 126.600013) (xy 200.673016 126.945791) (xy 200.6 127.312866) - (xy 199.4 127.312866) (xy 199.326984 126.945791) (xy 199.183758 126.600013) (xy 198.975826 126.288821) (xy 198.711179 126.024174) - (xy 198.399987 125.816242) (xy 198.054209 125.673016) (xy 197.687134 125.6) (xy 197.312866 125.6) (xy 196.945791 125.673016) - (xy 196.600013 125.816242) (xy 196.288821 126.024174) (xy 196.024174 126.288821) (xy 195.816242 126.600013) (xy 195.673016 126.945791) - (xy 195.6 127.312866) (xy 194.4 127.312866) (xy 194.326984 126.945791) (xy 194.183758 126.600013) (xy 193.975826 126.288821) - (xy 193.711179 126.024174) (xy 193.399987 125.816242) (xy 193.054209 125.673016) (xy 192.687134 125.6) (xy 192.312866 125.6) - (xy 191.945791 125.673016) (xy 191.600013 125.816242) (xy 191.288821 126.024174) (xy 191.024174 126.288821) (xy 190.816242 126.600013) - (xy 190.673016 126.945791) (xy 190.6 127.312866) (xy 189.4 127.312866) (xy 189.326984 126.945791) (xy 189.183758 126.600013) - (xy 188.975826 126.288821) (xy 188.711179 126.024174) (xy 188.399987 125.816242) (xy 188.054209 125.673016) (xy 187.687134 125.6) - (xy 187.312866 125.6) (xy 186.945791 125.673016) (xy 186.600013 125.816242) (xy 186.288821 126.024174) (xy 186.024174 126.288821) - (xy 185.816242 126.600013) (xy 185.673016 126.945791) (xy 185.6 127.312866) (xy 184.4 127.312866) (xy 184.326984 126.945791) - (xy 184.183758 126.600013) (xy 183.975826 126.288821) (xy 183.711179 126.024174) (xy 183.399987 125.816242) (xy 183.054209 125.673016) - (xy 182.687134 125.6) (xy 182.312866 125.6) (xy 181.945791 125.673016) (xy 181.600013 125.816242) (xy 181.288821 126.024174) - (xy 181.024174 126.288821) (xy 180.816242 126.600013) (xy 180.673016 126.945791) (xy 180.6 127.312866) (xy 179.4 127.312866) - (xy 179.326984 126.945791) (xy 179.183758 126.600013) (xy 178.975826 126.288821) (xy 178.711179 126.024174) (xy 178.399987 125.816242) - (xy 178.054209 125.673016) (xy 177.687134 125.6) (xy 177.312866 125.6) (xy 176.945791 125.673016) (xy 176.600013 125.816242) - (xy 176.288821 126.024174) (xy 176.024174 126.288821) (xy 175.816242 126.600013) (xy 175.673016 126.945791) (xy 175.6 127.312866) - (xy 146.2 127.312866) (xy 146.2 123.735846) (xy 149.068 123.735846) (xy 149.068 124.264154) (xy 149.171068 124.782311) - (xy 149.373242 125.270403) (xy 149.666755 125.709675) (xy 150.040325 126.083245) (xy 150.479597 126.376758) (xy 150.967689 126.578932) - (xy 151.485846 126.682) (xy 152.014154 126.682) (xy 152.532311 126.578932) (xy 153.020403 126.376758) (xy 153.459675 126.083245) - (xy 153.833245 125.709675) (xy 154.126758 125.270403) (xy 154.328932 124.782311) (xy 154.432 124.264154) (xy 154.432 123.735846) - (xy 154.328932 123.217689) (xy 154.126758 122.729597) (xy 153.833245 122.290325) (xy 153.459675 121.916755) (xy 153.020403 121.623242) - (xy 152.532311 121.421068) (xy 152.014154 121.318) (xy 151.485846 121.318) (xy 150.967689 121.421068) (xy 150.479597 121.623242) - (xy 150.040325 121.916755) (xy 149.666755 122.290325) (xy 149.373242 122.729597) (xy 149.171068 123.217689) (xy 149.068 123.735846) - (xy 146.2 123.735846) (xy 146.2 120.7) (xy 176.880646 120.7) + (xy 266.458805 161.640653) (xy 266.533985 161.5) (xy 269.342017 161.5) (xy 269.373875 161.823456) (xy 269.468223 162.134483) + (xy 269.621438 162.421126) (xy 269.827629 162.672371) (xy 270.078874 162.878562) (xy 270.365517 163.031777) (xy 270.676544 163.126125) + (xy 270.918948 163.15) (xy 272.081052 163.15) (xy 272.323456 163.126125) (xy 272.634483 163.031777) (xy 272.921126 162.878562) + (xy 273.172371 162.672371) (xy 273.378562 162.421126) (xy 273.531777 162.134483) (xy 273.626125 161.823456) (xy 273.657983 161.5) + (xy 273.626125 161.176544) (xy 273.531777 160.865517) (xy 273.378562 160.578874) (xy 273.172371 160.327629) (xy 272.921126 160.121438) + (xy 272.634483 159.968223) (xy 272.323456 159.873875) (xy 272.081052 159.85) (xy 270.918948 159.85) (xy 270.676544 159.873875) + (xy 270.365517 159.968223) (xy 270.078874 160.121438) (xy 269.827629 160.327629) (xy 269.621438 160.578874) (xy 269.468223 160.865517) + (xy 269.373875 161.176544) (xy 269.342017 161.5) (xy 266.533985 161.5) (xy 266.565367 161.441289) (xy 266.630988 161.224967) + (xy 266.653145 161) (xy 266.653145 160) (xy 266.630988 159.775033) (xy 266.612588 159.714375) (xy 280.1 159.714375) + (xy 280.1 160.285625) (xy 280.211445 160.845899) (xy 280.430053 161.373665) (xy 280.747423 161.848642) (xy 281.151358 162.252577) + (xy 281.626335 162.569947) (xy 282.154101 162.788555) (xy 282.714375 162.9) (xy 283.285625 162.9) (xy 283.845899 162.788555) + (xy 284.373665 162.569947) (xy 284.848642 162.252577) (xy 285.252577 161.848642) (xy 285.569947 161.373665) (xy 285.788555 160.845899) + (xy 285.9 160.285625) (xy 285.9 159.714375) (xy 285.788555 159.154101) (xy 285.569947 158.626335) (xy 285.252577 158.151358) + (xy 284.848642 157.747423) (xy 284.61493 157.591261) (xy 292.35 157.591261) (xy 292.35 158.408739) (xy 292.509482 159.21051) + (xy 292.822318 159.965762) (xy 293.276485 160.645471) (xy 293.854529 161.223515) (xy 294.534238 161.677682) (xy 295.28949 161.990518) + (xy 296.091261 162.15) (xy 296.908739 162.15) (xy 297.71051 161.990518) (xy 298.465762 161.677682) (xy 299.145471 161.223515) + (xy 299.723515 160.645471) (xy 300.177682 159.965762) (xy 300.490518 159.21051) (xy 300.65 158.408739) (xy 300.65 157.591261) + (xy 300.490518 156.78949) (xy 300.177682 156.034238) (xy 299.723515 155.354529) (xy 299.145471 154.776485) (xy 298.465762 154.322318) + (xy 297.71051 154.009482) (xy 296.908739 153.85) (xy 296.091261 153.85) (xy 295.28949 154.009482) (xy 294.534238 154.322318) + (xy 293.854529 154.776485) (xy 293.276485 155.354529) (xy 292.822318 156.034238) (xy 292.509482 156.78949) (xy 292.35 157.591261) + (xy 284.61493 157.591261) (xy 284.373665 157.430053) (xy 283.845899 157.211445) (xy 283.285625 157.1) (xy 282.714375 157.1) + (xy 282.154101 157.211445) (xy 281.626335 157.430053) (xy 281.151358 157.747423) (xy 280.747423 158.151358) (xy 280.430053 158.626335) + (xy 280.211445 159.154101) (xy 280.1 159.714375) (xy 266.612588 159.714375) (xy 266.565367 159.558711) (xy 266.458805 159.359347) + (xy 266.315397 159.184603) (xy 266.140653 159.041195) (xy 265.941289 158.934633) (xy 265.724967 158.869012) (xy 265.5 158.846855) + (xy 264.633043 158.846855) (xy 265.941319 157.53858) (xy 265.994739 157.494739) (xy 266.066931 157.406774) (xy 266.129683 157.33031) + (xy 266.16969 157.281562) (xy 266.29969 157.038349) (xy 266.379743 156.774448) (xy 266.4 156.568777) (xy 266.4 156.568769) + (xy 266.406773 156.5) (xy 266.4 156.431231) (xy 266.4 152.068769) (xy 266.406773 152) (xy 266.4 151.931231) + (xy 266.4 151.931223) (xy 266.379743 151.725552) (xy 266.29969 151.461651) (xy 266.16969 151.218438) (xy 266.089114 151.120257) + (xy 266.038582 151.058683) (xy 266.038576 151.058677) (xy 265.994738 151.005261) (xy 265.941324 150.961425) (xy 264.208659 149.228761) + (xy 264.445791 149.326984) (xy 264.812866 149.4) (xy 265.187134 149.4) (xy 265.554209 149.326984) (xy 265.899987 149.183758) + (xy 266.211179 148.975826) (xy 266.451159 148.735846) (xy 294.068 148.735846) (xy 294.068 149.264154) (xy 294.171068 149.782311) + (xy 294.373242 150.270403) (xy 294.666755 150.709675) (xy 295.040325 151.083245) (xy 295.479597 151.376758) (xy 295.967689 151.578932) + (xy 296.485846 151.682) (xy 297.014154 151.682) (xy 297.532311 151.578932) (xy 298.020403 151.376758) (xy 298.459675 151.083245) + (xy 298.833245 150.709675) (xy 299.126758 150.270403) (xy 299.328932 149.782311) (xy 299.432 149.264154) (xy 299.432 148.735846) + (xy 299.328932 148.217689) (xy 299.126758 147.729597) (xy 298.833245 147.290325) (xy 298.459675 146.916755) (xy 298.020403 146.623242) + (xy 297.532311 146.421068) (xy 297.014154 146.318) (xy 296.485846 146.318) (xy 295.967689 146.421068) (xy 295.479597 146.623242) + (xy 295.040325 146.916755) (xy 294.666755 147.290325) (xy 294.373242 147.729597) (xy 294.171068 148.217689) (xy 294.068 148.735846) + (xy 266.451159 148.735846) (xy 266.475826 148.711179) (xy 266.683758 148.399987) (xy 266.826984 148.054209) (xy 266.9 147.687134) + (xy 266.9 147.312866) (xy 266.826984 146.945791) (xy 266.683758 146.600013) (xy 266.475826 146.288821) (xy 266.211179 146.024174) + (xy 265.899987 145.816242) (xy 265.554209 145.673016) (xy 265.187134 145.6) (xy 264.812866 145.6) (xy 264.445791 145.673016) + (xy 264.100013 145.816242) (xy 263.9 145.949887) (xy 263.9 144.050113) (xy 264.100013 144.183758) (xy 264.445791 144.326984) + (xy 264.812866 144.4) (xy 265.187134 144.4) (xy 265.554209 144.326984) (xy 265.899987 144.183758) (xy 266.211179 143.975826) + (xy 266.475826 143.711179) (xy 266.683758 143.399987) (xy 266.826984 143.054209) (xy 266.9 142.687134) (xy 266.9 142.312866) + (xy 266.826984 141.945791) (xy 266.683758 141.600013) (xy 266.475826 141.288821) (xy 266.211179 141.024174) (xy 265.899987 140.816242) + (xy 265.554209 140.673016) (xy 265.187134 140.6) (xy 264.812866 140.6) (xy 264.445791 140.673016) (xy 264.100013 140.816242) + (xy 263.9 140.949887) (xy 263.9 138.787005) (xy 263.975826 138.711179) (xy 264.183758 138.399987) (xy 264.326984 138.054209) + (xy 264.4 137.687134) (xy 264.4 137.312866) (xy 264.326984 136.945791) (xy 264.183758 136.600013) (xy 263.975826 136.288821) + (xy 263.9 136.212995) (xy 263.9 135.762) (xy 281.332045 135.762) (xy 281.339845 135.841198) (xy 281.362946 135.917352) + (xy 281.400461 135.987537) (xy 281.450946 136.049054) (xy 281.512463 136.099539) (xy 281.582648 136.137054) (xy 281.658802 136.160155) + (xy 281.738 136.167955) (xy 282.099 136.166) (xy 282.2 136.065) (xy 282.2 135.3) (xy 282.8 135.3) + (xy 282.8 136.065) (xy 282.901 136.166) (xy 283.262 136.167955) (xy 283.341198 136.160155) (xy 283.417352 136.137054) + (xy 283.487537 136.099539) (xy 283.549054 136.049054) (xy 283.599539 135.987537) (xy 283.637054 135.917352) (xy 283.660155 135.841198) + (xy 283.667955 135.762) (xy 283.666 135.401) (xy 283.565 135.3) (xy 282.8 135.3) (xy 282.2 135.3) + (xy 281.435 135.3) (xy 281.334 135.401) (xy 281.332045 135.762) (xy 263.9 135.762) (xy 263.9 134.238) + (xy 281.332045 134.238) (xy 281.334 134.599) (xy 281.435 134.7) (xy 282.2 134.7) (xy 282.2 133.935) + (xy 282.8 133.935) (xy 282.8 134.7) (xy 283.565 134.7) (xy 283.666 134.599) (xy 283.667955 134.238) + (xy 283.660155 134.158802) (xy 283.637054 134.082648) (xy 283.599539 134.012463) (xy 283.549054 133.950946) (xy 283.487537 133.900461) + (xy 283.417352 133.862946) (xy 283.341198 133.839845) (xy 283.262 133.832045) (xy 282.901 133.834) (xy 282.8 133.935) + (xy 282.2 133.935) (xy 282.099 133.834) (xy 281.738 133.832045) (xy 281.658802 133.839845) (xy 281.582648 133.862946) + (xy 281.512463 133.900461) (xy 281.450946 133.950946) (xy 281.400461 134.012463) (xy 281.362946 134.082648) (xy 281.339845 134.158802) + (xy 281.332045 134.238) (xy 263.9 134.238) (xy 263.9 133.787005) (xy 263.975826 133.711179) (xy 264.183758 133.399987) + (xy 264.326984 133.054209) (xy 264.4 132.687134) (xy 264.4 132.312866) (xy 264.326984 131.945791) (xy 264.183758 131.600013) + (xy 263.975826 131.288821) (xy 263.711179 131.024174) (xy 263.399987 130.816242) (xy 263.054209 130.673016) (xy 262.687134 130.6) + (xy 262.312866 130.6) (xy 261.945791 130.673016) (xy 261.600013 130.816242) (xy 261.288821 131.024174) (xy 261.024174 131.288821) + (xy 260.816242 131.600013) (xy 260.673016 131.945791) (xy 260.6 132.312866) (xy 260.6 132.687134) (xy 260.673016 133.054209) + (xy 260.816242 133.399987) (xy 261.024174 133.711179) (xy 261.100001 133.787006) (xy 261.1 136.212995) (xy 261.024174 136.288821) + (xy 260.816242 136.600013) (xy 260.673016 136.945791) (xy 260.6 137.312866) (xy 260.6 137.687134) (xy 260.673016 138.054209) + (xy 260.816242 138.399987) (xy 261.024174 138.711179) (xy 261.1 138.787005) (xy 261.1 140.949887) (xy 260.899987 140.816242) + (xy 260.554209 140.673016) (xy 260.187134 140.6) (xy 259.812866 140.6) (xy 259.445791 140.673016) (xy 259.100013 140.816242) + (xy 258.9 140.949887) (xy 258.9 138.787005) (xy 258.975826 138.711179) (xy 259.183758 138.399987) (xy 259.326984 138.054209) + (xy 259.4 137.687134) (xy 259.4 137.312866) (xy 259.326984 136.945791) (xy 259.183758 136.600013) (xy 258.975826 136.288821) + (xy 258.9 136.212995) (xy 258.9 133.787005) (xy 258.975826 133.711179) (xy 259.183758 133.399987) (xy 259.326984 133.054209) + (xy 259.4 132.687134) (xy 259.4 132.312866) (xy 259.326984 131.945791) (xy 259.183758 131.600013) (xy 258.975826 131.288821) + (xy 258.711179 131.024174) (xy 258.399987 130.816242) (xy 258.054209 130.673016) (xy 257.687134 130.6) (xy 257.312866 130.6) + (xy 256.945791 130.673016) (xy 256.600013 130.816242) (xy 256.288821 131.024174) (xy 256.024174 131.288821) (xy 255.816242 131.600013) + (xy 255.673016 131.945791) (xy 255.6 132.312866) (xy 255.6 132.687134) (xy 255.673016 133.054209) (xy 255.816242 133.399987) + (xy 256.024174 133.711179) (xy 256.100001 133.787006) (xy 256.1 136.212995) (xy 256.024174 136.288821) (xy 255.816242 136.600013) + (xy 255.673016 136.945791) (xy 255.6 137.312866) (xy 255.6 137.687134) (xy 255.673016 138.054209) (xy 255.816242 138.399987) + (xy 256.024174 138.711179) (xy 256.1 138.787005) (xy 256.1 140.949887) (xy 255.899987 140.816242) (xy 255.554209 140.673016) + (xy 255.187134 140.6) (xy 254.812866 140.6) (xy 254.445791 140.673016) (xy 254.100013 140.816242) (xy 253.9 140.949887) + (xy 253.9 138.787005) (xy 253.975826 138.711179) (xy 254.183758 138.399987) (xy 254.326984 138.054209) (xy 254.4 137.687134) + (xy 254.4 137.312866) (xy 254.326984 136.945791) (xy 254.183758 136.600013) (xy 253.975826 136.288821) (xy 253.9 136.212995) + (xy 253.9 133.787005) (xy 253.975826 133.711179) (xy 254.183758 133.399987) (xy 254.326984 133.054209) (xy 254.4 132.687134) + (xy 254.4 132.312866) (xy 254.326984 131.945791) (xy 254.183758 131.600013) (xy 253.975826 131.288821) (xy 253.711179 131.024174) + (xy 253.399987 130.816242) (xy 253.054209 130.673016) (xy 252.687134 130.6) (xy 252.312866 130.6) (xy 251.945791 130.673016) + (xy 251.600013 130.816242) (xy 251.288821 131.024174) (xy 251.024174 131.288821) (xy 250.816242 131.600013) (xy 250.673016 131.945791) + (xy 250.6 132.312866) (xy 250.6 132.687134) (xy 250.673016 133.054209) (xy 250.816242 133.399987) (xy 251.024174 133.711179) + (xy 251.100001 133.787006) (xy 251.1 136.212995) (xy 251.024174 136.288821) (xy 250.816242 136.600013) (xy 250.673016 136.945791) + (xy 250.6 137.312866) (xy 250.6 137.687134) (xy 250.673016 138.054209) (xy 250.816242 138.399987) (xy 251.024174 138.711179) + (xy 251.1 138.787005) (xy 251.1 140.949887) (xy 250.899987 140.816242) (xy 250.554209 140.673016) (xy 250.187134 140.6) + (xy 249.812866 140.6) (xy 249.445791 140.673016) (xy 249.100013 140.816242) (xy 248.9 140.949887) (xy 248.9 138.787005) + (xy 248.975826 138.711179) (xy 249.183758 138.399987) (xy 249.326984 138.054209) (xy 249.4 137.687134) (xy 249.4 137.312866) + (xy 249.326984 136.945791) (xy 249.183758 136.600013) (xy 248.975826 136.288821) (xy 248.9 136.212995) (xy 248.9 133.787005) + (xy 248.975826 133.711179) (xy 249.183758 133.399987) (xy 249.326984 133.054209) (xy 249.4 132.687134) (xy 249.4 132.312866) + (xy 249.326984 131.945791) (xy 249.183758 131.600013) (xy 248.975826 131.288821) (xy 248.711179 131.024174) (xy 248.399987 130.816242) + (xy 248.054209 130.673016) (xy 247.687134 130.6) (xy 247.312866 130.6) (xy 246.945791 130.673016) (xy 246.600013 130.816242) + (xy 246.288821 131.024174) (xy 246.024174 131.288821) (xy 245.816242 131.600013) (xy 245.673016 131.945791) (xy 245.6 132.312866) + (xy 245.6 132.687134) (xy 245.673016 133.054209) (xy 245.816242 133.399987) (xy 246.024174 133.711179) (xy 246.100001 133.787006) + (xy 246.1 136.212995) (xy 246.024174 136.288821) (xy 245.816242 136.600013) (xy 245.673016 136.945791) (xy 245.6 137.312866) + (xy 245.6 137.687134) (xy 245.673016 138.054209) (xy 245.816242 138.399987) (xy 246.024174 138.711179) (xy 246.1 138.787005) + (xy 246.1 140.949887) (xy 245.899987 140.816242) (xy 245.554209 140.673016) (xy 245.187134 140.6) (xy 244.812866 140.6) + (xy 244.445791 140.673016) (xy 244.100013 140.816242) (xy 243.9 140.949887) (xy 243.9 138.787005) (xy 243.975826 138.711179) + (xy 244.183758 138.399987) (xy 244.326984 138.054209) (xy 244.4 137.687134) (xy 244.4 137.312866) (xy 244.326984 136.945791) + (xy 244.183758 136.600013) (xy 243.975826 136.288821) (xy 243.9 136.212995) (xy 243.9 133.787005) (xy 243.975826 133.711179) + (xy 244.183758 133.399987) (xy 244.326984 133.054209) (xy 244.4 132.687134) (xy 244.4 132.312866) (xy 244.326984 131.945791) + (xy 244.183758 131.600013) (xy 243.975826 131.288821) (xy 243.711179 131.024174) (xy 243.399987 130.816242) (xy 243.054209 130.673016) + (xy 242.687134 130.6) (xy 242.312866 130.6) (xy 241.945791 130.673016) (xy 241.600013 130.816242) (xy 241.288821 131.024174) + (xy 241.024174 131.288821) (xy 240.816242 131.600013) (xy 240.673016 131.945791) (xy 240.6 132.312866) (xy 240.6 132.687134) + (xy 240.673016 133.054209) (xy 240.816242 133.399987) (xy 241.024174 133.711179) (xy 241.100001 133.787006) (xy 241.1 136.212995) + (xy 241.024174 136.288821) (xy 240.816242 136.600013) (xy 240.673016 136.945791) (xy 240.6 137.312866) (xy 240.6 137.687134) + (xy 240.673016 138.054209) (xy 240.816242 138.399987) (xy 241.024174 138.711179) (xy 241.1 138.787005) (xy 241.1 140.949887) + (xy 240.899987 140.816242) (xy 240.554209 140.673016) (xy 240.187134 140.6) (xy 239.812866 140.6) (xy 239.445791 140.673016) + (xy 239.100013 140.816242) (xy 238.9 140.949887) (xy 238.9 138.787005) (xy 238.975826 138.711179) (xy 239.183758 138.399987) + (xy 239.326984 138.054209) (xy 239.4 137.687134) (xy 239.4 137.312866) (xy 239.326984 136.945791) (xy 239.183758 136.600013) + (xy 238.975826 136.288821) (xy 238.9 136.212995) (xy 238.9 133.787005) (xy 238.975826 133.711179) (xy 239.183758 133.399987) + (xy 239.326984 133.054209) (xy 239.4 132.687134) (xy 239.4 132.312866) (xy 239.326984 131.945791) (xy 239.183758 131.600013) + (xy 238.975826 131.288821) (xy 238.711179 131.024174) (xy 238.399987 130.816242) (xy 238.054209 130.673016) (xy 237.687134 130.6) + (xy 237.312866 130.6) (xy 236.945791 130.673016) (xy 236.600013 130.816242) (xy 236.288821 131.024174) (xy 236.024174 131.288821) + (xy 235.816242 131.600013) (xy 235.673016 131.945791) (xy 235.6 132.312866) (xy 235.6 132.687134) (xy 235.673016 133.054209) + (xy 235.816242 133.399987) (xy 236.024174 133.711179) (xy 236.1 133.787005) (xy 236.100001 136.212994) (xy 236.024174 136.288821) + (xy 235.816242 136.600013) (xy 235.673016 136.945791) (xy 235.6 137.312866) (xy 235.6 137.687134) (xy 235.673016 138.054209) + (xy 235.816242 138.399987) (xy 236.024174 138.711179) (xy 236.1 138.787005) (xy 236.1 140.949887) (xy 235.899987 140.816242) + (xy 235.554209 140.673016) (xy 235.187134 140.6) (xy 234.812866 140.6) (xy 234.445791 140.673016) (xy 234.100013 140.816242) + (xy 233.9 140.949887) (xy 233.9 138.787005) (xy 233.975826 138.711179) (xy 234.183758 138.399987) (xy 234.326984 138.054209) + (xy 234.4 137.687134) (xy 234.4 137.312866) (xy 234.326984 136.945791) (xy 234.183758 136.600013) (xy 233.975826 136.288821) + (xy 233.9 136.212995) (xy 233.9 133.787005) (xy 233.975826 133.711179) (xy 234.183758 133.399987) (xy 234.326984 133.054209) + (xy 234.4 132.687134) (xy 234.4 132.312866) (xy 234.326984 131.945791) (xy 234.183758 131.600013) (xy 233.975826 131.288821) + (xy 233.711179 131.024174) (xy 233.399987 130.816242) (xy 233.054209 130.673016) (xy 232.687134 130.6) (xy 232.312866 130.6) + (xy 231.945791 130.673016) (xy 231.600013 130.816242) (xy 231.288821 131.024174) (xy 231.024174 131.288821) (xy 230.816242 131.600013) + (xy 230.673016 131.945791) (xy 230.6 132.312866) (xy 230.6 132.687134) (xy 230.673016 133.054209) (xy 230.816242 133.399987) + (xy 231.024174 133.711179) (xy 231.100001 133.787006) (xy 231.1 136.212995) (xy 231.024174 136.288821) (xy 230.816242 136.600013) + (xy 230.673016 136.945791) (xy 230.6 137.312866) (xy 230.6 137.687134) (xy 230.673016 138.054209) (xy 230.816242 138.399987) + (xy 231.024174 138.711179) (xy 231.1 138.787005) (xy 231.1 140.949887) (xy 230.899987 140.816242) (xy 230.554209 140.673016) + (xy 230.187134 140.6) (xy 229.812866 140.6) (xy 229.445791 140.673016) (xy 229.100013 140.816242) (xy 228.9 140.949887) + (xy 228.9 138.787005) (xy 228.975826 138.711179) (xy 229.183758 138.399987) (xy 229.326984 138.054209) (xy 229.4 137.687134) + (xy 229.4 137.312866) (xy 229.326984 136.945791) (xy 229.183758 136.600013) (xy 228.975826 136.288821) (xy 228.9 136.212995) + (xy 228.9 133.787005) (xy 228.975826 133.711179) (xy 229.183758 133.399987) (xy 229.326984 133.054209) (xy 229.4 132.687134) + (xy 229.4 132.312866) (xy 229.326984 131.945791) (xy 229.183758 131.600013) (xy 228.975826 131.288821) (xy 228.711179 131.024174) + (xy 228.399987 130.816242) (xy 228.054209 130.673016) (xy 227.687134 130.6) (xy 227.312866 130.6) (xy 226.945791 130.673016) + (xy 226.600013 130.816242) (xy 226.288821 131.024174) (xy 226.024174 131.288821) (xy 225.816242 131.600013) (xy 225.673016 131.945791) + (xy 225.6 132.312866) (xy 225.6 132.687134) (xy 225.673016 133.054209) (xy 225.816242 133.399987) (xy 226.024174 133.711179) + (xy 226.1 133.787005) (xy 226.100001 136.212994) (xy 226.024174 136.288821) (xy 225.816242 136.600013) (xy 225.673016 136.945791) + (xy 225.6 137.312866) (xy 225.6 137.687134) (xy 225.673016 138.054209) (xy 225.816242 138.399987) (xy 226.024174 138.711179) + (xy 226.1 138.787005) (xy 226.1 140.949887) (xy 225.899987 140.816242) (xy 225.554209 140.673016) (xy 225.187134 140.6) + (xy 224.812866 140.6) (xy 224.445791 140.673016) (xy 224.100013 140.816242) (xy 223.9 140.949887) (xy 223.9 138.787005) + (xy 223.975826 138.711179) (xy 224.183758 138.399987) (xy 224.326984 138.054209) (xy 224.4 137.687134) (xy 224.4 137.312866) + (xy 224.326984 136.945791) (xy 224.183758 136.600013) (xy 223.975826 136.288821) (xy 223.9 136.212995) (xy 223.9 133.787005) + (xy 223.975826 133.711179) (xy 224.183758 133.399987) (xy 224.326984 133.054209) (xy 224.4 132.687134) (xy 224.4 132.312866) + (xy 224.326984 131.945791) (xy 224.183758 131.600013) (xy 223.975826 131.288821) (xy 223.711179 131.024174) (xy 223.399987 130.816242) + (xy 223.054209 130.673016) (xy 222.687134 130.6) (xy 222.312866 130.6) (xy 221.945791 130.673016) (xy 221.600013 130.816242) + (xy 221.288821 131.024174) (xy 221.024174 131.288821) (xy 220.816242 131.600013) (xy 220.673016 131.945791) (xy 220.6 132.312866) + (xy 220.6 132.687134) (xy 220.673016 133.054209) (xy 220.816242 133.399987) (xy 221.024174 133.711179) (xy 221.100001 133.787006) + (xy 221.1 136.212995) (xy 221.024174 136.288821) (xy 220.816242 136.600013) (xy 220.673016 136.945791) (xy 220.6 137.312866) + (xy 220.6 137.687134) (xy 220.673016 138.054209) (xy 220.816242 138.399987) (xy 221.024174 138.711179) (xy 221.1 138.787005) + (xy 221.1 140.949887) (xy 220.899987 140.816242) (xy 220.554209 140.673016) (xy 220.187134 140.6) (xy 219.812866 140.6) + (xy 219.445791 140.673016) (xy 219.100013 140.816242) (xy 218.9 140.949887) (xy 218.9 138.787005) (xy 218.975826 138.711179) + (xy 219.183758 138.399987) (xy 219.326984 138.054209) (xy 219.4 137.687134) (xy 219.4 137.312866) (xy 219.326984 136.945791) + (xy 219.183758 136.600013) (xy 218.975826 136.288821) (xy 218.9 136.212995) (xy 218.9 133.787005) (xy 218.975826 133.711179) + (xy 219.183758 133.399987) (xy 219.326984 133.054209) (xy 219.4 132.687134) (xy 219.4 132.312866) (xy 219.326984 131.945791) + (xy 219.183758 131.600013) (xy 218.975826 131.288821) (xy 218.711179 131.024174) (xy 218.399987 130.816242) (xy 218.054209 130.673016) + (xy 217.687134 130.6) (xy 217.312866 130.6) (xy 216.945791 130.673016) (xy 216.600013 130.816242) (xy 216.288821 131.024174) + (xy 216.024174 131.288821) (xy 215.816242 131.600013) (xy 215.673016 131.945791) (xy 215.6 132.312866) (xy 215.6 132.687134) + (xy 215.673016 133.054209) (xy 215.816242 133.399987) (xy 216.024174 133.711179) (xy 216.100001 133.787006) (xy 216.1 136.212995) + (xy 216.024174 136.288821) (xy 215.816242 136.600013) (xy 215.673016 136.945791) (xy 215.6 137.312866) (xy 215.6 137.687134) + (xy 215.673016 138.054209) (xy 215.816242 138.399987) (xy 216.024174 138.711179) (xy 216.1 138.787005) (xy 216.1 140.949887) + (xy 215.899987 140.816242) (xy 215.554209 140.673016) (xy 215.187134 140.6) (xy 214.812866 140.6) (xy 214.445791 140.673016) + (xy 214.100013 140.816242) (xy 213.9 140.949887) (xy 213.9 138.787005) (xy 213.975826 138.711179) (xy 214.183758 138.399987) + (xy 214.326984 138.054209) (xy 214.4 137.687134) (xy 214.4 137.312866) (xy 214.326984 136.945791) (xy 214.183758 136.600013) + (xy 213.975826 136.288821) (xy 213.9 136.212995) (xy 213.9 133.787005) (xy 213.975826 133.711179) (xy 214.183758 133.399987) + (xy 214.326984 133.054209) (xy 214.4 132.687134) (xy 214.4 132.312866) (xy 214.326984 131.945791) (xy 214.183758 131.600013) + (xy 213.975826 131.288821) (xy 213.711179 131.024174) (xy 213.399987 130.816242) (xy 213.054209 130.673016) (xy 212.687134 130.6) + (xy 212.312866 130.6) (xy 211.945791 130.673016) (xy 211.600013 130.816242) (xy 211.288821 131.024174) (xy 211.024174 131.288821) + (xy 210.816242 131.600013) (xy 210.673016 131.945791) (xy 210.6 132.312866) (xy 210.6 132.687134) (xy 210.673016 133.054209) + (xy 210.816242 133.399987) (xy 211.024174 133.711179) (xy 211.100001 133.787006) (xy 211.1 136.212995) (xy 211.024174 136.288821) + (xy 210.816242 136.600013) (xy 210.673016 136.945791) (xy 210.6 137.312866) (xy 210.6 137.687134) (xy 210.673016 138.054209) + (xy 210.816242 138.399987) (xy 211.024174 138.711179) (xy 211.1 138.787005) (xy 211.1 140.949887) (xy 210.899987 140.816242) + (xy 210.554209 140.673016) (xy 210.187134 140.6) (xy 209.812866 140.6) (xy 209.445791 140.673016) (xy 209.100013 140.816242) + (xy 208.9 140.949887) (xy 208.9 138.787005) (xy 208.975826 138.711179) (xy 209.183758 138.399987) (xy 209.326984 138.054209) + (xy 209.4 137.687134) (xy 209.4 137.312866) (xy 209.326984 136.945791) (xy 209.183758 136.600013) (xy 208.975826 136.288821) + (xy 208.9 136.212995) (xy 208.9 133.787005) (xy 208.975826 133.711179) (xy 209.183758 133.399987) (xy 209.326984 133.054209) + (xy 209.4 132.687134) (xy 209.4 132.312866) (xy 209.326984 131.945791) (xy 209.183758 131.600013) (xy 208.975826 131.288821) + (xy 208.711179 131.024174) (xy 208.399987 130.816242) (xy 208.054209 130.673016) (xy 207.687134 130.6) (xy 207.312866 130.6) + (xy 206.945791 130.673016) (xy 206.600013 130.816242) (xy 206.288821 131.024174) (xy 206.024174 131.288821) (xy 205.816242 131.600013) + (xy 205.673016 131.945791) (xy 205.6 132.312866) (xy 205.6 132.687134) (xy 205.673016 133.054209) (xy 205.816242 133.399987) + (xy 206.024174 133.711179) (xy 206.100001 133.787006) (xy 206.1 136.212995) (xy 206.024174 136.288821) (xy 205.816242 136.600013) + (xy 205.673016 136.945791) (xy 205.6 137.312866) (xy 205.6 137.687134) (xy 205.673016 138.054209) (xy 205.816242 138.399987) + (xy 206.024174 138.711179) (xy 206.1 138.787005) (xy 206.1 140.949887) (xy 205.899987 140.816242) (xy 205.554209 140.673016) + (xy 205.187134 140.6) (xy 204.812866 140.6) (xy 204.445791 140.673016) (xy 204.100013 140.816242) (xy 203.9 140.949887) + (xy 203.9 138.787005) (xy 203.975826 138.711179) (xy 204.183758 138.399987) (xy 204.326984 138.054209) (xy 204.4 137.687134) + (xy 204.4 137.312866) (xy 204.326984 136.945791) (xy 204.183758 136.600013) (xy 203.975826 136.288821) (xy 203.9 136.212995) + (xy 203.9 133.787005) (xy 203.975826 133.711179) (xy 204.183758 133.399987) (xy 204.326984 133.054209) (xy 204.4 132.687134) + (xy 204.4 132.312866) (xy 204.326984 131.945791) (xy 204.183758 131.600013) (xy 203.975826 131.288821) (xy 203.711179 131.024174) + (xy 203.399987 130.816242) (xy 203.054209 130.673016) (xy 202.687134 130.6) (xy 202.312866 130.6) (xy 201.945791 130.673016) + (xy 201.600013 130.816242) (xy 201.288821 131.024174) (xy 201.024174 131.288821) (xy 200.816242 131.600013) (xy 200.673016 131.945791) + (xy 200.6 132.312866) (xy 200.6 132.687134) (xy 200.673016 133.054209) (xy 200.816242 133.399987) (xy 201.024174 133.711179) + (xy 201.100001 133.787006) (xy 201.1 136.212995) (xy 201.024174 136.288821) (xy 200.816242 136.600013) (xy 200.673016 136.945791) + (xy 200.6 137.312866) (xy 200.6 137.687134) (xy 200.673016 138.054209) (xy 200.816242 138.399987) (xy 201.024174 138.711179) + (xy 201.1 138.787005) (xy 201.1 140.949887) (xy 200.899987 140.816242) (xy 200.554209 140.673016) (xy 200.187134 140.6) + (xy 199.812866 140.6) (xy 199.445791 140.673016) (xy 199.100013 140.816242) (xy 198.9 140.949887) (xy 198.9 138.787005) + (xy 198.975826 138.711179) (xy 199.183758 138.399987) (xy 199.326984 138.054209) (xy 199.4 137.687134) (xy 199.4 137.312866) + (xy 199.326984 136.945791) (xy 199.183758 136.600013) (xy 198.975826 136.288821) (xy 198.9 136.212995) (xy 198.9 133.787005) + (xy 198.975826 133.711179) (xy 199.183758 133.399987) (xy 199.326984 133.054209) (xy 199.4 132.687134) (xy 199.4 132.312866) + (xy 199.326984 131.945791) (xy 199.183758 131.600013) (xy 198.975826 131.288821) (xy 198.711179 131.024174) (xy 198.399987 130.816242) + (xy 198.054209 130.673016) (xy 197.687134 130.6) (xy 197.312866 130.6) (xy 196.945791 130.673016) (xy 196.600013 130.816242) + (xy 196.288821 131.024174) (xy 196.024174 131.288821) (xy 195.816242 131.600013) (xy 195.673016 131.945791) (xy 195.6 132.312866) + (xy 195.6 132.687134) (xy 195.673016 133.054209) (xy 195.816242 133.399987) (xy 196.024174 133.711179) (xy 196.100001 133.787006) + (xy 196.1 136.212995) (xy 196.024174 136.288821) (xy 195.816242 136.600013) (xy 195.673016 136.945791) (xy 195.6 137.312866) + (xy 195.6 137.687134) (xy 195.673016 138.054209) (xy 195.816242 138.399987) (xy 196.024174 138.711179) (xy 196.1 138.787005) + (xy 196.1 140.949887) (xy 195.899987 140.816242) (xy 195.554209 140.673016) (xy 195.187134 140.6) (xy 194.812866 140.6) + (xy 194.445791 140.673016) (xy 194.100013 140.816242) (xy 193.9 140.949887) (xy 193.9 138.787005) (xy 193.975826 138.711179) + (xy 194.183758 138.399987) (xy 194.326984 138.054209) (xy 194.4 137.687134) (xy 194.4 137.312866) (xy 194.326984 136.945791) + (xy 194.183758 136.600013) (xy 193.975826 136.288821) (xy 193.9 136.212995) (xy 193.9 133.787005) (xy 193.975826 133.711179) + (xy 194.183758 133.399987) (xy 194.326984 133.054209) (xy 194.4 132.687134) (xy 194.4 132.312866) (xy 194.326984 131.945791) + (xy 194.183758 131.600013) (xy 193.975826 131.288821) (xy 193.711179 131.024174) (xy 193.399987 130.816242) (xy 193.054209 130.673016) + (xy 192.687134 130.6) (xy 192.312866 130.6) (xy 191.945791 130.673016) (xy 191.600013 130.816242) (xy 191.288821 131.024174) + (xy 191.024174 131.288821) (xy 190.816242 131.600013) (xy 190.673016 131.945791) (xy 190.6 132.312866) (xy 190.6 132.687134) + (xy 190.673016 133.054209) (xy 190.816242 133.399987) (xy 191.024174 133.711179) (xy 191.100001 133.787006) (xy 191.1 136.212995) + (xy 191.024174 136.288821) (xy 190.816242 136.600013) (xy 190.673016 136.945791) (xy 190.6 137.312866) (xy 190.6 137.687134) + (xy 190.673016 138.054209) (xy 190.816242 138.399987) (xy 191.024174 138.711179) (xy 191.1 138.787005) (xy 191.1 140.949887) + (xy 190.899987 140.816242) (xy 190.554209 140.673016) (xy 190.187134 140.6) (xy 189.812866 140.6) (xy 189.445791 140.673016) + (xy 189.100013 140.816242) (xy 188.9 140.949887) (xy 188.9 138.787005) (xy 188.975826 138.711179) (xy 189.183758 138.399987) + (xy 189.326984 138.054209) (xy 189.4 137.687134) (xy 189.4 137.312866) (xy 189.326984 136.945791) (xy 189.183758 136.600013) + (xy 188.975826 136.288821) (xy 188.9 136.212995) (xy 188.9 133.787005) (xy 188.975826 133.711179) (xy 189.183758 133.399987) + (xy 189.326984 133.054209) (xy 189.4 132.687134) (xy 189.4 132.312866) (xy 189.326984 131.945791) (xy 189.183758 131.600013) + (xy 188.975826 131.288821) (xy 188.711179 131.024174) (xy 188.399987 130.816242) (xy 188.054209 130.673016) (xy 187.687134 130.6) + (xy 187.312866 130.6) (xy 186.945791 130.673016) (xy 186.600013 130.816242) (xy 186.288821 131.024174) (xy 186.024174 131.288821) + (xy 185.816242 131.600013) (xy 185.673016 131.945791) (xy 185.6 132.312866) (xy 185.6 132.687134) (xy 185.673016 133.054209) + (xy 185.816242 133.399987) (xy 186.024174 133.711179) (xy 186.100001 133.787006) (xy 186.1 136.212995) (xy 186.024174 136.288821) + (xy 185.816242 136.600013) (xy 185.673016 136.945791) (xy 185.6 137.312866) (xy 185.6 137.687134) (xy 185.673016 138.054209) + (xy 185.816242 138.399987) (xy 186.024174 138.711179) (xy 186.1 138.787005) (xy 186.1 140.949887) (xy 185.899987 140.816242) + (xy 185.554209 140.673016) (xy 185.187134 140.6) (xy 184.812866 140.6) (xy 184.445791 140.673016) (xy 184.100013 140.816242) + (xy 183.9 140.949887) (xy 183.9 138.787005) (xy 183.975826 138.711179) (xy 184.183758 138.399987) (xy 184.326984 138.054209) + (xy 184.4 137.687134) (xy 184.4 137.312866) (xy 184.326984 136.945791) (xy 184.183758 136.600013) (xy 183.975826 136.288821) + (xy 183.9 136.212995) (xy 183.9 133.787005) (xy 183.975826 133.711179) (xy 184.183758 133.399987) (xy 184.326984 133.054209) + (xy 184.4 132.687134) (xy 184.4 132.312866) (xy 184.326984 131.945791) (xy 184.183758 131.600013) (xy 183.975826 131.288821) + (xy 183.711179 131.024174) (xy 183.399987 130.816242) (xy 183.054209 130.673016) (xy 182.687134 130.6) (xy 182.312866 130.6) + (xy 181.945791 130.673016) (xy 181.600013 130.816242) (xy 181.288821 131.024174) (xy 181.024174 131.288821) (xy 180.816242 131.600013) + (xy 180.673016 131.945791) (xy 180.6 132.312866) (xy 180.6 132.687134) (xy 180.673016 133.054209) (xy 180.816242 133.399987) + (xy 181.024174 133.711179) (xy 181.100001 133.787006) (xy 181.1 136.212995) (xy 181.024174 136.288821) (xy 180.816242 136.600013) + (xy 180.673016 136.945791) (xy 180.6 137.312866) (xy 180.6 137.687134) (xy 180.673016 138.054209) (xy 180.816242 138.399987) + (xy 181.024174 138.711179) (xy 181.1 138.787005) (xy 181.1 140.949887) (xy 180.899987 140.816242) (xy 180.554209 140.673016) + (xy 180.187134 140.6) (xy 179.812866 140.6) (xy 179.445791 140.673016) (xy 179.100013 140.816242) (xy 178.9 140.949887) + (xy 178.9 138.787005) (xy 178.975826 138.711179) (xy 179.183758 138.399987) (xy 179.326984 138.054209) (xy 179.4 137.687134) + (xy 179.4 137.312866) (xy 179.326984 136.945791) (xy 179.183758 136.600013) (xy 178.975826 136.288821) (xy 178.9 136.212995) + (xy 178.9 133.787005) (xy 178.975826 133.711179) (xy 179.183758 133.399987) (xy 179.326984 133.054209) (xy 179.4 132.687134) + (xy 179.4 132.312866) (xy 179.326984 131.945791) (xy 179.183758 131.600013) (xy 178.975826 131.288821) (xy 178.711179 131.024174) + (xy 178.399987 130.816242) (xy 178.054209 130.673016) (xy 177.687134 130.6) (xy 177.312866 130.6) (xy 176.945791 130.673016) + (xy 176.600013 130.816242) (xy 176.288821 131.024174) (xy 176.024174 131.288821) (xy 175.816242 131.600013) (xy 175.673016 131.945791) + (xy 175.6 132.312866) (xy 175.6 132.687134) (xy 175.673016 133.054209) (xy 175.816242 133.399987) (xy 176.024174 133.711179) + (xy 176.100001 133.787006) (xy 176.1 136.212995) (xy 176.024174 136.288821) (xy 175.816242 136.600013) (xy 175.673016 136.945791) + (xy 175.6 137.312866) (xy 175.6 137.687134) (xy 175.673016 138.054209) (xy 175.816242 138.399987) (xy 176.024174 138.711179) + (xy 176.1 138.787005) (xy 176.1 140.949887) (xy 175.899987 140.816242) (xy 175.554209 140.673016) (xy 175.187134 140.6) + (xy 174.812866 140.6) (xy 174.445791 140.673016) (xy 174.100013 140.816242) (xy 173.788821 141.024174) (xy 173.524174 141.288821) + (xy 173.316242 141.600013) (xy 173.173016 141.945791) (xy 173.1 142.312866) (xy 146.2 142.312866) (xy 146.2 135.762) + (xy 156.332045 135.762) (xy 156.339845 135.841198) (xy 156.362946 135.917352) (xy 156.400461 135.987537) (xy 156.450946 136.049054) + (xy 156.512463 136.099539) (xy 156.582648 136.137054) (xy 156.658802 136.160155) (xy 156.738 136.167955) (xy 157.099 136.166) + (xy 157.2 136.065) (xy 157.2 135.3) (xy 157.8 135.3) (xy 157.8 136.065) (xy 157.901 136.166) + (xy 158.262 136.167955) (xy 158.341198 136.160155) (xy 158.417352 136.137054) (xy 158.487537 136.099539) (xy 158.549054 136.049054) + (xy 158.599539 135.987537) (xy 158.637054 135.917352) (xy 158.660155 135.841198) (xy 158.667955 135.762) (xy 158.666 135.401) + (xy 158.565 135.3) (xy 157.8 135.3) (xy 157.2 135.3) (xy 156.435 135.3) (xy 156.334 135.401) + (xy 156.332045 135.762) (xy 146.2 135.762) (xy 146.2 134.238) (xy 156.332045 134.238) (xy 156.334 134.599) + (xy 156.435 134.7) (xy 157.2 134.7) (xy 157.2 133.935) (xy 157.8 133.935) (xy 157.8 134.7) + (xy 158.565 134.7) (xy 158.666 134.599) (xy 158.667955 134.238) (xy 158.660155 134.158802) (xy 158.637054 134.082648) + (xy 158.599539 134.012463) (xy 158.549054 133.950946) (xy 158.487537 133.900461) (xy 158.417352 133.862946) (xy 158.341198 133.839845) + (xy 158.262 133.832045) (xy 157.901 133.834) (xy 157.8 133.935) (xy 157.2 133.935) (xy 157.099 133.834) + (xy 156.738 133.832045) (xy 156.658802 133.839845) (xy 156.582648 133.862946) (xy 156.512463 133.900461) (xy 156.450946 133.950946) + (xy 156.400461 134.012463) (xy 156.362946 134.082648) (xy 156.339845 134.158802) (xy 156.332045 134.238) (xy 146.2 134.238) + (xy 146.2 127.312866) (xy 175.6 127.312866) (xy 175.6 127.687134) (xy 175.673016 128.054209) (xy 175.816242 128.399987) + (xy 176.024174 128.711179) (xy 176.288821 128.975826) (xy 176.600013 129.183758) (xy 176.945791 129.326984) (xy 177.312866 129.4) + (xy 177.687134 129.4) (xy 178.054209 129.326984) (xy 178.399987 129.183758) (xy 178.711179 128.975826) (xy 178.975826 128.711179) + (xy 179.183758 128.399987) (xy 179.326984 128.054209) (xy 179.4 127.687134) (xy 179.4 127.312866) (xy 180.6 127.312866) + (xy 180.6 127.687134) (xy 180.673016 128.054209) (xy 180.816242 128.399987) (xy 181.024174 128.711179) (xy 181.288821 128.975826) + (xy 181.600013 129.183758) (xy 181.945791 129.326984) (xy 182.312866 129.4) (xy 182.687134 129.4) (xy 183.054209 129.326984) + (xy 183.399987 129.183758) (xy 183.711179 128.975826) (xy 183.975826 128.711179) (xy 184.183758 128.399987) (xy 184.326984 128.054209) + (xy 184.4 127.687134) (xy 184.4 127.312866) (xy 185.6 127.312866) (xy 185.6 127.687134) (xy 185.673016 128.054209) + (xy 185.816242 128.399987) (xy 186.024174 128.711179) (xy 186.288821 128.975826) (xy 186.600013 129.183758) (xy 186.945791 129.326984) + (xy 187.312866 129.4) (xy 187.687134 129.4) (xy 188.054209 129.326984) (xy 188.399987 129.183758) (xy 188.711179 128.975826) + (xy 188.975826 128.711179) (xy 189.183758 128.399987) (xy 189.326984 128.054209) (xy 189.4 127.687134) (xy 189.4 127.312866) + (xy 190.6 127.312866) (xy 190.6 127.687134) (xy 190.673016 128.054209) (xy 190.816242 128.399987) (xy 191.024174 128.711179) + (xy 191.288821 128.975826) (xy 191.600013 129.183758) (xy 191.945791 129.326984) (xy 192.312866 129.4) (xy 192.687134 129.4) + (xy 193.054209 129.326984) (xy 193.399987 129.183758) (xy 193.711179 128.975826) (xy 193.975826 128.711179) (xy 194.183758 128.399987) + (xy 194.326984 128.054209) (xy 194.4 127.687134) (xy 194.4 127.312866) (xy 195.6 127.312866) (xy 195.6 127.687134) + (xy 195.673016 128.054209) (xy 195.816242 128.399987) (xy 196.024174 128.711179) (xy 196.288821 128.975826) (xy 196.600013 129.183758) + (xy 196.945791 129.326984) (xy 197.312866 129.4) (xy 197.687134 129.4) (xy 198.054209 129.326984) (xy 198.399987 129.183758) + (xy 198.711179 128.975826) (xy 198.975826 128.711179) (xy 199.183758 128.399987) (xy 199.326984 128.054209) (xy 199.4 127.687134) + (xy 199.4 127.312866) (xy 200.6 127.312866) (xy 200.6 127.687134) (xy 200.673016 128.054209) (xy 200.816242 128.399987) + (xy 201.024174 128.711179) (xy 201.288821 128.975826) (xy 201.600013 129.183758) (xy 201.945791 129.326984) (xy 202.312866 129.4) + (xy 202.687134 129.4) (xy 203.054209 129.326984) (xy 203.399987 129.183758) (xy 203.711179 128.975826) (xy 203.975826 128.711179) + (xy 204.183758 128.399987) (xy 204.326984 128.054209) (xy 204.4 127.687134) (xy 204.4 127.312866) (xy 205.6 127.312866) + (xy 205.6 127.687134) (xy 205.673016 128.054209) (xy 205.816242 128.399987) (xy 206.024174 128.711179) (xy 206.288821 128.975826) + (xy 206.600013 129.183758) (xy 206.945791 129.326984) (xy 207.312866 129.4) (xy 207.687134 129.4) (xy 208.054209 129.326984) + (xy 208.399987 129.183758) (xy 208.711179 128.975826) (xy 208.975826 128.711179) (xy 209.183758 128.399987) (xy 209.326984 128.054209) + (xy 209.4 127.687134) (xy 209.4 127.312866) (xy 210.6 127.312866) (xy 210.6 127.687134) (xy 210.673016 128.054209) + (xy 210.816242 128.399987) (xy 211.024174 128.711179) (xy 211.288821 128.975826) (xy 211.600013 129.183758) (xy 211.945791 129.326984) + (xy 212.312866 129.4) (xy 212.687134 129.4) (xy 213.054209 129.326984) (xy 213.399987 129.183758) (xy 213.711179 128.975826) + (xy 213.975826 128.711179) (xy 214.183758 128.399987) (xy 214.326984 128.054209) (xy 214.4 127.687134) (xy 214.4 127.312866) + (xy 215.6 127.312866) (xy 215.6 127.687134) (xy 215.673016 128.054209) (xy 215.816242 128.399987) (xy 216.024174 128.711179) + (xy 216.288821 128.975826) (xy 216.600013 129.183758) (xy 216.945791 129.326984) (xy 217.312866 129.4) (xy 217.687134 129.4) + (xy 218.054209 129.326984) (xy 218.399987 129.183758) (xy 218.711179 128.975826) (xy 218.975826 128.711179) (xy 219.183758 128.399987) + (xy 219.326984 128.054209) (xy 219.4 127.687134) (xy 219.4 127.312866) (xy 220.6 127.312866) (xy 220.6 127.687134) + (xy 220.673016 128.054209) (xy 220.816242 128.399987) (xy 221.024174 128.711179) (xy 221.288821 128.975826) (xy 221.600013 129.183758) + (xy 221.945791 129.326984) (xy 222.312866 129.4) (xy 222.687134 129.4) (xy 223.054209 129.326984) (xy 223.399987 129.183758) + (xy 223.711179 128.975826) (xy 223.975826 128.711179) (xy 224.183758 128.399987) (xy 224.326984 128.054209) (xy 224.4 127.687134) + (xy 224.4 127.312866) (xy 225.6 127.312866) (xy 225.6 127.687134) (xy 225.673016 128.054209) (xy 225.816242 128.399987) + (xy 226.024174 128.711179) (xy 226.288821 128.975826) (xy 226.600013 129.183758) (xy 226.945791 129.326984) (xy 227.312866 129.4) + (xy 227.687134 129.4) (xy 228.054209 129.326984) (xy 228.399987 129.183758) (xy 228.711179 128.975826) (xy 228.975826 128.711179) + (xy 229.183758 128.399987) (xy 229.326984 128.054209) (xy 229.4 127.687134) (xy 229.4 127.312866) (xy 230.6 127.312866) + (xy 230.6 127.687134) (xy 230.673016 128.054209) (xy 230.816242 128.399987) (xy 231.024174 128.711179) (xy 231.288821 128.975826) + (xy 231.600013 129.183758) (xy 231.945791 129.326984) (xy 232.312866 129.4) (xy 232.687134 129.4) (xy 233.054209 129.326984) + (xy 233.399987 129.183758) (xy 233.711179 128.975826) (xy 233.975826 128.711179) (xy 234.183758 128.399987) (xy 234.326984 128.054209) + (xy 234.4 127.687134) (xy 234.4 127.312866) (xy 235.6 127.312866) (xy 235.6 127.687134) (xy 235.673016 128.054209) + (xy 235.816242 128.399987) (xy 236.024174 128.711179) (xy 236.288821 128.975826) (xy 236.600013 129.183758) (xy 236.945791 129.326984) + (xy 237.312866 129.4) (xy 237.687134 129.4) (xy 238.054209 129.326984) (xy 238.399987 129.183758) (xy 238.711179 128.975826) + (xy 238.975826 128.711179) (xy 239.183758 128.399987) (xy 239.326984 128.054209) (xy 239.4 127.687134) (xy 239.4 127.312866) + (xy 240.6 127.312866) (xy 240.6 127.687134) (xy 240.673016 128.054209) (xy 240.816242 128.399987) (xy 241.024174 128.711179) + (xy 241.288821 128.975826) (xy 241.600013 129.183758) (xy 241.945791 129.326984) (xy 242.312866 129.4) (xy 242.687134 129.4) + (xy 243.054209 129.326984) (xy 243.399987 129.183758) (xy 243.711179 128.975826) (xy 243.975826 128.711179) (xy 244.183758 128.399987) + (xy 244.326984 128.054209) (xy 244.4 127.687134) (xy 244.4 127.312866) (xy 245.6 127.312866) (xy 245.6 127.687134) + (xy 245.673016 128.054209) (xy 245.816242 128.399987) (xy 246.024174 128.711179) (xy 246.288821 128.975826) (xy 246.600013 129.183758) + (xy 246.945791 129.326984) (xy 247.312866 129.4) (xy 247.687134 129.4) (xy 248.054209 129.326984) (xy 248.399987 129.183758) + (xy 248.711179 128.975826) (xy 248.975826 128.711179) (xy 249.183758 128.399987) (xy 249.326984 128.054209) (xy 249.4 127.687134) + (xy 249.4 127.312866) (xy 250.6 127.312866) (xy 250.6 127.687134) (xy 250.673016 128.054209) (xy 250.816242 128.399987) + (xy 251.024174 128.711179) (xy 251.288821 128.975826) (xy 251.600013 129.183758) (xy 251.945791 129.326984) (xy 252.312866 129.4) + (xy 252.687134 129.4) (xy 253.054209 129.326984) (xy 253.399987 129.183758) (xy 253.711179 128.975826) (xy 253.975826 128.711179) + (xy 254.183758 128.399987) (xy 254.326984 128.054209) (xy 254.4 127.687134) (xy 254.4 127.312866) (xy 255.6 127.312866) + (xy 255.6 127.687134) (xy 255.673016 128.054209) (xy 255.816242 128.399987) (xy 256.024174 128.711179) (xy 256.288821 128.975826) + (xy 256.600013 129.183758) (xy 256.945791 129.326984) (xy 257.312866 129.4) (xy 257.687134 129.4) (xy 258.054209 129.326984) + (xy 258.399987 129.183758) (xy 258.711179 128.975826) (xy 258.975826 128.711179) (xy 259.183758 128.399987) (xy 259.326984 128.054209) + (xy 259.4 127.687134) (xy 259.4 127.312866) (xy 260.6 127.312866) (xy 260.6 127.687134) (xy 260.673016 128.054209) + (xy 260.816242 128.399987) (xy 261.024174 128.711179) (xy 261.288821 128.975826) (xy 261.600013 129.183758) (xy 261.945791 129.326984) + (xy 262.312866 129.4) (xy 262.687134 129.4) (xy 263.054209 129.326984) (xy 263.399987 129.183758) (xy 263.711179 128.975826) + (xy 263.975826 128.711179) (xy 264.183758 128.399987) (xy 264.326984 128.054209) (xy 264.4 127.687134) (xy 264.4 127.312866) + (xy 264.326984 126.945791) (xy 264.183758 126.600013) (xy 263.975826 126.288821) (xy 263.711179 126.024174) (xy 263.399987 125.816242) + (xy 263.054209 125.673016) (xy 262.687134 125.6) (xy 262.312866 125.6) (xy 261.945791 125.673016) (xy 261.600013 125.816242) + (xy 261.288821 126.024174) (xy 261.024174 126.288821) (xy 260.816242 126.600013) (xy 260.673016 126.945791) (xy 260.6 127.312866) + (xy 259.4 127.312866) (xy 259.326984 126.945791) (xy 259.183758 126.600013) (xy 258.975826 126.288821) (xy 258.711179 126.024174) + (xy 258.399987 125.816242) (xy 258.054209 125.673016) (xy 257.687134 125.6) (xy 257.312866 125.6) (xy 256.945791 125.673016) + (xy 256.600013 125.816242) (xy 256.288821 126.024174) (xy 256.024174 126.288821) (xy 255.816242 126.600013) (xy 255.673016 126.945791) + (xy 255.6 127.312866) (xy 254.4 127.312866) (xy 254.326984 126.945791) (xy 254.183758 126.600013) (xy 253.975826 126.288821) + (xy 253.711179 126.024174) (xy 253.399987 125.816242) (xy 253.054209 125.673016) (xy 252.687134 125.6) (xy 252.312866 125.6) + (xy 251.945791 125.673016) (xy 251.600013 125.816242) (xy 251.288821 126.024174) (xy 251.024174 126.288821) (xy 250.816242 126.600013) + (xy 250.673016 126.945791) (xy 250.6 127.312866) (xy 249.4 127.312866) (xy 249.326984 126.945791) (xy 249.183758 126.600013) + (xy 248.975826 126.288821) (xy 248.711179 126.024174) (xy 248.399987 125.816242) (xy 248.054209 125.673016) (xy 247.687134 125.6) + (xy 247.312866 125.6) (xy 246.945791 125.673016) (xy 246.600013 125.816242) (xy 246.288821 126.024174) (xy 246.024174 126.288821) + (xy 245.816242 126.600013) (xy 245.673016 126.945791) (xy 245.6 127.312866) (xy 244.4 127.312866) (xy 244.326984 126.945791) + (xy 244.183758 126.600013) (xy 243.975826 126.288821) (xy 243.711179 126.024174) (xy 243.399987 125.816242) (xy 243.054209 125.673016) + (xy 242.687134 125.6) (xy 242.312866 125.6) (xy 241.945791 125.673016) (xy 241.600013 125.816242) (xy 241.288821 126.024174) + (xy 241.024174 126.288821) (xy 240.816242 126.600013) (xy 240.673016 126.945791) (xy 240.6 127.312866) (xy 239.4 127.312866) + (xy 239.326984 126.945791) (xy 239.183758 126.600013) (xy 238.975826 126.288821) (xy 238.711179 126.024174) (xy 238.399987 125.816242) + (xy 238.054209 125.673016) (xy 237.687134 125.6) (xy 237.312866 125.6) (xy 236.945791 125.673016) (xy 236.600013 125.816242) + (xy 236.288821 126.024174) (xy 236.024174 126.288821) (xy 235.816242 126.600013) (xy 235.673016 126.945791) (xy 235.6 127.312866) + (xy 234.4 127.312866) (xy 234.326984 126.945791) (xy 234.183758 126.600013) (xy 233.975826 126.288821) (xy 233.711179 126.024174) + (xy 233.399987 125.816242) (xy 233.054209 125.673016) (xy 232.687134 125.6) (xy 232.312866 125.6) (xy 231.945791 125.673016) + (xy 231.600013 125.816242) (xy 231.288821 126.024174) (xy 231.024174 126.288821) (xy 230.816242 126.600013) (xy 230.673016 126.945791) + (xy 230.6 127.312866) (xy 229.4 127.312866) (xy 229.326984 126.945791) (xy 229.183758 126.600013) (xy 228.975826 126.288821) + (xy 228.711179 126.024174) (xy 228.399987 125.816242) (xy 228.054209 125.673016) (xy 227.687134 125.6) (xy 227.312866 125.6) + (xy 226.945791 125.673016) (xy 226.600013 125.816242) (xy 226.288821 126.024174) (xy 226.024174 126.288821) (xy 225.816242 126.600013) + (xy 225.673016 126.945791) (xy 225.6 127.312866) (xy 224.4 127.312866) (xy 224.326984 126.945791) (xy 224.183758 126.600013) + (xy 223.975826 126.288821) (xy 223.711179 126.024174) (xy 223.399987 125.816242) (xy 223.054209 125.673016) (xy 222.687134 125.6) + (xy 222.312866 125.6) (xy 221.945791 125.673016) (xy 221.600013 125.816242) (xy 221.288821 126.024174) (xy 221.024174 126.288821) + (xy 220.816242 126.600013) (xy 220.673016 126.945791) (xy 220.6 127.312866) (xy 219.4 127.312866) (xy 219.326984 126.945791) + (xy 219.183758 126.600013) (xy 218.975826 126.288821) (xy 218.711179 126.024174) (xy 218.399987 125.816242) (xy 218.054209 125.673016) + (xy 217.687134 125.6) (xy 217.312866 125.6) (xy 216.945791 125.673016) (xy 216.600013 125.816242) (xy 216.288821 126.024174) + (xy 216.024174 126.288821) (xy 215.816242 126.600013) (xy 215.673016 126.945791) (xy 215.6 127.312866) (xy 214.4 127.312866) + (xy 214.326984 126.945791) (xy 214.183758 126.600013) (xy 213.975826 126.288821) (xy 213.711179 126.024174) (xy 213.399987 125.816242) + (xy 213.054209 125.673016) (xy 212.687134 125.6) (xy 212.312866 125.6) (xy 211.945791 125.673016) (xy 211.600013 125.816242) + (xy 211.288821 126.024174) (xy 211.024174 126.288821) (xy 210.816242 126.600013) (xy 210.673016 126.945791) (xy 210.6 127.312866) + (xy 209.4 127.312866) (xy 209.326984 126.945791) (xy 209.183758 126.600013) (xy 208.975826 126.288821) (xy 208.711179 126.024174) + (xy 208.399987 125.816242) (xy 208.054209 125.673016) (xy 207.687134 125.6) (xy 207.312866 125.6) (xy 206.945791 125.673016) + (xy 206.600013 125.816242) (xy 206.288821 126.024174) (xy 206.024174 126.288821) (xy 205.816242 126.600013) (xy 205.673016 126.945791) + (xy 205.6 127.312866) (xy 204.4 127.312866) (xy 204.326984 126.945791) (xy 204.183758 126.600013) (xy 203.975826 126.288821) + (xy 203.711179 126.024174) (xy 203.399987 125.816242) (xy 203.054209 125.673016) (xy 202.687134 125.6) (xy 202.312866 125.6) + (xy 201.945791 125.673016) (xy 201.600013 125.816242) (xy 201.288821 126.024174) (xy 201.024174 126.288821) (xy 200.816242 126.600013) + (xy 200.673016 126.945791) (xy 200.6 127.312866) (xy 199.4 127.312866) (xy 199.326984 126.945791) (xy 199.183758 126.600013) + (xy 198.975826 126.288821) (xy 198.711179 126.024174) (xy 198.399987 125.816242) (xy 198.054209 125.673016) (xy 197.687134 125.6) + (xy 197.312866 125.6) (xy 196.945791 125.673016) (xy 196.600013 125.816242) (xy 196.288821 126.024174) (xy 196.024174 126.288821) + (xy 195.816242 126.600013) (xy 195.673016 126.945791) (xy 195.6 127.312866) (xy 194.4 127.312866) (xy 194.326984 126.945791) + (xy 194.183758 126.600013) (xy 193.975826 126.288821) (xy 193.711179 126.024174) (xy 193.399987 125.816242) (xy 193.054209 125.673016) + (xy 192.687134 125.6) (xy 192.312866 125.6) (xy 191.945791 125.673016) (xy 191.600013 125.816242) (xy 191.288821 126.024174) + (xy 191.024174 126.288821) (xy 190.816242 126.600013) (xy 190.673016 126.945791) (xy 190.6 127.312866) (xy 189.4 127.312866) + (xy 189.326984 126.945791) (xy 189.183758 126.600013) (xy 188.975826 126.288821) (xy 188.711179 126.024174) (xy 188.399987 125.816242) + (xy 188.054209 125.673016) (xy 187.687134 125.6) (xy 187.312866 125.6) (xy 186.945791 125.673016) (xy 186.600013 125.816242) + (xy 186.288821 126.024174) (xy 186.024174 126.288821) (xy 185.816242 126.600013) (xy 185.673016 126.945791) (xy 185.6 127.312866) + (xy 184.4 127.312866) (xy 184.326984 126.945791) (xy 184.183758 126.600013) (xy 183.975826 126.288821) (xy 183.711179 126.024174) + (xy 183.399987 125.816242) (xy 183.054209 125.673016) (xy 182.687134 125.6) (xy 182.312866 125.6) (xy 181.945791 125.673016) + (xy 181.600013 125.816242) (xy 181.288821 126.024174) (xy 181.024174 126.288821) (xy 180.816242 126.600013) (xy 180.673016 126.945791) + (xy 180.6 127.312866) (xy 179.4 127.312866) (xy 179.326984 126.945791) (xy 179.183758 126.600013) (xy 178.975826 126.288821) + (xy 178.711179 126.024174) (xy 178.399987 125.816242) (xy 178.054209 125.673016) (xy 177.687134 125.6) (xy 177.312866 125.6) + (xy 176.945791 125.673016) (xy 176.600013 125.816242) (xy 176.288821 126.024174) (xy 176.024174 126.288821) (xy 175.816242 126.600013) + (xy 175.673016 126.945791) (xy 175.6 127.312866) (xy 146.2 127.312866) (xy 146.2 123.735846) (xy 149.068 123.735846) + (xy 149.068 124.264154) (xy 149.171068 124.782311) (xy 149.373242 125.270403) (xy 149.666755 125.709675) (xy 150.040325 126.083245) + (xy 150.479597 126.376758) (xy 150.967689 126.578932) (xy 151.485846 126.682) (xy 152.014154 126.682) (xy 152.532311 126.578932) + (xy 153.020403 126.376758) (xy 153.459675 126.083245) (xy 153.833245 125.709675) (xy 154.126758 125.270403) (xy 154.328932 124.782311) + (xy 154.432 124.264154) (xy 154.432 123.735846) (xy 154.328932 123.217689) (xy 154.126758 122.729597) (xy 153.833245 122.290325) + (xy 153.459675 121.916755) (xy 153.020403 121.623242) (xy 152.532311 121.421068) (xy 152.014154 121.318) (xy 151.485846 121.318) + (xy 150.967689 121.421068) (xy 150.479597 121.623242) (xy 150.040325 121.916755) (xy 149.666755 122.290325) (xy 149.373242 122.729597) + (xy 149.171068 123.217689) (xy 149.068 123.735846) (xy 146.2 123.735846) (xy 146.2 120.7) (xy 176.880646 120.7) ) ) ) diff --git a/hardware/rusefi_lib b/hardware/rusefi_lib index ec3889b76b..60db1ce9ef 160000 --- a/hardware/rusefi_lib +++ b/hardware/rusefi_lib @@ -1 +1 @@ -Subproject commit ec3889b76b2fc7c4cb4461525b2d5f46ea9e56f1 +Subproject commit 60db1ce9ef6f94d4c6adbb9300096e02801ef83e diff --git a/java_console/.idea/modules.xml b/java_console/.idea/modules.xml index 0ee521d085..d870adaa1b 100644 --- a/java_console/.idea/modules.xml +++ b/java_console/.idea/modules.xml @@ -5,6 +5,7 @@ + diff --git a/java_console/.idea/runConfigurations/IniFileModel.xml b/java_console/.idea/runConfigurations/IniFileModel.xml index 975077309a..ab35129570 100644 --- a/java_console/.idea/runConfigurations/IniFileModel.xml +++ b/java_console/.idea/runConfigurations/IniFileModel.xml @@ -1,22 +1,16 @@ - + \ No newline at end of file diff --git a/java_console/autotest/src/com/rusefi/AutoTest.java b/java_console/autotest/src/com/rusefi/AutoTest.java index e3a2c2f159..8c8d90837c 100644 --- a/java_console/autotest/src/com/rusefi/AutoTest.java +++ b/java_console/autotest/src/com/rusefi/AutoTest.java @@ -9,14 +9,15 @@ import com.rusefi.core.MessagesCentral; import com.rusefi.core.Sensor; import com.rusefi.core.SensorCentral; import com.rusefi.io.CommandQueue; -import com.rusefi.io.ConnectionStatus; import com.rusefi.waves.EngineChart; import com.rusefi.waves.EngineReport; +import java.util.concurrent.atomic.AtomicReference; +import java.util.function.Function; + import static com.rusefi.IoUtil.*; import static com.rusefi.IoUtil.getEnableCommand; import static com.rusefi.TestingUtils.*; -import static com.rusefi.config.generated.Fields.CMD_PINS; import static com.rusefi.config.generated.Fields.MOCK_MAF_COMMAND; import static com.rusefi.waves.EngineReport.isCloseEnough; @@ -26,19 +27,19 @@ import static com.rusefi.waves.EngineReport.isCloseEnough; * java -cp rusefi_console.jar com.rusefi.AutoTest * * @author Andrey Belomutskiy - * 3/5/14 + * 3/5/14 */ public class AutoTest { public static final int COMPLEX_COMMAND_RETRY = 10000; static int currentEngineType; - private static String fatalError; + private static String criticalError; static void mainTestBody() throws Exception { MessagesCentral.getInstance().addListener(new MessagesCentral.MessageListener() { @Override public void onMessage(Class clazz, String message) { - if (message.startsWith(ConnectionStatus.FATAL_MESSAGE_PREFIX)) - fatalError = message; + if (message.startsWith(Fields.CRITICAL_PREFIX)) + criticalError = message; } }); @@ -49,6 +50,8 @@ public class AutoTest { sendCommand(getDisableCommand(Fields.CMD_TRIGGER_HW_INPUT)); sendCommand(getEnableCommand(Fields.CMD_FUNCTIONAL_TEST_MODE)); testCustomEngine(); + testVW_60_2(); + testV12(); testMazdaMiata2003(); test2003DodgeNeon(); testFordAspire(); @@ -67,6 +70,53 @@ public class AutoTest { testFordFiesta(); } + private static Function FAIL = new Function() { + @Override + public Object apply(String errorCode) { + if (errorCode != null) + throw new IllegalStateException("Failed " + errorCode); + return null; + } + }; + + private static void testVW_60_2() { + setEngineType(32); + changeRpm(900); + // TODO: we shall get this RPM higher! + // first let's get to expected RPM + assertRpmDoesNotJump(3000, 15, 30, FAIL); + } + + private static void testV12() { + setEngineType(40); + changeRpm(700); +/* +this is just too unreliable at this point :( + // TODO: we shall get this RPM higher! + // first let's get to expected RPM + assertRpmDoesNotJump(1700, 15, 30, FAIL); + + */ + } + + public static void assertRpmDoesNotJump(int rpm, int settleTime, int testDuration, Function callback) { + changeRpm(rpm); + sleep(settleTime); + AtomicReference result = new AtomicReference<>(); + SensorCentral.SensorListener listener = new SensorCentral.SensorListener() { + @Override + public void onSensorUpdate(double value) { + double actualRpm = SensorCentral.getInstance().getValue(Sensor.RPM); + if (!isCloseEnough(rpm, actualRpm)) + result.set("Got " + actualRpm + " while trying to stay at " + rpm); + } + }; + SensorCentral.getInstance().addListener(Sensor.RPM, listener); + sleep(testDuration); + callback.apply(result.get()); + SensorCentral.getInstance().removeListener(Sensor.RPM, listener); + } + private static void testCustomEngine() { setEngineType(0); sendCommand("set_toothed_wheel 4 0"); @@ -168,7 +218,7 @@ public class AutoTest { IoUtil.changeRpm(200); IoUtil.changeRpm(250); // another approach to artificial delay IoUtil.changeRpm(200); - assertEquals("VBatt",12, SensorCentral.getInstance().getValue(Sensor.VBATT)); + assertEquals("VBatt", 12, SensorCentral.getInstance().getValue(Sensor.VBATT)); chart = nextChart(); double x = 100; @@ -426,7 +476,7 @@ public class AutoTest { IoUtil.changeRpm(2400); IoUtil.changeRpm(2000); chart = nextChart(); - assertEquals("MAP",69.12, SensorCentral.getInstance().getValue(Sensor.MAP)); + assertEquals("MAP", 69.12, SensorCentral.getInstance().getValue(Sensor.MAP)); //assertEquals(1, SensorCentral.getInstance().getValue(Sensor.)); x = 8.88; assertWave(false, msg + " fuel SD #1", chart, EngineChart.INJECTOR_1, 0.577, 0.1, 0.1, x + 180); @@ -445,7 +495,7 @@ public class AutoTest { } private static void sendCommand(String command, int retryTimeoutMs, int totalTimeoutSeconds) { - assertNull("Fatal not expected", fatalError); + assertNull("Fatal not expected", criticalError); IoUtil.sendCommand(command, retryTimeoutMs, totalTimeoutSeconds); } diff --git a/java_console/build.xml b/java_console/build.xml index 56d015cf44..56134288eb 100644 --- a/java_console/build.xml +++ b/java_console/build.xml @@ -19,6 +19,7 @@ + diff --git a/java_console/inifile/inifile.iml b/java_console/inifile/inifile.iml new file mode 100644 index 0000000000..a91a847c47 --- /dev/null +++ b/java_console/inifile/inifile.iml @@ -0,0 +1,31 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/java_console/ui/src/com/rusefi/ui/config/DialogModel.java b/java_console/inifile/src/com/opensr5/ini/DialogModel.java similarity index 97% rename from java_console/ui/src/com/rusefi/ui/config/DialogModel.java rename to java_console/inifile/src/com/opensr5/ini/DialogModel.java index d7ffad0a76..a3c1ef7b2f 100644 --- a/java_console/ui/src/com/rusefi/ui/config/DialogModel.java +++ b/java_console/inifile/src/com/opensr5/ini/DialogModel.java @@ -1,4 +1,4 @@ -package com.rusefi.ui.config; +package com.opensr5.ini; import java.util.ArrayList; import java.util.List; diff --git a/java_console/opensr5/src/com/opensr5/io/IniFileMetaInfo.java b/java_console/inifile/src/com/opensr5/ini/IniFileMetaInfo.java similarity index 98% rename from java_console/opensr5/src/com/opensr5/io/IniFileMetaInfo.java rename to java_console/inifile/src/com/opensr5/ini/IniFileMetaInfo.java index e5fc0ba611..943a55491c 100644 --- a/java_console/opensr5/src/com/opensr5/io/IniFileMetaInfo.java +++ b/java_console/inifile/src/com/opensr5/ini/IniFileMetaInfo.java @@ -1,4 +1,4 @@ -package com.opensr5.io; +package com.opensr5.ini; import java.util.ArrayList; import java.util.List; diff --git a/java_console/ui/src/com/rusefi/ui/config/IniFileModel.java b/java_console/inifile/src/com/opensr5/ini/IniFileModel.java similarity index 86% rename from java_console/ui/src/com/rusefi/ui/config/IniFileModel.java rename to java_console/inifile/src/com/opensr5/ini/IniFileModel.java index 31c253556a..75f3e8fdcc 100644 --- a/java_console/ui/src/com/rusefi/ui/config/IniFileModel.java +++ b/java_console/inifile/src/com/opensr5/ini/IniFileModel.java @@ -1,14 +1,10 @@ -package com.rusefi.ui.config; +package com.opensr5.ini; -import com.opensr5.io.IniFileReader; -import com.opensr5.io.RawIniFile; import org.jetbrains.annotations.Nullable; import java.io.*; import java.util.*; -import static com.rusefi.Launcher.INI_FILE_PATH; - /** * (c) Andrey Belomutskiy * 12/23/2015. @@ -17,7 +13,7 @@ public class IniFileModel { public static final String RUSEFI_INI_PREFIX = "rusefi"; public static final String RUSEFI_INI_SUFFIX = ".ini"; - private final static IniFileModel INSTANCE = new IniFileModel(); + private static IniFileModel INSTANCE; private String dialogId; private String dialogUiName; private Map dialogs = new TreeMap<>(); @@ -26,15 +22,11 @@ public class IniFileModel { private List fieldsOfCurrentDialog = new ArrayList<>(); public static void main(String[] args) { - System.out.println(IniFileModel.INSTANCE.dialogs); + System.out.println(IniFileModel.getInstance("..").dialogs); } - private IniFileModel() { - readIniFile(); - } - - private void readIniFile() { - String fileName = findMetaInfoFile(); + public void readIniFile(String iniFilePath) { + String fileName = findMetaInfoFile(iniFilePath); File input = null; if (fileName != null) input = new File(fileName); @@ -53,13 +45,13 @@ public class IniFileModel { finishDialog(); } - private String findMetaInfoFile() { - File dir = new File(INI_FILE_PATH); + private String findMetaInfoFile(String iniFilePath) { + File dir = new File(iniFilePath); if (!dir.isDirectory()) return null; for (String file : dir.list()) { if (file.startsWith(RUSEFI_INI_PREFIX) && file.endsWith(RUSEFI_INI_SUFFIX)) - return INI_FILE_PATH + File.separator + file; + return iniFilePath + File.separator + file; } return null; } @@ -143,8 +135,11 @@ public class IniFileModel { DIALOG } - - public static IniFileModel getInstance() { + public static synchronized IniFileModel getInstance(String iniFilePath) { + if (INSTANCE == null) { + INSTANCE = new IniFileModel(); + INSTANCE.readIniFile(iniFilePath); + } return INSTANCE; } diff --git a/java_console/opensr5/src/com/opensr5/io/IniFileReader.java b/java_console/inifile/src/com/opensr5/ini/IniFileReader.java similarity index 98% rename from java_console/opensr5/src/com/opensr5/io/IniFileReader.java rename to java_console/inifile/src/com/opensr5/ini/IniFileReader.java index 45d8417edf..fc74ff070a 100644 --- a/java_console/opensr5/src/com/opensr5/io/IniFileReader.java +++ b/java_console/inifile/src/com/opensr5/ini/IniFileReader.java @@ -1,4 +1,4 @@ -package com.opensr5.io; +package com.opensr5.ini; import java.io.*; import java.util.ArrayList; diff --git a/java_console/opensr5/src/com/opensr5/io/RawIniFile.java b/java_console/inifile/src/com/opensr5/ini/RawIniFile.java similarity index 98% rename from java_console/opensr5/src/com/opensr5/io/RawIniFile.java rename to java_console/inifile/src/com/opensr5/ini/RawIniFile.java index 2d2a52b103..03e60ab87d 100644 --- a/java_console/opensr5/src/com/opensr5/io/RawIniFile.java +++ b/java_console/inifile/src/com/opensr5/ini/RawIniFile.java @@ -1,4 +1,4 @@ -package com.opensr5.io; +package com.opensr5.ini; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; diff --git a/java_console/opensr5/src/com/opensr5/io/test/IniFileReaderTest.java b/java_console/inifile/src/com/opensr5/ini/test/IniFileReaderTest.java similarity index 94% rename from java_console/opensr5/src/com/opensr5/io/test/IniFileReaderTest.java rename to java_console/inifile/src/com/opensr5/ini/test/IniFileReaderTest.java index b836cab735..ff00949964 100644 --- a/java_console/opensr5/src/com/opensr5/io/test/IniFileReaderTest.java +++ b/java_console/inifile/src/com/opensr5/ini/test/IniFileReaderTest.java @@ -1,8 +1,8 @@ -package com.opensr5.io.test; +package com.opensr5.ini.test; -import com.opensr5.io.IniFileMetaInfo; -import com.opensr5.io.IniFileReader; -import com.opensr5.io.RawIniFile; +import com.opensr5.ini.IniFileMetaInfo; +import com.opensr5.ini.IniFileReader; +import com.opensr5.ini.RawIniFile; import org.junit.Test; import java.io.ByteArrayInputStream; diff --git a/java_console/io/src/com/rusefi/io/ConnectionStatus.java b/java_console/io/src/com/rusefi/io/ConnectionStatus.java index 128f45cb7b..da2f6686e4 100644 --- a/java_console/io/src/com/rusefi/io/ConnectionStatus.java +++ b/java_console/io/src/com/rusefi/io/ConnectionStatus.java @@ -1,6 +1,7 @@ package com.rusefi.io; import com.rusefi.Timeouts; +import com.rusefi.config.generated.Fields; import com.rusefi.core.EngineTimeListener; import com.rusefi.core.MessagesCentral; import com.rusefi.core.Sensor; @@ -17,8 +18,6 @@ import java.util.concurrent.CopyOnWriteArrayList; * todo: eliminate logic duplication with {@link ConnectionWatchdog} */ public class ConnectionStatus { - // todo: react to any message as connected? how to know if message from controller, not internal message? - public static final String FATAL_MESSAGE_PREFIX = "FATAL"; @NotNull private Value value = Value.NOT_CONNECTED; @@ -71,7 +70,7 @@ public class ConnectionStatus { MessagesCentral.getInstance().addListener(new MessagesCentral.MessageListener() { @Override public void onMessage(Class clazz, String message) { - if (message.startsWith(FATAL_MESSAGE_PREFIX)) + if (message.startsWith(Fields.CRITICAL_PREFIX)) markConnected(); } }); diff --git a/java_console/models/src/com/fathzer/soft/javaluator/DoubleEvaluator.java b/java_console/models/src/com/fathzer/soft/javaluator/DoubleEvaluator.java index e52d371772..2710e08c27 100644 --- a/java_console/models/src/com/fathzer/soft/javaluator/DoubleEvaluator.java +++ b/java_console/models/src/com/fathzer/soft/javaluator/DoubleEvaluator.java @@ -6,6 +6,8 @@ import java.text.NumberFormat; import java.text.ParsePosition; import java.util.*; +import static com.rusefi.config.generated.Fields.*; + /** An evaluator that is able to evaluate arithmetic expressions on real numbers. *
Built-in operators:
    *
  • +: Addition
  • @@ -112,10 +114,11 @@ public class DoubleEvaluator extends AbstractEvaluator { /** Returns the decimal logarithm of a number */ public static final Function LOG = new Function("log", 1); - public static final Function fsio_setting = new Function("fsio_setting", 1); - public static final Function fsio_input = new Function("fsio_input", 1); + public static final Function fsio_setting = new Function(FSIO_METHOD_FSIO_SETTING, 1); + public static final Function fsio_analog_input = new Function(FSIO_METHOD_FSIO_ANALOG_INPUT, 1); + public static final Function fsio_digital_input = new Function(FSIO_METHOD_FSIO_DIGITAL_INPUT, 1); public static final Function if_function = new Function("if", 3); - public static final Function table_function = new Function("fsio_table", 3); + public static final Function table_function = new Function(FSIO_METHOD_FSIO_TABLE, 3); /** Returns a pseudo random number */ @@ -158,7 +161,11 @@ public class DoubleEvaluator extends AbstractEvaluator { /** The standard whole set of predefined operators */ private static final Operator[] OPERATORS = new Operator[]{NEGATE, NOT, NOT2, MORE, MORE_EQ, AND, AND2, OR, OR2, LESS, LESS_EQ, MINUS, PLUS, MULTIPLY, DIVIDE, EXPONENT, MODULO}; - private static final List MISC_FUNCTIONS = Arrays.asList(if_function, fsio_setting, fsio_input, table_function); + private static final List MISC_FUNCTIONS = Arrays.asList(if_function, + fsio_setting, + fsio_analog_input, + fsio_digital_input, + table_function); /** The whole set of predefined functions */ private static final List FUNCTIONS = new ArrayList<>( diff --git a/java_console/models/src/com/rusefi/InfixConverter.java b/java_console/models/src/com/rusefi/InfixConverter.java new file mode 100644 index 0000000000..5e3f2f4f1c --- /dev/null +++ b/java_console/models/src/com/rusefi/InfixConverter.java @@ -0,0 +1,73 @@ +package com.rusefi; + +import com.fathzer.soft.javaluator.DoubleEvaluator; +import com.fathzer.soft.javaluator.Function; +import com.fathzer.soft.javaluator.Operator; + +import java.util.Stack; + +public class InfixConverter { + public static String getHumanInfixFormOrError(String rpn) { + try { + return getHumanInfixForm(rpn); + } catch (Throwable e) { + return "Failing to parse. Maybe invalid function was used? Valid functions include " + getReadableListOfFunctions(); + } + } + + public static String getHumanInfixForm(String rpn) { + String tokens[] = rpn.split(" "); + Stack stack = new Stack<>(); + + for (String token : tokens) { + if (DoubleEvaluator.getFunction(token) != null) { + int pCount = DoubleEvaluator.getFunction(token).getMaximumArgumentCount(); + + StringBuilder sb = new StringBuilder(); + for (int i = 0; i < pCount; i++) { + if (i != 0) + sb.insert(0, ", "); + if (stack.isEmpty()) + throw new IllegalStateException("While getting " + pCount + "parameters for " + token); + sb.insert(0, stack.pop()); + } + + stack.push(token + "(" + sb + ")"); + + + } else if (Operator._1_OPERATORS.contains(token)) { + String a = stack.pop(); + + stack.push("(" + token + " " + a + ")"); + + } else if (takesTwoParameters(token)) { + if (stack.size() < 2) + throw new IllegalStateException("Not enough " + token); + String a = stack.pop(); + String b = stack.pop(); + stack.push("(" + b + " " + token + " " + a + ")"); + } else { + stack.push(token); + } + } + if (stack.size() != 1) + throw new IllegalStateException("Unexpected stack content: " + stack); + return stack.pop(); + } + + private static boolean takesTwoParameters(String token) { + return Operator._2_OPERATORS.contains(token); + } + + public static String getReadableListOfFunctions() { + StringBuilder result = new StringBuilder(); + DoubleEvaluator evaluator = new DoubleEvaluator(); + for (Function function : evaluator.getFunctions()) { + if (result.length() > 0) { + result.append(", "); + } + result.append(function.getName()); + } + return result.toString(); + } +} diff --git a/java_console/models/src/com/rusefi/config/generated/EngineState.java b/java_console/models/src/com/rusefi/config/generated/EngineState.java index c8567ccdff..42542091a5 100644 --- a/java_console/models/src/com/rusefi/config/generated/EngineState.java +++ b/java_console/models/src/com/rusefi/config/generated/EngineState.java @@ -1,6 +1,6 @@ package com.rusefi.config.generated; -// this file was generated automatically by rusEfi tool ConfigDefinition.jar based on integration/engine_state.txt Sat Feb 22 15:19:24 EST 2020 +// this file was generated automatically by rusEfi tool ConfigDefinition.jar based on integration/engine_state.txt Fri Apr 10 12:53:32 EDT 2020 // by class com.rusefi.output.FileJavaFieldsConsumer import com.rusefi.config.*; @@ -60,37 +60,37 @@ public class EngineState { public static final Field INJECTORFLOWCORRECTION = Field.create("INJECTORFLOWCORRECTION", 80, FieldType.FLOAT); public static final Field BAROCORRECTION = Field.create("BAROCORRECTION", 84, FieldType.FLOAT); public static final Field ISCRANKINGSTATE = Field.create("ISCRANKINGSTATE", 88, FieldType.BIT, 0); - public static final Field HASETBPEDALPOSITIONSENSOR = Field.create("HASETBPEDALPOSITIONSENSOR", 88, FieldType.BIT, 1); - public static final Field ISAUTOMATICIDLE = Field.create("ISAUTOMATICIDLE", 88, FieldType.BIT, 2); - public static final Field UNUSEDBIT_14_3 = Field.create("UNUSEDBIT_14_3", 88, FieldType.BIT, 3); - public static final Field UNUSEDBIT_14_4 = Field.create("UNUSEDBIT_14_4", 88, FieldType.BIT, 4); - public static final Field UNUSEDBIT_14_5 = Field.create("UNUSEDBIT_14_5", 88, FieldType.BIT, 5); - public static final Field UNUSEDBIT_14_6 = Field.create("UNUSEDBIT_14_6", 88, FieldType.BIT, 6); - public static final Field UNUSEDBIT_14_7 = Field.create("UNUSEDBIT_14_7", 88, FieldType.BIT, 7); - public static final Field UNUSEDBIT_14_8 = Field.create("UNUSEDBIT_14_8", 88, FieldType.BIT, 8); - public static final Field UNUSEDBIT_14_9 = Field.create("UNUSEDBIT_14_9", 88, FieldType.BIT, 9); - public static final Field UNUSEDBIT_14_10 = Field.create("UNUSEDBIT_14_10", 88, FieldType.BIT, 10); - public static final Field UNUSEDBIT_14_11 = Field.create("UNUSEDBIT_14_11", 88, FieldType.BIT, 11); - public static final Field UNUSEDBIT_14_12 = Field.create("UNUSEDBIT_14_12", 88, FieldType.BIT, 12); - public static final Field UNUSEDBIT_14_13 = Field.create("UNUSEDBIT_14_13", 88, FieldType.BIT, 13); - public static final Field UNUSEDBIT_14_14 = Field.create("UNUSEDBIT_14_14", 88, FieldType.BIT, 14); - public static final Field UNUSEDBIT_14_15 = Field.create("UNUSEDBIT_14_15", 88, FieldType.BIT, 15); - public static final Field UNUSEDBIT_14_16 = Field.create("UNUSEDBIT_14_16", 88, FieldType.BIT, 16); - public static final Field UNUSEDBIT_14_17 = Field.create("UNUSEDBIT_14_17", 88, FieldType.BIT, 17); - public static final Field UNUSEDBIT_14_18 = Field.create("UNUSEDBIT_14_18", 88, FieldType.BIT, 18); - public static final Field UNUSEDBIT_14_19 = Field.create("UNUSEDBIT_14_19", 88, FieldType.BIT, 19); - public static final Field UNUSEDBIT_14_20 = Field.create("UNUSEDBIT_14_20", 88, FieldType.BIT, 20); - public static final Field UNUSEDBIT_14_21 = Field.create("UNUSEDBIT_14_21", 88, FieldType.BIT, 21); - public static final Field UNUSEDBIT_14_22 = Field.create("UNUSEDBIT_14_22", 88, FieldType.BIT, 22); - public static final Field UNUSEDBIT_14_23 = Field.create("UNUSEDBIT_14_23", 88, FieldType.BIT, 23); - public static final Field UNUSEDBIT_14_24 = Field.create("UNUSEDBIT_14_24", 88, FieldType.BIT, 24); - public static final Field UNUSEDBIT_14_25 = Field.create("UNUSEDBIT_14_25", 88, FieldType.BIT, 25); - public static final Field UNUSEDBIT_14_26 = Field.create("UNUSEDBIT_14_26", 88, FieldType.BIT, 26); - public static final Field UNUSEDBIT_14_27 = Field.create("UNUSEDBIT_14_27", 88, FieldType.BIT, 27); - public static final Field UNUSEDBIT_14_28 = Field.create("UNUSEDBIT_14_28", 88, FieldType.BIT, 28); - public static final Field UNUSEDBIT_14_29 = Field.create("UNUSEDBIT_14_29", 88, FieldType.BIT, 29); - public static final Field UNUSEDBIT_14_30 = Field.create("UNUSEDBIT_14_30", 88, FieldType.BIT, 30); - public static final Field UNUSEDBIT_14_31 = Field.create("UNUSEDBIT_14_31", 88, FieldType.BIT, 31); + public static final Field ISAUTOMATICIDLE = Field.create("ISAUTOMATICIDLE", 88, FieldType.BIT, 1); + public static final Field UNUSEDBIT_13_2 = Field.create("UNUSEDBIT_13_2", 88, FieldType.BIT, 2); + public static final Field UNUSEDBIT_13_3 = Field.create("UNUSEDBIT_13_3", 88, FieldType.BIT, 3); + public static final Field UNUSEDBIT_13_4 = Field.create("UNUSEDBIT_13_4", 88, FieldType.BIT, 4); + public static final Field UNUSEDBIT_13_5 = Field.create("UNUSEDBIT_13_5", 88, FieldType.BIT, 5); + public static final Field UNUSEDBIT_13_6 = Field.create("UNUSEDBIT_13_6", 88, FieldType.BIT, 6); + public static final Field UNUSEDBIT_13_7 = Field.create("UNUSEDBIT_13_7", 88, FieldType.BIT, 7); + public static final Field UNUSEDBIT_13_8 = Field.create("UNUSEDBIT_13_8", 88, FieldType.BIT, 8); + public static final Field UNUSEDBIT_13_9 = Field.create("UNUSEDBIT_13_9", 88, FieldType.BIT, 9); + public static final Field UNUSEDBIT_13_10 = Field.create("UNUSEDBIT_13_10", 88, FieldType.BIT, 10); + public static final Field UNUSEDBIT_13_11 = Field.create("UNUSEDBIT_13_11", 88, FieldType.BIT, 11); + public static final Field UNUSEDBIT_13_12 = Field.create("UNUSEDBIT_13_12", 88, FieldType.BIT, 12); + public static final Field UNUSEDBIT_13_13 = Field.create("UNUSEDBIT_13_13", 88, FieldType.BIT, 13); + public static final Field UNUSEDBIT_13_14 = Field.create("UNUSEDBIT_13_14", 88, FieldType.BIT, 14); + public static final Field UNUSEDBIT_13_15 = Field.create("UNUSEDBIT_13_15", 88, FieldType.BIT, 15); + public static final Field UNUSEDBIT_13_16 = Field.create("UNUSEDBIT_13_16", 88, FieldType.BIT, 16); + public static final Field UNUSEDBIT_13_17 = Field.create("UNUSEDBIT_13_17", 88, FieldType.BIT, 17); + public static final Field UNUSEDBIT_13_18 = Field.create("UNUSEDBIT_13_18", 88, FieldType.BIT, 18); + public static final Field UNUSEDBIT_13_19 = Field.create("UNUSEDBIT_13_19", 88, FieldType.BIT, 19); + public static final Field UNUSEDBIT_13_20 = Field.create("UNUSEDBIT_13_20", 88, FieldType.BIT, 20); + public static final Field UNUSEDBIT_13_21 = Field.create("UNUSEDBIT_13_21", 88, FieldType.BIT, 21); + public static final Field UNUSEDBIT_13_22 = Field.create("UNUSEDBIT_13_22", 88, FieldType.BIT, 22); + public static final Field UNUSEDBIT_13_23 = Field.create("UNUSEDBIT_13_23", 88, FieldType.BIT, 23); + public static final Field UNUSEDBIT_13_24 = Field.create("UNUSEDBIT_13_24", 88, FieldType.BIT, 24); + public static final Field UNUSEDBIT_13_25 = Field.create("UNUSEDBIT_13_25", 88, FieldType.BIT, 25); + public static final Field UNUSEDBIT_13_26 = Field.create("UNUSEDBIT_13_26", 88, FieldType.BIT, 26); + public static final Field UNUSEDBIT_13_27 = Field.create("UNUSEDBIT_13_27", 88, FieldType.BIT, 27); + public static final Field UNUSEDBIT_13_28 = Field.create("UNUSEDBIT_13_28", 88, FieldType.BIT, 28); + public static final Field UNUSEDBIT_13_29 = Field.create("UNUSEDBIT_13_29", 88, FieldType.BIT, 29); + public static final Field UNUSEDBIT_13_30 = Field.create("UNUSEDBIT_13_30", 88, FieldType.BIT, 30); + public static final Field UNUSEDBIT_13_31 = Field.create("UNUSEDBIT_13_31", 88, FieldType.BIT, 31); public static final Field CRANKING_BASEFUEL = Field.create("CRANKING_BASEFUEL", 92, FieldType.FLOAT); public static final Field CRANKING_COOLANTTEMPERATURECOEFFICIENT = Field.create("CRANKING_COOLANTTEMPERATURECOEFFICIENT", 96, FieldType.FLOAT); public static final Field CRANKING_TPSCOEFFICIENT = Field.create("CRANKING_TPSCOEFFICIENT", 100, FieldType.FLOAT); @@ -164,37 +164,37 @@ public class EngineState { INJECTORFLOWCORRECTION, BAROCORRECTION, ISCRANKINGSTATE, - HASETBPEDALPOSITIONSENSOR, ISAUTOMATICIDLE, - UNUSEDBIT_14_3, - UNUSEDBIT_14_4, - UNUSEDBIT_14_5, - UNUSEDBIT_14_6, - UNUSEDBIT_14_7, - UNUSEDBIT_14_8, - UNUSEDBIT_14_9, - UNUSEDBIT_14_10, - UNUSEDBIT_14_11, - UNUSEDBIT_14_12, - UNUSEDBIT_14_13, - UNUSEDBIT_14_14, - UNUSEDBIT_14_15, - UNUSEDBIT_14_16, - UNUSEDBIT_14_17, - UNUSEDBIT_14_18, - UNUSEDBIT_14_19, - UNUSEDBIT_14_20, - UNUSEDBIT_14_21, - UNUSEDBIT_14_22, - UNUSEDBIT_14_23, - UNUSEDBIT_14_24, - UNUSEDBIT_14_25, - UNUSEDBIT_14_26, - UNUSEDBIT_14_27, - UNUSEDBIT_14_28, - UNUSEDBIT_14_29, - UNUSEDBIT_14_30, - UNUSEDBIT_14_31, + UNUSEDBIT_13_2, + UNUSEDBIT_13_3, + UNUSEDBIT_13_4, + UNUSEDBIT_13_5, + UNUSEDBIT_13_6, + UNUSEDBIT_13_7, + UNUSEDBIT_13_8, + UNUSEDBIT_13_9, + UNUSEDBIT_13_10, + UNUSEDBIT_13_11, + UNUSEDBIT_13_12, + UNUSEDBIT_13_13, + UNUSEDBIT_13_14, + UNUSEDBIT_13_15, + UNUSEDBIT_13_16, + UNUSEDBIT_13_17, + UNUSEDBIT_13_18, + UNUSEDBIT_13_19, + UNUSEDBIT_13_20, + UNUSEDBIT_13_21, + UNUSEDBIT_13_22, + UNUSEDBIT_13_23, + UNUSEDBIT_13_24, + UNUSEDBIT_13_25, + UNUSEDBIT_13_26, + UNUSEDBIT_13_27, + UNUSEDBIT_13_28, + UNUSEDBIT_13_29, + UNUSEDBIT_13_30, + UNUSEDBIT_13_31, CRANKING_BASEFUEL, CRANKING_COOLANTTEMPERATURECOEFFICIENT, CRANKING_TPSCOEFFICIENT, diff --git a/java_console/models/src/com/rusefi/config/generated/Fields.java b/java_console/models/src/com/rusefi/config/generated/Fields.java index 118d8970a3..8e48f99da6 100644 --- a/java_console/models/src/com/rusefi/config/generated/Fields.java +++ b/java_console/models/src/com/rusefi/config/generated/Fields.java @@ -1,6 +1,6 @@ package com.rusefi.config.generated; -// this file was generated automatically by rusEfi tool ConfigDefinition.jar based on integration\rusefi_config.txt Fri Mar 20 19:54:54 EDT 2020 +// this file was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.bat integration\rusefi_config.txt Sun Apr 26 14:16:11 EDT 2020 // by class com.rusefi.output.FileJavaFieldsConsumer import com.rusefi.config.*; @@ -38,6 +38,16 @@ public class Fields { public static final int afrRpmBins_offset = 18912; public static final int afrTable_offset = 18592; public static final int afterCrankingIACtaperDuration_offset = 2036; + public static final int AFTERSTART_DECAY_CURVE_SIZE = 8; + public static final int AFTERSTART_ENRICH_CURVE_SIZE = 8; + public static final int AFTERSTART_HOLD_CURVE_SIZE = 8; + public static final int afterstartCoolantBins_offset = 6120; + public static final int afterstartDecayTime_offset = 6216; + public static final int afterstartDecayTime_offset_hex = 1848; + public static final int afterstartEnrich_offset = 6184; + public static final int afterstartEnrich_offset_hex = 1828; + public static final int afterstartHoldTime_offset = 6152; + public static final int afterstartHoldTime_offset_hex = 1808; public static final int alFIn_offset = 4024; public static final int alignEngineSnifferAtTDC_offset = 744; public static final int alternator_antiwindupFreq_offset = 1764; @@ -61,6 +71,9 @@ public class Fields { public static final int antiLagActivationMode_offset = 1024; public static final int antiLagActivationMode_offset_hex = 400; public static final int antiLagEnabled_offset = 76; + public static final int antiLagRpmTreshold_offset = 824; + public static final int antiLagRpmTreshold_offset_hex = 338; + public static final int anUnused4Bytes_offset = 732; public static final int autoTuneCltThreshold_offset = 2420; public static final int autoTuneCltThreshold_offset_hex = 974; public static final int autoTuneTpsQuietPeriod_offset = 2428; @@ -109,6 +122,10 @@ public class Fields { public static final int auxPidPins2_offset = 2221; public static final int auxPidPins3_offset = 2222; public static final int auxPidPins4_offset = 2223; + public static final int auxSerialRxPin_offset = 2042; + public static final int auxSerialSpeed_offset = 2096; + public static final int auxSerialSpeed_offset_hex = 830; + public static final int auxSerialTxPin_offset = 2040; public static final int auxTempSensor1_adcChannel_offset = 2472; public static final int auxTempSensor1_alignmentFill_at_29_offset = 2473; public static final int auxTempSensor1_bias_resistor_offset = 2468; @@ -160,15 +177,6 @@ public class Fields { public static final int binarySerialRxPin_offset_hex = 717; public static final int binarySerialTxPin_offset = 1814; public static final int binarySerialTxPin_offset_hex = 716; - public static final int biQuad_a0_offset = 2332; - public static final int biQuad_a1_offset = 2336; - public static final int biQuad_a1_offset_hex = 920; - public static final int biQuad_a2_offset = 2340; - public static final int biQuad_a2_offset_hex = 924; - public static final int biQuad_b1_offset = 2344; - public static final int biQuad_b1_offset_hex = 928; - public static final int biQuad_b2_offset = 2348; - public static final int biQuad_offset = 2332; public static final int BLOCKING_FACTOR = 400; public static final int BOOST_LOAD_COUNT = 8; public static final int BOOST_RPM_COUNT = 8; @@ -200,12 +208,12 @@ public class Fields { public static final int camInputs2_offset = 557; public static final int camInputs3_offset = 558; public static final int camInputs4_offset = 559; - public static final int canDeviceMode_offset = 732; public static final int canNbcType_offset = 480; public static final int canReadEnabled_offset = 1464; public static final int canRxPin_offset = 709; public static final int canSleepPeriodMs_offset = 484; public static final int canTxPin_offset = 708; + public static final int canVssNbcType_offset = 4140; public static final int canWriteEnabled_offset = 1464; public static final int cdmInputPin_offset = 937; public static final int cj125CsPin_offset = 674; @@ -282,6 +290,9 @@ public class Fields { public static final int coastingFuelCutTps_offset = 3152; public static final int communicationLedPin_offset = 1812; public static final int communicationLedPin_offset_hex = 714; + public static final int COMPOSITE_DATA_LENGTH = 2500; + public static final int COMPOSITE_PACKET_COUNT = 500; + public static final int COMPOSITE_PACKET_SIZE = 5; public static final String CONSOLE_DATA_PROTOCOL_TAG = " @"; public static final int consoleLoopPeriodMs_offset = 716; public static final int consoleSerialRxPin_offset = 1819; @@ -315,6 +326,7 @@ public class Fields { public static final int crankingTpsBins_offset_hex = 688; public static final int crankingTpsCoef_offset = 1640; public static final int crankingTpsCoef_offset_hex = 668; + public static final String CRITICAL_PREFIX = "CRITICAL"; public static final int cutFuelOnHardLimit_offset = 1464; public static final int cutSparkOnHardLimit_offset = 1464; public static final int cylinderBore_offset = 408; @@ -324,9 +336,6 @@ public class Fields { public static final int debugMapAveraging_offset = 807; public static final int debugMapAveraging_offset_hex = 327; public static final int debugMode_offset = 2092; - public static final int debugSetTimer_offset = 806; - public static final int debugSetTimer_offset_hex = 326; - public static final int debugTimerCallback_offset = 711; public static final int debugTriggerSync_offset = 676; public static final int DIGIPOT_COUNT = 4; public static final int digitalPotentiometerChipSelect1_offset = 668; @@ -334,8 +343,8 @@ public class Fields { public static final int digitalPotentiometerChipSelect3_offset = 670; public static final int digitalPotentiometerChipSelect4_offset = 671; public static final int digitalPotentiometerSpiDevice_offset = 677; - public static final int directSelfStimulation_offset = 76; public static final int displacement_offset = 396; + public static final int displayLogicLevelsInEngineSniffer_offset = 76; public static final int displayMode_offset = 492; public static final int dizzySparkOutputPin_offset = 2226; public static final int dizzySparkOutputPinMode_offset = 2227; @@ -344,7 +353,11 @@ public class Fields { public static final int EGT_CHANNEL_COUNT = 8; public static final int electronicThrottlePin1Mode_offset = 672; public static final int enableAemXSeries_offset = 744; + public static final int enableCanVss_offset = 976; public static final int enabledStep1Limiter_offset = 744; + public static final int enableInnovateLC2_offset = 976; + public static final int enableLaunchBoost_offset = 976; + public static final int enableLaunchRetard_offset = 976; public static final int enableVerboseCanTx_offset = 744; public static final int ENGINE_NOISE_CURVE_SIZE = 8; public static final int engineChartSize_offset = 1480; @@ -363,6 +376,7 @@ public class Fields { public static final int engineSnifferRpmThreshold_offset_hex = 4; public static final int engineType_offset = 0; public static final int engineType_offset_hex = 0; + public static final int ERROR_BUFFER_SIZE = 120; public static final int ETB_BIAS_CURVE_LENGTH = 8; public static final int ETB_COUNT = 2; public static final int etb_dFactor_offset = 1744; @@ -383,14 +397,14 @@ public class Fields { public static final int etbFreq_offset = 2514; public static final int etbIdleThrottleRange_offset = 4012; public static final int etbIo1_controlPin1_offset = 982; - public static final int etbIo1_controlPinMode_offset = 983; public static final int etbIo1_directionPin1_offset = 980; public static final int etbIo1_directionPin2_offset = 981; + public static final int etbIo1_disablePin_offset = 983; public static final int etbIo1_offset = 980; public static final int etbIo2_controlPin1_offset = 986; - public static final int etbIo2_controlPinMode_offset = 987; public static final int etbIo2_directionPin1_offset = 984; public static final int etbIo2_directionPin2_offset = 985; + public static final int etbIo2_disablePin_offset = 987; public static final int etbIo2_offset = 984; public static final int etbNeutralPosition_offset = 1471; public static final int externalKnockSenseAdc_offset = 3103; @@ -410,6 +424,10 @@ public class Fields { public static final int FSIO_COMMAND_COUNT = 16; public static final int FSIO_CURVE_16 = 16; public static final int FSIO_CURVE_8 = 8; + public static final String FSIO_METHOD_FSIO_ANALOG_INPUT = "fsio_analog_input"; + public static final String FSIO_METHOD_FSIO_DIGITAL_INPUT = "fsio_digital_input"; + public static final String FSIO_METHOD_FSIO_SETTING = "fsio_setting"; + public static final String FSIO_METHOD_FSIO_TABLE = "fsio_table"; public static final int fsio_setting10_offset = 900; public static final int fsio_setting10_offset_hex = 384; public static final int fsio_setting11_offset = 904; @@ -685,6 +703,74 @@ public class Fields { public static final int gpioPinModes8_offset_hex = 303; public static final int gpioPinModes9_offset = 772; public static final int gpioPinModes9_offset_hex = 304; + public static final int gppwm1_dutyIfError_offset = 4145; + public static final int gppwm1_dutyIfError_offset_hex = 1031; + public static final int gppwm1_loadAxis_offset = 4150; + public static final int gppwm1_loadAxis_offset_hex = 1036; + public static final int gppwm1_loadBins_offset = 4152; + public static final int gppwm1_loadBins_offset_hex = 1038; + public static final int gppwm1_offBelowDuty_offset = 4149; + public static final int gppwm1_offBelowDuty_offset_hex = 1035; + public static final int gppwm1_offset = 4144; + public static final int gppwm1_offset_hex = 1030; + public static final int gppwm1_onAboveDuty_offset = 4148; + public static final int gppwm1_onAboveDuty_offset_hex = 1034; + public static final int gppwm1_pad_offset = 4151; + public static final int gppwm1_pad_offset_hex = 1037; + public static final int gppwm1_pin_offset = 4144; + public static final int gppwm1_pin_offset_hex = 1030; + public static final int gppwm1_pwmFrequency_offset = 4146; + public static final int gppwm1_pwmFrequency_offset_hex = 1032; + public static final int gppwm1_rpmBins_offset = 4160; + public static final int gppwm1_rpmBins_offset_hex = 1040; + public static final int gppwm1_table_offset = 4168; + public static final int gppwm1_table_offset_hex = 1048; + public static final int gppwm2_dutyIfError_offset = 4233; + public static final int gppwm2_dutyIfError_offset_hex = 1089; + public static final int gppwm2_loadAxis_offset = 4238; + public static final int gppwm2_loadBins_offset = 4240; + public static final int gppwm2_loadBins_offset_hex = 1090; + public static final int gppwm2_offBelowDuty_offset = 4237; + public static final int gppwm2_offset = 4232; + public static final int gppwm2_offset_hex = 1088; + public static final int gppwm2_onAboveDuty_offset = 4236; + public static final int gppwm2_pad_offset = 4239; + public static final int gppwm2_pin_offset = 4232; + public static final int gppwm2_pin_offset_hex = 1088; + public static final int gppwm2_pwmFrequency_offset = 4234; + public static final int gppwm2_rpmBins_offset = 4248; + public static final int gppwm2_rpmBins_offset_hex = 1098; + public static final int gppwm2_table_offset = 4256; + public static final int gppwm3_dutyIfError_offset = 4321; + public static final int gppwm3_loadAxis_offset = 4326; + public static final int gppwm3_loadBins_offset = 4328; + public static final int gppwm3_offBelowDuty_offset = 4325; + public static final int gppwm3_offset = 4320; + public static final int gppwm3_onAboveDuty_offset = 4324; + public static final int gppwm3_pad_offset = 4327; + public static final int gppwm3_pin_offset = 4320; + public static final int gppwm3_pwmFrequency_offset = 4322; + public static final int gppwm3_rpmBins_offset = 4336; + public static final int gppwm3_table_offset = 4344; + public static final int gppwm4_dutyIfError_offset = 4409; + public static final int gppwm4_dutyIfError_offset_hex = 1139; + public static final int gppwm4_loadAxis_offset = 4414; + public static final int gppwm4_loadBins_offset = 4416; + public static final int gppwm4_loadBins_offset_hex = 1140; + public static final int gppwm4_offBelowDuty_offset = 4413; + public static final int gppwm4_offset = 4408; + public static final int gppwm4_offset_hex = 1138; + public static final int gppwm4_onAboveDuty_offset = 4412; + public static final int gppwm4_pad_offset = 4415; + public static final int gppwm4_pin_offset = 4408; + public static final int gppwm4_pin_offset_hex = 1138; + public static final int gppwm4_pwmFrequency_offset = 4410; + public static final int gppwm4_rpmBins_offset = 4424; + public static final int gppwm4_rpmBins_offset_hex = 1148; + public static final int gppwm4_table_offset = 4432; + public static final int gppwm4_table_offset_hex = 1150; + public static final int GPPWM_LOAD_COUNT = 8; + public static final int GPPWM_RPM_COUNT = 8; public static final int gps_rx_pin_offset = 656; public static final int gps_rx_pin_offset_hex = 290; public static final int gps_tx_pin_offset = 657; @@ -889,6 +975,7 @@ public class Fields { public static final int isAlternatorControlEnabled_offset = 1464; public static final int isBoostControlEnabled_offset = 1476; public static final int isCJ125Enabled_offset = 744; + public static final int isCJ125Verbose_offset = 76; public static final int isCylinderCleanupEnabled_offset = 1476; public static final int isDoubleSolenoidIdle_offset = 76; public static final int isEngineChartEnabled_offset = 1464; @@ -901,13 +988,13 @@ public class Fields { public static final int isManualSpinningMode_offset = 1476; public static final int isMapAveragingEnabled_offset = 1476; public static final int isSdCardEnabled_offset = 744; - public static final int issue_294_25_offset = 76; public static final int issue_294_26_offset = 76; public static final int issue_294_27_offset = 76; public static final int issue_294_28_offset = 76; public static final int issue_294_29_offset = 76; public static final int issue_294_30_offset = 76; public static final int issue_294_31_offset = 76; + public static final int issue_294_unused_offset = 76; public static final int isTunerStudioEnabled_offset = 1476; public static final int isVerboseAlternator_offset = 744; public static final int isVerboseAuxPid1_offset = 76; @@ -929,11 +1016,15 @@ public class Fields { public static final int knockNoise_offset = 1820; public static final int knockNoiseRpmBins_offset = 1852; public static final int knockVThreshold_offset = 1512; + public static final int launchActivateDelay_offset = 1060; + public static final int launchActivateDelay_offset_hex = 424; public static final int launchActivatePin_offset = 991; public static final int launchActivationMode_offset = 1020; + public static final int launchAdvanceRpmRange_offset = 1052; public static final int launchBoostDuty_offset = 1044; public static final int launchBoostDuty_offset_hex = 414; public static final int launchControlEnabled_offset = 76; + public static final int launchDisableBySpeed_offset = 976; public static final int launchFuelAdded_offset = 1040; public static final int launchFuelAdded_offset_hex = 410; public static final int launchFuelCutEnable_offset = 1464; @@ -947,6 +1038,8 @@ public class Fields { public static final int launchTimingRetard_offset = 320; public static final int launchTimingRetard_offset_hex = 140; public static final int launchTimingRpmRange_offset = 1036; + public static final int launchTpsTreshold_offset = 1056; + public static final int launchTpsTreshold_offset_hex = 420; public static final int lcdThreadPeriodMs_offset = 720; public static final int LDS_ALTERNATOR_PID_STATE_INDEX = 9; public static final int LDS_CJ125_PID_STATE_INDEX = 10; @@ -976,7 +1069,8 @@ public class Fields { public static final int mafSensorType_offset = 948; public static final int mainRelayPin_offset = 706; public static final int mainRelayPinMode_offset = 752; - public static final int mainUnusedEnd_offset = 4140; + public static final int mainUnusedEnd_offset = 4496; + public static final int mainUnusedEnd_offset_hex = 1190; public static final int malfunctionIndicatorPin_offset = 660; public static final int malfunctionIndicatorPin_offset_hex = 294; public static final int malfunctionIndicatorPinMode_offset = 661; @@ -1029,11 +1123,13 @@ public class Fields { public static final int maxKnockSubDeg_offset_hex = 228; public static final int mc33816_cs_offset = 3107; public static final int mc33816_driven_offset = 2607; + public static final int mc33816_flag0_offset = 1774; public static final int mc33816_rstb_offset = 2606; public static final int mc33816spiDevice_offset = 4001; public static final int mc33972_cs_offset = 678; public static final int mc33972_csPinMode_offset = 679; public static final int mc33972spiDevice_offset = 4008; + public static final int mc33_hvolt_offset = 760; public static final int measureMapOnlyInOneCylinder_offset = 744; public static final String MOCK_AFR_COMMAND = "mock_afr_voltage"; public static final String MOCK_CLT_COMMAND = "mock_clt_voltage"; @@ -1042,7 +1138,6 @@ public class Fields { public static final String MOCK_MAP_COMMAND = "mock_map_voltage"; public static final String MOCK_PPS_POSITION_COMMAND = "mock_pps_position"; public static final String MOCK_PPS_VOLTAGE_COMMAND = "mock_pps_voltage"; - public static final String MOCK_TPS_COMMAND = "mock_tps_voltage"; public static final int multisparkDwell_offset = 1786; public static final int multisparkEnable_offset = 976; public static final int multisparkMaxExtraSparkCount_offset = 975; @@ -1052,8 +1147,6 @@ public class Fields { public static final int NARROW_BAND_WIDE_BAND_CONVERSION_SIZE = 8; public static final int narrowToWideOxygen_offset = 2296; public static final int narrowToWideOxygenBins_offset = 2264; - public static final int nbVvtIndex_offset = 2416; - public static final int nbVvtIndex_offset_hex = 970; public static final int noAccelAfterHardLimitPeriodSecs_offset = 1536; public static final int noAccelAfterHardLimitPeriodSecs_offset_hex = 600; public static final int o2heaterPin_offset = 742; @@ -1069,6 +1162,7 @@ public class Fields { public static final int overrideCrankingIacSetting_offset = 1476; public static final int overrideCrankingIgnition_offset = 516; public static final int overrideCrankingIgnition_offset_hex = 204; + public static final int PACK_ADD_TEMPERATURE = 40; public static final int PACK_MULT_AFR = 1000; public static final int PACK_MULT_ANGLE = 50; public static final int PACK_MULT_MS = 300; @@ -1089,8 +1183,6 @@ public class Fields { public static final int postCrankingDurationSec_offset_hex = 988; public static final int postCrankingFactor_offset = 2436; public static final int postCrankingFactor_offset_hex = 984; - public static final int postCrankingTargetClt_offset = 2432; - public static final int postCrankingTargetClt_offset_hex = 980; public static final int primeInjFalloffTemperature_offset = 1486; public static final int primingSquirtDurationMs_offset = 96; public static final int primingSquirtDurationMs_offset_hex = 60; @@ -1138,6 +1230,7 @@ public class Fields { public static final int servoOutputPins6_offset = 3145; public static final int servoOutputPins7_offset = 3146; public static final int servoOutputPins8_offset = 3147; + public static final int showHumanReadableWarning_offset = 976; public static final int showSdCardWarning_offset = 76; public static final int silentTriggerError_offset = 1464; public static final int slowAdcAlpha_offset = 2088; @@ -1163,6 +1256,7 @@ public class Fields { public static final int spi3mosiPin_offset = 934; public static final int spi3SckMode_offset = 2602; public static final int spi3sckPin_offset = 936; + public static final int startCrankingDuration_offset = 826; public static final int starterControlPin_offset = 1772; public static final int starterRelayDisableMode_offset = 809; public static final int starterRelayDisableMode_offset_hex = 329; @@ -1179,6 +1273,46 @@ public class Fields { public static final int stepperForceParkingEveryRestart_offset = 744; public static final int stepperParkingExtraSteps_offset = 818; public static final int stepperParkingExtraSteps_offset_hex = 332; + public static final int STFT_CELL_COUNT = 4; + public static final int stft_cellCfgs1_maxAdd_offset = 1072; + public static final int stft_cellCfgs1_maxAdd_offset_hex = 430; + public static final int stft_cellCfgs1_maxRemove_offset = 1073; + public static final int stft_cellCfgs1_maxRemove_offset_hex = 431; + public static final int stft_cellCfgs1_offset = 1072; + public static final int stft_cellCfgs1_offset_hex = 430; + public static final int stft_cellCfgs1_timeConstant_offset = 1074; + public static final int stft_cellCfgs1_timeConstant_offset_hex = 432; + public static final int stft_cellCfgs2_maxAdd_offset = 1076; + public static final int stft_cellCfgs2_maxAdd_offset_hex = 434; + public static final int stft_cellCfgs2_maxRemove_offset = 1077; + public static final int stft_cellCfgs2_maxRemove_offset_hex = 435; + public static final int stft_cellCfgs2_offset = 1076; + public static final int stft_cellCfgs2_offset_hex = 434; + public static final int stft_cellCfgs2_timeConstant_offset = 1078; + public static final int stft_cellCfgs2_timeConstant_offset_hex = 436; + public static final int stft_cellCfgs3_maxAdd_offset = 1080; + public static final int stft_cellCfgs3_maxAdd_offset_hex = 438; + public static final int stft_cellCfgs3_maxRemove_offset = 1081; + public static final int stft_cellCfgs3_maxRemove_offset_hex = 439; + public static final int stft_cellCfgs3_offset = 1080; + public static final int stft_cellCfgs3_offset_hex = 438; + public static final int stft_cellCfgs3_timeConstant_offset = 1082; + public static final int stft_cellCfgs4_maxAdd_offset = 1084; + public static final int stft_cellCfgs4_maxRemove_offset = 1085; + public static final int stft_cellCfgs4_offset = 1084; + public static final int stft_cellCfgs4_timeConstant_offset = 1086; + public static final int stft_deadband_offset = 1067; + public static final int stft_maxAfr_offset = 1070; + public static final int stft_maxIdleRegionRpm_offset = 1064; + public static final int stft_maxIdleRegionRpm_offset_hex = 428; + public static final int stft_maxOverrunLoad_offset = 1065; + public static final int stft_maxOverrunLoad_offset_hex = 429; + public static final int stft_minAfr_offset = 1069; + public static final int stft_minClt_offset = 1068; + public static final int stft_minPowerLoad_offset = 1066; + public static final int stft_offset = 1064; + public static final int stft_offset_hex = 428; + public static final int stft_startupDelay_offset = 1071; public static final int storageMode_offset = 2260; public static final int tachOutputPin_offset = 704; public static final int tachOutputPinMode_offset = 705; @@ -1231,9 +1365,14 @@ public class Fields { public static final int tle6240spiDevice_offset = 4004; public static final int tle8888_cs_offset = 3105; public static final int tle8888_csPinMode_offset = 3106; + public static final int tle8888mode_offset = 2416; + public static final int tle8888mode_offset_hex = 970; public static final int tle8888spiDevice_offset = 4000; public static final int todoClutchDownPinInverted_offset = 976; public static final int todoClutchUpPinInverted_offset = 976; + public static final int TOOTH_DATA_LENGTH = 2000; + public static final int TOOTH_PACKET_COUNT = 1000; + public static final int TOOTH_PACKET_SIZE = 2; public static final String TOP_DEAD_CENTER_MESSAGE = "r"; public static final int TOTAL_CONFIG_SIZE = 20000; public static final int tps1_1AdcChannel_offset = 512; @@ -1273,6 +1412,12 @@ public class Fields { public static final int TRIGGER_INPUT_PIN_COUNT = 3; public static final int trigger_offset = 524; public static final int TRIGGER_SIMULATOR_PIN_COUNT = 3; + public static final int trigger_todoRemoveMeOneDay0_offset = 528; + public static final int trigger_todoRemoveMeOneDay0_offset_hex = 210; + public static final int trigger_todoRemoveMeOneDay1_offset = 528; + public static final int trigger_todoRemoveMeOneDay1_offset_hex = 210; + public static final int TRIGGER_TYPE_36_1 = 9; + public static final int TRIGGER_TYPE_60_2 = 8; public static final int trigger_type_offset = 524; public static final int trigger_unusedBit_4_10_offset = 528; public static final int trigger_unusedBit_4_10_offset_hex = 210; @@ -1332,10 +1477,6 @@ public class Fields { public static final int trigger_unusedBit_4_8_offset_hex = 210; public static final int trigger_unusedBit_4_9_offset = 528; public static final int trigger_unusedBit_4_9_offset_hex = 210; - public static final int trigger_unusedTriggerBit0_offset = 528; - public static final int trigger_unusedTriggerBit0_offset_hex = 210; - public static final int trigger_unusedTriggerBit1_offset = 528; - public static final int trigger_unusedTriggerBit1_offset_hex = 210; public static final int trigger_useOnlyFirstChannel_offset = 528; public static final int trigger_useOnlyFirstChannel_offset_hex = 210; public static final int triggerCompCenterVolt_offset = 4036; @@ -1355,15 +1496,19 @@ public class Fields { public static final int triggerSimulatorPins2_offset = 737; public static final int triggerSimulatorPins3_offset = 738; public static final int TS_FILE_VERSION = 20200310; - public static final int TS_OUTPUT_SIZE = 240; - public static final String TS_SIGNATURE = "rusEFI v1.2020.3"; + public static final int TS_OUTPUT_SIZE = 244; + public static final String TS_SIGNATURE = "rusEFI v1.2020.4"; public static final int tunerStudioSerialSpeed_offset = 728; public static final int twoWireBatchIgnition_offset = 1476; public static final int twoWireBatchInjection_offset = 1476; public static final int uartConsoleSerialSpeed_offset = 2076; - public static final int unrealisticRpmThreashold_offset = 760; public static final int unused1059_offset = 3964; - public static final int unused1234234_offset = 2042; + public static final int unused2432_offset = 2432; + public static final int unused2432_offset_hex = 980; + public static final int unused711_offset = 711; + public static final int unused76b0_offset = 76; + public static final int unused806_offset = 806; + public static final int unused806_offset_hex = 326; public static final int unused_1484_bit_24_offset = 1476; public static final int unused_1484_bit_25_offset = 1476; public static final int unused_1484_bit_26_offset = 1476; @@ -1372,9 +1517,12 @@ public class Fields { public static final int unused_1484_bit_29_offset = 1476; public static final int unused_1484_bit_30_offset = 1476; public static final int unused_1484_bit_31_offset = 1476; - public static final int unused_former_warmup_target_afr_offset = 2096; - public static final int unused_former_warmup_target_afr_offset_hex = 830; - public static final int unusedAtOldBoardConfigurationEnd_offset = 1052; + public static final int unused_former_warmup_target_afr_offset = 2100; + public static final int unused_former_warmup_target_afr_offset_hex = 834; + public static final int unusedAntilagTimeout_offset = 820; + public static final int unusedAntilagTimeout_offset_hex = 334; + public static final int unusedAtOldBoardConfigurationEnd_offset = 1088; + public static final int unusedAtOldBoardConfigurationEnd_offset_hex = 440; public static final int unusedBit4_1476_offset = 1476; public static final int unusedBit_251_10_offset = 976; public static final int unusedBit_251_11_offset = 976; @@ -1396,22 +1544,14 @@ public class Fields { public static final int unusedBit_251_27_offset = 976; public static final int unusedBit_251_28_offset = 976; public static final int unusedBit_251_29_offset = 976; - public static final int unusedBit_251_4_offset = 976; - public static final int unusedBit_251_5_offset = 976; - public static final int unusedBit_251_6_offset = 976; - public static final int unusedBit_251_7_offset = 976; - public static final int unusedBit_251_8_offset = 976; - public static final int unusedBit_251_9_offset = 976; - public static final int unusedBit_280_30_offset = 976; - public static final int unusedBit_280_31_offset = 976; + public static final int unusedBit_282_30_offset = 976; + public static final int unusedBit_282_31_offset = 976; public static final int unusedBit_34_31_offset = 76; - public static final int unusedErrorPin_offset = 2040; public static final int unusedFlexFuelSensor_offset = 3100; - public static final int unusedFormerWarmupAfrPid_offset = 1774; - public static final int unusedmiataNb2VVTRatioFrom_offset = 820; - public static final int unusedmiataNb2VVTRatioFrom_offset_hex = 334; - public static final int unusedmiataNb2VVTRatioTo_offset = 824; - public static final int unusedmiataNb2VVTRatioTo_offset_hex = 338; + public static final int unusedHere_offset = 761; + public static final int unusedOldBiquad_offset = 2332; + public static final int unusedSomethingWasHere_offset = 2417; + public static final int unusedSomethingWasHere_offset_hex = 971; public static final int unusedSpiPadding4_offset = 2593; public static final int unusedSpiPadding5_offset = 2713; public static final int unusedSpiPadding7_offset = 4005; @@ -1419,7 +1559,6 @@ public class Fields { public static final int unusuedsw_offset = 4020; public static final int unusuedvref_offset = 4016; public static final int useAdvanceCorrectionsForCranking_offset = 1476; - public static final int useBiQuadAnalogFiltering_offset = 76; public static final int useConstantDwellDuringCranking_offset = 1464; public static final int useETBforIdleControl_offset = 744; public static final int useFixedBaroCorrFromMap_offset = 1476; @@ -1452,7 +1591,6 @@ public class Fields { public static final int useSerialPort_offset = 744; public static final int useStepperIdle_offset = 744; public static final int useTLE8888_cranking_hack_offset = 76; - public static final int useTLE8888_hall_mode_offset = 76; public static final int useTpicAdvancedMode_offset = 744; public static final int useTPSAdvanceTable_offset = 1476; public static final int useTPSBasedVeTable_offset = 744; @@ -1478,6 +1616,8 @@ public class Fields { public static final int vvtMode_offset_hex = 918; public static final int vvtOffset_offset = 2052; public static final int vvtOffset_offset_hex = 804; + public static final int warning_message_offset = 6000; + public static final int warning_message_offset_hex = 1770; public static final int warningLedPin_offset = 2041; public static final int warningPeriod_offset = 1498; public static final int wboHeaterPin_offset = 673; @@ -1487,7 +1627,7 @@ public class Fields { public static final Field ENGINETYPE = Field.create("ENGINETYPE", 0, FieldType.INT); public static final Field ENGINESNIFFERRPMTHRESHOLD = Field.create("ENGINESNIFFERRPMTHRESHOLD", 4, FieldType.INT); public static final Field INJECTOR_FLOW = Field.create("INJECTOR_FLOW", 8, FieldType.FLOAT); - public static final Field DIRECTSELFSTIMULATION = Field.create("DIRECTSELFSTIMULATION", 76, FieldType.BIT, 0); + public static final Field UNUSED76B0 = Field.create("UNUSED76B0", 76, FieldType.BIT, 0); public static final Field ACTIVATEAUXPID1 = Field.create("ACTIVATEAUXPID1", 76, FieldType.BIT, 1); public static final Field ISVERBOSEAUXPID1 = Field.create("ISVERBOSEAUXPID1", 76, FieldType.BIT, 2); public static final Field ACTIVATEAUXPID2 = Field.create("ACTIVATEAUXPID2", 76, FieldType.BIT, 3); @@ -1496,14 +1636,14 @@ public class Fields { public static final Field ISVERBOSEAUXPID3 = Field.create("ISVERBOSEAUXPID3", 76, FieldType.BIT, 6); public static final Field ACTIVATEAUXPID4 = Field.create("ACTIVATEAUXPID4", 76, FieldType.BIT, 7); public static final Field ISVERBOSEAUXPID4 = Field.create("ISVERBOSEAUXPID4", 76, FieldType.BIT, 8); - public static final Field USEBIQUADANALOGFILTERING = Field.create("USEBIQUADANALOGFILTERING", 76, FieldType.BIT, 9); + public static final Field ISCJ125VERBOSE = Field.create("ISCJ125VERBOSE", 76, FieldType.BIT, 9); public static final Field CJ125ISUADIVIDED = Field.create("CJ125ISUADIVIDED", 76, FieldType.BIT, 10); public static final Field CJ125ISLSU49 = Field.create("CJ125ISLSU49", 76, FieldType.BIT, 11); public static final Field ETB_USE_TWO_WIRES = Field.create("ETB_USE_TWO_WIRES", 76, FieldType.BIT, 12); public static final Field ISDOUBLESOLENOIDIDLE = Field.create("ISDOUBLESOLENOIDIDLE", 76, FieldType.BIT, 13); public static final Field SHOWSDCARDWARNING = Field.create("SHOWSDCARDWARNING", 76, FieldType.BIT, 14); public static final Field CJ125ISURDIVIDED = Field.create("CJ125ISURDIVIDED", 76, FieldType.BIT, 15); - public static final Field USETLE8888_HALL_MODE = Field.create("USETLE8888_HALL_MODE", 76, FieldType.BIT, 16); + public static final Field ISSUE_294_UNUSED = Field.create("ISSUE_294_UNUSED", 76, FieldType.BIT, 16); public static final Field USETLE8888_CRANKING_HACK = Field.create("USETLE8888_CRANKING_HACK", 76, FieldType.BIT, 17); public static final Field USEINSTANTRPMFORIDLE = Field.create("USEINSTANTRPMFORIDLE", 76, FieldType.BIT, 18); public static final Field ABSOLUTEFUELPRESSURE = Field.create("ABSOLUTEFUELPRESSURE", 76, FieldType.BIT, 19); @@ -1511,7 +1651,7 @@ public class Fields { public static final Field ROLLINGLAUNCHENABLED = Field.create("ROLLINGLAUNCHENABLED", 76, FieldType.BIT, 21); public static final Field ANTILAGENABLED = Field.create("ANTILAGENABLED", 76, FieldType.BIT, 22); public static final Field USERUNNINGMATHFORCRANKING = Field.create("USERUNNINGMATHFORCRANKING", 76, FieldType.BIT, 23); - public static final Field ISSUE_294_25 = Field.create("ISSUE_294_25", 76, FieldType.BIT, 24); + public static final Field DISPLAYLOGICLEVELSINENGINESNIFFER = Field.create("DISPLAYLOGICLEVELSINENGINESNIFFER", 76, FieldType.BIT, 24); public static final Field ISSUE_294_26 = Field.create("ISSUE_294_26", 76, FieldType.BIT, 25); public static final Field ISSUE_294_27 = Field.create("ISSUE_294_27", 76, FieldType.BIT, 26); public static final Field ISSUE_294_28 = Field.create("ISSUE_294_28", 76, FieldType.BIT, 27); @@ -1589,10 +1729,10 @@ public class Fields { public static final Field TPS2_1ADCCHANNEL = Field.create("TPS2_1ADCCHANNEL", 515, FieldType.INT8, adc_channel_e); public static final Field OVERRIDECRANKINGIGNITION = Field.create("OVERRIDECRANKINGIGNITION", 516, FieldType.INT); public static final Field SENSORCHARTFREQUENCY = Field.create("SENSORCHARTFREQUENCY", 520, FieldType.INT); - public static final String[] trigger_type_e = {"custom toothed wheel", "Ford Aspire", "Dodge Neon 1995", "Miata NA", "Miata NB", "GM_7X", "Cooper R50", "Mazda SOHC 4", "60/2", "36/1", "Honda 4+24+1", "Mitsubishi", "Honda 4+24", "Honda 1+4+24", "Dodge Neon 2003", "Mazda DOHC 1+4", "1+1", "1+60/2", "Single Tooth", "Dodge Ram 1+16", "60/2 VW", "Honda 1+24", "Dodge Stratus", "36_2_2_2", "Nissan Primera", "2JZ", "Rover K", "GM LS 24", "Honda CBR 600", "2JZ_1_12", "Honda CBR 600 custom", "3/1 skipped" , "Dodge Neon 2003 crank", "Miata VVT", "trg34", "trg35", "Subaru 7+6", "Jeep 18-2-2-2", "WIP", "Dodge Neon 1995 crank only", "Jeep XJ 4 cyl", "FiatIAQ_P8", "Mazda Z5", "trg43", "trg44", "trg45", "INVALID"}; + public static final String[] trigger_type_e = {"custom toothed wheel", "Ford Aspire", "Dodge Neon 1995", "Miata NA", "Miata NB", "GM_7X", "Cooper R50", "Mazda SOHC 4", "60/2", "36/1", "Honda 4+24+1", "Mitsubishi", "Honda 4+24", "Honda 1+4+24", "Dodge Neon 2003", "Mazda DOHC 1+4", "1+1", "1+60/2", "Single Tooth", "Dodge Ram 1+16", "60/2 VW", "Honda 1+24", "Dodge Stratus", "36_2_2_2", "Nissan Primera", "2JZ", "Rover K", "GM LS 24", "Honda CBR 600", "2JZ_1_12", "Honda CBR 600 custom", "3/1 skipped" , "Dodge Neon 2003 crank", "Miata VVT", "trg34", "trg35", "Subaru 7+6", "Jeep 18-2-2-2", "WIP", "Dodge Neon 1995 crank only", "Jeep XJ 4 cyl", "FiatIAQ_P8", "Mazda Z5", "trg43", "Renix 44-2-2", "Renix 66-2-2-2", "Honda K 12+1", "trg47", "trg48", "INVALID"}; public static final Field TRIGGER_TYPE = Field.create("TRIGGER_TYPE", 524, FieldType.INT, trigger_type_e); - public static final Field TRIGGER_UNUSEDTRIGGERBIT0 = Field.create("TRIGGER_UNUSEDTRIGGERBIT0", 528, FieldType.BIT, 0); - public static final Field TRIGGER_UNUSEDTRIGGERBIT1 = Field.create("TRIGGER_UNUSEDTRIGGERBIT1", 528, FieldType.BIT, 1); + public static final Field TRIGGER_TODOREMOVEMEONEDAY0 = Field.create("TRIGGER_TODOREMOVEMEONEDAY0", 528, FieldType.BIT, 0); + public static final Field TRIGGER_TODOREMOVEMEONEDAY1 = Field.create("TRIGGER_TODOREMOVEMEONEDAY1", 528, FieldType.BIT, 1); public static final Field TRIGGER_USEONLYFIRSTCHANNEL = Field.create("TRIGGER_USEONLYFIRSTCHANNEL", 528, FieldType.BIT, 2); public static final Field TRIGGER_UNUSEDBIT_4_3 = Field.create("TRIGGER_UNUSEDBIT_4_3", 528, FieldType.BIT, 3); public static final Field TRIGGER_UNUSEDBIT_4_4 = Field.create("TRIGGER_UNUSEDBIT_4_4", 528, FieldType.BIT, 4); @@ -1739,14 +1879,13 @@ public class Fields { public static final Field CANTXPIN = Field.create("CANTXPIN", 708, FieldType.INT8, brain_pin_e); public static final Field CANRXPIN = Field.create("CANRXPIN", 709, FieldType.INT8, brain_pin_e); public static final Field THROTTLEPEDALUPPINMODE = Field.create("THROTTLEPEDALUPPINMODE", 710, FieldType.INT8); - public static final Field DEBUGTIMERCALLBACK = Field.create("DEBUGTIMERCALLBACK", 711, FieldType.INT8, brain_pin_e); + public static final Field UNUSED711 = Field.create("UNUSED711", 711, FieldType.INT8); public static final Field IDLETHREADPERIODMS = Field.create("IDLETHREADPERIODMS", 712, FieldType.INT); public static final Field CONSOLELOOPPERIODMS = Field.create("CONSOLELOOPPERIODMS", 716, FieldType.INT); public static final Field LCDTHREADPERIODMS = Field.create("LCDTHREADPERIODMS", 720, FieldType.INT); public static final Field GENERALPERIODICTHREADPERIODMS = Field.create("GENERALPERIODICTHREADPERIODMS", 724, FieldType.INT); public static final Field TUNERSTUDIOSERIALSPEED = Field.create("TUNERSTUDIOSERIALSPEED", 728, FieldType.INT); - public static final String[] can_device_mode_e = {"v0", "v1"}; - public static final Field CANDEVICEMODE = Field.create("CANDEVICEMODE", 732, FieldType.INT, can_device_mode_e); + public static final Field ANUNUSED4BYTES = Field.create("ANUNUSED4BYTES", 732, FieldType.INT); public static final Field TRIGGERSIMULATORPINS1 = Field.create("TRIGGERSIMULATORPINS1", 736, FieldType.INT8, brain_pin_e); public static final Field TRIGGERSIMULATORPINS2 = Field.create("TRIGGERSIMULATORPINS2", 737, FieldType.INT8, brain_pin_e); public static final Field TRIGGERSIMULATORPINS3 = Field.create("TRIGGERSIMULATORPINS3", 738, FieldType.INT8, brain_pin_e); @@ -1796,7 +1935,7 @@ public class Fields { public static final Field HIP9011INTHOLDPIN = Field.create("HIP9011INTHOLDPIN", 754, FieldType.INT8, brain_pin_e); public static final Field HIP9011INTHOLDPINMODE = Field.create("HIP9011INTHOLDPINMODE", 755, FieldType.INT8, pin_output_mode_e); public static final Field VERBOSECANBASEADDRESS = Field.create("VERBOSECANBASEADDRESS", 756, FieldType.INT); - public static final Field UNREALISTICRPMTHREASHOLD = Field.create("UNREALISTICRPMTHREASHOLD", 760, FieldType.INT); + public static final Field MC33_HVOLT = Field.create("MC33_HVOLT", 760, FieldType.INT8); public static final Field GPIOPINMODES1 = Field.create("GPIOPINMODES1", 764, FieldType.INT8, pin_output_mode_e); public static final Field GPIOPINMODES2 = Field.create("GPIOPINMODES2", 765, FieldType.INT8, pin_output_mode_e); public static final Field GPIOPINMODES3 = Field.create("GPIOPINMODES3", 766, FieldType.INT8, pin_output_mode_e); @@ -1838,7 +1977,7 @@ public class Fields { public static final Field MAX31855_CS7 = Field.create("MAX31855_CS7", 802, FieldType.INT8, brain_pin_e); public static final Field MAX31855_CS8 = Field.create("MAX31855_CS8", 803, FieldType.INT8, brain_pin_e); public static final Field SDCARDPERIODMS = Field.create("SDCARDPERIODMS", 804, FieldType.INT16); - public static final Field DEBUGSETTIMER = Field.create("DEBUGSETTIMER", 806, FieldType.INT8, brain_pin_e); + public static final Field UNUSED806 = Field.create("UNUSED806", 806, FieldType.INT8); public static final Field DEBUGMAPAVERAGING = Field.create("DEBUGMAPAVERAGING", 807, FieldType.INT8, brain_pin_e); public static final Field STARTERRELAYDISABLEPIN = Field.create("STARTERRELAYDISABLEPIN", 808, FieldType.INT8, output_pin_e); public static final Field STARTERRELAYDISABLEMODE = Field.create("STARTERRELAYDISABLEMODE", 809, FieldType.INT8, pin_output_mode_e); @@ -1847,8 +1986,9 @@ public class Fields { public static final Field MAPMINBUFFERLENGTH = Field.create("MAPMINBUFFERLENGTH", 812, FieldType.INT); public static final Field IDLEPIDDEACTIVATIONTPSTHRESHOLD = Field.create("IDLEPIDDEACTIVATIONTPSTHRESHOLD", 816, FieldType.INT16); public static final Field STEPPERPARKINGEXTRASTEPS = Field.create("STEPPERPARKINGEXTRASTEPS", 818, FieldType.INT16); - public static final Field UNUSEDMIATANB2VVTRATIOFROM = Field.create("UNUSEDMIATANB2VVTRATIOFROM", 820, FieldType.FLOAT); - public static final Field UNUSEDMIATANB2VVTRATIOTO = Field.create("UNUSEDMIATANB2VVTRATIOTO", 824, FieldType.FLOAT); + public static final Field UNUSEDANTILAGTIMEOUT = Field.create("UNUSEDANTILAGTIMEOUT", 820, FieldType.FLOAT); + public static final Field ANTILAGRPMTRESHOLD = Field.create("ANTILAGRPMTRESHOLD", 824, FieldType.INT16); + public static final Field STARTCRANKINGDURATION = Field.create("STARTCRANKINGDURATION", 826, FieldType.INT16); public static final Field TRIGGERERRORPIN = Field.create("TRIGGERERRORPIN", 828, FieldType.INT8, brain_pin_e); public static final Field TRIGGERERRORPINMODE = Field.create("TRIGGERERRORPINMODE", 829, FieldType.INT8, pin_output_mode_e); public static final Field ACRELAYPIN = Field.create("ACRELAYPIN", 830, FieldType.INT8, output_pin_e); @@ -1932,12 +2072,12 @@ public class Fields { public static final Field TODOCLUTCHDOWNPININVERTED = Field.create("TODOCLUTCHDOWNPININVERTED", 976, FieldType.BIT, 1); public static final Field USEHBRIDGES = Field.create("USEHBRIDGES", 976, FieldType.BIT, 2); public static final Field MULTISPARKENABLE = Field.create("MULTISPARKENABLE", 976, FieldType.BIT, 3); - public static final Field UNUSEDBIT_251_4 = Field.create("UNUSEDBIT_251_4", 976, FieldType.BIT, 4); - public static final Field UNUSEDBIT_251_5 = Field.create("UNUSEDBIT_251_5", 976, FieldType.BIT, 5); - public static final Field UNUSEDBIT_251_6 = Field.create("UNUSEDBIT_251_6", 976, FieldType.BIT, 6); - public static final Field UNUSEDBIT_251_7 = Field.create("UNUSEDBIT_251_7", 976, FieldType.BIT, 7); - public static final Field UNUSEDBIT_251_8 = Field.create("UNUSEDBIT_251_8", 976, FieldType.BIT, 8); - public static final Field UNUSEDBIT_251_9 = Field.create("UNUSEDBIT_251_9", 976, FieldType.BIT, 9); + public static final Field ENABLELAUNCHRETARD = Field.create("ENABLELAUNCHRETARD", 976, FieldType.BIT, 4); + public static final Field ENABLELAUNCHBOOST = Field.create("ENABLELAUNCHBOOST", 976, FieldType.BIT, 5); + public static final Field LAUNCHDISABLEBYSPEED = Field.create("LAUNCHDISABLEBYSPEED", 976, FieldType.BIT, 6); + public static final Field ENABLECANVSS = Field.create("ENABLECANVSS", 976, FieldType.BIT, 7); + public static final Field ENABLEINNOVATELC2 = Field.create("ENABLEINNOVATELC2", 976, FieldType.BIT, 8); + public static final Field SHOWHUMANREADABLEWARNING = Field.create("SHOWHUMANREADABLEWARNING", 976, FieldType.BIT, 9); public static final Field UNUSEDBIT_251_10 = Field.create("UNUSEDBIT_251_10", 976, FieldType.BIT, 10); public static final Field UNUSEDBIT_251_11 = Field.create("UNUSEDBIT_251_11", 976, FieldType.BIT, 11); public static final Field UNUSEDBIT_251_12 = Field.create("UNUSEDBIT_251_12", 976, FieldType.BIT, 12); @@ -1958,16 +2098,16 @@ public class Fields { public static final Field UNUSEDBIT_251_27 = Field.create("UNUSEDBIT_251_27", 976, FieldType.BIT, 27); public static final Field UNUSEDBIT_251_28 = Field.create("UNUSEDBIT_251_28", 976, FieldType.BIT, 28); public static final Field UNUSEDBIT_251_29 = Field.create("UNUSEDBIT_251_29", 976, FieldType.BIT, 29); - public static final Field UNUSEDBIT_280_30 = Field.create("UNUSEDBIT_280_30", 976, FieldType.BIT, 30); - public static final Field UNUSEDBIT_280_31 = Field.create("UNUSEDBIT_280_31", 976, FieldType.BIT, 31); + public static final Field UNUSEDBIT_282_30 = Field.create("UNUSEDBIT_282_30", 976, FieldType.BIT, 30); + public static final Field UNUSEDBIT_282_31 = Field.create("UNUSEDBIT_282_31", 976, FieldType.BIT, 31); public static final Field ETBIO1_DIRECTIONPIN1 = Field.create("ETBIO1_DIRECTIONPIN1", 980, FieldType.INT8, brain_pin_e); public static final Field ETBIO1_DIRECTIONPIN2 = Field.create("ETBIO1_DIRECTIONPIN2", 981, FieldType.INT8, brain_pin_e); public static final Field ETBIO1_CONTROLPIN1 = Field.create("ETBIO1_CONTROLPIN1", 982, FieldType.INT8, brain_pin_e); - public static final Field ETBIO1_CONTROLPINMODE = Field.create("ETBIO1_CONTROLPINMODE", 983, FieldType.INT8, pin_output_mode_e); + public static final Field ETBIO1_DISABLEPIN = Field.create("ETBIO1_DISABLEPIN", 983, FieldType.INT8, brain_pin_e); public static final Field ETBIO2_DIRECTIONPIN1 = Field.create("ETBIO2_DIRECTIONPIN1", 984, FieldType.INT8, brain_pin_e); public static final Field ETBIO2_DIRECTIONPIN2 = Field.create("ETBIO2_DIRECTIONPIN2", 985, FieldType.INT8, brain_pin_e); public static final Field ETBIO2_CONTROLPIN1 = Field.create("ETBIO2_CONTROLPIN1", 986, FieldType.INT8, brain_pin_e); - public static final Field ETBIO2_CONTROLPINMODE = Field.create("ETBIO2_CONTROLPINMODE", 987, FieldType.INT8, pin_output_mode_e); + public static final Field ETBIO2_DISABLEPIN = Field.create("ETBIO2_DISABLEPIN", 987, FieldType.INT8, brain_pin_e); public static final Field BOOSTCONTROLPIN = Field.create("BOOSTCONTROLPIN", 988, FieldType.INT8, output_pin_e); public static final Field BOOSTCONTROLPINMODE = Field.create("BOOSTCONTROLPINMODE", 989, FieldType.INT8, pin_output_mode_e); public static final Field ANTILAGACTIVATEPIN = Field.create("ANTILAGACTIVATEPIN", 990, FieldType.INT8, switch_input_pin_e); @@ -1991,6 +2131,29 @@ public class Fields { public static final Field LAUNCHFUELADDED = Field.create("LAUNCHFUELADDED", 1040, FieldType.INT); public static final Field LAUNCHBOOSTDUTY = Field.create("LAUNCHBOOSTDUTY", 1044, FieldType.INT); public static final Field HARDCUTRPMRANGE = Field.create("HARDCUTRPMRANGE", 1048, FieldType.INT); + public static final Field LAUNCHADVANCERPMRANGE = Field.create("LAUNCHADVANCERPMRANGE", 1052, FieldType.INT); + public static final Field LAUNCHTPSTRESHOLD = Field.create("LAUNCHTPSTRESHOLD", 1056, FieldType.INT); + public static final Field LAUNCHACTIVATEDELAY = Field.create("LAUNCHACTIVATEDELAY", 1060, FieldType.FLOAT); + public static final Field STFT_MAXIDLEREGIONRPM = Field.create("STFT_MAXIDLEREGIONRPM", 1064, FieldType.INT8); + public static final Field STFT_MAXOVERRUNLOAD = Field.create("STFT_MAXOVERRUNLOAD", 1065, FieldType.INT8); + public static final Field STFT_MINPOWERLOAD = Field.create("STFT_MINPOWERLOAD", 1066, FieldType.INT8); + public static final Field STFT_DEADBAND = Field.create("STFT_DEADBAND", 1067, FieldType.INT8); + public static final Field STFT_MINCLT = Field.create("STFT_MINCLT", 1068, FieldType.INT8); + public static final Field STFT_MINAFR = Field.create("STFT_MINAFR", 1069, FieldType.INT8); + public static final Field STFT_MAXAFR = Field.create("STFT_MAXAFR", 1070, FieldType.INT8); + public static final Field STFT_STARTUPDELAY = Field.create("STFT_STARTUPDELAY", 1071, FieldType.INT8); + public static final Field STFT_CELLCFGS1_MAXADD = Field.create("STFT_CELLCFGS1_MAXADD", 1072, FieldType.INT8); + public static final Field STFT_CELLCFGS1_MAXREMOVE = Field.create("STFT_CELLCFGS1_MAXREMOVE", 1073, FieldType.INT8); + public static final Field STFT_CELLCFGS1_TIMECONSTANT = Field.create("STFT_CELLCFGS1_TIMECONSTANT", 1074, FieldType.INT16); + public static final Field STFT_CELLCFGS2_MAXADD = Field.create("STFT_CELLCFGS2_MAXADD", 1076, FieldType.INT8); + public static final Field STFT_CELLCFGS2_MAXREMOVE = Field.create("STFT_CELLCFGS2_MAXREMOVE", 1077, FieldType.INT8); + public static final Field STFT_CELLCFGS2_TIMECONSTANT = Field.create("STFT_CELLCFGS2_TIMECONSTANT", 1078, FieldType.INT16); + public static final Field STFT_CELLCFGS3_MAXADD = Field.create("STFT_CELLCFGS3_MAXADD", 1080, FieldType.INT8); + public static final Field STFT_CELLCFGS3_MAXREMOVE = Field.create("STFT_CELLCFGS3_MAXREMOVE", 1081, FieldType.INT8); + public static final Field STFT_CELLCFGS3_TIMECONSTANT = Field.create("STFT_CELLCFGS3_TIMECONSTANT", 1082, FieldType.INT16); + public static final Field STFT_CELLCFGS4_MAXADD = Field.create("STFT_CELLCFGS4_MAXADD", 1084, FieldType.INT8); + public static final Field STFT_CELLCFGS4_MAXREMOVE = Field.create("STFT_CELLCFGS4_MAXREMOVE", 1085, FieldType.INT8); + public static final Field STFT_CELLCFGS4_TIMECONSTANT = Field.create("STFT_CELLCFGS4_TIMECONSTANT", 1086, FieldType.INT16); public static final Field VVTDISPLAYINVERTED = Field.create("VVTDISPLAYINVERTED", 1464, FieldType.BIT, 0); public static final Field FUELCLOSEDLOOPCORRECTIONENABLED = Field.create("FUELCLOSEDLOOPCORRECTIONENABLED", 1464, FieldType.BIT, 1); public static final Field ISVERBOSEIAC = Field.create("ISVERBOSEIAC", 1464, FieldType.BIT, 2); @@ -2116,7 +2279,7 @@ public class Fields { public static final Field TPS2MAX = Field.create("TPS2MAX", 1770, FieldType.INT16); public static final Field STARTERCONTROLPIN = Field.create("STARTERCONTROLPIN", 1772, FieldType.INT8, output_pin_e); public static final Field STARTSTOPBUTTONMODE = Field.create("STARTSTOPBUTTONMODE", 1773, FieldType.INT8); - public static final Field UNUSEDFORMERWARMUPAFRPID = Field.create("UNUSEDFORMERWARMUPAFRPID", 1774, FieldType.INT8); + public static final Field MC33816_FLAG0 = Field.create("MC33816_FLAG0", 1774, FieldType.INT8, brain_pin_e); public static final Field TACHPULSEPERREV = Field.create("TACHPULSEPERREV", 1775, FieldType.INT8); public static final Field MAPERRORDETECTIONTOOLOW = Field.create("MAPERRORDETECTIONTOOLOW", 1776, FieldType.FLOAT); public static final Field MAPERRORDETECTIONTOOHIGH = Field.create("MAPERRORDETECTIONTOOHIGH", 1780, FieldType.FLOAT); @@ -2147,9 +2310,9 @@ public class Fields { public static final Field STARTOFCRANKINGPRIMINGPULSE = Field.create("STARTOFCRANKINGPRIMINGPULSE", 2032, FieldType.FLOAT); public static final Field AFTERCRANKINGIACTAPERDURATION = Field.create("AFTERCRANKINGIACTAPERDURATION", 2036, FieldType.INT16); public static final Field IACBYTPSTAPER = Field.create("IACBYTPSTAPER", 2038, FieldType.INT16); - public static final Field UNUSEDERRORPIN = Field.create("UNUSEDERRORPIN", 2040, FieldType.INT8, brain_pin_e); + public static final Field AUXSERIALTXPIN = Field.create("AUXSERIALTXPIN", 2040, FieldType.INT8, brain_pin_e); public static final Field WARNINGLEDPIN = Field.create("WARNINGLEDPIN", 2041, FieldType.INT8, brain_pin_e); - public static final Field UNUSED1234234 = Field.create("UNUSED1234234", 2042, FieldType.INT8, brain_pin_e); + public static final Field AUXSERIALRXPIN = Field.create("AUXSERIALRXPIN", 2042, FieldType.INT8, brain_pin_e); public static final Field LIS302DLCSPIN = Field.create("LIS302DLCSPIN", 2043, FieldType.INT8, brain_pin_e); public static final Field TPSACCELLENGTH = Field.create("TPSACCELLENGTH", 2044, FieldType.INT); public static final Field TPSACCELENRICHMENTTHRESHOLD = Field.create("TPSACCELENRICHMENTTHRESHOLD", 2048, FieldType.FLOAT); @@ -2163,8 +2326,9 @@ public class Fields { public static final Field TPSDECELENLEANMENTTHRESHOLD = Field.create("TPSDECELENLEANMENTTHRESHOLD", 2080, FieldType.FLOAT); public static final Field TPSDECELENLEANMENTMULTIPLIER = Field.create("TPSDECELENLEANMENTMULTIPLIER", 2084, FieldType.FLOAT); public static final Field SLOWADCALPHA = Field.create("SLOWADCALPHA", 2088, FieldType.FLOAT); - public static final String[] debug_mode_e = {"Alternator PID", "TPS acceleration enrichment", "INVALID", "Idle Control", "Engine Load accl enrich", "Trigger Counters", "FSIO_ADC", "AUX_PID_1", "VVT input", "Cranking", "Timing", "Closed-loop fuel corr PID", "VSS", "SD card", "sr5", "Knock", "Trigger Sync", "Electronic Throttle", "Executor", "Bench Test / TS commands", "Aux Valves", "Analog inputs #1", "INSTANT_RPM", "FSIO_EXPRESSION", "Status", "CJ125", "CAN", "MAP", "Metrics", "ETB#2", "Ion Sense", "TLE8888", "Analog inputs #2", "Dwell Metric", "Aux Temperature", "ETB Logic", "Boost Control"}; + public static final String[] debug_mode_e = {"Alternator PID", "TPS acceleration enrichment", "INVALID", "Idle Control", "Engine Load accl enrich", "Trigger Counters", "FSIO_ADC", "AUX_PID_1", "VVT input", "Cranking", "Timing", "Closed-loop fuel corr PID", "VSS", "SD card", "sr5", "Knock", "mode16", "Electronic Throttle", "Executor", "Bench Test / TS commands", "Aux Valves", "Analog inputs #1", "INSTANT_RPM", "FSIO_EXPRESSION", "Status", "CJ125", "CAN", "MAP", "Metrics", "ETB#2", "Ion Sense", "TLE8888", "Analog inputs #2", "Dwell Metric", "INVALID", "ETB Logic", "Boost Control", "Start/Stop", "Launch", "ETB Autotune", "Mode40"}; public static final Field DEBUGMODE = Field.create("DEBUGMODE", 2092, FieldType.INT, debug_mode_e); + public static final Field AUXSERIALSPEED = Field.create("AUXSERIALSPEED", 2096, FieldType.INT); public static final Field BOOSTCUTPRESSURE = Field.create("BOOSTCUTPRESSURE", 2132, FieldType.FLOAT); public static final Field FSIOADC1 = Field.create("FSIOADC1", 2200, FieldType.INT8, adc_channel_e); public static final Field FSIOADC2 = Field.create("FSIOADC2", 2201, FieldType.INT8, adc_channel_e); @@ -2196,16 +2360,11 @@ public class Fields { public static final Field STORAGEMODE = Field.create("STORAGEMODE", 2260, FieldType.INT, mass_storage_e); public static final String[] vvt_mode_e = {"First half", "Second half", "2GZ", "Miata NB2", "mode4", "mode5", "mode6", "mode7"}; public static final Field VVTMODE = Field.create("VVTMODE", 2328, FieldType.INT, vvt_mode_e); - public static final Field BIQUAD_A0 = Field.create("BIQUAD_A0", 2332, FieldType.FLOAT); - public static final Field BIQUAD_A1 = Field.create("BIQUAD_A1", 2336, FieldType.FLOAT); - public static final Field BIQUAD_A2 = Field.create("BIQUAD_A2", 2340, FieldType.FLOAT); - public static final Field BIQUAD_B1 = Field.create("BIQUAD_B1", 2344, FieldType.FLOAT); - public static final Field BIQUAD_B2 = Field.create("BIQUAD_B2", 2348, FieldType.FLOAT); - public static final Field NBVVTINDEX = Field.create("NBVVTINDEX", 2416, FieldType.INT); + public static final Field TLE8888MODE = Field.create("TLE8888MODE", 2416, FieldType.INT8); public static final Field AUTOTUNECLTTHRESHOLD = Field.create("AUTOTUNECLTTHRESHOLD", 2420, FieldType.FLOAT); public static final Field AUTOTUNETPSROCTHRESHOLD = Field.create("AUTOTUNETPSROCTHRESHOLD", 2424, FieldType.FLOAT); public static final Field AUTOTUNETPSQUIETPERIOD = Field.create("AUTOTUNETPSQUIETPERIOD", 2428, FieldType.FLOAT); - public static final Field POSTCRANKINGTARGETCLT = Field.create("POSTCRANKINGTARGETCLT", 2432, FieldType.FLOAT); + public static final Field UNUSED2432 = Field.create("UNUSED2432", 2432, FieldType.FLOAT); public static final Field POSTCRANKINGFACTOR = Field.create("POSTCRANKINGFACTOR", 2436, FieldType.FLOAT); public static final Field POSTCRANKINGDURATIONSEC = Field.create("POSTCRANKINGDURATIONSEC", 2440, FieldType.FLOAT); public static final Field AUXTEMPSENSOR1_TEMPC_1 = Field.create("AUXTEMPSENSOR1_TEMPC_1", 2444, FieldType.FLOAT); @@ -2367,6 +2526,41 @@ public class Fields { public static final Field IDLERPMPID2_MINVALUE = Field.create("IDLERPMPID2_MINVALUE", 4056, FieldType.INT16); public static final Field IDLERPMPID2_MAXVALUE = Field.create("IDLERPMPID2_MAXVALUE", 4058, FieldType.INT16); public static final Field IACPIDMULTTABLE = Field.create("IACPIDMULTTABLE", 4060, FieldType.INT); + public static final Field CANVSSNBCTYPE = Field.create("CANVSSNBCTYPE", 4140, FieldType.INT); + public static final Field GPPWM1_PIN = Field.create("GPPWM1_PIN", 4144, FieldType.INT8, output_pin_e); + public static final Field GPPWM1_DUTYIFERROR = Field.create("GPPWM1_DUTYIFERROR", 4145, FieldType.INT8); + public static final Field GPPWM1_PWMFREQUENCY = Field.create("GPPWM1_PWMFREQUENCY", 4146, FieldType.INT16); + public static final Field GPPWM1_ONABOVEDUTY = Field.create("GPPWM1_ONABOVEDUTY", 4148, FieldType.INT8); + public static final Field GPPWM1_OFFBELOWDUTY = Field.create("GPPWM1_OFFBELOWDUTY", 4149, FieldType.INT8); + public static final String[] gppwm_channel_e = {"TPS", "MAP", "CLT", "IAT"}; + public static final Field GPPWM1_LOADAXIS = Field.create("GPPWM1_LOADAXIS", 4150, FieldType.INT8, gppwm_channel_e); + public static final Field GPPWM1_PAD = Field.create("GPPWM1_PAD", 4151, FieldType.INT8); + public static final Field GPPWM1_TABLE = Field.create("GPPWM1_TABLE", 4168, FieldType.INT); + public static final Field GPPWM2_PIN = Field.create("GPPWM2_PIN", 4232, FieldType.INT8, output_pin_e); + public static final Field GPPWM2_DUTYIFERROR = Field.create("GPPWM2_DUTYIFERROR", 4233, FieldType.INT8); + public static final Field GPPWM2_PWMFREQUENCY = Field.create("GPPWM2_PWMFREQUENCY", 4234, FieldType.INT16); + public static final Field GPPWM2_ONABOVEDUTY = Field.create("GPPWM2_ONABOVEDUTY", 4236, FieldType.INT8); + public static final Field GPPWM2_OFFBELOWDUTY = Field.create("GPPWM2_OFFBELOWDUTY", 4237, FieldType.INT8); + public static final Field GPPWM2_LOADAXIS = Field.create("GPPWM2_LOADAXIS", 4238, FieldType.INT8, gppwm_channel_e); + public static final Field GPPWM2_PAD = Field.create("GPPWM2_PAD", 4239, FieldType.INT8); + public static final Field GPPWM2_TABLE = Field.create("GPPWM2_TABLE", 4256, FieldType.INT); + public static final Field GPPWM3_PIN = Field.create("GPPWM3_PIN", 4320, FieldType.INT8, output_pin_e); + public static final Field GPPWM3_DUTYIFERROR = Field.create("GPPWM3_DUTYIFERROR", 4321, FieldType.INT8); + public static final Field GPPWM3_PWMFREQUENCY = Field.create("GPPWM3_PWMFREQUENCY", 4322, FieldType.INT16); + public static final Field GPPWM3_ONABOVEDUTY = Field.create("GPPWM3_ONABOVEDUTY", 4324, FieldType.INT8); + public static final Field GPPWM3_OFFBELOWDUTY = Field.create("GPPWM3_OFFBELOWDUTY", 4325, FieldType.INT8); + public static final Field GPPWM3_LOADAXIS = Field.create("GPPWM3_LOADAXIS", 4326, FieldType.INT8, gppwm_channel_e); + public static final Field GPPWM3_PAD = Field.create("GPPWM3_PAD", 4327, FieldType.INT8); + public static final Field GPPWM3_TABLE = Field.create("GPPWM3_TABLE", 4344, FieldType.INT); + public static final Field GPPWM4_PIN = Field.create("GPPWM4_PIN", 4408, FieldType.INT8, output_pin_e); + public static final Field GPPWM4_DUTYIFERROR = Field.create("GPPWM4_DUTYIFERROR", 4409, FieldType.INT8); + public static final Field GPPWM4_PWMFREQUENCY = Field.create("GPPWM4_PWMFREQUENCY", 4410, FieldType.INT16); + public static final Field GPPWM4_ONABOVEDUTY = Field.create("GPPWM4_ONABOVEDUTY", 4412, FieldType.INT8); + public static final Field GPPWM4_OFFBELOWDUTY = Field.create("GPPWM4_OFFBELOWDUTY", 4413, FieldType.INT8); + public static final Field GPPWM4_LOADAXIS = Field.create("GPPWM4_LOADAXIS", 4414, FieldType.INT8, gppwm_channel_e); + public static final Field GPPWM4_PAD = Field.create("GPPWM4_PAD", 4415, FieldType.INT8); + public static final Field GPPWM4_TABLE = Field.create("GPPWM4_TABLE", 4432, FieldType.INT); + public static final Field WARNING_MESSAGE = Field.create("WARNING_MESSAGE", 6000, FieldType.INT); public static final Field BOOSTTABLEOPENLOOP = Field.create("BOOSTTABLEOPENLOOP", 6248, FieldType.INT); public static final Field BOOSTTABLECLOSEDLOOP = Field.create("BOOSTTABLECLOSEDLOOP", 6328, FieldType.INT); public static final Field PEDALTOTPSTABLE = Field.create("PEDALTOTPSTABLE", 6400, FieldType.INT); @@ -2403,7 +2597,7 @@ public class Fields { ENGINETYPE, ENGINESNIFFERRPMTHRESHOLD, INJECTOR_FLOW, - DIRECTSELFSTIMULATION, + UNUSED76B0, ACTIVATEAUXPID1, ISVERBOSEAUXPID1, ACTIVATEAUXPID2, @@ -2412,14 +2606,14 @@ public class Fields { ISVERBOSEAUXPID3, ACTIVATEAUXPID4, ISVERBOSEAUXPID4, - USEBIQUADANALOGFILTERING, + ISCJ125VERBOSE, CJ125ISUADIVIDED, CJ125ISLSU49, ETB_USE_TWO_WIRES, ISDOUBLESOLENOIDIDLE, SHOWSDCARDWARNING, CJ125ISURDIVIDED, - USETLE8888_HALL_MODE, + ISSUE_294_UNUSED, USETLE8888_CRANKING_HACK, USEINSTANTRPMFORIDLE, ABSOLUTEFUELPRESSURE, @@ -2427,7 +2621,7 @@ public class Fields { ROLLINGLAUNCHENABLED, ANTILAGENABLED, USERUNNINGMATHFORCRANKING, - ISSUE_294_25, + DISPLAYLOGICLEVELSINENGINESNIFFER, ISSUE_294_26, ISSUE_294_27, ISSUE_294_28, @@ -2504,8 +2698,8 @@ public class Fields { OVERRIDECRANKINGIGNITION, SENSORCHARTFREQUENCY, TRIGGER_TYPE, - TRIGGER_UNUSEDTRIGGERBIT0, - TRIGGER_UNUSEDTRIGGERBIT1, + TRIGGER_TODOREMOVEMEONEDAY0, + TRIGGER_TODOREMOVEMEONEDAY1, TRIGGER_USEONLYFIRSTCHANNEL, TRIGGER_UNUSEDBIT_4_3, TRIGGER_UNUSEDBIT_4_4, @@ -2646,13 +2840,13 @@ public class Fields { CANTXPIN, CANRXPIN, THROTTLEPEDALUPPINMODE, - DEBUGTIMERCALLBACK, + UNUSED711, IDLETHREADPERIODMS, CONSOLELOOPPERIODMS, LCDTHREADPERIODMS, GENERALPERIODICTHREADPERIODMS, TUNERSTUDIOSERIALSPEED, - CANDEVICEMODE, + ANUNUSED4BYTES, TRIGGERSIMULATORPINS1, TRIGGERSIMULATORPINS2, TRIGGERSIMULATORPINS3, @@ -2702,7 +2896,7 @@ public class Fields { HIP9011INTHOLDPIN, HIP9011INTHOLDPINMODE, VERBOSECANBASEADDRESS, - UNREALISTICRPMTHREASHOLD, + MC33_HVOLT, GPIOPINMODES1, GPIOPINMODES2, GPIOPINMODES3, @@ -2744,7 +2938,7 @@ public class Fields { MAX31855_CS7, MAX31855_CS8, SDCARDPERIODMS, - DEBUGSETTIMER, + UNUSED806, DEBUGMAPAVERAGING, STARTERRELAYDISABLEPIN, STARTERRELAYDISABLEMODE, @@ -2753,8 +2947,9 @@ public class Fields { MAPMINBUFFERLENGTH, IDLEPIDDEACTIVATIONTPSTHRESHOLD, STEPPERPARKINGEXTRASTEPS, - UNUSEDMIATANB2VVTRATIOFROM, - UNUSEDMIATANB2VVTRATIOTO, + UNUSEDANTILAGTIMEOUT, + ANTILAGRPMTRESHOLD, + STARTCRANKINGDURATION, TRIGGERERRORPIN, TRIGGERERRORPINMODE, ACRELAYPIN, @@ -2836,12 +3031,12 @@ public class Fields { TODOCLUTCHDOWNPININVERTED, USEHBRIDGES, MULTISPARKENABLE, - UNUSEDBIT_251_4, - UNUSEDBIT_251_5, - UNUSEDBIT_251_6, - UNUSEDBIT_251_7, - UNUSEDBIT_251_8, - UNUSEDBIT_251_9, + ENABLELAUNCHRETARD, + ENABLELAUNCHBOOST, + LAUNCHDISABLEBYSPEED, + ENABLECANVSS, + ENABLEINNOVATELC2, + SHOWHUMANREADABLEWARNING, UNUSEDBIT_251_10, UNUSEDBIT_251_11, UNUSEDBIT_251_12, @@ -2862,16 +3057,16 @@ public class Fields { UNUSEDBIT_251_27, UNUSEDBIT_251_28, UNUSEDBIT_251_29, - UNUSEDBIT_280_30, - UNUSEDBIT_280_31, + UNUSEDBIT_282_30, + UNUSEDBIT_282_31, ETBIO1_DIRECTIONPIN1, ETBIO1_DIRECTIONPIN2, ETBIO1_CONTROLPIN1, - ETBIO1_CONTROLPINMODE, + ETBIO1_DISABLEPIN, ETBIO2_DIRECTIONPIN1, ETBIO2_DIRECTIONPIN2, ETBIO2_CONTROLPIN1, - ETBIO2_CONTROLPINMODE, + ETBIO2_DISABLEPIN, BOOSTCONTROLPIN, BOOSTCONTROLPINMODE, ANTILAGACTIVATEPIN, @@ -2893,6 +3088,29 @@ public class Fields { LAUNCHFUELADDED, LAUNCHBOOSTDUTY, HARDCUTRPMRANGE, + LAUNCHADVANCERPMRANGE, + LAUNCHTPSTRESHOLD, + LAUNCHACTIVATEDELAY, + STFT_MAXIDLEREGIONRPM, + STFT_MAXOVERRUNLOAD, + STFT_MINPOWERLOAD, + STFT_DEADBAND, + STFT_MINCLT, + STFT_MINAFR, + STFT_MAXAFR, + STFT_STARTUPDELAY, + STFT_CELLCFGS1_MAXADD, + STFT_CELLCFGS1_MAXREMOVE, + STFT_CELLCFGS1_TIMECONSTANT, + STFT_CELLCFGS2_MAXADD, + STFT_CELLCFGS2_MAXREMOVE, + STFT_CELLCFGS2_TIMECONSTANT, + STFT_CELLCFGS3_MAXADD, + STFT_CELLCFGS3_MAXREMOVE, + STFT_CELLCFGS3_TIMECONSTANT, + STFT_CELLCFGS4_MAXADD, + STFT_CELLCFGS4_MAXREMOVE, + STFT_CELLCFGS4_TIMECONSTANT, VVTDISPLAYINVERTED, FUELCLOSEDLOOPCORRECTIONENABLED, ISVERBOSEIAC, @@ -3018,7 +3236,7 @@ public class Fields { TPS2MAX, STARTERCONTROLPIN, STARTSTOPBUTTONMODE, - UNUSEDFORMERWARMUPAFRPID, + MC33816_FLAG0, TACHPULSEPERREV, MAPERRORDETECTIONTOOLOW, MAPERRORDETECTIONTOOHIGH, @@ -3049,9 +3267,9 @@ public class Fields { STARTOFCRANKINGPRIMINGPULSE, AFTERCRANKINGIACTAPERDURATION, IACBYTPSTAPER, - UNUSEDERRORPIN, + AUXSERIALTXPIN, WARNINGLEDPIN, - UNUSED1234234, + AUXSERIALRXPIN, LIS302DLCSPIN, TPSACCELLENGTH, TPSACCELENRICHMENTTHRESHOLD, @@ -3066,6 +3284,7 @@ public class Fields { TPSDECELENLEANMENTMULTIPLIER, SLOWADCALPHA, DEBUGMODE, + AUXSERIALSPEED, BOOSTCUTPRESSURE, FSIOADC1, FSIOADC2, @@ -3095,16 +3314,11 @@ public class Fields { ALTERNATORPWMFREQUENCY, STORAGEMODE, VVTMODE, - BIQUAD_A0, - BIQUAD_A1, - BIQUAD_A2, - BIQUAD_B1, - BIQUAD_B2, - NBVVTINDEX, + TLE8888MODE, AUTOTUNECLTTHRESHOLD, AUTOTUNETPSROCTHRESHOLD, AUTOTUNETPSQUIETPERIOD, - POSTCRANKINGTARGETCLT, + UNUSED2432, POSTCRANKINGFACTOR, POSTCRANKINGDURATIONSEC, AUXTEMPSENSOR1_TEMPC_1, @@ -3264,6 +3478,40 @@ public class Fields { IDLERPMPID2_MINVALUE, IDLERPMPID2_MAXVALUE, IACPIDMULTTABLE, + CANVSSNBCTYPE, + GPPWM1_PIN, + GPPWM1_DUTYIFERROR, + GPPWM1_PWMFREQUENCY, + GPPWM1_ONABOVEDUTY, + GPPWM1_OFFBELOWDUTY, + GPPWM1_LOADAXIS, + GPPWM1_PAD, + GPPWM1_TABLE, + GPPWM2_PIN, + GPPWM2_DUTYIFERROR, + GPPWM2_PWMFREQUENCY, + GPPWM2_ONABOVEDUTY, + GPPWM2_OFFBELOWDUTY, + GPPWM2_LOADAXIS, + GPPWM2_PAD, + GPPWM2_TABLE, + GPPWM3_PIN, + GPPWM3_DUTYIFERROR, + GPPWM3_PWMFREQUENCY, + GPPWM3_ONABOVEDUTY, + GPPWM3_OFFBELOWDUTY, + GPPWM3_LOADAXIS, + GPPWM3_PAD, + GPPWM3_TABLE, + GPPWM4_PIN, + GPPWM4_DUTYIFERROR, + GPPWM4_PWMFREQUENCY, + GPPWM4_ONABOVEDUTY, + GPPWM4_OFFBELOWDUTY, + GPPWM4_LOADAXIS, + GPPWM4_PAD, + GPPWM4_TABLE, + WARNING_MESSAGE, BOOSTTABLEOPENLOOP, BOOSTTABLECLOSEDLOOP, PEDALTOTPSTABLE, diff --git a/java_console/models/src/com/rusefi/test/ReversePolishNotationParserTest.java b/java_console/models/src/com/rusefi/test/ReversePolishNotationParserTest.java index d2b6653cc5..03d174c48b 100644 --- a/java_console/models/src/com/rusefi/test/ReversePolishNotationParserTest.java +++ b/java_console/models/src/com/rusefi/test/ReversePolishNotationParserTest.java @@ -2,13 +2,13 @@ package com.rusefi.test; import com.fathzer.soft.javaluator.DoubleEvaluator; import com.fathzer.soft.javaluator.Operator; +import com.rusefi.InfixConverter; +import com.rusefi.config.generated.Fields; import org.junit.Test; import java.text.ParseException; -import java.util.Stack; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.fail; +import static org.junit.Assert.*; /** * @see DoubleEvaluator @@ -22,13 +22,13 @@ public class ReversePolishNotationParserTest { assertParseB("1 3 max", "max(1, 3)"); try { - assertParse("3 1 max", "max(1 3)"); + assertHumanToRPN("max(1 3)", "3 1 max"); fail("Error expected"); } catch (Throwable ignored) { // expected } - assertParse("log 3", "log 3 "); // todo: better handling? + assertHumanToRPN("log 3 ", "log 3"); // todo: better handling? assertParseB("0 fsio_setting", "fsio_setting(0)"); assertParseB("rpm 2 fsio_setting >", "rpm > fsio_setting(2)"); @@ -42,77 +42,48 @@ public class ReversePolishNotationParserTest { assertParseB("1 2 + 3 4 5 + / +", "1 + 2 + 3 / (4 +5 )"); - assertParse("rpm 0 >", "rpm > false"); - assertParse("rpm 0 >", "(rpm > false)"); + assertHumanToRPN("rpm > false", "rpm 0 >"); + assertHumanToRPN("(rpm > false)", "rpm 0 >"); assertParseB("rpm user0 > clt user2 > or", "(rpm > user0) or (clt > user2)"); assertParseB("1 2 | 3 |", "1 | 2 | 3"); assertParseB("rpm user0 > clt user2 > or vbatt user1 > or", "(rpm > user0) or (clt > user2) or (vbatt > user1)"); } private void assertParseB(String rpn, String expression) { - assertParse(rpn, expression); - String infix = getInfix(rpn); - System.out.println(infix); + assertHumanToRPN(expression, rpn); - assertEquals("infix recovery", getReplace(expression).toLowerCase(), getReplace(infix).toLowerCase()); + // humans line infix notation for some reason + String humanInfixForm = InfixConverter.getHumanInfixForm(rpn); + System.out.println(humanInfixForm); + + assertEquals("infix recovery", getReplace(expression).toLowerCase(), getReplace(humanInfixForm).toLowerCase()); } private String getReplace(String h) { return h.replaceAll("[\\(\\)]", "").replace(" ", ""); } - private void assertParse(String rpn, String expression) { + private void assertHumanToRPN(String inputExpression, String expectedRPN) { DoubleEvaluator evaluator = new DoubleEvaluator(); - evaluator.evaluate(expression.toLowerCase()); + evaluator.evaluate(inputExpression.toLowerCase()); - assertEquals(rpn, evaluator.getPosftfixExpression()); + assertEquals(expectedRPN, evaluator.getPosftfixExpression()); } - private String getInfix(String rpn) { - String tokens[] = rpn.split(" "); - Stack stack = new Stack<>(); + @Test + public void testRpnToHuman() { + assertEquals("if((fsio_analog_input(0) > 20), 0, 10)", InfixConverter.getHumanInfixForm("0 fsio_analog_input 20 > 0 10 if")); - for (String token : tokens) { - if (DoubleEvaluator.getFunction(token) != null) { - int pCount = DoubleEvaluator.getFunction(token).getMaximumArgumentCount(); - - StringBuilder sb = new StringBuilder(); - for (int i = 0; i < pCount; i++) { - if (i != 0) - sb.insert(0, ", "); - if (stack.isEmpty()) - throw new IllegalStateException("While getting " + pCount + "parameters for " + token); - sb.insert(0, stack.pop()); - } - - stack.push(token + "(" + sb + ")"); - - - } else if (Operator._1_OPERATORS.contains(token)) { - String a = stack.pop(); - - stack.push("(" + token + " " + a + ")"); - - } else if (takesTwoParameters(token)) { - if (stack.size() < 2) - throw new IllegalStateException("Not enough " + token); - String a = stack.pop(); - String b = stack.pop(); - stack.push("(" + b + " " + token + " " + a + ")"); - } else { - stack.push(token); - } - } - if (stack.size() != 1) - throw new IllegalStateException("Unexpected stack content: " + stack); - return stack.pop(); + assertTrue(InfixConverter.getHumanInfixFormOrError("0 fsoi_input 20 > 0 10 if").contains(Fields.FSIO_METHOD_FSIO_TABLE)); } - private boolean takesTwoParameters(String token) { - return Operator._2_OPERATORS.contains(token); + @Test + public void testListOfFunctions() { + String readableListOfFunctions = InfixConverter.getReadableListOfFunctions(); + assertTrue(readableListOfFunctions.contains(Fields.FSIO_METHOD_FSIO_DIGITAL_INPUT)); + assertTrue(readableListOfFunctions.contains(Fields.FSIO_METHOD_FSIO_TABLE)); } - @Test public void testUnaryMinus() { /** diff --git a/java_console/opensr5/opensr5.iml b/java_console/opensr5/opensr5.iml index a797b96e7c..4dc12e2190 100644 --- a/java_console/opensr5/opensr5.iml +++ b/java_console/opensr5/opensr5.iml @@ -10,5 +10,6 @@ + \ No newline at end of file diff --git a/java_console/opensr5/src/com/opensr5/Main.java b/java_console/opensr5/src/com/opensr5/Main.java index 89e3c6b75a..9236fdc104 100644 --- a/java_console/opensr5/src/com/opensr5/Main.java +++ b/java_console/opensr5/src/com/opensr5/Main.java @@ -1,8 +1,8 @@ package com.opensr5; -import com.opensr5.io.IniFileMetaInfo; -import com.opensr5.io.IniFileReader; -import com.opensr5.io.RawIniFile; +import com.opensr5.ini.IniFileMetaInfo; +import com.opensr5.ini.IniFileReader; +import com.opensr5.ini.RawIniFile; import java.io.File; @@ -10,7 +10,7 @@ public class Main { public static void main(String[] args) { System.out.println("OpenSR5 - load/program tune via serial port utility"); - System.out.println(" (c) Andrey Belomutskiy 2012-2019"); + System.out.println(" Andrey Belomutskiy, (c) 2012-2020\n"); System.out.println(" https://github.com/rusefi/opensr5_flash"); System.out.flush(); diff --git a/java_console/ui/src/com/rusefi/Launcher.java b/java_console/ui/src/com/rusefi/Launcher.java index fc7575f9f2..aecddee738 100644 --- a/java_console/ui/src/com/rusefi/Launcher.java +++ b/java_console/ui/src/com/rusefi/Launcher.java @@ -49,7 +49,7 @@ import static com.rusefi.ui.storage.PersistentConfiguration.getConfig; * @see EngineSnifferPanel */ public class Launcher { - public static final int CONSOLE_VERSION = 20200317; + public static final int CONSOLE_VERSION = 20200424; public static final String INI_FILE_PATH = System.getProperty("ini_file_path", ".."); public static final String INPUT_FILES_PATH = System.getProperty("input_files_path", ".."); public static final String TOOLS_PATH = System.getProperty("tools_path", "."); @@ -66,8 +66,8 @@ public class Launcher { private static final String TOOL_NAME_COMPILE = "compile"; private final String port; - // todo: the logic around 'fatalError' could be implemented nicer - private String fatalError; + // todo: the logic around 'criticalError' could be implemented nicer + private String criticalError; public static EngineSnifferPanel engineSnifferPanel; private static SensorCentral.SensorListener wrongVersionListener; @@ -93,8 +93,8 @@ public class Launcher { default: text = ""; } - if (fatalError != null) { - text = fatalError; + if (criticalError != null) { + text = criticalError; g.setColor(Color.red); } int labelWidth = g.getFontMetrics().stringWidth(text); @@ -149,8 +149,8 @@ public class Launcher { MessagesCentral.getInstance().addListener(new MessagesCentral.MessageListener() { @Override public void onMessage(Class clazz, String message) { - if (message.startsWith(ConnectionStatus.FATAL_MESSAGE_PREFIX)) - fatalError = message; + if (message.startsWith(Fields.CRITICAL_PREFIX)) + criticalError = message; } }); diff --git a/java_console/ui/src/com/rusefi/ldmp/generated/ElectronicThrottleMeta.java b/java_console/ui/src/com/rusefi/ldmp/generated/ElectronicThrottleMeta.java index 2c7f2a476f..df0d2d4784 100644 --- a/java_console/ui/src/com/rusefi/ldmp/generated/ElectronicThrottleMeta.java +++ b/java_console/ui/src/com/rusefi/ldmp/generated/ElectronicThrottleMeta.java @@ -3,6 +3,7 @@ package com.rusefi.ldmp.generated; import com.rusefi.ldmp.*; public class ElectronicThrottleMeta { + /* todo: restore this functionality public static final Request[] CONTENT = new Request[]{ new IfRequest("Engine", "hasEtbPedalPositionSensor", new Request[]{ @@ -41,4 +42,5 @@ public class ElectronicThrottleMeta { new TextRequest("No_Pedal_Sensor"), }), }; + */ } \ No newline at end of file diff --git a/java_console/ui/src/com/rusefi/ldmp/generated/TpsMeta.java b/java_console/ui/src/com/rusefi/ldmp/generated/TpsMeta.java index bc11b74d19..712cb416f1 100644 --- a/java_console/ui/src/com/rusefi/ldmp/generated/TpsMeta.java +++ b/java_console/ui/src/com/rusefi/ldmp/generated/TpsMeta.java @@ -3,29 +3,4 @@ package com.rusefi.ldmp.generated; import com.rusefi.ldmp.*; public class TpsMeta { - public static final Request[] PEDAL_SECTION = new Request[]{ - new TextRequest("Analog_MCU_reads"), - new ConfigRequest("throttlePedalPositionAdcChannel"), - }; - public static final Request[] TPS_SECTION = new Request[]{ - new SensorRequest("TPS"), - new TextRequest("EOL"), - new TextRequest("Analog_MCU_reads"), - new FieldRequest("Engine", "tpsVoltageMCU"), - new TextRequest("Volts"), - new TextRequest("from_pin"), - new ConfigRequest("tps1_1AdcChannel"), - new TextRequest("EOL"), - new TextRequest("Analog_ECU_reads"), - new FieldRequest("Engine", "tpsVoltageBoard"), - new TextRequest("Rdivider"), - new ConfigRequest("analogInputDividerCoefficient"), - new TextRequest("EOL"), - new TextRequest("Current_ADC"), - new FieldRequest("Engine", "currentTpsAdc"), - new TextRequest("interpolate_between"), - new ConfigRequest("tpsMax"), - new TextRequest("and"), - new ConfigRequest("tpsMin"), - }; } \ No newline at end of file diff --git a/java_console/ui/src/com/rusefi/maintenance/FirmwareFlasher.java b/java_console/ui/src/com/rusefi/maintenance/FirmwareFlasher.java index 4131c8989b..9d2e2ea64b 100644 --- a/java_console/ui/src/com/rusefi/maintenance/FirmwareFlasher.java +++ b/java_console/ui/src/com/rusefi/maintenance/FirmwareFlasher.java @@ -19,9 +19,8 @@ import static com.rusefi.ui.storage.PersistentConfiguration.getConfig; * 2/4/15 */ public class FirmwareFlasher { - // Even on Windows openOCD insists on "/" for path separator - public static final String IMAGE_FILE = INPUT_FILES_PATH + File.separator + "rusefi.bin"; - public static final String IMAGE_NO_ASSERTS_FILE = INPUT_FILES_PATH + File.separator + "rusefi_no_asserts.bin"; + public static final String IMAGE_FILE = INPUT_FILES_PATH + "/" + "rusefi.bin"; + public static final String IMAGE_NO_ASSERTS_FILE = INPUT_FILES_PATH + "/" + "rusefi_no_asserts.bin"; /** * SWD ST-LINK/V2 mode */ diff --git a/java_console/ui/src/com/rusefi/ui/SettingsTab.java b/java_console/ui/src/com/rusefi/ui/SettingsTab.java index 807e30bbe7..48d4a1cbf1 100644 --- a/java_console/ui/src/com/rusefi/ui/SettingsTab.java +++ b/java_console/ui/src/com/rusefi/ui/SettingsTab.java @@ -1,5 +1,8 @@ package com.rusefi.ui; +import com.opensr5.ini.DialogModel; +import com.opensr5.ini.IniFileModel; +import com.rusefi.Launcher; import com.rusefi.config.Field; import com.rusefi.config.FieldType; import com.rusefi.config.FieldsMap; @@ -15,8 +18,8 @@ import java.util.ArrayList; import java.util.Map; import java.util.concurrent.atomic.AtomicBoolean; -import static com.rusefi.ui.config.IniFileModel.RUSEFI_INI_PREFIX; -import static com.rusefi.ui.config.IniFileModel.RUSEFI_INI_SUFFIX; +import static com.opensr5.ini.IniFileModel.RUSEFI_INI_PREFIX; +import static com.opensr5.ini.IniFileModel.RUSEFI_INI_SUFFIX; /** * @see EnumConfigField @@ -36,7 +39,7 @@ public class SettingsTab { } public void showContent() { - final Map dialogs = IniFileModel.getInstance().getDialogs(); + final Map dialogs = IniFileModel.getInstance(Launcher.INI_FILE_PATH).getDialogs(); if (dialogs.isEmpty()) { content.removeAll(); content.add(new JLabel("Meta data not found: " + RUSEFI_INI_PREFIX + "*" + RUSEFI_INI_SUFFIX)); @@ -128,7 +131,7 @@ public class SettingsTab { dialog.setText(name); dialogBody.removeAll(); - DialogModel m = IniFileModel.getInstance().getDialogs().get(name); + DialogModel m = IniFileModel.getInstance(Launcher.INI_FILE_PATH).getDialogs().get(name); dialogBody.setLayout(new GridLayout(m.getFields().size(), 1)); diff --git a/java_console/ui/src/com/rusefi/ui/WarningPanel.java b/java_console/ui/src/com/rusefi/ui/WarningPanel.java index b4fa8bc637..f24f7dc819 100644 --- a/java_console/ui/src/com/rusefi/ui/WarningPanel.java +++ b/java_console/ui/src/com/rusefi/ui/WarningPanel.java @@ -1,8 +1,8 @@ package com.rusefi.ui; import com.rusefi.FileLog; +import com.rusefi.config.generated.Fields; import com.rusefi.core.MessagesCentral; -import com.rusefi.io.ConnectionStatus; import com.rusefi.ui.util.UiUtils; import javax.swing.*; @@ -18,7 +18,7 @@ public class WarningPanel { private final JLabel label = new JLabel(); private final JButton reset = new JButton("clear warning"); - private final Timer fatalBlinking = new Timer(1000, new ActionListener() { + private final Timer criticalErrorBlinking = new Timer(1000, new ActionListener() { @Override public void actionPerformed(ActionEvent e) { label.setVisible(!label.isVisible()); @@ -50,9 +50,9 @@ public class WarningPanel { if (haveFatalError) return; - if (message.startsWith(ConnectionStatus.FATAL_MESSAGE_PREFIX)) { + if (message.startsWith(Fields.CRITICAL_PREFIX)) { haveFatalError = true; - fatalBlinking.start(); + criticalErrorBlinking.start(); label.setText(message); return; } diff --git a/java_console/ui/src/com/rusefi/ui/etb/EtbCommandsPanel.java b/java_console/ui/src/com/rusefi/ui/etb/EtbCommandsPanel.java index 9b8ce34ccc..ce81cf5867 100644 --- a/java_console/ui/src/com/rusefi/ui/etb/EtbCommandsPanel.java +++ b/java_console/ui/src/com/rusefi/ui/etb/EtbCommandsPanel.java @@ -59,7 +59,8 @@ public class EtbCommandsPanel { content.add(mockPpsPanel); - content.add(LiveDocPanel.createPanel("ETB", ElectronicThrottleMeta.CONTENT)); + // todo: restore this functionality + // content.add(LiveDocPanel.createPanel("ETB", ElectronicThrottleMeta.CONTENT)); content.add(new EnumConfigField(Fields.DEBUGMODE, "Debug Mode").getContent()); diff --git a/java_console/ui/src/com/rusefi/ui/livedocs/LiveDocPanel.java b/java_console/ui/src/com/rusefi/ui/livedocs/LiveDocPanel.java index 66b38d27f0..977394929e 100644 --- a/java_console/ui/src/com/rusefi/ui/livedocs/LiveDocPanel.java +++ b/java_console/ui/src/com/rusefi/ui/livedocs/LiveDocPanel.java @@ -1,6 +1,7 @@ package com.rusefi.ui.livedocs; import com.opensr5.ConfigurationImage; +import com.rusefi.Launcher; import com.rusefi.binaryprotocol.BinaryProtocol; import com.rusefi.config.Field; import com.rusefi.config.generated.Fields; @@ -8,8 +9,8 @@ import com.rusefi.core.Sensor; import com.rusefi.core.SensorCentral; import com.rusefi.ldmp.*; import com.rusefi.ldmp.generated.*; -import com.rusefi.ui.config.DialogModel; -import com.rusefi.ui.config.IniFileModel; +import com.opensr5.ini.DialogModel; +import com.opensr5.ini.IniFileModel; import com.rusefi.ui.livedocs.controls.Toolbox; import com.rusefi.ui.util.UiUtils; import com.rusefi.ui.widgets.DetachedSensor; @@ -162,7 +163,7 @@ public class LiveDocPanel { } private static String getTooltipText(String configurationFieldName) { - DialogModel.Field dialogField = IniFileModel.getInstance().getField(configurationFieldName); + DialogModel.Field dialogField = IniFileModel.getInstance(Launcher.INI_FILE_PATH).getField(configurationFieldName); if (dialogField == null) { return "Configuration " + configurationFieldName; } @@ -223,7 +224,8 @@ public class LiveDocPanel { liveDocs.add(createPanel("Idle", IdleThreadMeta.CONTENT), CONSTRAINTS); - liveDocs.add(createPanel("ETB", ElectronicThrottleMeta.CONTENT), CONSTRAINTS); + // todo: restore this functionality + // liveDocs.add(createPanel("ETB", ElectronicThrottleMeta.CONTENT), CONSTRAINTS); return liveDocs; } @@ -237,8 +239,12 @@ public class LiveDocPanel { liveDocs.add(createPanel("Intake Air Sensor", ThermistorsMeta.CONTENT, "IAT", Fields.LDS_IAT_STATE_INDEX ), CONSTRAINTS); +/* + One day we shall have this back liveDocs.add(createPanel("Throttle Position Sensor", TpsMeta.TPS_SECTION), CONSTRAINTS); + */ + liveDocs.add(createPanel("Trigger", TriggerDecoderMeta.CONTENT), CONSTRAINTS); return liveDocs; diff --git a/java_console/ui/src/com/rusefi/ui/widgets/AnyCommand.java b/java_console/ui/src/com/rusefi/ui/widgets/AnyCommand.java index 1e00820836..16a625bd96 100644 --- a/java_console/ui/src/com/rusefi/ui/widgets/AnyCommand.java +++ b/java_console/ui/src/com/rusefi/ui/widgets/AnyCommand.java @@ -1,7 +1,10 @@ package com.rusefi.ui.widgets; import com.fathzer.soft.javaluator.DoubleEvaluator; +import com.rusefi.AutoTest; import com.rusefi.FileLog; +import com.rusefi.InfixConverter; +import com.rusefi.core.MessagesCentral; import com.rusefi.io.CommandQueue; import com.rusefi.ui.RecentCommands; import com.rusefi.ui.storage.Node; @@ -17,6 +20,7 @@ import java.awt.event.ActionListener; import java.awt.event.KeyAdapter; import java.awt.event.KeyEvent; import java.util.concurrent.atomic.AtomicInteger; +import java.util.function.Function; /** * Date: 3/20/13 @@ -24,6 +28,7 @@ import java.util.concurrent.atomic.AtomicInteger; */ public class AnyCommand { public static final String KEY = "last_value"; + private static final String DECODE_RPN = "decode_rpn"; private final JTextComponent text; private JPanel content = new JPanel(new FlowLayout(FlowLayout.LEFT)); @@ -107,6 +112,12 @@ public class AnyCommand { if (!isValidInput(rawCommand)) return; String cmd = prepareCommand(rawCommand); + if (cmd == null) { + /** + * {@link #DECODE_RPN} for example does not send out anything + */ + return; + } if (listener != null) listener.onSend(); int timeout = CommandQueue.getTimeout(cmd); @@ -117,9 +128,15 @@ public class AnyCommand { public static String prepareCommand(String rawCommand) { try { - if (rawCommand.startsWith("eval ")) { + if (rawCommand.startsWith("eval" + " ")) { return prepareEvalCommand(rawCommand); - } else if (rawCommand.startsWith("set_fsio_expression ")) { + } else if (rawCommand.toLowerCase().startsWith("stim_check" + " ")) { + handleStimulationSelfCheck(rawCommand); + return null; + } else if (rawCommand.toLowerCase().startsWith(DECODE_RPN + " ")) { + handleDecodeRpn(rawCommand); + return null; + } else if (rawCommand.toLowerCase().startsWith("set_fsio_expression" + " ")) { return prepareSetFsioCommand(rawCommand); } else { return rawCommand; @@ -130,6 +147,39 @@ public class AnyCommand { } } + /** + * stim_check 3000 5 30 + * would set RPM to 3000, give it 5 seconds to settle, and test for 30 seconds + */ + private static void handleStimulationSelfCheck(String rawCommand) { + String[] parts = rawCommand.split(" ", 4); + if (parts.length != 4) { + MessagesCentral.getInstance().postMessage(AnyCommand.class, "Invalid command length " + parts); + return; // let's ignore invalid command + } + int rpm = Integer.parseInt(parts[1]); + int settleTime = Integer.parseInt(parts[2]); + int durationTime = Integer.parseInt(parts[3]); + new Thread(new Runnable() { + @Override + public void run() { + MessagesCentral.getInstance().postMessage(AnyCommand.class, "Will test with RPM " + rpm + ", settle time" + settleTime + "s and duration" + durationTime + "s"); + Function callback = new Function() { + @Override + public Object apply(String status) { + if (status == null) { + MessagesCentral.getInstance().postMessage(AnyCommand.class, rpm + " worked!"); + } else { + MessagesCentral.getInstance().postMessage(AnyCommand.class, rpm + " failed " + status); + } + return null; + } + }; + AutoTest.assertRpmDoesNotJump(rpm, settleTime, durationTime, callback); + } + }).start(); + } + private static String prepareSetFsioCommand(String rawCommand) { String[] parts = rawCommand.split(" ", 3); if (parts.length != 3) @@ -137,12 +187,23 @@ public class AnyCommand { return "set_rpn_expression " + parts[1] + " " + quote(infix2postfix(unquote(parts[2]))); } + private static void handleDecodeRpn(String rawCommand) { + String[] parts = rawCommand.split(" ", 2); + if (parts.length != 2) { + MessagesCentral.getInstance().postMessage(AnyCommand.class, "Failed to parse, one argument expected"); + return; + } + String argument = unquote(parts[1]); + String humanForm = InfixConverter.getHumanInfixFormOrError(argument); + MessagesCentral.getInstance().postMessage(AnyCommand.class, "Human form is \"" + humanForm + "\""); + } + private static String prepareEvalCommand(String rawCommand) { String[] parts = rawCommand.split(" ", 2); if (parts.length != 2) return rawCommand; // let's ignore invalid command - return "rpn_eval " + quote(infix2postfix(unquote(parts[1]))); + return "rpn_eval" + " " + quote(infix2postfix(unquote(parts[1]))); } private static String quote(String s) { @@ -154,7 +215,7 @@ public class AnyCommand { } public static String unquote(String quoted) { - quoted = quoted.trim(); + quoted = quoted.trim().replace('\u201C', '"').replace('\u201D', '"'); if (quoted.charAt(0) == '"') return quoted.substring(1, quoted.length() - 1); return quoted; // ignoring invalid input diff --git a/java_console/ui/src/com/rusefi/ui/widgets/test/AnyCommandTest.java b/java_console/ui/src/com/rusefi/ui/widgets/test/AnyCommandTest.java index 29b97a4e07..2504ac45c2 100644 --- a/java_console/ui/src/com/rusefi/ui/widgets/test/AnyCommandTest.java +++ b/java_console/ui/src/com/rusefi/ui/widgets/test/AnyCommandTest.java @@ -25,4 +25,13 @@ public class AnyCommandTest { // todo: parameter order needs to be in postfix form assertEquals("set_rpn_expression 1 \"rpm fsio_setting 0 >\"", AnyCommand.prepareCommand("set_fsio_expression 1 \"rpm > fsio_setting 0\"")); } + + @Test + public void testSetFSIOexpressionWithFunnyQuotes() { + assertEquals("tps > 10", AnyCommand.unquote("\"tps > 10\"")); + assertEquals("tps > 10", AnyCommand.unquote("\u201Ctps > 10\u201D")); + + + assertEquals("set_rpn_expression 1 \"tps 10 >\"", AnyCommand.prepareCommand("Set_fsio_expression 1 \u201Ctps > 10\u201D")); + } } diff --git a/java_console/ui/ui.iml b/java_console/ui/ui.iml index 91616b7195..1244b95131 100644 --- a/java_console/ui/ui.iml +++ b/java_console/ui/ui.iml @@ -21,5 +21,6 @@ + \ No newline at end of file diff --git a/java_tools/ConfigDefinition.jar b/java_tools/ConfigDefinition.jar index c6e15c8e74..fbe4f0887a 100644 Binary files a/java_tools/ConfigDefinition.jar and b/java_tools/ConfigDefinition.jar differ diff --git a/java_tools/configuration_definition/src/com/rusefi/ConfigDefinition.java b/java_tools/configuration_definition/src/com/rusefi/ConfigDefinition.java index 9257d537c4..6acd0c282e 100644 --- a/java_tools/configuration_definition/src/com/rusefi/ConfigDefinition.java +++ b/java_tools/configuration_definition/src/com/rusefi/ConfigDefinition.java @@ -20,9 +20,9 @@ import java.util.List; @SuppressWarnings("StringConcatenationInsideStringBufferAppend") public class ConfigDefinition { public static final String EOL = "\n"; - public static final String GENERATED_AUTOMATICALLY_TAG = LazyFile.LAZY_FILE_TAG + "ConfigDefinition.jar based on "; public static String MESSAGE; + public static String TOOL = "(unknown script)"; private static final String ROM_RAIDER_XML_TEMPLATE = "rusefi_template.xml"; public static final String KEY_DEFINITION = "-definition"; private static final String KEY_ROM_INPUT = "-romraider"; @@ -42,6 +42,10 @@ public class ConfigDefinition { public static boolean needZeroInit = true; public static String definitionInputFile = null; + public static String getGeneratedAutomaticallyTag() { + return LazyFile.LAZY_FILE_TAG + "ConfigDefinition.jar based on " + TOOL + " "; + } + public static void main(String[] args) throws IOException { try { doJob(args); @@ -81,7 +85,9 @@ public class ConfigDefinition { for (int i = 0; i < args.length - 1; i += 2) { String key = args[i]; - if (key.equals(KEY_DEFINITION)) { + if (key.equals("-tool")) { + ConfigDefinition.TOOL = args[i + 1]; + } else if (key.equals(KEY_DEFINITION)) { definitionInputFile = args[i + 1]; } else if (key.equals(KEY_TS_DESTINATION)) { tsPath = args[i + 1]; @@ -116,7 +122,7 @@ public class ConfigDefinition { } } - MESSAGE = GENERATED_AUTOMATICALLY_TAG + definitionInputFile + " " + new Date(); + MESSAGE = getGeneratedAutomaticallyTag() + definitionInputFile + " " + new Date(); SystemOut.println("Reading from " + definitionInputFile); @@ -214,7 +220,7 @@ public class ConfigDefinition { SystemOut.println("Reading from " + inputFileName); SystemOut.println("Writing to " + outputFileName); - VariableRegistry.INSTANCE.put("generator_message", ConfigDefinition.GENERATED_AUTOMATICALLY_TAG + new Date()); + VariableRegistry.INSTANCE.put("generator_message", ConfigDefinition.getGeneratedAutomaticallyTag() + new Date()); File inputFile = new File(inputFileName); diff --git a/java_tools/configuration_definition/src/com/rusefi/ReaderState.java b/java_tools/configuration_definition/src/com/rusefi/ReaderState.java index b6cb02f06c..698b4221f0 100644 --- a/java_tools/configuration_definition/src/com/rusefi/ReaderState.java +++ b/java_tools/configuration_definition/src/com/rusefi/ReaderState.java @@ -26,6 +26,7 @@ public class ReaderState { private static final String STRUCT_NO_PREFIX = "struct_no_prefix "; private static final String STRUCT = "struct "; private static final String DEFINE_CONSTRUCTOR = "define_constructor"; + public static final char MULT_TOKEN = '*'; public Stack stack = new Stack<>(); public Map tsCustomSize = new HashMap<>(); public Map tsCustomLine = new HashMap<>(); @@ -80,7 +81,7 @@ public class ReaderState { customSize = customSize.replaceAll("x", "*"); line = VariableRegistry.INSTANCE.applyVariables(line); - int multPosition = customSize.indexOf('*'); + int multPosition = customSize.indexOf(MULT_TOKEN); if (multPosition != -1) { String firstPart = customSize.substring(0, multPosition); int first; diff --git a/java_tools/configuration_definition/src/com/rusefi/VariableRegistry.java b/java_tools/configuration_definition/src/com/rusefi/VariableRegistry.java index ece519d34b..dc04306c20 100644 --- a/java_tools/configuration_definition/src/com/rusefi/VariableRegistry.java +++ b/java_tools/configuration_definition/src/com/rusefi/VariableRegistry.java @@ -9,11 +9,13 @@ import java.util.regex.Matcher; import java.util.regex.Pattern; import static com.rusefi.ConfigDefinition.EOL; +import static com.rusefi.ReaderState.MULT_TOKEN; /** * 3/30/2015 */ -public class VariableRegistry extends TreeMap { +public class VariableRegistry { + private TreeMap data = new TreeMap<>(String.CASE_INSENSITIVE_ORDER); public static final VariableRegistry INSTANCE = new VariableRegistry(); private final Pattern VAR = Pattern.compile("(@@(.*?)@@)"); @@ -24,7 +26,6 @@ public class VariableRegistry extends TreeMap { private final Map javaDefinitions = new TreeMap<>(String.CASE_INSENSITIVE_ORDER); private VariableRegistry() { - super(String.CASE_INSENSITIVE_ORDER); } /** @@ -42,21 +43,29 @@ public class VariableRegistry extends TreeMap { // key = - if (!containsKey(key)) + if (!data.containsKey(key)) throw new IllegalStateException("No such variable: " + key); - String s = get(key); + String s = data.get(key); line = m.replaceFirst(s); } return line; } public void register(String var, String value) { - if (containsKey(var)) { + if (data.containsKey(var)) { SystemOut.println("Not redefining " + var); return; } + value = applyVariables(value); + int multPosition = value.indexOf(MULT_TOKEN); + if (multPosition != -1) { + Integer first = Integer.valueOf(value.substring(0, multPosition)); + Integer second = Integer.valueOf(value.substring(multPosition + 1)); + value = String.valueOf(first * second); + } + SystemOut.println("Registering " + var + " as " + value); - put(var, value); + data.put(var, value); cAllDefinitions.put(var, "#define " + var + " " + value + EOL); tryToRegisterAsInteger(var, value); @@ -101,7 +110,7 @@ public class VariableRegistry extends TreeMap { SystemOut.println("Writing to " + fileName); LazyFile cHeader = new LazyFile(fileName); - cHeader.write("//\n// " + ConfigDefinition.GENERATED_AUTOMATICALLY_TAG + ConfigDefinition.definitionInputFile + "\n//\n\n"); + cHeader.write("//\n// " + ConfigDefinition.getGeneratedAutomaticallyTag() + ConfigDefinition.definitionInputFile + "\n//\n\n"); cHeader.write(getDefinesSection()); cHeader.close(); } @@ -119,4 +128,18 @@ public class VariableRegistry extends TreeMap { result.append(value); return result.toString(); } + + public void clear() { + data.clear(); + cAllDefinitions.clear(); + javaDefinitions.clear(); + } + + public void put(String key, String value) { + data.put(key, value); + } + + public String get(Object key) { + return data.get(key); + } } diff --git a/java_tools/configuration_definition/src/com/rusefi/test/ConfigFieldParserTest.java b/java_tools/configuration_definition/src/com/rusefi/test/ConfigFieldParserTest.java index bdc336aadb..89cfecb7f9 100644 --- a/java_tools/configuration_definition/src/com/rusefi/test/ConfigFieldParserTest.java +++ b/java_tools/configuration_definition/src/com/rusefi/test/ConfigFieldParserTest.java @@ -12,6 +12,7 @@ import java.io.BufferedReader; import java.io.IOException; import java.io.StringReader; import java.util.Arrays; +import java.util.Collections; import static org.junit.Assert.*; @@ -51,6 +52,46 @@ public class ConfigFieldParserTest { assertEquals(16, TypesHelper.getElementSize(state, "pid_s")); } + @Test + public void multiplicationInDefine() throws IOException { + String test = "struct pid_s\n" + + "#define ERROR_BUFFER_SIZE 120\n" + + "#define ERROR_BUFFER_COUNT 120\n" + + "#define RESULT @@ERROR_BUFFER_SIZE@@*@@ERROR_BUFFER_COUNT@@\n" + + "\tint16_t periodMs;PID dTime;\"ms\", 1, 0, 0, 3000, 0\n" + + "end_struct\n" + + ""; + + VariableRegistry.INSTANCE.clear(); + BufferedReader reader = new BufferedReader(new StringReader(test)); + new ReaderState().readBufferedReader(reader, Collections.emptyList()); + + assertEquals("#define ERROR_BUFFER_COUNT 120\n" + + "#define ERROR_BUFFER_SIZE 120\n" + + "#define RESULT 14400\n", VariableRegistry.INSTANCE.getDefinesSection()); + } + + @Test + public void useCustomType() throws IOException { + ReaderState state = new ReaderState(); + String test = "struct pid_s\n" + + "#define ERROR_BUFFER_SIZE 120\n" + + "\tcustom critical_error_message_t @@ERROR_BUFFER_SIZE@@ string, ASCII, @OFFSET@, @@ERROR_BUFFER_SIZE@@\n" + + "\tcritical_error_message_t var;\n" + + "\tint16_t periodMs;PID dTime;\"ms\", 1, 0, 0, 3000, 0\n" + + "end_struct\n" + + ""; + BufferedReader reader = new BufferedReader(new StringReader(test)); + + JavaFieldsConsumer javaFieldsConsumer = new TestJavaFieldsConsumer(state); + state.readBufferedReader(reader, Arrays.asList(javaFieldsConsumer)); + + assertEquals("\tpublic static final Field VAR = Field.create(\"VAR\", 0, FieldType.INT);\n" + + "\tpublic static final Field PERIODMS = Field.create(\"PERIODMS\", 120, FieldType.INT16);\n", + javaFieldsConsumer.getJavaFieldsWriter()); + + } + @Test public void testFsioVisible() throws IOException { { diff --git a/java_tools/ts_screenshots/.gitignore b/java_tools/ts_screenshots/.gitignore new file mode 100644 index 0000000000..e72f0e6eb6 --- /dev/null +++ b/java_tools/ts_screenshots/.gitignore @@ -0,0 +1,5 @@ +inc +config +TunerStudio.properties +lib +images diff --git a/java_tools/ts_screenshots/.idea/encodings.xml b/java_tools/ts_screenshots/.idea/encodings.xml new file mode 100644 index 0000000000..15a15b218a --- /dev/null +++ b/java_tools/ts_screenshots/.idea/encodings.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/java_tools/ts_screenshots/.idea/libraries/3rd_party.xml b/java_tools/ts_screenshots/.idea/libraries/3rd_party.xml new file mode 100644 index 0000000000..da67eac1b1 --- /dev/null +++ b/java_tools/ts_screenshots/.idea/libraries/3rd_party.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/java_tools/ts_screenshots/.idea/libraries/TunerStudioMS.xml b/java_tools/ts_screenshots/.idea/libraries/TunerStudioMS.xml new file mode 100644 index 0000000000..186fad7202 --- /dev/null +++ b/java_tools/ts_screenshots/.idea/libraries/TunerStudioMS.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/java_tools/ts_screenshots/.idea/libraries/serial.xml b/java_tools/ts_screenshots/.idea/libraries/serial.xml new file mode 100644 index 0000000000..e86715eea8 --- /dev/null +++ b/java_tools/ts_screenshots/.idea/libraries/serial.xml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/java_tools/ts_screenshots/.idea/misc.xml b/java_tools/ts_screenshots/.idea/misc.xml new file mode 100644 index 0000000000..d5d79e0ca5 --- /dev/null +++ b/java_tools/ts_screenshots/.idea/misc.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/java_tools/ts_screenshots/.idea/modules.xml b/java_tools/ts_screenshots/.idea/modules.xml new file mode 100644 index 0000000000..6b7c1a6d04 --- /dev/null +++ b/java_tools/ts_screenshots/.idea/modules.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/java_tools/ts_screenshots/.idea/vcs.xml b/java_tools/ts_screenshots/.idea/vcs.xml new file mode 100644 index 0000000000..b2bdec2d71 --- /dev/null +++ b/java_tools/ts_screenshots/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/java_tools/ts_screenshots/screen/screen.iml b/java_tools/ts_screenshots/screen/screen.iml new file mode 100644 index 0000000000..348f236b51 --- /dev/null +++ b/java_tools/ts_screenshots/screen/screen.iml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/java_tools/ts_screenshots/screen/src/ScreenCaptureLauncher.java b/java_tools/ts_screenshots/screen/src/ScreenCaptureLauncher.java new file mode 100644 index 0000000000..39f13c0e74 --- /dev/null +++ b/java_tools/ts_screenshots/screen/src/ScreenCaptureLauncher.java @@ -0,0 +1,23 @@ +import com.rusefi.ScreenGenerator; + +public class ScreenCaptureLauncher { + public static void main(String[] args) throws Exception { + startTunerStudio(args); + ScreenGenerator.main(args); + } + + private static void startTunerStudio(String[] args) { + Thread t = new Thread(() -> { + try { + TunerStudio.main(args); + } catch (Exception e) { + e.printStackTrace(); + throw new IllegalStateException(e); + } + }); + + t.setDaemon(false); + t.start(); + } + +} diff --git a/java_tools/ts_screenshots/screen/src/com/rusefi/Content.java b/java_tools/ts_screenshots/screen/src/com/rusefi/Content.java new file mode 100644 index 0000000000..6c36282a36 --- /dev/null +++ b/java_tools/ts_screenshots/screen/src/com/rusefi/Content.java @@ -0,0 +1,18 @@ +package com.rusefi; + +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlElementWrapper; +import javax.xml.bind.annotation.XmlRootElement; +import java.util.ArrayList; +import java.util.List; + +@XmlRootElement +public class Content { + private List menus = new ArrayList<>(); + + @XmlElementWrapper + @XmlElement(name = "keyword") + public List getTopLevelMenus() { + return menus; + } +} diff --git a/java_tools/ts_screenshots/screen/src/com/rusefi/ScreenGenerator.java b/java_tools/ts_screenshots/screen/src/com/rusefi/ScreenGenerator.java new file mode 100644 index 0000000000..455fe38b84 --- /dev/null +++ b/java_tools/ts_screenshots/screen/src/com/rusefi/ScreenGenerator.java @@ -0,0 +1,322 @@ +package com.rusefi; + +import com.opensr5.ini.IniFileModel; + +import javax.imageio.ImageIO; +import javax.swing.*; +import javax.xml.bind.JAXBContext; +import javax.xml.bind.JAXBException; +import javax.xml.bind.Marshaller; +import java.awt.*; +import java.awt.image.BufferedImage; +import java.awt.image.RasterFormatException; +import java.io.*; +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; +import java.util.*; +import java.util.List; +import java.util.concurrent.atomic.AtomicReference; + +public class ScreenGenerator { + public static final String TS_DIALOG = "com.efiAnalytics.ui.dg"; + public static final String PNG = "png"; + private static final int MENU_CLICK_DELAY = 300; + private static final int TOP_MENU_CLICK_DELAY = 1000; + private static ArrayList topLevelButtons = new ArrayList<>(); + + private static final String DESTINATION = "images" + File.separator; + + static Content content = new Content(); + + public static void main(String[] args) throws Exception { + IniFileModel iniFileModel = new IniFileModel(); + iniFileModel.readIniFile("../../firmware/tunerstudio"); + + new File(DESTINATION).mkdirs(); + + Frame mainFrame = findMainFrame(); + + while (topLevelButtons.isEmpty()) { + visitComponents(mainFrame, "", (parent, component) -> { + if (component instanceof AbstractButton) { + AbstractButton ab = (AbstractButton) component; + System.out.println("topLevelButton " + ab.getText()); + + if (isTopLevelMenuButton(component)) { + topLevelButtons.add(ab); + } + } + }); + Thread.sleep(1000); + } + + System.out.println("Done discovering buttons, " + topLevelButtons.size()); + + handleTopLevelButtons(mainFrame, topLevelButtons); + } + + private static void writeXml(Content content) throws JAXBException, IOException { + JAXBContext jaxbContext = JAXBContext.newInstance(Content.class); + + Marshaller marshaller = jaxbContext.createMarshaller(); + + StringWriter xmlWriter = new StringWriter(); + marshaller.marshal(content, xmlWriter); + System.out.println(xmlWriter.toString()); + + marshaller.marshal(content, new FileWriter("output.xml")); + } + + + private static Frame findMainFrame() throws InterruptedException { + while (true) { + Frame[] all = JFrame.getFrames(); + + for (Frame frame : all) { + System.out.println("I see " + frame.getTitle()); + + if (frame.getTitle().contains("TunerStudio")) { + return frame; + } + } + Thread.sleep(1000); + } + } + + interface Callback { + void onComponent(Component parent, Component component); + } + + public static void visitComponents(Component cmp, String prefix, Callback callback) { + visitComponents(cmp, null, prefix, callback); + } + + public static void visitComponents(Component component, Component parent, String prefix, Callback callback) { + if (component == null) + throw new NullPointerException("component"); + if (component instanceof AbstractButton) { + AbstractButton ab = (AbstractButton) component; + System.out.println("[button " + ab.getText() + "]"); + } else if (component instanceof JLabel) { + JLabel ab = (JLabel) component; + System.out.println("[label " + ab.getText() + "]"); + } else if (component instanceof JComboBox) { + JComboBox ab = (JComboBox) component; + System.out.println("[combo " + ab.getSelectedItem() + "]"); + } + + + System.out.println(prefix + " I see " + component.getClass()); + callback.onComponent(parent, component); + Container container = (Container) component; + if (container == null) { + // Not a container, return + return; + } + // Go visit and add all children + for (Component subComponent : container.getComponents()) { + if (subComponent == null) + continue; + visitComponents(subComponent, component, prefix + " " + subComponent.getClass().getSimpleName(), callback); + } + } + + private static boolean isTopLevelMenuButton(Component component) { + return component instanceof bi.b; + } + + private static void handleTopLevelButtons(Frame frame, ArrayList topLevelButtons) throws Exception { + printAllDialogs("Dialogs before clicking ", JDialog.getWindows()); + + for (AbstractButton topLevel : topLevelButtons) { + handleTopLevelButton(frame, topLevel); + } + } + + private static void handleTopLevelButton(Frame frame, AbstractButton topLevel) throws Exception { + SwingUtilities.invokeAndWait(topLevel::doClick); + Thread.sleep(TOP_MENU_CLICK_DELAY); + + content.getTopLevelMenus().add(new TopLevelMenu(topLevel.getText())); + + writeXml(content); + + + ImageIO.write( + getScreenShot(frame), + "png", + new File(DESTINATION + cleanName(topLevel.getText()) + ".png")); + + List menuItems = findMenuItems(frame); + + for (JMenuItem menuItem : menuItems) { + handleMenuItem(menuItem); + } + } + + private static void handleMenuItem(JMenuItem menuItem) throws InterruptedException, InvocationTargetException { + SwingUtilities.invokeAndWait(menuItem::doClick); + + Thread.sleep(MENU_CLICK_DELAY); + + + AtomicReference ref = new AtomicReference<>(); + SwingUtilities.invokeAndWait(() -> ref.set(findDynamicDialog())); + // let's give it time to appear on the screen + Thread.sleep(MENU_CLICK_DELAY); + JDialog dialog = ref.get(); + if (dialog == null) { + System.out.println("Not found for " + menuItem); + return; + } + + SwingUtilities.invokeAndWait(() -> { + try { + Map yCoordinates = new TreeMap<>(); + + findSlices(dialog, yCoordinates); + + if (dialog == null) { + // this happens for example for disabled menu items + return; + } + + + System.out.println("Label Y coordinates: " + yCoordinates); + int topY = dialog.getLocationOnScreen().y; + yCoordinates.put(topY, "top"); + yCoordinates.put(topY + dialog.getSize().height, "bottom"); + + List sorted = new ArrayList<>(yCoordinates.keySet()); + + BufferedImage dialogScreenShot = getScreenShot(dialog); + + for (int i = 0; i < sorted.size() - 1; i++) { + Integer fromYScreen = sorted.get(i); + int fromY = fromYScreen - topY; + int toY = sorted.get(i + 1) - topY; + + String sectionNameWithSpecifalCharacters = yCoordinates.get(fromYScreen); + String sectionName = cleanName(sectionNameWithSpecifalCharacters); + + BufferedImage slice; + try { + slice = dialogScreenShot.getSubimage(0, fromY, dialogScreenShot.getWidth(), toY - fromY); + } catch (RasterFormatException e) { + System.out.println("Dialog does not fit screen? " + sectionNameWithSpecifalCharacters); + continue; + } + + if (slice == null) { + System.out.println("Weird"); + continue; + } + String fileName = cleanName(dialog.getTitle()) + "_slice_" + fromY + "_" + sectionName + ".png"; + File output = new File(DESTINATION + fileName); + if (output == null) { + System.out.println(sectionName + " in " + fileName + " was not a success"); + continue; + } + try { + ImageIO.write(slice, PNG, output); + } catch (NullPointerException | FileNotFoundException e) { + System.out.println(sectionName + " in " + fileName + " was not a success?"); + continue; + } + } + + +// Robot robot = new Robot(); +// Rectangle captureRect = new Rectangle(Toolkit.getDefaultToolkit().getScreenSize()); +// BufferedImage screenFullImage = robot.createScreenCapture(captureRect); +// ImageIO.write(screenFullImage, PNG, new File(DESTINATION + "full_" + d.getTitle() + ".png")); + + ImageIO.write( + dialogScreenShot, + PNG, + new File(DESTINATION + cleanName(dialog.getTitle()) + ".png")); + dialog.setVisible(false); + dialog.dispose(); + } catch (Exception e) { + throw new IllegalStateException(e); + } + }); + } + + private static void findSlices(JDialog dialog, Map yCoordinates) { + visitComponents(dialog, "Dynamic dialog", new Callback() { + @Override + public void onComponent(Component parent, Component component) { + if (component instanceof JLabel) { + JLabel label = (JLabel) component; + if (!label.isVisible() || label.getSize().width == 0) + return; + String labelText = label.getText(); + if (labelText.length() > 0) { + System.out.println("Looking at " + label); + try { + yCoordinates.put(label.getLocationOnScreen().y, labelText); + } catch (IllegalComponentStateException e) { + System.out.printf("Did not go well for " + label); + } + } + } + + } + }); + } + + private static List findMenuItems(Frame frame) { + List menuItems = new ArrayList<>(); + visitComponents(frame, "Just clicked ", (parent, component) -> { + if (component instanceof JMenuItem && component.getClass().getName().endsWith("aH.gc")) { + JMenuItem menuItem = (JMenuItem) component; + System.out.println("Menu item " + menuItem.getText()); + menuItems.add(menuItem); + } + }); + return menuItems; + } + + private static String cleanName(String title) { + title = title.replace(' ', '_'); + title = title.replace(")", ""); + title = title.replace("%", ""); + title = title.replace(">", ""); + title = title.replace("<", ""); + title = title.replace("?", ""); + title = title.replace("(", ""); + title = title.replace('/', '_'); + title = title.replace('\\', '_'); + title = title.replace(" ", " "); + return title; + } + + private static JDialog findDynamicDialog() { + for (Window d : Dialog.getWindows()) { + if (d.getClass().getName().equals(TS_DIALOG) && d.isVisible()) { + return (JDialog) d; + } + } + return null; + } + + private static void printAllDialogs(String message, Window[] windows) { + System.out.println(message + windows.length); + for (Window window : windows) + System.out.println("type " + window.getClass()); + } + + public static BufferedImage getScreenShot(Component component) { + + BufferedImage image = new BufferedImage( + component.getWidth(), + component.getHeight(), + BufferedImage.TYPE_INT_RGB + ); + // call the Component's paint method, using + // the Graphics object of the image. + component.paint(image.getGraphics()); // alternately use .printAll(..) + return image; + } +} diff --git a/java_tools/ts_screenshots/screen/src/com/rusefi/TopLevelMenu.java b/java_tools/ts_screenshots/screen/src/com/rusefi/TopLevelMenu.java new file mode 100644 index 0000000000..1e3b79bf27 --- /dev/null +++ b/java_tools/ts_screenshots/screen/src/com/rusefi/TopLevelMenu.java @@ -0,0 +1,30 @@ +package com.rusefi; + +import com.opensr5.ini.DialogModel; + +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlElementWrapper; +import java.util.ArrayList; +import java.util.List; + +public class TopLevelMenu { + private final String title; + + @XmlElementWrapper + @XmlElement(name = "dialog") + private List dialogs = new ArrayList<>(); + + public TopLevelMenu(String title) { + this.title = title; + } + + @XmlAttribute + public String getTitle() { + return title; + } + + public List getDialogs() { + return dialogs; + } +} diff --git a/misc/git_scripts/git_add_upstream.bat b/misc/git_scripts/git_add_upstream.bat index ac65837d91..6afd00c4e7 100644 --- a/misc/git_scripts/git_add_upstream.bat +++ b/misc/git_scripts/git_add_upstream.bat @@ -5,5 +5,6 @@ rem The heros, in alpabetical order git remote add andreika-git https://github.com/andreika-git/rusefi git remote add DonaldBecker https://github.com/DonaldBecker/rusefi git remote add mck1117 https://github.com/mck1117/rusefi +git remote add NOx-z https://github.com/NOx-z/rusefi git remote -v diff --git a/misc/jenkins/InteractiveHtmlBom/run5.bat b/misc/jenkins/InteractiveHtmlBom/run5.bat index 47964286f5..4636515642 100644 --- a/misc/jenkins/InteractiveHtmlBom/run5.bat +++ b/misc/jenkins/InteractiveHtmlBom/run5.bat @@ -20,6 +20,7 @@ echo "ibom_cmd=%ibom_cmd%" set ibom_cmd=%kicad_path%\bin\python.exe C:\stuff\InteractiveHtmlBom\InteractiveHtmlBom\generate_interactive_bom.py --no-browser --name-format %%f_latest --dest-dir ../../ibom echo "ibom_cmd=%ibom_cmd%" +%ibom_cmd% --extra-fields "Part #","VEND#" hw_modular/cj125_Module/cj125_Module.kicad_pcb %ibom_cmd% --extra-fields "Part #","VEND#" hw_modular/TLE8888_Module/TLE8888_Module.kicad_pcb --netlist-file hw_modular/TLE8888_Module/TLE8888_Module.net %ibom_cmd% --extra-fields "Part #","VEND#" hw_modular/TLE7209_or_MC33186_H-Bridge_Breakout/TLE7209_Module.kicad_pcb --netlist-file hw_modular/TLE7209_or_MC33186_H-Bridge_Breakout/TLE7209_Module.net %ibom_cmd% hw_modular/Analog_Input_Module/Analog_Input_Module.kicad_pcb diff --git a/misc/jenkins/compile_other_versions/run.bat b/misc/jenkins/compile_other_versions/run.bat index b1859e3504..741d99ed49 100644 --- a/misc/jenkins/compile_other_versions/run.bat +++ b/misc/jenkins/compile_other_versions/run.bat @@ -38,6 +38,11 @@ IF NOT ERRORLEVEL 0 echo ERROR invoking compile_and_upload.bat IF NOT ERRORLEVEL 0 EXIT /B 1 pwd +rem call misc\jenkins\compile_other_versions\compile_and_upload.bat microrusefi mre-f4-slave rusefi_microrusefi.ini +rem IF NOT ERRORLEVEL 0 echo ERROR invoking compile_and_upload.bat +rem IF NOT ERRORLEVEL 0 EXIT /B 1 +rem pwd + call misc\jenkins\compile_other_versions\compile_and_upload.bat microrusefi mre-f4-test rusefi_microrusefi.ini IF NOT ERRORLEVEL 0 echo ERROR invoking compile_and_upload.bat IF NOT ERRORLEVEL 0 EXIT /B 1 @@ -65,10 +70,10 @@ IF NOT ERRORLEVEL 0 EXIT /B 1 pwd -call misc\jenkins\compile_other_versions\compile_and_upload.bat nucleo_f767 stm32f767_osc no %f7_console_setting% -IF NOT ERRORLEVEL 0 echo ERROR invoking compile_and_upload.bat -IF NOT ERRORLEVEL 0 EXIT /B 1 -pwd +rem call misc\jenkins\compile_other_versions\compile_and_upload.bat nucleo_f767 stm32f767_osc no %f7_console_setting% +rem IF NOT ERRORLEVEL 0 echo ERROR invoking compile_and_upload.bat +rem IF NOT ERRORLEVEL 0 EXIT /B 1 +rem pwd call misc\jenkins\compile_other_versions\compile_and_upload.bat prometheus prometheus_405 diff --git a/misc/jenkins/gcov/readme.md b/misc/jenkins/gcov/readme.md new file mode 100644 index 0000000000..e2abd0c7ad --- /dev/null +++ b/misc/jenkins/gcov/readme.md @@ -0,0 +1 @@ +This runs on a separate unix Jenkins instance. \ No newline at end of file diff --git a/misc/jenkins/gcov/run.sh b/misc/jenkins/gcov/run.sh new file mode 100644 index 0000000000..70c8488152 --- /dev/null +++ b/misc/jenkins/gcov/run.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +. /home/jenkins.secrets +echo $RUSEFI_DOXYGEN_FTP_USER +cd unit_tests +chmod +x run*sh +git submodule update --init +./run_clean_gcov.sh \ No newline at end of file diff --git a/misc/jenkins/gen_config_and_push.bat b/misc/jenkins/gen_config_and_push.bat new file mode 100644 index 0000000000..b4c8382b1d --- /dev/null +++ b/misc/jenkins/gen_config_and_push.bat @@ -0,0 +1,10 @@ + + + +git fetch >> log.txt 2>> err.txt +git reset --hard origin/master >> log.txt 2>> err.txt +cd firmware +call gen_config.bat >> ../log.txt 2>>../err.txt +call gen_live_documentation.bat >> ../log.txt 2>>../err.txt +git commit -am "Fresh generated - auto" >> ../log.txt 2>>../err.txt +git push diff --git a/misc/www/images/c_assembled.jpg b/misc/www/images/c_assembled.jpg new file mode 100644 index 0000000000..3d8962bf81 Binary files /dev/null and b/misc/www/images/c_assembled.jpg differ diff --git a/misc/www/images/c_microrusefi.jpg b/misc/www/images/c_microrusefi.jpg new file mode 100644 index 0000000000..59a977aa48 Binary files /dev/null and b/misc/www/images/c_microrusefi.jpg differ diff --git a/misc/www/images/triggers/trigger_1.png b/misc/www/images/triggers/trigger_1.png deleted file mode 100644 index f47b098d64..0000000000 Binary files a/misc/www/images/triggers/trigger_1.png and /dev/null differ diff --git a/misc/www/images/triggers/trigger_10.png b/misc/www/images/triggers/trigger_10.png deleted file mode 100644 index b83c7c2741..0000000000 Binary files a/misc/www/images/triggers/trigger_10.png and /dev/null differ diff --git a/misc/www/images/triggers/trigger_11.png b/misc/www/images/triggers/trigger_11.png deleted file mode 100644 index 2618c1bde2..0000000000 Binary files a/misc/www/images/triggers/trigger_11.png and /dev/null differ diff --git a/misc/www/images/triggers/trigger_12.png b/misc/www/images/triggers/trigger_12.png deleted file mode 100644 index aa4811e712..0000000000 Binary files a/misc/www/images/triggers/trigger_12.png and /dev/null differ diff --git a/misc/www/images/triggers/trigger_13.png b/misc/www/images/triggers/trigger_13.png deleted file mode 100644 index 1e1777245c..0000000000 Binary files a/misc/www/images/triggers/trigger_13.png and /dev/null differ diff --git a/misc/www/images/triggers/trigger_14.png b/misc/www/images/triggers/trigger_14.png deleted file mode 100644 index 8e13c9fbe4..0000000000 Binary files a/misc/www/images/triggers/trigger_14.png and /dev/null differ diff --git a/misc/www/images/triggers/trigger_15.png b/misc/www/images/triggers/trigger_15.png deleted file mode 100644 index 22c4fd559a..0000000000 Binary files a/misc/www/images/triggers/trigger_15.png and /dev/null differ diff --git a/misc/www/images/triggers/trigger_16.png b/misc/www/images/triggers/trigger_16.png deleted file mode 100644 index dcd302efcb..0000000000 Binary files a/misc/www/images/triggers/trigger_16.png and /dev/null differ diff --git a/misc/www/images/triggers/trigger_17.png b/misc/www/images/triggers/trigger_17.png deleted file mode 100644 index 069c8235f8..0000000000 Binary files a/misc/www/images/triggers/trigger_17.png and /dev/null differ diff --git a/misc/www/images/triggers/trigger_18.png b/misc/www/images/triggers/trigger_18.png deleted file mode 100644 index 53a6ec2fa4..0000000000 Binary files a/misc/www/images/triggers/trigger_18.png and /dev/null differ diff --git a/misc/www/images/triggers/trigger_19.png b/misc/www/images/triggers/trigger_19.png deleted file mode 100644 index 152e708af2..0000000000 Binary files a/misc/www/images/triggers/trigger_19.png and /dev/null differ diff --git a/misc/www/images/triggers/trigger_2.png b/misc/www/images/triggers/trigger_2.png deleted file mode 100644 index 704352d867..0000000000 Binary files a/misc/www/images/triggers/trigger_2.png and /dev/null differ diff --git a/misc/www/images/triggers/trigger_20.png b/misc/www/images/triggers/trigger_20.png deleted file mode 100644 index aa3b75216f..0000000000 Binary files a/misc/www/images/triggers/trigger_20.png and /dev/null differ diff --git a/misc/www/images/triggers/trigger_21.png b/misc/www/images/triggers/trigger_21.png deleted file mode 100644 index cd3b9f84ac..0000000000 Binary files a/misc/www/images/triggers/trigger_21.png and /dev/null differ diff --git a/misc/www/images/triggers/trigger_22.png b/misc/www/images/triggers/trigger_22.png deleted file mode 100644 index 3285000df1..0000000000 Binary files a/misc/www/images/triggers/trigger_22.png and /dev/null differ diff --git a/misc/www/images/triggers/trigger_23.png b/misc/www/images/triggers/trigger_23.png deleted file mode 100644 index 446e45c6f1..0000000000 Binary files a/misc/www/images/triggers/trigger_23.png and /dev/null differ diff --git a/misc/www/images/triggers/trigger_24.png b/misc/www/images/triggers/trigger_24.png deleted file mode 100644 index 5a32525fa0..0000000000 Binary files a/misc/www/images/triggers/trigger_24.png and /dev/null differ diff --git a/misc/www/images/triggers/trigger_25.png b/misc/www/images/triggers/trigger_25.png deleted file mode 100644 index 8d01c34d66..0000000000 Binary files a/misc/www/images/triggers/trigger_25.png and /dev/null differ diff --git a/misc/www/images/triggers/trigger_26.png b/misc/www/images/triggers/trigger_26.png deleted file mode 100644 index 762f8a6d66..0000000000 Binary files a/misc/www/images/triggers/trigger_26.png and /dev/null differ diff --git a/misc/www/images/triggers/trigger_27.png b/misc/www/images/triggers/trigger_27.png deleted file mode 100644 index 24f8c603f3..0000000000 Binary files a/misc/www/images/triggers/trigger_27.png and /dev/null differ diff --git a/misc/www/images/triggers/trigger_28.png b/misc/www/images/triggers/trigger_28.png deleted file mode 100644 index 395af02403..0000000000 Binary files a/misc/www/images/triggers/trigger_28.png and /dev/null differ diff --git a/misc/www/images/triggers/trigger_29.png b/misc/www/images/triggers/trigger_29.png deleted file mode 100644 index f391670bbf..0000000000 Binary files a/misc/www/images/triggers/trigger_29.png and /dev/null differ diff --git a/misc/www/images/triggers/trigger_3.png b/misc/www/images/triggers/trigger_3.png deleted file mode 100644 index 88b04bf712..0000000000 Binary files a/misc/www/images/triggers/trigger_3.png and /dev/null differ diff --git a/misc/www/images/triggers/trigger_4.png b/misc/www/images/triggers/trigger_4.png deleted file mode 100644 index 67a14abcfd..0000000000 Binary files a/misc/www/images/triggers/trigger_4.png and /dev/null differ diff --git a/misc/www/images/triggers/trigger_5.png b/misc/www/images/triggers/trigger_5.png deleted file mode 100644 index 2084188c9a..0000000000 Binary files a/misc/www/images/triggers/trigger_5.png and /dev/null differ diff --git a/misc/www/images/triggers/trigger_6.png b/misc/www/images/triggers/trigger_6.png deleted file mode 100644 index 8f56a80cf5..0000000000 Binary files a/misc/www/images/triggers/trigger_6.png and /dev/null differ diff --git a/misc/www/images/triggers/trigger_7.png b/misc/www/images/triggers/trigger_7.png deleted file mode 100644 index 73db8e3054..0000000000 Binary files a/misc/www/images/triggers/trigger_7.png and /dev/null differ diff --git a/misc/www/images/triggers/trigger_8.png b/misc/www/images/triggers/trigger_8.png deleted file mode 100644 index 64635450be..0000000000 Binary files a/misc/www/images/triggers/trigger_8.png and /dev/null differ diff --git a/misc/www/images/triggers/trigger_9.png b/misc/www/images/triggers/trigger_9.png deleted file mode 100644 index 8d1ed33ffc..0000000000 Binary files a/misc/www/images/triggers/trigger_9.png and /dev/null differ diff --git a/misc/www/index.html b/misc/www/index.html index ec5373afbe..2ec92fb7c8 100644 --- a/misc/www/index.html +++ b/misc/www/index.html @@ -1,89 +1,176 @@ - - a:visited:hover { - color: black; - } + + + - table td, - table th { - border: 1px solid black; - padding: 0.5em; - } - table tr:first-child th { - border-top: 0; - font-weight: normal; - } + + + + - table tr:last-child td { - border-bottom: 0; - } - - table tr td:first-child, - table tr th:first-child { - border-left: 0; - } - - table tr td:last-child, - table tr th:last-child { - border-right: 0; - } - - + + + + + + +
    +
    +
    +
    + +
    - -

    rusEfi is a GPL open source engine control unit.

    -
    -


    + + + +
    + +
    +
    + + + diff --git a/misc/www/microrusefi/index.html b/misc/www/microrusefi/index.html new file mode 100644 index 0000000000..f2741b7e84 --- /dev/null +++ b/misc/www/microrusefi/index.html @@ -0,0 +1,74 @@ + + + + rusEfi microRusEfi + + + + + + + + + + + + +

    microRusEfi is the latest fully assembled rusEfi ECU. It was primaraly designed for 4 cylinder applications with or without drive-by-wire electronic throttle body.

    + +

    Available at rusEfi store $75 kit or $220 fully assembled

    + +
    + + +Pinout
    + +Documentation
    + +Interactive BOM
    + + +microRusEfi GitHub
    + +Forum thread
    + + + + +

    Capabilities

    + +
      +
    • Primary VR or Hall input (configurable with few resistor changes)
    • +
    • Secondary Hall input
    • +
    • x4 analog thermistor (temperature) inputs
    • +
    • x10 analog voltage inputs (0-5v)
    • +
    • x4 high-Z injector outputs
    • +
    • x2 high-current low side outputs for IAC/VVT/other solenoids
    • +
    • Dedicated main relay control output
    • +
    • x4 low-current low side outputs for relays or warning lights
    • +
    • x4 5v logic-level ignition outputs
    • +
    • x2 5v/12v configurable logic level outputs (requires resistor changes)
    • +
    • Electronic throttle body (drive by wire)
    • +
    • CAN connectivity on the plug
    • +
    • USB connectivity on the plug
    • +
    + +
    + + + + +
    +
    +Home (c) rusEfi llc, 2020 +
    + + + + \ No newline at end of file diff --git a/misc/www/rusefi.css b/misc/www/rusefi.css new file mode 100644 index 0000000000..b50fd58c6c --- /dev/null +++ b/misc/www/rusefi.css @@ -0,0 +1,46 @@ + + a:link { + color: #34495e; + } + + a:visited { + color: #34495e; + } + + a:hover { + color: black; + } + + a:visited:hover { + color: black; + } + + table { + border-collapse: collapse; + font-size: 100%; + } + + table td, + table th { + border: 1px solid black; + padding: 0.5em; + } + + table tr:first-child th { + border-top: 0; + font-weight: normal; + } + + table tr:last-child td { + border-bottom: 0; + } + + table tr td:first-child, + table tr th:first-child { + border-left: 0; + } + + table tr td:last-child, + table tr th:last-child { + border-right: 0; + } diff --git a/misc/www/s/debugmode/index.shtml b/misc/www/s/debugmode/index.shtml index 4cfa2a7918..db4aaa3f55 100644 --- a/misc/www/s/debugmode/index.shtml +++ b/misc/www/s/debugmode/index.shtml @@ -1,7 +1,7 @@ - + @@ -9,7 +9,7 @@




    -https://rusefi.com/wiki/index.php?title=Manual:Debug_fields +https://github.com/rusefi/rusefi/wiki/Debug_Mode diff --git a/misc/www/s/etb/index.shtml b/misc/www/s/etb/index.shtml index 3f49542311..874005e30d 100644 --- a/misc/www/s/etb/index.shtml +++ b/misc/www/s/etb/index.shtml @@ -1,7 +1,7 @@ - + @@ -9,7 +9,7 @@




    -https://github.com/rusefi/rusefi_documentation/blob/master/FAQ/HOWTO_electronic_throttle_body.md +https://github.com/rusefi/rusefi/wiki/HOWTO_electronic_throttle_body diff --git a/misc/www/s/fsio/index.shtml b/misc/www/s/fsio/index.shtml index d3ab64524c..9d68611cbd 100644 --- a/misc/www/s/fsio/index.shtml +++ b/misc/www/s/fsio/index.shtml @@ -1,7 +1,7 @@ - + @@ -9,7 +9,7 @@




    -http://rusefi.com/wiki/index.php?title=Manual:Flexible_Logic +https://github.com/rusefi/rusefi/wiki/FSIO diff --git a/misc/www/s/howtocontribute/index.shtml b/misc/www/s/howtocontribute/index.shtml index 104155f38b..04005194d4 100644 --- a/misc/www/s/howtocontribute/index.shtml +++ b/misc/www/s/howtocontribute/index.shtml @@ -1,7 +1,7 @@ - + @@ -9,7 +9,7 @@




    -https://github.com/rusefi/rusefi_documentation/wiki/HOWTO_help_rusEfi +https://github.com/rusefi/rusefi/wiki/HOWTO_help_rusEfi diff --git a/misc/www/s/microrusefi/index.shtml b/misc/www/s/microrusefi/index.shtml new file mode 100644 index 0000000000..cf09b6eec2 --- /dev/null +++ b/misc/www/s/microrusefi/index.shtml @@ -0,0 +1,17 @@ + + + + + + + +
    + +




    + +https://github.com/rusefi/rusefi/wiki/Hardware_microRusEfi + +
    + + + diff --git a/misc/www/s/questions/index.shtml b/misc/www/s/questions/index.shtml index 42ee50f8f8..bfa23b50f2 100644 --- a/misc/www/s/questions/index.shtml +++ b/misc/www/s/questions/index.shtml @@ -1,7 +1,7 @@ - + @@ -9,7 +9,7 @@




    -https://github.com/rusefi/rusefi_documentation/blob/master/FAQ/HOWTO_ask_questions.md +https://github.com/rusefi/rusefi/wiki/HOWTO_ask_questions diff --git a/misc/www/shop/index.html b/misc/www/shop/index.html new file mode 100644 index 0000000000..aaebbf5d5a --- /dev/null +++ b/misc/www/shop/index.html @@ -0,0 +1,103 @@ + + + + + + + rusEfi Store + + + + + + + + + + + + + + + + +
    +
    + +

    +microRusEfi
    microRusEfi eBay
    +

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    48 + Coming soon! +
    + 55 pin breakout board Get it on eBay +
    55 pin connector with breakout board Get it on eBay +
    + 64 pin breakout board Get it on eBay +
    64 pin connector with breakout board Get it on eBay +
    + +72 pin connector with breakout board Get it on eBay +
    + 121 pin breakout board Get it on eBay +
    + 134 pin breakout board Get it on eBay +
    + Coming soon +
    + +
    + + +
    +
    +Home (c) rusEfi llc, 2020 +
    + + + \ No newline at end of file diff --git a/misc/www/style/logo_640.png b/misc/www/style/logo_640.png new file mode 100644 index 0000000000..3314413b6e Binary files /dev/null and b/misc/www/style/logo_640.png differ diff --git a/misc/www/style/logo_w_60.gif b/misc/www/style/logo_w_60.gif new file mode 100644 index 0000000000..9e5c788c2e Binary files /dev/null and b/misc/www/style/logo_w_60.gif differ diff --git a/misc/www/style/sticker.png b/misc/www/style/sticker.png index a0d7c3ddb4..bd17db4beb 100644 Binary files a/misc/www/style/sticker.png and b/misc/www/style/sticker.png differ diff --git a/misc/www/style/sticker.xcf b/misc/www/style/sticker.xcf index ff22af299e..d951dca50b 100644 Binary files a/misc/www/style/sticker.xcf and b/misc/www/style/sticker.xcf differ diff --git a/misc/www/style/sticker_smaller.png b/misc/www/style/sticker_smaller.png new file mode 100644 index 0000000000..aa5cd7eafc Binary files /dev/null and b/misc/www/style/sticker_smaller.png differ diff --git a/misc/www/style/sticker_smaller.xcf b/misc/www/style/sticker_smaller.xcf new file mode 100644 index 0000000000..3461f36e1a Binary files /dev/null and b/misc/www/style/sticker_smaller.xcf differ diff --git a/simulator/Makefile b/simulator/Makefile index 4073f86510..42041676f4 100644 --- a/simulator/Makefile +++ b/simulator/Makefile @@ -156,7 +156,6 @@ CPPSRC = $(UTILSRC_CPP) \ $(CONTROLLERS_ALGO_SRC_CPP) \ $(CONTROLLERS_SRC_CPP) \ $(PROJECT_DIR)/development/sensor_chart.cpp \ - $(PROJECT_DIR)/development/trigger_emulator.cpp \ $(HW_LAYER_EMS_CPP) \ $(HW_SENSORS_SRC) \ $(TRIGGER_SRC_CPP) \ diff --git a/simulator/simulator/efifeatures.h b/simulator/simulator/efifeatures.h index da667200d6..88759126ef 100644 --- a/simulator/simulator/efifeatures.h +++ b/simulator/simulator/efifeatures.h @@ -10,7 +10,7 @@ #include "rusefi_true.h" #define EFI_ENABLE_ASSERTS TRUE - +#define EFI_LAUNCH_CONTROL FALSE #define EFI_ENABLE_MOCK_ADC TRUE #define ENABLE_PERF_TRACE FALSE @@ -39,8 +39,6 @@ #define BOARD_MC33972_COUNT 0 #define BOARD_TLE8888_COUNT 0 -#define BOARD_EXT_GPIOCHIPS (BOARD_TLE6240_COUNT + BOARD_MC33972_COUNT + BOARD_TLE8888_COUNT) - #define EFI_CLOCK_LOCKS FALSE #define EFI_FSIO TRUE @@ -88,14 +86,10 @@ #define EFI_IDLE_PID_CIC FALSE #define EFI_MAIN_RELAY_CONTROL FALSE #define EFI_HIP_9011 TRUE -#define EFI_CJ125 FALSE +#define EFI_CJ125 TRUE #define EFI_CAN_SUPPORT FALSE #define EFI_MAX_31855 FALSE -#define BOARD_TLE6240_COUNT 0 -#define BOARD_MC33972_COUNT 0 -#define BOARD_TLE8888_COUNT 0 - #define EFI_ELECTRONIC_THROTTLE_BODY TRUE #define EFI_AUX_PID TRUE #define EFI_ICU_INPUTS FALSE diff --git a/simulator/simulator/global.h b/simulator/simulator/global.h index dc1a498826..5836aeaaf8 100644 --- a/simulator/simulator/global.h +++ b/simulator/simulator/global.h @@ -28,7 +28,7 @@ #define EFI_UNIT_TEST FALSE -#define hasFatalError() (FALSE) +#define hasOsPanicError() (FALSE) #define US_TO_NT_MULTIPLIER 100 @@ -47,6 +47,7 @@ #define DL_OUTPUT_BUFFER 9000 #define CCM_OPTIONAL +#define NO_CACHE #define EFI_CUSTOM_PANIC_METHOD 1 diff --git a/simulator/simulator/rusEfiFunctionalTest.cpp b/simulator/simulator/rusEfiFunctionalTest.cpp index 6b2a8c9733..2f56efea66 100644 --- a/simulator/simulator/rusEfiFunctionalTest.cpp +++ b/simulator/simulator/rusEfiFunctionalTest.cpp @@ -22,10 +22,9 @@ #include "main_trigger_callback.h" #include "allsensors.h" #include "sensor_chart.h" -#include "injector_central.h" +#include "bench_test.h" #include "engine.h" #include "tunerstudio.h" -#include "trigger_emulator.h" #include "engine_controller.h" #include "map_averaging.h" #include "memstreams.h" @@ -141,8 +140,6 @@ void printPendingMessages(void) { int isSerialOverTcpReady; -int maxNesting = 0; - bool isCommandLineConsoleReady(void) { return isSerialOverTcpReady; } diff --git a/unit_tests/.gitignore b/unit_tests/.gitignore index 1a279984f9..30469214fb 100644 --- a/unit_tests/.gitignore +++ b/unit_tests/.gitignore @@ -1,3 +1,5 @@ .dep* build/ gcov_working_area +triggers +triggers.txt \ No newline at end of file diff --git a/unit_tests/Makefile b/unit_tests/Makefile index 54857e6cf7..0dc0d51827 100644 --- a/unit_tests/Makefile +++ b/unit_tests/Makefile @@ -26,6 +26,7 @@ ifeq ($(USE_OPT),) USE_OPT = -c -Wall -O0 -ggdb -g3 USE_OPT += -fprofile-arcs -ftest-coverage USE_OPT += -Werror=missing-field-initializers + USE_OPT += -Wno-unused-parameter -Wno-unused-function endif @@ -102,6 +103,7 @@ include $(PROJECT_DIR)/hw_layer/hw_layer.mk include $(PROJECT_DIR)/hw_layer/drivers/drivers.mk include $(PROJECT_DIR)/hw_layer/sensors/sensors.mk include $(PROJECT_DIR)/util/util.mk +include $(PROJECT_DIR)/init/init.mk include test.mk include tests/tests.mk @@ -138,6 +140,7 @@ CPPSRC = $(UTILSRC_CPP) \ $(HW_LAYER_EMS_CPP) \ $(HW_SENSORS_SRC) \ $(TRIGGER_SRC_CPP) \ + $(INIT_SRC_CPP) \ $(PROJECT_DIR)/../unit_tests/main.cpp @@ -175,6 +178,7 @@ INCDIR = . \ $(PROJECT_DIR)/hw_layer \ $(PROJECT_DIR)/hw_layer/algo \ $(PROJECT_DIR)/hw_layer/sensors/ \ + $(PROJECT_DIR)/init/ \ $(HW_LAYER_DRIVERS_INC) \ test_data_structures \ googletest/googlemock/include \ diff --git a/unit_tests/adc_inputs.h b/unit_tests/adc_inputs.h index 80bf095932..b31e410367 100644 --- a/unit_tests/adc_inputs.h +++ b/unit_tests/adc_inputs.h @@ -5,9 +5,6 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ -#ifndef ADC_INPUTS_H_ -#define ADC_INPUTS_H_ +#pragma once #include "boards.h" - -#endif /* ADC_INPUTS_H_ */ diff --git a/unit_tests/afm2mapConverter.h b/unit_tests/afm2mapConverter.h index 05400bdf75..3a3dd5eb5d 100644 --- a/unit_tests/afm2mapConverter.h +++ b/unit_tests/afm2mapConverter.h @@ -5,9 +5,6 @@ * @date Jan 20, 2018 */ -#ifndef AFM2MAPCONVERTER_H_ -#define AFM2MAPCONVERTER_H_ +#pragma once void printConvertedTable(); - -#endif /* AFM2MAPCONVERTER_H_ */ diff --git a/unit_tests/efifeatures.h b/unit_tests/efifeatures.h index 47f7cd739b..910f15331f 100644 --- a/unit_tests/efifeatures.h +++ b/unit_tests/efifeatures.h @@ -5,8 +5,7 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ -#ifndef EFIFEATURES_H_ -#define EFIFEATURES_H_ +#pragma once #include "rusefi_true.h" @@ -16,6 +15,10 @@ #define ENABLE_PERF_TRACE FALSE +#define EFI_LAUNCH_CONTROL TRUE + +#define EFI_BOOST_CONTROL TRUE + #define EFI_IDLE_CONTROL TRUE #define EFI_ELECTRONIC_THROTTLE_BODY TRUE @@ -60,11 +63,7 @@ #define EFI_ANALOG_SENSORS TRUE -#define BOARD_EXT_GPIOCHIPS 3 - #define EFI_BOARD_TEST FALSE #define EFI_JOYSTICK FALSE #define EFI_MAP_AVERAGING TRUE - -#endif /* EFIFEATURES_H_ */ diff --git a/unit_tests/engine_test_helper.cpp b/unit_tests/engine_test_helper.cpp index f075d0bb32..17edd9567d 100644 --- a/unit_tests/engine_test_helper.cpp +++ b/unit_tests/engine_test_helper.cpp @@ -14,9 +14,9 @@ #include "allsensors.h" #include "engine_controller.h" #include "advance_map.h" +#include "sensor.h" extern int timeNowUs; -extern EnginePins enginePins; extern WarningCodeState unitTestWarningCodeState; extern float testMafValue; extern float testCltValue; @@ -65,9 +65,10 @@ EngineTestHelper::EngineTestHelper(engine_type_e engineType, configuration_callb engine->engineConfigurationPtr->iat.adcChannel = TEST_IAT_CHANNEL; // magic voltage to get nice CLT testCltValue = 1.492964; - //todosetMockCltVoltage(1.492964 PASS_ENGINE_PARAMETER_SUFFIX); + Sensor::setMockValue(SensorType::Clt, 70); // magic voltage to get nice IAT testIatValue = 4.03646; + Sensor::setMockValue(SensorType::Iat, 30); // this is needed to have valid CLT and IAT. //todo: reuse initPeriodicEvents(PASS_ENGINE_PARAMETER_SIGNATURE) method @@ -75,7 +76,14 @@ EngineTestHelper::EngineTestHelper(engine_type_e engineType, configuration_callb } -EngineTestHelper::EngineTestHelper(engine_type_e engineType) : EngineTestHelper(engineType, &emptyCallbackWithConfiguration) { +EngineTestHelper::EngineTestHelper(engine_type_e engineType, const std::unordered_map& sensorValues) : EngineTestHelper(engineType, &emptyCallbackWithConfiguration) { + for (const auto [s, v] : sensorValues) { + Sensor::setMockValue(s, v); + } +} + +EngineTestHelper::~EngineTestHelper() { + Sensor::resetRegistry(); } /** diff --git a/unit_tests/engine_test_helper.h b/unit_tests/engine_test_helper.h index 57b9e13421..47e75f8dba 100644 --- a/unit_tests/engine_test_helper.h +++ b/unit_tests/engine_test_helper.h @@ -12,6 +12,9 @@ #include "rpm_calculator.h" #include "main_trigger_callback.h" #include "unit_test_framework.h" +#include "sensor.h" + +extern EnginePins enginePins; class EngineTestHelperBase { @@ -26,8 +29,10 @@ public: */ class EngineTestHelper : public EngineTestHelperBase { public: - EngineTestHelper(engine_type_e engineType); + EngineTestHelper(engine_type_e engineType, const std::unordered_map& sensorValues); EngineTestHelper(engine_type_e engineType, configuration_callback_t boardCallback); + ~EngineTestHelper(); + void applyTriggerWaveform(); void setTriggerType(trigger_type_e trigger DECLARE_ENGINE_PARAMETER_SUFFIX); void fireRise(float delayMs); diff --git a/unit_tests/global.h b/unit_tests/global.h index fec4452d07..656b214d5a 100644 --- a/unit_tests/global.h +++ b/unit_tests/global.h @@ -38,6 +38,7 @@ extern "C" #endif /* __cplusplus */ #define CH_FREQUENCY 1000 +#define NO_CACHE typedef int bool_t; typedef uint32_t systime_t; @@ -86,8 +87,13 @@ void print(const char *fmt, ...); Engine *engine = ð.engine; \ EXPAND_Engine -#define WITH_ENGINE_TEST_HELPER(x) EngineTestHelper eth(x); \ - EXPAND_EngineTestHelper; +#define WITH_ENGINE_TEST_HELPER_SENS(x, sensorvals) \ + EngineTestHelper eth(x, sensorvals); \ + EXPAND_EngineTestHelper; + +#define WITH_ENGINE_TEST_HELPER(x) \ + EngineTestHelper eth(x, std::unordered_map{}); \ + EXPAND_EngineTestHelper; #define CONFIG_PARAM(x) (x) diff --git a/unit_tests/global_execution_queue.h b/unit_tests/global_execution_queue.h index b1e341d741..f568ad9954 100644 --- a/unit_tests/global_execution_queue.h +++ b/unit_tests/global_execution_queue.h @@ -5,8 +5,7 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ -#ifndef GLOBAL_EXECUTION_QUEUE_H_ -#define GLOBAL_EXECUTION_QUEUE_H_ +#pragma once #include "scheduler.h" #include "event_queue.h" @@ -23,5 +22,3 @@ public: private: EventQueue schedulingQueue; }; - -#endif /* GLOBAL_EXECUTION_QUEUE_H_ */ diff --git a/unit_tests/googletest b/unit_tests/googletest index dea0216d0c..dcc92d0ab6 160000 --- a/unit_tests/googletest +++ b/unit_tests/googletest @@ -1 +1 @@ -Subproject commit dea0216d0c6bc5e63cf5f6c8651cd268668032ec +Subproject commit dcc92d0ab6c4ce022162a23566d44f673251eee4 diff --git a/unit_tests/main.cpp b/unit_tests/main.cpp index 20a0d9a248..fbceeed41b 100644 --- a/unit_tests/main.cpp +++ b/unit_tests/main.cpp @@ -2,14 +2,13 @@ * @file main.cpp * @file First step towards unit-testing rusEfi algorithms * - * @author Andrey Belomutskiy (c) 2012-2018 + * @author Andrey Belomutskiy, (c) 2012-2020 */ #include #include "global.h" -#include "test_interpolation_3d.h" #include "test_find_index.h" #include "engine_configuration.h" diff --git a/unit_tests/map_resize.h b/unit_tests/map_resize.h index 9c2c043e91..102502aa83 100644 --- a/unit_tests/map_resize.h +++ b/unit_tests/map_resize.h @@ -5,9 +5,6 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ -#ifndef MAP_RESIZE_H_ -#define MAP_RESIZE_H_ +#pragma once void resizeMap(void); - -#endif /* MAP_RESIZE_H_ */ diff --git a/unit_tests/mocks.h b/unit_tests/mocks.h new file mode 100644 index 0000000000..65194ddd69 --- /dev/null +++ b/unit_tests/mocks.h @@ -0,0 +1,45 @@ +#include "electronic_throttle.h" +#include "dc_motor.h" +#include "table_helper.h" +#include "pwm_generator_logic.h" + +#include "gmock/gmock.h" + +class MockEtb : public IEtbController { +public: + // PeriodicTimerController mocks + MOCK_METHOD(void, PeriodicTask, (), (override)); + MOCK_METHOD(int, getPeriodMs, (), (override)); + + // IEtbController mocks + MOCK_METHOD(void, reset, (), ()); + MOCK_METHOD(void, Start, (), (override)); + MOCK_METHOD(void, init, (DcMotor* motor, int ownIndex, pid_s* pidParameters, const ValueProvider3D* pedalMap), (override)); + MOCK_METHOD(void, setIdlePosition, (percent_t pos), (override)); + + // ClosedLoopController mocks + MOCK_METHOD(expected, getSetpoint, (), (const, override)); + MOCK_METHOD(expected, observePlant, (), (const, override)); + MOCK_METHOD(expected, getOpenLoop, (percent_t setpoint), (const, override)); + MOCK_METHOD(expected, getClosedLoop, (percent_t setpoint, percent_t observation), (override)); + MOCK_METHOD(void, setOutput, (expected outputValue), (override)); +}; + +class MockMotor : public DcMotor { +public: + MOCK_METHOD(bool, set, (float duty), (override)); + MOCK_METHOD(float, get, (), (const, override)); + MOCK_METHOD(void, enable, (), (override)); + MOCK_METHOD(void, disable, (), (override)); + MOCK_METHOD(bool, isOpenDirection, (), (const, override)); +}; + +class MockVp3d : public ValueProvider3D { +public: + MOCK_METHOD(float, getValue, (float xRpm, float y), (const, override)); +}; + +class MockPwm : public SimplePwm { +public: + MOCK_METHOD(void, setSimplePwmDutyCycle, (float dutyCycle), (override)); +}; diff --git a/unit_tests/os_access.h b/unit_tests/os_access.h index 60e1de3860..aaa3b76b00 100644 --- a/unit_tests/os_access.h +++ b/unit_tests/os_access.h @@ -7,7 +7,3 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ -#ifndef OS_ACCESS_H_ -#define OS_ACCESS_H_ - -#endif /* OS_ACCESS_H_ */ diff --git a/unit_tests/settings.h b/unit_tests/settings.h deleted file mode 100644 index 31327e150e..0000000000 --- a/unit_tests/settings.h +++ /dev/null @@ -1,13 +0,0 @@ -/** - * @file settings.h - * - * @date Feb 13, 2014 - * @author Andrey Belomutskiy, (c) 2012-2014 - */ - -#ifndef SETTINGS_H_ -#define SETTINGS_H_ - - - -#endif /* SETTINGS_H_ */ diff --git a/unit_tests/test_basic_math/test_efilib.cpp b/unit_tests/test_basic_math/test_efilib.cpp index 713083f6b3..e6070a4b58 100644 --- a/unit_tests/test_basic_math/test_efilib.cpp +++ b/unit_tests/test_basic_math/test_efilib.cpp @@ -21,3 +21,18 @@ TEST(EfiLibTest, ExpTaylor) EXPECT_NEAR(expf_taylor(x), expf(x), 0.01f); } } + +TEST(EfiLibTest, clampf) { + // off scale low + EXPECT_EQ(clampF(10, 5, 20), 10); + EXPECT_EQ(clampF(-10, -50, 10), -10); + + // in range (unclamped) + EXPECT_EQ(clampF(10, 15, 20), 15); + EXPECT_EQ(clampF(-10, -5, 10), -5); + + // off scale high + EXPECT_EQ(clampF(10, 25, 20), 20); + EXPECT_EQ(clampF(-10, 50, 10), 10); + +} diff --git a/unit_tests/test_basic_math/test_find_index.h b/unit_tests/test_basic_math/test_find_index.h index 3f9fcf1ed6..850649e01c 100644 --- a/unit_tests/test_basic_math/test_find_index.h +++ b/unit_tests/test_basic_math/test_find_index.h @@ -5,9 +5,6 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ -#ifndef TEST_FIND_INDEX_H_ -#define TEST_FIND_INDEX_H_ +#pragma once void testFindIndex(void); - -#endif /* TEST_FIND_INDEX_H_ */ diff --git a/unit_tests/test_basic_math/test_interpolation_3d.cpp b/unit_tests/test_basic_math/test_interpolation_3d.cpp index 2dc909935a..1e03d5cc4e 100644 --- a/unit_tests/test_basic_math/test_interpolation_3d.cpp +++ b/unit_tests/test_basic_math/test_interpolation_3d.cpp @@ -5,7 +5,6 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ -#include "test_interpolation_3d.h" #include #include "interpolation.h" diff --git a/unit_tests/test_basic_math/test_interpolation_3d.h b/unit_tests/test_basic_math/test_interpolation_3d.h deleted file mode 100644 index 0528c36db8..0000000000 --- a/unit_tests/test_basic_math/test_interpolation_3d.h +++ /dev/null @@ -1,15 +0,0 @@ -/* - * Created on: Oct 17, 2013 - * Author: Andrey Belomutskiy, (c) 2012-2015 - */ - -/** - * @file test_interpolation_3d.h - */ - - -#ifndef TEST_INTERPOLATION_3D_H_ -#define TEST_INTERPOLATION_3D_H_ - - -#endif /* TEST_INTERPOLATION_3D_H_ */ diff --git a/unit_tests/tests/sensor/basic_sensor.cpp b/unit_tests/tests/sensor/basic_sensor.cpp index 4982a1376b..796605b29a 100644 --- a/unit_tests/tests/sensor/basic_sensor.cpp +++ b/unit_tests/tests/sensor/basic_sensor.cpp @@ -79,3 +79,29 @@ TEST_F(SensorBasic, SensorInitialized) { EXPECT_TRUE(result2.Valid); EXPECT_FLOAT_EQ(result2.Value, 75); } + +TEST_F(SensorBasic, HasSensor) { + MockSensor dut(SensorType::Clt); + + // Check that we don't have the sensor + ASSERT_FALSE(Sensor::hasSensor(SensorType::Clt)); + + // Register it + ASSERT_TRUE(dut.Register()); + + // Now we should! + ASSERT_TRUE(Sensor::hasSensor(SensorType::Clt)); +} + +TEST_F(SensorBasic, HasSensorMock) { + MockSensor dut(SensorType::Clt); + + // Check that we don't have the sensor + ASSERT_FALSE(Sensor::hasSensor(SensorType::Clt)); + + // Mock the sensor - this should count as having it + Sensor::setMockValue(SensorType::Clt, 25); + + // Now we should! + ASSERT_TRUE(Sensor::hasSensor(SensorType::Clt)); +} diff --git a/unit_tests/tests/sensor/func_chain.cpp b/unit_tests/tests/sensor/func_chain.cpp index b325a95675..875df1579d 100644 --- a/unit_tests/tests/sensor/func_chain.cpp +++ b/unit_tests/tests/sensor/func_chain.cpp @@ -4,19 +4,19 @@ struct AddOne final : public SensorConverter { SensorResult convert(float input) const { - return {true, input + 1}; + return input + 1; } }; struct SubOne final : public SensorConverter { SensorResult convert(float input) const { - return {true, input - 1}; + return input - 1; } }; struct Doubler final : public SensorConverter { SensorResult convert(float input) const { - return {true, input * 2}; + return input * 2; } }; diff --git a/unit_tests/tests/sensor/func_sensor.cpp b/unit_tests/tests/sensor/func_sensor.cpp index 81f2cdd947..b5551dd403 100644 --- a/unit_tests/tests/sensor/func_sensor.cpp +++ b/unit_tests/tests/sensor/func_sensor.cpp @@ -5,10 +5,11 @@ struct DoublerFunc final : public SensorConverter { SensorResult convert(float input) const { - bool valid = input > 0; - float value = input * 2; + if (input <= 0) { + return unexpected; + } - return {valid, value}; + return input * 2; } }; diff --git a/unit_tests/tests/sensor/mock/mock_sensor.h b/unit_tests/tests/sensor/mock/mock_sensor.h index 72177d30c3..c037194b00 100644 --- a/unit_tests/tests/sensor/mock/mock_sensor.h +++ b/unit_tests/tests/sensor/mock/mock_sensor.h @@ -18,4 +18,6 @@ struct MockSensor final : public StoredValueSensor { StoredValueSensor::invalidate(); } + + void showInfo(Logging* logger, const char* name) const override {} }; diff --git a/unit_tests/tests/sensor/redundant.cpp b/unit_tests/tests/sensor/redundant.cpp new file mode 100644 index 0000000000..0d9203cfb7 --- /dev/null +++ b/unit_tests/tests/sensor/redundant.cpp @@ -0,0 +1,218 @@ +#include "redundant_sensor.h" + +#include + +#include "mock/mock_sensor.h" + +class SensorRedundant : public ::testing::Test +{ +protected: + RedundantSensor dut; + MockSensor m1, m2; + + SensorRedundant() + : dut(SensorType::Tps1, SensorType::Tps1Primary, SensorType::Tps1Secondary) + , m1(SensorType::Tps1Primary) + , m2(SensorType::Tps1Secondary) + { + } + + void SetUp() override + { + Sensor::resetRegistry(); + + // Other tests verify registry function - don't re-test it here + ASSERT_TRUE(dut.Register()); + ASSERT_TRUE(m1.Register()); + ASSERT_TRUE(m2.Register()); + + dut.configure(5.0f, false); + } + + void TearDown() override + { + Sensor::resetRegistry(); + } +}; + +TEST_F(SensorRedundant, SetOnlyOneSensor) +{ + // Don't set any sensors - expect invalid + { + auto result = dut.get(); + EXPECT_FALSE(result.Valid); + } + + // Set one sensor + m1.set(24.0f); + + // Should still be invalid - only one is set! + { + auto result = dut.get(); + EXPECT_FALSE(result.Valid); + } +} + +TEST_F(SensorRedundant, SetTwoSensors) +{ + // Don't set any sensors - expect invalid + { + auto result = dut.get(); + EXPECT_FALSE(result.Valid); + } + + // Set one sensor + m1.set(24.0f); + // Set the other sensor + m2.set(26.0f); + + // Should now be valid - and the average of the two input + { + auto result = dut.get(); + EXPECT_TRUE(result.Valid); + EXPECT_FLOAT_EQ(result.Value, 25.0f); + } +} + +TEST_F(SensorRedundant, DifferenceNone) +{ + // Set both sensors to the same value + m1.set(10); + m2.set(10); + + // Expect valid, and 10 output + { + auto result = dut.get(); + EXPECT_TRUE(result.Valid); + EXPECT_FLOAT_EQ(result.Value, 10.0f); + } +} + +TEST_F(SensorRedundant, DifferenceNearLimit) +{ + // Set both sensors to nearly the limit (4.998 apart) + m1.set(7.501f); + m2.set(12.499f); + + // Expect valid, and 10 output + { + auto result = dut.get(); + EXPECT_TRUE(result.Valid); + EXPECT_FLOAT_EQ(result.Value, 10.0f); + } +} + +TEST_F(SensorRedundant, DifferenceOverLimit) +{ + // Set both sensors barely over the limit (5.002 apart) + m1.set(7.499f); + m2.set(12.501f); + + // Expect invalid + { + auto result = dut.get(); + EXPECT_FALSE(result.Valid); + } +} + +TEST_F(SensorRedundant, DifferenceOverLimitSwapped) +{ + // Now try it the other way (m1 > m2) + m1.set(12.501f); + m2.set(7.499f); + + // Expect invalid + { + auto result = dut.get(); + EXPECT_FALSE(result.Valid); + } +} + + +class SensorRedundantIgnoreSecond : public ::testing::Test +{ +protected: + RedundantSensor dut; + MockSensor m1, m2; + + SensorRedundantIgnoreSecond() + : dut(SensorType::Tps1, SensorType::Tps1Primary, SensorType::Tps1Secondary) + , m1(SensorType::Tps1Primary) + , m2(SensorType::Tps1Secondary) + { + } + + void SetUp() override + { + Sensor::resetRegistry(); + + // Other tests verify registry function - don't re-test it here + ASSERT_TRUE(dut.Register()); + ASSERT_TRUE(m1.Register()); + ASSERT_TRUE(m2.Register()); + + dut.configure(5.0f, true); + } + + void TearDown() override + { + Sensor::resetRegistry(); + } +}; + +TEST_F(SensorRedundantIgnoreSecond, OnlyFirst) +{ + // Don't set any sensors - expect invalid + { + auto result = dut.get(); + EXPECT_FALSE(result.Valid); + } + + // Set one sensor + m1.set(44.0f); + + // Should be valid - we don't care about second sensor + { + auto result = dut.get(); + EXPECT_TRUE(result.Valid); + EXPECT_FLOAT_EQ(result.Value, 44.0f); + } +} + +TEST_F(SensorRedundantIgnoreSecond, OnlySecond) +{ + // Don't set any sensors - expect invalid + { + auto result = dut.get(); + EXPECT_FALSE(result.Valid); + } + + // Set second sensor only + m2.set(66.0f); + + // Should be invalid - should ignore second sensor + { + auto result = dut.get(); + EXPECT_FALSE(result.Valid); + } +} + +TEST_F(SensorRedundantIgnoreSecond, SetBothIgnoreSecond) +{ + // Don't set any sensors - expect invalid + { + auto result = dut.get(); + EXPECT_FALSE(result.Valid); + } + + // Set both sensors + m1.set(74.0f); + m2.set(76.0f); + + // Should be valid, but only get the value from m1 + { + auto result = dut.get(); + EXPECT_TRUE(result.Valid); + EXPECT_FLOAT_EQ(result.Value, 74.0f); + } +} diff --git a/unit_tests/tests/sensor/resist_func.cpp b/unit_tests/tests/sensor/resist_func.cpp index 8580e382b4..c5f864ab8e 100644 --- a/unit_tests/tests/sensor/resist_func.cpp +++ b/unit_tests/tests/sensor/resist_func.cpp @@ -28,15 +28,15 @@ TEST(resistance, OutOfRange) EXPECT_FALSE(r.Valid); } - // Something near 0.95 * 5v should be valid + // Something near 0.98 * 5v should be valid { - auto r = f.convert(0.94f * 5); + auto r = f.convert(0.97f * 5); EXPECT_TRUE(r.Valid); } - // Something just above 0.95 * 5v should be invalid + // Something just above 0.98 * 5v should be invalid { - auto r = f.convert(0.96f * 5); + auto r = f.convert(0.99f * 5); EXPECT_FALSE(r.Valid); } } diff --git a/unit_tests/tests/sensor/test_sensor_init.cpp b/unit_tests/tests/sensor/test_sensor_init.cpp new file mode 100644 index 0000000000..37f28a7624 --- /dev/null +++ b/unit_tests/tests/sensor/test_sensor_init.cpp @@ -0,0 +1,157 @@ +#include "unit_test_framework.h" +#include "init.h" +#include "sensor.h" +#include "functional_sensor.h" + +#include "engine_test_helper.h" +#include + +static void postToFuncSensor(Sensor* s, float value) { + static_cast(s)->postRawValue(value, getTimeNowNt()); +} + +#define EXPECT_POINT_VALID(s, raw, expect) \ + {\ + postToFuncSensor(s, raw); \ + auto res = s->get(); \ + EXPECT_TRUE(res.Valid); \ + EXPECT_NEAR(res.Value, expect, EPS2D); \ + } + +#define EXPECT_POINT_INVALID(s, raw) \ + {\ + postToFuncSensor(s, raw); \ + auto res = s->get(); \ + EXPECT_FALSE(res.Valid); \ + } + +TEST(SensorInit, Tps) { + WITH_ENGINE_TEST_HELPER(TEST_ENGINE); + + CONFIG(tpsMin) = 200; // 1 volt + CONFIG(tpsMax) = 800; // 4 volts + + initTps(PASS_ENGINE_PARAMETER_SIGNATURE); + + // Ensure the sensors were registered + auto s = const_cast(Sensor::getSensorOfType(SensorType::Tps1)); + ASSERT_NE(nullptr, s); + + // Test in range + EXPECT_POINT_VALID(s, 1.0f, 0.0f); // closed throttle + EXPECT_POINT_VALID(s, 2.5f, 50.0f); // half throttle + EXPECT_POINT_VALID(s, 4.0f, 100.0f) // full throttle + + // Test out of range + EXPECT_POINT_INVALID(s, 0.0f); + EXPECT_POINT_INVALID(s, 5.0f); +} + +TEST(SensorInit, Pedal) { + WITH_ENGINE_TEST_HELPER(TEST_ENGINE); + + CONFIG(throttlePedalPositionAdcChannel) = EFI_ADC_0; + CONFIG(throttlePedalUpVoltage) = 1; + CONFIG(throttlePedalWOTVoltage) = 4; + + initTps(PASS_ENGINE_PARAMETER_SIGNATURE); + + // Ensure the sensors were registered + auto s = const_cast(Sensor::getSensorOfType(SensorType::AcceleratorPedal)); + ASSERT_NE(nullptr, s); + + // Test in range + EXPECT_POINT_VALID(s, 1.0f, 0.0f); // closed throttle + EXPECT_POINT_VALID(s, 2.5f, 50.0f); // half throttle + EXPECT_POINT_VALID(s, 4.0f, 100.0f) // full throttle + + // Test out of range + EXPECT_POINT_INVALID(s, 0.0f); + EXPECT_POINT_INVALID(s, 5.0f); +} + +TEST(SensorInit, DriverIntentNoPedal) { + WITH_ENGINE_TEST_HELPER(TEST_ENGINE); + + // We have no pedal - so we should get the TPS + CONFIG(throttlePedalPositionAdcChannel) = EFI_ADC_NONE; + + initTps(PASS_ENGINE_PARAMETER_SIGNATURE); + + // Ensure a sensor got set + ASSERT_TRUE(Sensor::hasSensor(SensorType::DriverThrottleIntent)); + + // Set values so we can identify which one got proxied + Sensor::setMockValue(SensorType::Tps1, 25); + Sensor::setMockValue(SensorType::AcceleratorPedal, 75); + + // Should get the TPS + EXPECT_EQ(Sensor::get(SensorType::DriverThrottleIntent).Value, 25); +} + + +TEST(SensorInit, DriverIntentWithPedal) { + WITH_ENGINE_TEST_HELPER(TEST_ENGINE); + + // We have a pedal, so we should get it + CONFIG(throttlePedalPositionAdcChannel) = EFI_ADC_0; + + initTps(PASS_ENGINE_PARAMETER_SIGNATURE); + + // Ensure a sensor got set + ASSERT_TRUE(Sensor::hasSensor(SensorType::DriverThrottleIntent)); + + // Set values so we can identify which one got proxied + Sensor::setMockValue(SensorType::Tps1, 25); + Sensor::setMockValue(SensorType::AcceleratorPedal, 75); + + // Should get the pedal + EXPECT_EQ(Sensor::get(SensorType::DriverThrottleIntent).Value, 75); +} + +TEST(SensorInit, OilPressure) { + WITH_ENGINE_TEST_HELPER(TEST_ENGINE); + + CONFIG(oilPressure.hwChannel) = EFI_ADC_0; + CONFIG(oilPressure.v1) = 1; + CONFIG(oilPressure.v2) = 4; + CONFIG(oilPressure.value1) = 0; + CONFIG(oilPressure.value2) = 1000; + + initOilPressure(PASS_ENGINE_PARAMETER_SIGNATURE); + + // Ensure the sensors were registered + auto s = const_cast(Sensor::getSensorOfType(SensorType::OilPressure)); + ASSERT_NE(nullptr, s); + + // Test in range + EXPECT_POINT_VALID(s, 1.0f, 0.0f); // minimum + EXPECT_POINT_VALID(s, 2.5f, 500.0f); // mid + EXPECT_POINT_VALID(s, 4.0f, 1000.0f) // maximium + + // Test out of range + EXPECT_POINT_INVALID(s, 0.0f); + EXPECT_POINT_INVALID(s, 5.0f); +} + +TEST(SensorInit, Clt) { + WITH_ENGINE_TEST_HELPER(TEST_ENGINE); + + // 2003 neon sensor + CONFIG(clt.config) = {0, 30, 100, 32500, 7550, 700, 2700}; + + initNewThermistors(PASS_ENGINE_PARAMETER_SIGNATURE); + + // Ensure the sensors were registered + auto s = const_cast(Sensor::getSensorOfType(SensorType::Clt)); + ASSERT_NE(nullptr, s); + + // Test in range + EXPECT_POINT_VALID(s, 4.61648f, 0.0f); // minimum - 0C + EXPECT_POINT_VALID(s, 3.6829f, 30.0f); // mid - 30C + EXPECT_POINT_VALID(s, 1.0294f, 100.0f) // maximium - 100C + + // Test out of range + EXPECT_POINT_INVALID(s, 0.0f); + EXPECT_POINT_INVALID(s, 5.0f); +} diff --git a/unit_tests/tests/test_accel_enrichment.cpp b/unit_tests/tests/test_accel_enrichment.cpp index b61e1c1e7f..8259f6f4c1 100644 --- a/unit_tests/tests/test_accel_enrichment.cpp +++ b/unit_tests/tests/test_accel_enrichment.cpp @@ -5,12 +5,12 @@ * * @date Apr 29, 2014 * Author: Dmitry Sidin - * Author: Andrey Belomutskiy, (c) 2012-2019 + * @author Andrey Belomutskiy, (c) 2012-2020 */ #include "engine_test_helper.h" #include "accel_enrichment.h" -#include "tps.h" +#include "sensor.h" TEST(fuel, testTpsAccelEnrichmentMath) { printf("====================================================================================== testAccelEnrichment\r\n"); @@ -47,14 +47,14 @@ TEST(fuel, testTpsAccelEnrichmentScheduling) { eth.setTriggerType(TT_ONE PASS_ENGINE_PARAMETER_SUFFIX); - setMockTpsValue(7 PASS_ENGINE_PARAMETER_SUFFIX); + Sensor::setMockValue(SensorType::Tps1, 7); eth.fireTriggerEvents2(/* count */ 5, 25 /* ms */); ASSERT_EQ( 1200, GET_RPM()) << "RPM"; int expectedInvocationCounter = 1; ASSERT_EQ(expectedInvocationCounter, ENGINE(tpsAccelEnrichment).onUpdateInvocationCounter); - setMockTpsValue(70 PASS_ENGINE_PARAMETER_SUFFIX); + Sensor::setMockValue(SensorType::Tps1, 70); eth.fireTriggerEvents2(/* count */ 1, 25 /* ms */); float expectedAEValue = 29.2; diff --git a/unit_tests/tests/test_aux_valves.cpp b/unit_tests/tests/test_aux_valves.cpp index 3871e00ddc..0f5426941f 100644 --- a/unit_tests/tests/test_aux_valves.cpp +++ b/unit_tests/tests/test_aux_valves.cpp @@ -2,13 +2,16 @@ * @file test_aux_valves.cpp * * @date: Nov 23, 2019 - * @Author: Andrey Belomutskiy, (c) 2012-2019 + * @author Andrey Belomutskiy, (c) 2012-2020 */ #include "engine_test_helper.h" #include "aux_valves.h" +#include "sensor.h" TEST(misc, testAuxValves) { + Sensor::setMockValue(SensorType::DriverThrottleIntent, 0); + WITH_ENGINE_TEST_HELPER(NISSAN_PRIMERA); engine->needTdcCallback = false; diff --git a/unit_tests/tests/test_closed_loop_controller.cpp b/unit_tests/tests/test_closed_loop_controller.cpp new file mode 100644 index 0000000000..3c731e516b --- /dev/null +++ b/unit_tests/tests/test_closed_loop_controller.cpp @@ -0,0 +1,124 @@ +#include "closed_loop_controller.h" + +#include "gmock/gmock.h" +#include "gtest/gtest.h" + +using ::testing::StrictMock; +using ::testing::Return; +using ::testing::Eq; + +class TestController : public ClosedLoopController { +public: + MOCK_METHOD(expected, getSetpoint, (), (const, override)); + MOCK_METHOD(expected, observePlant, (), (const, override)); + MOCK_METHOD(expected, getOpenLoop, (float setpoint), (const, override)); + MOCK_METHOD(expected, getClosedLoop, (float setpoint, float observation), (override)); + MOCK_METHOD(void, setOutput, (expected outputValue), (override)); +}; + +TEST(ClosedLoopController, TestSetpoint) { + StrictMock controller; + + // If getSetpoint returns unexpected, no other functions should be called + EXPECT_CALL(controller, getSetpoint()) + .WillOnce(Return(unexpected)); + + // And output should be called with unexpected + EXPECT_CALL(controller, setOutput(Eq(unexpected))); + + controller.update(); +} + +TEST(ClosedLoopController, TestSetpointSuccessPlantFail) { + StrictMock controller; + + // If getSetpoint returns unexpected, no other functions should be called + EXPECT_CALL(controller, getSetpoint()) + .WillOnce(Return(25.0f)); + + // Fail to observe plant - exec should stop there + EXPECT_CALL(controller, observePlant()) + .WillOnce(Return(unexpected)); + + // And output should be called with unexpected + EXPECT_CALL(controller, setOutput(Eq(unexpected))); + + controller.update(); +} + +TEST(ClosedLoopController, TestPlantSuccessOpenLoopFail) { + StrictMock controller; + + // Return valid setpoint + EXPECT_CALL(controller, getSetpoint()) + .WillOnce(Return(25.0f)); + + // Return valid observation + EXPECT_CALL(controller, observePlant()) + .WillOnce(Return(75.0f)); + + // Setpoint should get passed to open loop + // It will fail, nothing else should be called + EXPECT_CALL(controller, getOpenLoop(25.0f)) + .WillOnce(Return(unexpected)); + + // And output should be called with unexpected + EXPECT_CALL(controller, setOutput(Eq(unexpected))); + + controller.update(); +} + + +TEST(ClosedLoopController, TestPlantOpenLoopSuccessClosedLoopFail) { + StrictMock controller; + + // Return valid setpoint + EXPECT_CALL(controller, getSetpoint()) + .WillOnce(Return(25.0f)); + + // Return valid observation + EXPECT_CALL(controller, observePlant()) + .WillOnce(Return(75.0f)); + + // Setpoint should get passed to open loop + // Return something valid + EXPECT_CALL(controller, getOpenLoop(25.0f)) + .WillOnce(Return(37.0f)); + + // Setpoint & observation should get passed + // But return invalid + EXPECT_CALL(controller, getClosedLoop(25.0f, 75.0f)) + .WillOnce(Return(unexpected)); + + // And output should be called with unexpected + EXPECT_CALL(controller, setOutput(Eq(unexpected))); + + controller.update(); +} + +TEST(ClosedLoopController, TestAllSuccess) { + StrictMock controller; + + // Return valid setpoint + EXPECT_CALL(controller, getSetpoint()) + .WillOnce(Return(25.0f)); + + // Return valid observation + EXPECT_CALL(controller, observePlant()) + .WillOnce(Return(75.0f)); + + // Setpoint should get passed to open loop + // Return something valid + EXPECT_CALL(controller, getOpenLoop(25.0f)) + .WillOnce(Return(37.0f)); + + // Setpoint & observation should get passed + // Return something valid + EXPECT_CALL(controller, getClosedLoop(25.0f, 75.0f)) + .WillOnce(Return(22.0f)); + + // Output should get called with sum of open & closed loop + EXPECT_CALL(controller, setOutput(expected(59.0f))); + + controller.update(); +} diff --git a/unit_tests/tests/test_deadband.cpp b/unit_tests/tests/test_deadband.cpp new file mode 100644 index 0000000000..ed8f8de2e7 --- /dev/null +++ b/unit_tests/tests/test_deadband.cpp @@ -0,0 +1,38 @@ +#pragma once +#include +#include "deadband.h" + +TEST(Deadband, OutsideDeadband) { + Deadband<5> d; + + EXPECT_TRUE(d.gt(100, 0)); + EXPECT_FALSE(d.gt(0, 100)); +} + +TEST(Deadband, InsideDeadband) { + Deadband<5> d; + + // stick the state to true + EXPECT_TRUE(d.gt(10, 0)); + + // Make sure it stays there while inside the deadband + EXPECT_TRUE(d.gt(0, 0)); + EXPECT_TRUE(d.gt(0, 1)); + EXPECT_TRUE(d.gt(0, 2)); + EXPECT_TRUE(d.gt(0, 3)); + EXPECT_TRUE(d.gt(0, 4)); + EXPECT_TRUE(d.gt(0, 4.99)); + + // Flip the state - it should now stick false + EXPECT_FALSE(d.gt(0, 5.01)); + + // Make sure it stays there while inside the deadband + EXPECT_FALSE(d.gt(0, 4.99)); + EXPECT_FALSE(d.gt(0, 1)); + EXPECT_FALSE(d.gt(0, -1)); + EXPECT_FALSE(d.gt(0, -1)); + EXPECT_FALSE(d.gt(0, -4.99)); + + // Now it should flip back + EXPECT_TRUE(d.gt(0, -5.01)); +} diff --git a/unit_tests/tests/test_engine_math.cpp b/unit_tests/tests/test_engine_math.cpp index dd3cc9fdc0..d4a35a62c2 100644 --- a/unit_tests/tests/test_engine_math.cpp +++ b/unit_tests/tests/test_engine_math.cpp @@ -41,14 +41,16 @@ TEST(misc, testEngineMath) { ASSERT_NEAR( 50, getOneDegreeTimeMs(600) * 180, EPS4D) << "600 RPM"; ASSERT_EQ( 5, getOneDegreeTimeMs(6000) * 180) << "6000 RPM"; - ASSERT_FLOAT_EQ(312.5, getTCharge(1000, 0, 300, 350 PASS_ENGINE_PARAMETER_SUFFIX)); - ASSERT_FLOAT_EQ(313.5833, getTCharge(1000, 50, 300, 350 PASS_ENGINE_PARAMETER_SUFFIX)); - ASSERT_FLOAT_EQ(314.6667, getTCharge(1000, 100, 300, 350 PASS_ENGINE_PARAMETER_SUFFIX)); + Sensor::setMockValue(SensorType::Clt, 300); + Sensor::setMockValue(SensorType::Iat, 350); + ASSERT_FLOAT_EQ(312.5, getTCharge(1000, 0 PASS_ENGINE_PARAMETER_SUFFIX)); + ASSERT_FLOAT_EQ(313.5833, getTCharge(1000, 50 PASS_ENGINE_PARAMETER_SUFFIX)); + ASSERT_FLOAT_EQ(314.6667, getTCharge(1000, 100 PASS_ENGINE_PARAMETER_SUFFIX)); - ASSERT_FLOAT_EQ(312.5, getTCharge(4000, 0, 300, 350 PASS_ENGINE_PARAMETER_SUFFIX)); - ASSERT_FLOAT_EQ(320.0833, getTCharge(4000, 50, 300, 350 PASS_ENGINE_PARAMETER_SUFFIX)); - ASSERT_FLOAT_EQ(327.6667, getTCharge(4000, 100, 300, 350 PASS_ENGINE_PARAMETER_SUFFIX)); + ASSERT_FLOAT_EQ(312.5, getTCharge(4000, 0 PASS_ENGINE_PARAMETER_SUFFIX)); + ASSERT_FLOAT_EQ(320.0833, getTCharge(4000, 50 PASS_ENGINE_PARAMETER_SUFFIX)); + ASSERT_FLOAT_EQ(327.6667, getTCharge(4000, 100 PASS_ENGINE_PARAMETER_SUFFIX)); // test Air Interpolation mode engineConfiguration->tChargeMode = TCHARGE_MODE_AIR_INTERP; @@ -58,8 +60,11 @@ TEST(misc, testEngineMath) { // calc. some airMass given the engine displacement=1.839 and 4 cylinders (FORD_ESCORT_GT) engine->engineState.sd.airMassInOneCylinder = getCylinderAirMass(/*VE*/1.0f, /*MAP*/100.0f, /*tChargeK*/273.15f + 20.0f PASS_ENGINE_PARAMETER_SUFFIX); ASSERT_NEAR(0.5464f, engine->engineState.sd.airMassInOneCylinder, EPS4D); + + Sensor::setMockValue(SensorType::Clt, 90); + Sensor::setMockValue(SensorType::Iat, 20); // calc. airFlow using airMass, and find tCharge - ASSERT_FLOAT_EQ(59.1175f, getTCharge(/*RPM*/1000, /*TPS*/0, /*CLT*/90.0f, /*IAT*/20.0f PASS_ENGINE_PARAMETER_SUFFIX)); + ASSERT_FLOAT_EQ(59.1175f, getTCharge(/*RPM*/1000, /*TPS*/0 PASS_ENGINE_PARAMETER_SUFFIX)); ASSERT_FLOAT_EQ(65.5625f/*kg/h*/, engine->engineState.airFlow); } diff --git a/unit_tests/tests/test_etb.cpp b/unit_tests/tests/test_etb.cpp index 178e3672c0..8e3b59c3e9 100644 --- a/unit_tests/tests/test_etb.cpp +++ b/unit_tests/tests/test_etb.cpp @@ -9,40 +9,16 @@ #include "electronic_throttle.h" #include "dc_motor.h" #include "engine_controller.h" -#include "tps.h" +#include "sensor.h" -class MockEtb : public IEtbController { -public: - // todo: somehow I am failinig to figure out GMOCK syntax here? - // todo: convert to GMOCK - int resetCount = 0; - int startCount = 0; - int initCount = 0; +#include "mocks.h" - void reset() { - resetCount++; - } +using ::testing::_; +using ::testing::Ne; +using ::testing::StrictMock; - void Start() override { - startCount++; - } - - void init(DcMotor *motor, int ownIndex, pid_s *pidParameters) { - initCount++; - }; - - void PeriodicTask() { - }; - - int getPeriodMs() { - return 1; - }; -}; - - -TEST(etb, singleEtbInitialization) { - - MockEtb mocks[ETB_COUNT]; +TEST(etb, initializationNoPedal) { + StrictMock mocks[ETB_COUNT]; WITH_ENGINE_TEST_HELPER(TEST_ENGINE); @@ -50,41 +26,291 @@ TEST(etb, singleEtbInitialization) { engine->etbControllers[i] = &mocks[i]; } - engineConfiguration->throttlePedalPositionAdcChannel = EFI_ADC_9; + // We expect no throttle init stuff to be called - lack of pedal should disable ETB doInitElectronicThrottle(PASS_ENGINE_PARAMETER_SIGNATURE); - - // assert that 1st ETB is initialized and started - ASSERT_EQ(1, mocks[0].initCount) << "1st init"; - ASSERT_EQ(1, mocks[0].startCount); - - // assert that 2nd ETB is neither initialized nor started - ASSERT_EQ(0, mocks[1].initCount) << "2nd init"; - ASSERT_EQ(0, mocks[1].startCount) << "2nd start"; - - - // todo: set mock pedal position - // todo: set mock ETB throttle position - // todo: invoke EtbController#PeriodicTask a few times and assert that duty cycle changes } -TEST(etb, testTargetTpsIsFloatBug945) { +TEST(etb, initializationSingleThrottle) { + + StrictMock mocks[ETB_COUNT]; + WITH_ENGINE_TEST_HELPER(TEST_ENGINE); + for (int i = 0; i < ETB_COUNT; i++) { + engine->etbControllers[i] = &mocks[i]; + } + + // Must have a sensor configured before init + Sensor::setMockValue(SensorType::AcceleratorPedal, 0); + + // Expect mock0 to be init with index 0, and PID params + EXPECT_CALL(mocks[0], init(_, 0, &engineConfiguration->etb, Ne(nullptr))); + EXPECT_CALL(mocks[0], reset); + EXPECT_CALL(mocks[0], Start); + + // We do not expect throttle #2 to be initialized + doInitElectronicThrottle(PASS_ENGINE_PARAMETER_SIGNATURE); - - engineConfiguration->throttlePedalPositionAdcChannel = EFI_ADC_0; - - setMockThrottlePedalSensorVoltage(3 PASS_ENGINE_PARAMETER_SUFFIX); - engine->etbControllers[0]->PeriodicTask(); - ASSERT_NEAR(50, engine->engineState.targetFromTable, EPS4D); - - setMockThrottlePedalSensorVoltage(3.05 PASS_ENGINE_PARAMETER_SUFFIX); - ASSERT_NEAR(50.8302, getPedalPosition(PASS_ENGINE_PARAMETER_SIGNATURE), EPS4D); - engine->etbControllers[0]->PeriodicTask(); - ASSERT_NEAR(50.8302, engine->engineState.targetFromTable, EPS4D); - - setMockThrottlePedalSensorVoltage(3.1 PASS_ENGINE_PARAMETER_SUFFIX); - engine->etbControllers[0]->PeriodicTask(); - ASSERT_NEAR(51.6605, engine->engineState.targetFromTable, EPS4D); +} + +TEST(etb, initializationDualThrottle) { + StrictMock mocks[ETB_COUNT]; + + WITH_ENGINE_TEST_HELPER(TEST_ENGINE); + + for (int i = 0; i < ETB_COUNT; i++) { + engine->etbControllers[i] = &mocks[i]; + } + + // Must have a sensor configured before init + Sensor::setMockValue(SensorType::AcceleratorPedal, 0); + + // The presence of a second TPS indicates dual throttle + Sensor::setMockValue(SensorType::Tps2, 25.0f); + + // Expect mock0 to be init with index 0, and PID params + EXPECT_CALL(mocks[0], init(_, 0, &engineConfiguration->etb, Ne(nullptr))); + EXPECT_CALL(mocks[0], reset); + EXPECT_CALL(mocks[0], Start); + + // Expect mock1 to be init with index 2, and PID params + EXPECT_CALL(mocks[1], init(_, 1, &engineConfiguration->etb, Ne(nullptr))); + EXPECT_CALL(mocks[1], reset); + EXPECT_CALL(mocks[1], Start); + + doInitElectronicThrottle(PASS_ENGINE_PARAMETER_SIGNATURE); +} + +TEST(etb, idlePlumbing) { + StrictMock mocks[ETB_COUNT]; + + WITH_ENGINE_TEST_HELPER(TEST_ENGINE); + + for (int i = 0; i < ETB_COUNT; i++) { + engine->etbControllers[i] = &mocks[i]; + + EXPECT_CALL(mocks[i], setIdlePosition(33.0f)); + } + + setEtbIdlePosition(33.0f PASS_ENGINE_PARAMETER_SUFFIX); +} + +TEST(etb, testSetpointOnlyPedal) { + WITH_ENGINE_TEST_HELPER(TEST_ENGINE); + + // Don't use ETB for idle, we aren't testing that yet - just pedal table for now + engineConfiguration->useETBforIdleControl = false; + + EtbController etb; + INJECT_ENGINE_REFERENCE(&etb); + + // Mock pedal map that's just passthru pedal -> target + StrictMock pedalMap; + EXPECT_CALL(pedalMap, getValue(_, _)) + .WillRepeatedly([](float xRpm, float y) { + return y; + }); + + // Uninitialized ETB must return unexpected (and not deference a null pointer) + EXPECT_EQ(etb.getSetpoint(), unexpected); + + etb.init(nullptr, 0, nullptr, &pedalMap); + + // Check endpoints and midpoint + Sensor::setMockValue(SensorType::AcceleratorPedal, 0.0f); + EXPECT_EQ(0, etb.getSetpoint().value_or(-1)); + Sensor::setMockValue(SensorType::AcceleratorPedal, 50.0f); + EXPECT_EQ(50, etb.getSetpoint().value_or(-1)); + Sensor::setMockValue(SensorType::AcceleratorPedal, 100.0f); + EXPECT_EQ(100, etb.getSetpoint().value_or(-1)); + + // Test some floating point pedal/output values + Sensor::setMockValue(SensorType::AcceleratorPedal, 50.8302f); + EXPECT_NEAR(50.8302, etb.getSetpoint().value_or(-1), EPS4D); + Sensor::setMockValue(SensorType::AcceleratorPedal, 51.6605f); + EXPECT_NEAR(51.6605, etb.getSetpoint().value_or(-1), EPS4D); + + // Valid but out of range - should clamp to [0, 100] + Sensor::setMockValue(SensorType::AcceleratorPedal, -5); + EXPECT_EQ(0, etb.getSetpoint().value_or(-1)); + Sensor::setMockValue(SensorType::AcceleratorPedal, 105); + EXPECT_EQ(100, etb.getSetpoint().value_or(-1)); + + // Check that ETB idle does NOT work - it's disabled + etb.setIdlePosition(50); + Sensor::setMockValue(SensorType::AcceleratorPedal, 0); + EXPECT_EQ(0, etb.getSetpoint().value_or(-1)); + Sensor::setMockValue(SensorType::AcceleratorPedal, 20); + EXPECT_EQ(20, etb.getSetpoint().value_or(-1)); + + // Test invalid pedal position - should give unexpected + Sensor::resetMockValue(SensorType::AcceleratorPedal); + EXPECT_EQ(etb.getSetpoint(), unexpected); +} + +TEST(etb, setpointIdle) { + WITH_ENGINE_TEST_HELPER(TEST_ENGINE); + + // Use ETB for idle, but don't give it any range (yet) + engineConfiguration->useETBforIdleControl = true; + engineConfiguration->etbIdleThrottleRange = 0; + + EtbController etb; + INJECT_ENGINE_REFERENCE(&etb); + + // Mock pedal map that's just passthru pedal -> target + StrictMock pedalMap; + EXPECT_CALL(pedalMap, getValue(_, _)) + .WillRepeatedly([](float xRpm, float y) { + return y; + }); + etb.init(nullptr, 0, nullptr, &pedalMap); + + // No idle range, should just pass pedal + Sensor::setMockValue(SensorType::AcceleratorPedal, 0.0f); + EXPECT_EQ(0, etb.getSetpoint().value_or(-1)); + Sensor::setMockValue(SensorType::AcceleratorPedal, 50.0f); + EXPECT_EQ(50, etb.getSetpoint().value_or(-1)); + + // Idle should now have 10% range + engineConfiguration->etbIdleThrottleRange = 10; + + // 50% idle position should increase setpoint by 5% when closed, and 0% when open + etb.setIdlePosition(50); + Sensor::setMockValue(SensorType::AcceleratorPedal, 0.0f); + EXPECT_FLOAT_EQ(5, etb.getSetpoint().value_or(-1)); + Sensor::setMockValue(SensorType::AcceleratorPedal, 50.0f); + EXPECT_FLOAT_EQ(52.5, etb.getSetpoint().value_or(-1)); + Sensor::setMockValue(SensorType::AcceleratorPedal, 100.0f); + EXPECT_FLOAT_EQ(100, etb.getSetpoint().value_or(-1)); + + // 100% setpoint should increase by 10% closed, scaled 0% at wot + etb.setIdlePosition(100); + Sensor::setMockValue(SensorType::AcceleratorPedal, 0.0f); + EXPECT_FLOAT_EQ(10, etb.getSetpoint().value_or(-1)); + Sensor::setMockValue(SensorType::AcceleratorPedal, 50.0f); + EXPECT_FLOAT_EQ(55, etb.getSetpoint().value_or(-1)); + Sensor::setMockValue(SensorType::AcceleratorPedal, 100.0f); + EXPECT_FLOAT_EQ(100, etb.getSetpoint().value_or(-1)); + + // 125% setpoint should clamp to 10% increase + etb.setIdlePosition(125); + Sensor::setMockValue(SensorType::AcceleratorPedal, 0.0f); + EXPECT_FLOAT_EQ(10, etb.getSetpoint().value_or(-1)); + Sensor::setMockValue(SensorType::AcceleratorPedal, 50.0f); + EXPECT_FLOAT_EQ(55, etb.getSetpoint().value_or(-1)); +} + +TEST(etb, etbTpsSensor) { + // Throw some distinct values on the TPS sensors so we can identify that we're getting the correct one + Sensor::setMockValue(SensorType::Tps1, 25.0f); + Sensor::setMockValue(SensorType::Tps2, 75.0f); + + // Test first throttle + { + EtbController etb; + etb.init(nullptr, 0, nullptr, nullptr); + EXPECT_EQ(etb.observePlant().Value, 25.0f); + } + + // Test second throttle + { + EtbController etb; + etb.init(nullptr, 1, nullptr, nullptr); + EXPECT_EQ(etb.observePlant().Value, 75.0f); + } +} + +TEST(etb, setOutputInvalid) { + StrictMock motor; + + EtbController etb; + etb.init(&motor, 0, nullptr, nullptr); + + // Should be disabled in case of unexpected + EXPECT_CALL(motor, disable()); + + etb.setOutput(unexpected); +} + +TEST(etb, setOutputValid) { + StrictMock motor; + + EtbController etb; + etb.init(&motor, 0, nullptr, nullptr); + + // Should be enabled and value set + EXPECT_CALL(motor, enable()); + EXPECT_CALL(motor, set(0.25f)) + .WillOnce(Return(false)); + + etb.setOutput(25.0f); +} + +TEST(etb, setOutputValid2) { + StrictMock motor; + + EtbController etb; + + etb.init(&motor, 0, nullptr, nullptr); + + // Should be enabled and value set + EXPECT_CALL(motor, enable()); + EXPECT_CALL(motor, set(-0.25f)) + .WillOnce(Return(false)); + + etb.setOutput(-25.0f); +} + +TEST(etb, setOutputOutOfRangeHigh) { + StrictMock motor; + + EtbController etb; + etb.init(&motor, 0, nullptr, nullptr); + + // Should be enabled and value set + EXPECT_CALL(motor, enable()); + EXPECT_CALL(motor, set(0.90f)); + + // Off scale - should get clamped to 90% + etb.setOutput(110); +} + +TEST(etb, setOutputOutOfRangeLow) { + StrictMock motor; + + EtbController etb; + etb.init(&motor, 0, nullptr, nullptr); + + // Should be enabled and value set + EXPECT_CALL(motor, enable()); + EXPECT_CALL(motor, set(-0.90f)); + + // Off scale - should get clamped to -90% + etb.setOutput(-110); +} + +TEST(etb, closedLoopPid) { + pid_s pid = {}; + pid.pFactor = 5; + pid.maxValue = 75; + pid.minValue = -60; + + EtbController etb; + etb.init(nullptr, 0, &pid, nullptr); + + // Disable autotune for now + Engine e; + e.etbAutoTune = false; + etb.engine = &e; + + // Setpoint greater than actual, should be positive output + EXPECT_FLOAT_EQ(etb.getClosedLoop(50, 40).value_or(-1), 50); + // Likewise but negative + EXPECT_FLOAT_EQ(etb.getClosedLoop(50, 52).value_or(-1), -10); + + // Test PID limiting + EXPECT_FLOAT_EQ(etb.getClosedLoop(50, 70).value_or(-1), -60); + EXPECT_FLOAT_EQ(etb.getClosedLoop(50, 30).value_or(-1), 75); } diff --git a/unit_tests/tests/test_fuelCut.cpp b/unit_tests/tests/test_fuelCut.cpp index c56c2e4a9a..9df1d37ca9 100644 --- a/unit_tests/tests/test_fuelCut.cpp +++ b/unit_tests/tests/test_fuelCut.cpp @@ -8,12 +8,10 @@ #include "engine_math.h" #include "engine_test_helper.h" #include "event_queue.h" -#include "tps.h" +#include "sensor.h" #include "fsio_impl.h" TEST(fuelCut, coasting) { - printf("*************************************************** testCoastingFuelCut\r\n"); - WITH_ENGINE_TEST_HELPER(TEST_ENGINE); // configure coastingFuelCut @@ -25,17 +23,15 @@ TEST(fuelCut, coasting) { engineConfiguration->coastingFuelCutMap = 100; // set cranking threshold engineConfiguration->cranking.rpm = 999; - // configure TPS - engineConfiguration->tpsMin = 0; - engineConfiguration->tpsMax = 10; // basic engine setup setupSimpleTestEngineWithMafAndTT_ONE_trigger(ð); // mock CLT - just above threshold ('hot engine') - float hotClt = engine->sensors.clt = engineConfiguration->coastingFuelCutClt + 1; + float hotClt = engineConfiguration->coastingFuelCutClt + 1; + Sensor::setMockValue(SensorType::Clt, hotClt); // mock TPS - throttle is opened - setMockTpsAdc(6 PASS_ENGINE_PARAMETER_SUFFIX); + Sensor::setMockValue(SensorType::Tps1, 60); // set 'running' RPM - just above RpmHigh threshold engine->rpmCalculator.mockRpm = engineConfiguration->coastingFuelCutRpmHigh + 1; // 'advance' time (amount doesn't matter) @@ -53,21 +49,21 @@ TEST(fuelCut, coasting) { assertEqualsM("inj dur#1 norm", normalInjDuration, ENGINE(injectionDuration)); // 'releasing' the throttle - setMockTpsAdc(0 PASS_ENGINE_PARAMETER_SUFFIX); + Sensor::setMockValue(SensorType::Tps1, 0); eth.engine.periodicFastCallback(PASS_ENGINE_PARAMETER_SIGNATURE); // Fuel cut-off is enabled now assertEqualsM("inj dur#2 cut", 0.0f, ENGINE(injectionDuration)); // Now drop the CLT below threshold - engine->sensors.clt = engineConfiguration->coastingFuelCutClt - 1; + Sensor::setMockValue(SensorType::Clt, engineConfiguration->coastingFuelCutClt - 1); eth.engine.periodicFastCallback(PASS_ENGINE_PARAMETER_SIGNATURE); // Fuel cut-off should be diactivated - the engine is 'cold' assertEqualsM("inj dur#3 clt", normalInjDuration, ENGINE(injectionDuration)); // restore CLT - engine->sensors.clt = hotClt; + Sensor::setMockValue(SensorType::Clt, hotClt); // And set RPM - somewhere between RpmHigh and RpmLow threshold engine->rpmCalculator.mockRpm = (engineConfiguration->coastingFuelCutRpmHigh + engineConfiguration->coastingFuelCutRpmLow) / 2; eth.engine.periodicFastCallback(PASS_ENGINE_PARAMETER_SIGNATURE); @@ -118,6 +114,7 @@ TEST(fuelCut, criticalEngineTemperature) { ASSERT_FALSE(engine->stopEngineRequestTimeNt > 0); engine->sensors.mockClt = 200; // 200C is really hot! + Sensor::setMockValue(SensorType::Clt, 200); eth.engine.periodicFastCallback(PASS_ENGINE_PARAMETER_SIGNATURE); eth.engine.periodicSlowCallback(PASS_ENGINE_PARAMETER_SIGNATURE); diff --git a/unit_tests/tests/test_fuel_map.cpp b/unit_tests/tests/test_fuel_map.cpp index a4c131ac8e..ba5d1ca698 100644 --- a/unit_tests/tests/test_fuel_map.cpp +++ b/unit_tests/tests/test_fuel_map.cpp @@ -13,12 +13,15 @@ #include "engine_test_helper.h" #include "efi_gpio.h" #include "advance_map.h" +#include "sensor.h" extern float testMafValue; TEST(misc, testMafFuelMath) { printf("====================================================================================== testMafFuelMath\r\n"); WITH_ENGINE_TEST_HELPER(FORD_ASPIRE_1996); + extern fuel_Map3D_t veMap; + veMap.setAll(75); engineConfiguration->fuelAlgorithm = LM_REAL_MAF; engineConfiguration->injector.flow = 200; @@ -26,12 +29,10 @@ TEST(misc, testMafFuelMath) { setAfrMap(config->afrTable, 13); float fuelMs = getRealMafFuel(300, 6000 PASS_ENGINE_PARAMETER_SUFFIX); - assertEqualsM("fuelMs", 26.7099, fuelMs); + assertEqualsM("fuelMs", 0.75 * 13.3550, fuelMs); } TEST(misc, testFuelMap) { - printf("====================================================================================== testFuelMap\r\n"); - printf("Setting up FORD_ASPIRE_1996\r\n"); WITH_ENGINE_TEST_HELPER(FORD_ASPIRE_1996); @@ -62,6 +63,9 @@ TEST(misc, testFuelMap) { eth.engine.updateSlowSensors(PASS_ENGINE_PARAMETER_SIGNATURE); + Sensor::setMockValue(SensorType::Clt, 36.605f); + Sensor::setMockValue(SensorType::Iat, 30.0f); + // because all the correction tables are zero printf("*************************************************** getRunningFuel 1\r\n"); eth.engine.periodicFastCallback(PASS_ENGINE_PARAMETER_SIGNATURE); @@ -70,25 +74,26 @@ TEST(misc, testFuelMap) { printf("*************************************************** setting IAT table\r\n"); for (int i = 0; i < IAT_CURVE_SIZE; i++) { - eth.engine.config->iatFuelCorrBins[i] = i; + eth.engine.config->iatFuelCorrBins[i] = i * 10; eth.engine.config->iatFuelCorr[i] = 2 * i; } eth.engine.config->iatFuelCorr[0] = 2; printf("*************************************************** setting CLT table\r\n"); for (int i = 0; i < CLT_CURVE_SIZE; i++) { - eth.engine.config->cltFuelCorrBins[i] = i; - eth.engine.config->cltFuelCorr[i] = 1; + eth.engine.config->cltFuelCorrBins[i] = i * 10; + eth.engine.config->cltFuelCorr[i] = i; } + Sensor::setMockValue(SensorType::Clt, 70.0f); + Sensor::setMockValue(SensorType::Iat, 30.0f); + setFlatInjectorLag(0 PASS_CONFIG_PARAMETER_SUFFIX); - ASSERT_FALSE(cisnan(getIntakeAirTemperature())); - float iatCorrection = getIatFuelCorrection(-KELV PASS_ENGINE_PARAMETER_SUFFIX); - ASSERT_EQ( 2, iatCorrection) << "IAT"; - ASSERT_FALSE(cisnan(getCoolantTemperature())); + float iatCorrection = getIatFuelCorrection(PASS_ENGINE_PARAMETER_SIGNATURE); + ASSERT_EQ( 6, iatCorrection) << "IAT"; float cltCorrection = getCltFuelCorrection(PASS_ENGINE_PARAMETER_SIGNATURE); - ASSERT_EQ( 1, cltCorrection) << "CLT"; + ASSERT_EQ( 7, cltCorrection) << "CLT"; float injectorLag = getInjectorLag(getVBatt(PASS_ENGINE_PARAMETER_SIGNATURE) PASS_ENGINE_PARAMETER_SUFFIX); ASSERT_EQ( 0, injectorLag) << "injectorLag"; @@ -98,7 +103,11 @@ TEST(misc, testFuelMap) { printf("*************************************************** getRunningFuel 2\r\n"); eth.engine.periodicFastCallback(PASS_ENGINE_PARAMETER_SIGNATURE); baseFuel = getBaseTableFuel(5, getEngineLoadT(PASS_ENGINE_PARAMETER_SIGNATURE)); - ASSERT_EQ( 30150, getRunningFuel(baseFuel PASS_ENGINE_PARAMETER_SUFFIX)) << "v1"; + EXPECT_EQ(baseFuel, 1005); + + // Check that runningFuel corrects appropriately + EXPECT_EQ( 42, getRunningFuel(1 PASS_ENGINE_PARAMETER_SUFFIX)) << "v1"; + EXPECT_EQ( 84, getRunningFuel(2 PASS_ENGINE_PARAMETER_SUFFIX)) << "v1"; testMafValue = 0; @@ -246,9 +255,8 @@ TEST(fuel, testTpsBasedVeDefect799) { // set TPS axis range which does not overlap MAP range for this test setLinearCurve(CONFIG(ignitionTpsBins), 0, 15, 1); - engine->mockMapValue = 107; - setMockTpsValue(7 PASS_ENGINE_PARAMETER_SUFFIX); + Sensor::setMockValue(SensorType::Tps1, 7); engine->engineState.periodicFastCallback(PASS_ENGINE_PARAMETER_SIGNATURE); // value in the middle of the map as expected diff --git a/unit_tests/tests/test_gppwm.cpp b/unit_tests/tests/test_gppwm.cpp new file mode 100644 index 0000000000..0ab1cc8925 --- /dev/null +++ b/unit_tests/tests/test_gppwm.cpp @@ -0,0 +1,99 @@ + +#include "engine_test_helper.h" +#include "gppwm_channel.h" +#include "gppwm.h" +#include "sensor.h" + +#include "mocks.h" + +using ::testing::InSequence; + +TEST(GpPwm, OutputWithPwm) { + GppwmChannel ch; + + gppwm_channel cfg; + + MockPwm pwm; + + // Shouldn't throw with no config + EXPECT_NO_THROW(ch.setOutput(10)); + + { + InSequence i; + EXPECT_CALL(pwm, setSimplePwmDutyCycle(0.25f)); + EXPECT_CALL(pwm, setSimplePwmDutyCycle(0.75f)); + EXPECT_CALL(pwm, setSimplePwmDutyCycle(0.0f)); + EXPECT_CALL(pwm, setSimplePwmDutyCycle(1.0f)); + } + + ch.init(true, &pwm, nullptr, &cfg); + + // Set the output - should set directly to PWM + ch.setOutput(25.0f); + ch.setOutput(75.0f); + + // Test clamping behavior - should clamp to [0, 100] + ch.setOutput(-10.0f); + ch.setOutput(110.0f); +} + +TEST(GpPwm, OutputOnOff) { + GppwmChannel ch; + + gppwm_channel cfg; + cfg.onAboveDuty = 50; + cfg.offBelowDuty = 40; + + MockPwm pwm; + + { + InSequence i; + EXPECT_CALL(pwm, setSimplePwmDutyCycle(0.0f)); + EXPECT_CALL(pwm, setSimplePwmDutyCycle(1.0f)); + EXPECT_CALL(pwm, setSimplePwmDutyCycle(1.0f)); + EXPECT_CALL(pwm, setSimplePwmDutyCycle(1.0f)); + EXPECT_CALL(pwm, setSimplePwmDutyCycle(0.0f)); + EXPECT_CALL(pwm, setSimplePwmDutyCycle(0.0f)); + } + + ch.init(false, &pwm, nullptr, &cfg); + + // Test rising edge - these should output 0, 1, 1 + ch.setOutput(49.0f); + ch.setOutput(51.0f); + ch.setOutput(49.0f); + + // Test falling edge - these should output 1, 0, 0 + ch.setOutput(41.0f); + ch.setOutput(39.0f); + ch.setOutput(41.0f); +} + +TEST(GpPwm, GetOutput) { + WITH_ENGINE_TEST_HELPER(TEST_ENGINE); + GppwmChannel ch; + INJECT_ENGINE_REFERENCE(&ch); + + gppwm_channel cfg; + cfg.loadAxis = GPPWM_Tps; + cfg.dutyIfError = 21.0f; + + MockVp3d table; + + engine->rpmCalculator.mockRpm = 1200; + EXPECT_CALL(table, getValue(1200 / RPM_1_BYTE_PACKING_MULT, 35.0f)) + .WillRepeatedly([](float x, float tps) { + return tps; + }); + + ch.init(false, nullptr, &table, &cfg); + + Sensor::resetAllMocks(); + + // Should return dutyIfError + EXPECT_FLOAT_EQ(21.0f, ch.getOutput()); + + // Set TPS, should return tps value + Sensor::setMockValue(SensorType::Tps1, 35.0f); + EXPECT_FLOAT_EQ(35.0f, ch.getOutput()); +} diff --git a/unit_tests/tests/test_idle_controller.cpp b/unit_tests/tests/test_idle_controller.cpp index 4e1ee6c778..2dc487cc5c 100644 --- a/unit_tests/tests/test_idle_controller.cpp +++ b/unit_tests/tests/test_idle_controller.cpp @@ -14,6 +14,7 @@ #include "allsensors.h" #include "engine_controller.h" #include "electronic_throttle.h" +#include "sensor.h" extern IdleController idleControllerInstance; extern int timeNowUs; @@ -50,8 +51,6 @@ TEST(idle, fsioPidParameters) { // see also util.pid test TEST(idle, timingPid) { - print("******************************************* testTimingPidController\r\n"); - WITH_ENGINE_TEST_HELPER(TEST_ENGINE); // set PID settings @@ -69,9 +68,9 @@ TEST(idle, timingPid) { engineConfiguration->idleTimingPidWorkZone = 100; engineConfiguration->idlePidFalloffDeltaRpm = 30; - // setup target rpm curve (we need only 1 value when CLT sensor is disabled) + // setup target rpm curve const int idleRpmTarget = 700; - engineConfiguration->cltIdleRpm[0] = idleRpmTarget; + setArrayValues(engineConfiguration->cltIdleRpm, idleRpmTarget); // setup other settings engineConfiguration->idleTimingPid = pidS; @@ -80,14 +79,8 @@ TEST(idle, timingPid) { eth.engine.engineState.cltTimingCorrection = 0; // configure TPS - engineConfiguration->tpsMin = 0; - engineConfiguration->tpsMax = 100; engineConfiguration->idlePidDeactivationTpsThreshold = 10; - setMockTpsAdc(0 PASS_ENGINE_PARAMETER_SUFFIX); - - // disable temperature sensors - eth.engine.sensors.clt = NAN; - eth.engine.sensors.iat = NAN; + Sensor::setMockValue(SensorType::Tps1, 0); // all corrections disabled, should be 0 engineConfiguration->useIdleTimingPidControl = false; @@ -117,12 +110,12 @@ TEST(idle, timingPid) { ASSERT_FLOAT_EQ(-5.75f, corr) << "getAdvanceCorrections#5"; // check if PID correction is disabled in running mode (tps > threshold): - setMockTpsAdc(engineConfiguration->idlePidDeactivationTpsThreshold + 1 PASS_ENGINE_PARAMETER_SUFFIX); + Sensor::setMockValue(SensorType::Tps1, engineConfiguration->idlePidDeactivationTpsThreshold + 1); corr = getAdvanceCorrections(idleRpmTarget PASS_ENGINE_PARAMETER_SUFFIX); ASSERT_EQ(0, corr) << "getAdvanceCorrections#6"; // check if PID correction is interpolated for transient idle-running TPS positions - setMockTpsAdc(engineConfiguration->idlePidDeactivationTpsThreshold / 2 PASS_ENGINE_PARAMETER_SUFFIX); + Sensor::setMockValue(SensorType::Tps1, engineConfiguration->idlePidDeactivationTpsThreshold / 2); corr = getAdvanceCorrections(baseTestRpm PASS_ENGINE_PARAMETER_SUFFIX); ASSERT_FLOAT_EQ(-5.0f, corr) << "getAdvanceCorrections#7"; diff --git a/unit_tests/tests/test_ignition_scheduling.cpp b/unit_tests/tests/test_ignition_scheduling.cpp index 0880fd0e15..151afb186f 100644 --- a/unit_tests/tests/test_ignition_scheduling.cpp +++ b/unit_tests/tests/test_ignition_scheduling.cpp @@ -8,8 +8,6 @@ #include "engine_test_helper.h" #include "spark_logic.h" -extern EnginePins enginePins; - TEST(ignition, twoCoils) { WITH_ENGINE_TEST_HELPER(BMW_M73_F); diff --git a/unit_tests/tests/test_logic_expression.cpp b/unit_tests/tests/test_logic_expression.cpp index 63dd61c90d..806d535c0c 100644 --- a/unit_tests/tests/test_logic_expression.cpp +++ b/unit_tests/tests/test_logic_expression.cpp @@ -19,7 +19,7 @@ float getEngineValue(le_action_e action DECLARE_ENGINE_PARAMETER_SUFFIX) { case LE_METHOD_FAN: return engine->fsioState.mockFan; case LE_METHOD_COOLANT: - return getCoolantTemperature(); + return Sensor::get(SensorType::Clt).value_or(0); case LE_METHOD_RPM: return engine->fsioState.mockRpm; case LE_METHOD_CRANKING_RPM: @@ -101,13 +101,13 @@ static void testExpression2(float selfValue, const char *line, float expected, E ASSERT_EQ(expected, c.getValue2(selfValue, element PASS_ENGINE_PARAMETER_SUFFIX)) << line; } -static void testExpression2(float selfValue, const char *line, float expected) { - WITH_ENGINE_TEST_HELPER(FORD_INLINE_6_1995); +static void testExpression2(float selfValue, const char *line, float expected, const std::unordered_map& sensorVals = {}) { + WITH_ENGINE_TEST_HELPER_SENS(FORD_INLINE_6_1995, sensorVals); testExpression2(selfValue, line, expected, engine); } -static void testExpression(const char *line, float expectedValue) { - testExpression2(0, line, expectedValue); +static void testExpression(const char *line, float expectedValue, const std::unordered_map& sensorVals = {}) { + testExpression2(0, line, expectedValue, sensorVals); } TEST(fsio, testIfFunction) { @@ -115,8 +115,6 @@ TEST(fsio, testIfFunction) { } TEST(fsio, testLogicExpressions) { - printf("*************************************************** testLogicExpressions\r\n"); - testParsing(); { @@ -181,36 +179,32 @@ TEST(fsio, testLogicExpressions) { * fan = fan NOT coolant 90 AND more fan coolant 85 more AND OR */ - { - WITH_ENGINE_TEST_HELPER(FORD_INLINE_6_1995); - engine->sensors.mockClt = 100; - engine->periodicSlowCallback(PASS_ENGINE_PARAMETER_SIGNATURE); - testExpression2(0, "coolant 1 +", 101, engine); - } - testExpression("fan", 0); - testExpression("fan not", 1); - testExpression("coolant 90 >", 1); - testExpression("fan not coolant 90 > and", 1); + std::unordered_map sensorVals = {{SensorType::Clt, 100}}; + testExpression("coolant 1 +", 101, sensorVals); + + testExpression("fan", 0, sensorVals); + testExpression("fan not", 1, sensorVals); + testExpression("coolant 90 >", 1, sensorVals); + testExpression("fan not coolant 90 > and", 1, sensorVals); testExpression("100 200 1 if", 200); testExpression("10 99 max", 99); testExpression2(123, "10 self max", 123); - testExpression("fan NOT coolant 90 > AND fan coolant 85 > AND OR", 1); - { - WITH_ENGINE_TEST_HELPER(FORD_INLINE_6_1995); - LEElement thepool[TEST_POOL_SIZE]; - LEElementPool pool(thepool, TEST_POOL_SIZE); - LEElement * element = pool.parseExpression("fan NOT coolant 90 > AND fan coolant 85 > AND OR"); - ASSERT_TRUE(element != NULL) << "Not NULL expected"; - LECalculator c; - ASSERT_EQ( 1, c.getValue2(0, element PASS_ENGINE_PARAMETER_SUFFIX)) << "that expression"; + testExpression("fan NOT coolant 90 > AND fan coolant 85 > AND OR", 1, sensorVals); - ASSERT_EQ(12, c.currentCalculationLogPosition); - ASSERT_EQ(102, c.calcLogAction[0]); - ASSERT_EQ(0, c.calcLogValue[0]); - } + WITH_ENGINE_TEST_HELPER_SENS(FORD_INLINE_6_1995, sensorVals); + LEElement thepool[TEST_POOL_SIZE]; + LEElementPool pool(thepool, TEST_POOL_SIZE); + LEElement * element = pool.parseExpression("fan NOT coolant 90 > AND fan coolant 85 > AND OR"); + ASSERT_TRUE(element != NULL) << "Not NULL expected"; + LECalculator c; + ASSERT_EQ( 1, c.getValue2(0, element PASS_ENGINE_PARAMETER_SUFFIX)) << "that expression"; + + ASSERT_EQ(12, c.currentCalculationLogPosition); + ASSERT_EQ(102, c.calcLogAction[0]); + ASSERT_EQ(0, c.calcLogValue[0]); testExpression("cfg_fanOffTemperature", 0); testExpression("coolant cfg_fanOffTemperature >", 1); @@ -222,13 +216,10 @@ TEST(fsio, testLogicExpressions) { testExpression(FAN_CONTROL_LOGIC, 1); - { - WITH_ENGINE_TEST_HELPER(FORD_INLINE_6_1995); - engine->fsioState.mockRpm = 900; - engine->fsioState.mockCrankingRpm = 200; - testExpression2(0, "rpm", 900, engine); - testExpression2(0, "cranking_rpm", 200, engine); - testExpression2(0, STARTER_RELAY_LOGIC, 0, engine); - testExpression2(0, "rpm cranking_rpm > ", 1, engine); - } + engine->fsioState.mockRpm = 900; + engine->fsioState.mockCrankingRpm = 200; + testExpression2(0, "rpm", 900, engine); + testExpression2(0, "cranking_rpm", 200, engine); + testExpression2(0, STARTER_RELAY_LOGIC, 0, engine); + testExpression2(0, "rpm cranking_rpm > ", 1, engine); } diff --git a/unit_tests/tests/test_multispark.cpp b/unit_tests/tests/test_multispark.cpp new file mode 100644 index 0000000000..71cbf6191b --- /dev/null +++ b/unit_tests/tests/test_multispark.cpp @@ -0,0 +1,74 @@ +/* + * @file test_multispark.cpp + * + * @date Mar 15, 2020 + * @author Matthew Kennedy, (c) 2020 + */ + +#include "engine_test_helper.h" +#include "advance_map.h" + +TEST(Multispark, DefaultConfiguration) { + WITH_ENGINE_TEST_HELPER(TEST_ENGINE); + + EXPECT_EQ(0, getMultiSparkCount(0 PASS_ENGINE_PARAMETER_SUFFIX)); + EXPECT_EQ(0, getMultiSparkCount(100 PASS_ENGINE_PARAMETER_SUFFIX)); + EXPECT_EQ(0, getMultiSparkCount(200 PASS_ENGINE_PARAMETER_SUFFIX)); + EXPECT_EQ(0, getMultiSparkCount(500 PASS_ENGINE_PARAMETER_SUFFIX)); + EXPECT_EQ(0, getMultiSparkCount(1000 PASS_ENGINE_PARAMETER_SUFFIX)); + EXPECT_EQ(0, getMultiSparkCount(2000 PASS_ENGINE_PARAMETER_SUFFIX)); + EXPECT_EQ(0, getMultiSparkCount(5000 PASS_ENGINE_PARAMETER_SUFFIX)); + EXPECT_EQ(0, getMultiSparkCount(50000 PASS_ENGINE_PARAMETER_SUFFIX)); +} + +static void multisparkCfg(DECLARE_ENGINE_PARAMETER_SIGNATURE) { + // Turn it on! + CONFIG(multisparkEnable) = true; + + // Fire up to 45 degrees worth of sparks... + CONFIG(multisparkMaxSparkingAngle) = 45; + + // ...but limit to 10 additional sparks + CONFIG(multisparkMaxExtraSparkCount) = 10; + + // 3ms period (spark + dwell) + CONFIG(multisparkDwell) = 2000; + CONFIG(multisparkSparkDuration) = 1000; +} + +TEST(Multispark, EnabledNoMaxRpm) { + WITH_ENGINE_TEST_HELPER(TEST_ENGINE); + + multisparkCfg(PASS_ENGINE_PARAMETER_SIGNATURE); + + // Practically no RPM limit + CONFIG(multisparkMaxRpm) = 65000; + + EXPECT_EQ(0, getMultiSparkCount(0 PASS_ENGINE_PARAMETER_SUFFIX)); + EXPECT_EQ(10, getMultiSparkCount(150 PASS_ENGINE_PARAMETER_SUFFIX)); + EXPECT_EQ(10, getMultiSparkCount(250 PASS_ENGINE_PARAMETER_SUFFIX)); + EXPECT_EQ(4, getMultiSparkCount(550 PASS_ENGINE_PARAMETER_SUFFIX)); + EXPECT_EQ(3, getMultiSparkCount(800 PASS_ENGINE_PARAMETER_SUFFIX)); + EXPECT_EQ(2, getMultiSparkCount(900 PASS_ENGINE_PARAMETER_SUFFIX)); + EXPECT_EQ(1, getMultiSparkCount(1500 PASS_ENGINE_PARAMETER_SUFFIX)); + + // 2500 is the threshold where we should get zero + EXPECT_EQ(1, getMultiSparkCount(2499 PASS_ENGINE_PARAMETER_SUFFIX)); + EXPECT_EQ(0, getMultiSparkCount(2501 PASS_ENGINE_PARAMETER_SUFFIX)); + + EXPECT_EQ(0, getMultiSparkCount(5000 PASS_ENGINE_PARAMETER_SUFFIX)); + + EXPECT_EQ(0, getMultiSparkCount(50000 PASS_ENGINE_PARAMETER_SUFFIX)); +} + +TEST(Multispark, RpmLimit) { + WITH_ENGINE_TEST_HELPER(TEST_ENGINE); + + multisparkCfg(PASS_ENGINE_PARAMETER_SIGNATURE); + + // Disable at 800 rpm + CONFIG(multisparkMaxRpm) = 800; + + EXPECT_EQ(3, getMultiSparkCount(795 PASS_ENGINE_PARAMETER_SUFFIX)); + EXPECT_EQ(0, getMultiSparkCount(805 PASS_ENGINE_PARAMETER_SUFFIX)); +} diff --git a/unit_tests/tests/test_parameters.h b/unit_tests/tests/test_parameters.h index 24d8ce7e62..dd4013a41c 100644 --- a/unit_tests/tests/test_parameters.h +++ b/unit_tests/tests/test_parameters.h @@ -5,8 +5,7 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ -#ifndef TESTS_TEST_PARAMETERS_H_ -#define TESTS_TEST_PARAMETERS_H_ +#pragma once #include using namespace std; @@ -18,4 +17,3 @@ public: float get(string key) const; }; -#endif /* TESTS_TEST_PARAMETERS_H_ */ diff --git a/unit_tests/tests/test_sensors.cpp b/unit_tests/tests/test_sensors.cpp index afc59d5bba..1689c962fc 100644 --- a/unit_tests/tests/test_sensors.cpp +++ b/unit_tests/tests/test_sensors.cpp @@ -10,8 +10,6 @@ #include "allsensors.h" #include "engine_test_helper.h" - - TEST(sensors, mapDecoding) { WITH_ENGINE_TEST_HELPER(FORD_INLINE_6_1995); @@ -26,35 +24,6 @@ TEST(sensors, mapDecoding) { ASSERT_FLOAT_EQ(58.4, decodePressure(1, &s PASS_ENGINE_PARAMETER_SUFFIX)); } -TEST(sensors, tps) { - print("************************************************** testTps\r\n"); - - WITH_ENGINE_TEST_HELPER(DODGE_RAM); - - engineConfiguration->tpsMax = 193; - engineConfiguration->tpsMin = 43; - - ASSERT_NEAR(49.3333, getTpsValue(0, 117 PASS_ENGINE_PARAMETER_SUFFIX), EPS4D); - - - engineConfiguration->tpsMax = 43; - engineConfiguration->tpsMin = 193; - assertEqualsM("test#2", 50.6667, getTpsValue(0, 117 PASS_ENGINE_PARAMETER_SUFFIX)); -} - -TEST(sensors, testTpsRateOfChange) { - print("************************************************** testTpsRateOfChange\r\n"); -// saveTpsState(0, 0); -// saveTpsState(CH_FREQUENCY, 50); -// assertEquals(50, getTpsRateOfChange()); -// -// saveTpsState(2 * CH_FREQUENCY, 50); -// assertEquals(0, getTpsRateOfChange()); -// -// saveTpsState(3 * CH_FREQUENCY, 75); -// assertEquals(25, getTpsRateOfChange()); -} - TEST(sensors, Thermistor1) { ThermistorMath tm; diff --git a/unit_tests/tests/test_signal_executor.h b/unit_tests/tests/test_signal_executor.h index a57093fb87..e38f1c9c9d 100644 --- a/unit_tests/tests/test_signal_executor.h +++ b/unit_tests/tests/test_signal_executor.h @@ -5,9 +5,6 @@ * @author Andrey Belomutskiy, (c) 2012-2020 */ -#ifndef TEST_SIGNAL_EXECUTOR_H_ -#define TEST_SIGNAL_EXECUTOR_H_ +#pragma once int getRevolutionCounter(); - -#endif /* TEST_SIGNAL_EXECUTOR_H_ */ diff --git a/unit_tests/tests/test_startOfCrankingPrimingPulse.cpp b/unit_tests/tests/test_startOfCrankingPrimingPulse.cpp index 52a9468773..a13a96d6e4 100644 --- a/unit_tests/tests/test_startOfCrankingPrimingPulse.cpp +++ b/unit_tests/tests/test_startOfCrankingPrimingPulse.cpp @@ -31,8 +31,6 @@ TEST(engine, testPlainCrankingWithoutAdvancedFeatures) { TEST(engine, testStartOfCrankingPrimingPulse) { - printf("*************************************************** testStartOfCrankingPrimingPulse\r\n"); - WITH_ENGINE_TEST_HELPER(TEST_ENGINE); engineConfiguration->startOfCrankingPrimingPulse = 4; @@ -43,8 +41,8 @@ TEST(engine, testStartOfCrankingPrimingPulse) { ASSERT_NEAR( 70, engine->sensors.clt, EPS4D) << "CLT#1"; // we need below freezing temperature to get prime fuel - // todo: less cruel CLT value assignment which would survive 'updateSlowSensors' engine->sensors.clt = -10; + Sensor::setMockValue(SensorType::Clt, -10); // prod code invokes this on ECU start, here we have to mimic this behavior startPrimeInjectionPulse(PASS_ENGINE_PARAMETER_SIGNATURE); diff --git a/unit_tests/tests/test_tacho.cpp b/unit_tests/tests/test_tacho.cpp new file mode 100644 index 0000000000..96d522b2b9 --- /dev/null +++ b/unit_tests/tests/test_tacho.cpp @@ -0,0 +1,41 @@ +#include "engine_test_helper.h" + +extern WarningCodeState unitTestWarningCodeState; +extern float getTachFreq(void); +extern float getTachDuty(void); + +TEST(tachometer, testPulsePerRev) { + // This engine has a tach pin set - we need that + WITH_ENGINE_TEST_HELPER(BMW_E34); + + // We don't actually care about ign/inj at all, just tach + engineConfiguration->isInjectionEnabled = false; + engineConfiguration->isIgnitionEnabled = false; + + // Configure tach pulse count + // 5 PPR, 25% duty + engineConfiguration->tachPulsePerRev = 4; + engineConfiguration->tachPulseDuractionMs = 0.5f; + engineConfiguration->tachPulseDurationAsDutyCycle = true; + engineConfiguration->tachPulseTriggerIndex = 0; + + // Set predictable trigger settings + engineConfiguration->trigger.customTotalToothCount = 8; + engineConfiguration->trigger.customSkippedToothCount = 0; + engineConfiguration->useOnlyRisingEdgeForTrigger = false; + engineConfiguration->ambiguousOperationMode = FOUR_STROKE_CAM_SENSOR; + eth.applyTriggerWaveform(); + + // get the engine running - 6 revolutions + eth.fireTriggerEvents(48); + + // ensure engine speed and position + ASSERT_EQ(1500, GET_RPM()) << "RPM"; + ASSERT_EQ(15, engine->triggerCentral.triggerState.getCurrentIndex()) << "index #1"; + ASSERT_EQ(engine->triggerCentral.triggerState.shaft_is_synchronized, true); + ASSERT_EQ(100,getTachFreq()); + ASSERT_EQ(0.5,getTachDuty()); +std::cerr << "Tach Freq: " << getTachFreq() << "\n" << std::endl; +std::cerr << "Tach Duty: " << getTachDuty() << "\n" << std::endl; + +} diff --git a/unit_tests/tests/test_trigger_decoder.cpp b/unit_tests/tests/test_trigger_decoder.cpp index 0771e400be..73c9728749 100644 --- a/unit_tests/tests/test_trigger_decoder.cpp +++ b/unit_tests/tests/test_trigger_decoder.cpp @@ -21,6 +21,7 @@ #include "fuel_math.h" #include "spark_logic.h" #include "trigger_universal.h" +#include "sensor.h" extern float testMafValue; extern WarningCodeState unitTestWarningCodeState; @@ -152,6 +153,8 @@ TEST(misc, test1995FordInline6TriggerDecoder) { WITH_ENGINE_TEST_HELPER(FORD_INLINE_6_1995); + Sensor::setMockValue(SensorType::Iat, 49.579071f); + TriggerWaveform * shape = &engine->triggerCentral.triggerShape; ASSERT_EQ( 0, shape->getTriggerWaveformSynchPointIndex()) << "triggerShapeSynchPointIndex"; @@ -245,21 +248,17 @@ static void testTriggerDecoder3(const char *msg, engine_type_e type, int synchPo } TEST(misc, testStartupFuelPumping) { - printf("*************************************************** testStartupFuelPumping\r\n"); WITH_ENGINE_TEST_HELPER(FORD_INLINE_6_1995); StartupFuelPumping sf; engine->rpmCalculator.mockRpm = 0; - engineConfiguration->tpsMin = 0; - engineConfiguration->tpsMax = 10; - - setMockTpsAdc(6 PASS_ENGINE_PARAMETER_SUFFIX); + Sensor::setMockValue(SensorType::DriverThrottleIntent, 60); sf.update(PASS_ENGINE_PARAMETER_SIGNATURE); ASSERT_EQ( 1, sf.pumpsCounter) << "pc#1"; - setMockTpsAdc(3 PASS_ENGINE_PARAMETER_SUFFIX); + Sensor::setMockValue(SensorType::DriverThrottleIntent, 30); sf.update(PASS_ENGINE_PARAMETER_SIGNATURE); ASSERT_EQ( 1, sf.pumpsCounter) << "pumpsCounter#2"; @@ -270,16 +269,16 @@ TEST(misc, testStartupFuelPumping) { sf.update(PASS_ENGINE_PARAMETER_SIGNATURE); ASSERT_EQ( 0, sf.pumpsCounter) << "pc#4"; - setMockTpsAdc(7 PASS_ENGINE_PARAMETER_SUFFIX); + Sensor::setMockValue(SensorType::DriverThrottleIntent, 70); engine->rpmCalculator.mockRpm = 0; sf.update(PASS_ENGINE_PARAMETER_SIGNATURE); ASSERT_EQ( 1, sf.pumpsCounter) << "pc#5"; - setMockTpsAdc(3 PASS_ENGINE_PARAMETER_SUFFIX); + Sensor::setMockValue(SensorType::DriverThrottleIntent, 30); sf.update(PASS_ENGINE_PARAMETER_SIGNATURE); ASSERT_EQ( 1, sf.pumpsCounter) << "pc#6"; - setMockTpsAdc(7 PASS_ENGINE_PARAMETER_SUFFIX); + Sensor::setMockValue(SensorType::DriverThrottleIntent, 70); sf.update(PASS_ENGINE_PARAMETER_SIGNATURE); ASSERT_EQ( 2, sf.pumpsCounter) << "pc#7"; } @@ -293,7 +292,6 @@ static void assertREqualsM(const char *msg, void *expected, void *actual) { } extern bool_t debugSignalExecutor; -extern EnginePins enginePins; TEST(misc, testRpmCalculator) { printf("*************************************************** testRpmCalculator\r\n"); diff --git a/unit_tests/tests/test_util.cpp b/unit_tests/tests/test_util.cpp index 2c1e98546e..1d312ab6d7 100644 --- a/unit_tests/tests/test_util.cpp +++ b/unit_tests/tests/test_util.cpp @@ -146,14 +146,14 @@ TEST(util, histogram) { static void testMalfunctionCentralRemoveNonExistent() { print("******************************************* testMalfunctionCentralRemoveNonExistent\r\n"); - initMalfunctionCentral(); + clearWarnings(); // this should not crash removeError(OBD_Engine_Coolant_Temperature_Circuit_Malfunction); } static void testMalfunctionCentralSameElementAgain() { - initMalfunctionCentral(); + clearWarnings(); print("******************************************* testMalfunctionCentralSameElementAgain\r\n"); error_codes_set_s localCopy; @@ -164,7 +164,7 @@ static void testMalfunctionCentralSameElementAgain() { } static void testMalfunctionCentralRemoveFirstElement() { - initMalfunctionCentral(); + clearWarnings(); print("******************************************* testMalfunctionCentralRemoveFirstElement\r\n"); error_codes_set_s localCopy; @@ -190,7 +190,7 @@ TEST(misc, testMalfunctionCentral) { testMalfunctionCentralRemoveFirstElement(); print("******************************************* testMalfunctionCentral\r\n"); - initMalfunctionCentral(); + clearWarnings(); error_codes_set_s localCopy; diff --git a/unit_tests/tests/tests.mk b/unit_tests/tests/tests.mk index 61e1d94923..b48dfb3882 100644 --- a/unit_tests/tests/tests.mk +++ b/unit_tests/tests/tests.mk @@ -33,7 +33,10 @@ TESTS_SRC_CPP = \ tests/test_pid_auto.cpp \ tests/test_pid.cpp \ tests/test_accel_enrichment.cpp \ + tests/test_tacho.cpp \ tests/test_gpiochip.cpp \ + tests/test_multispark.cpp \ + tests/test_deadband.cpp \ tests/sensor/basic_sensor.cpp \ tests/sensor/func_sensor.cpp \ tests/sensor/function_pointer_sensor.cpp \ @@ -42,4 +45,9 @@ TESTS_SRC_CPP = \ tests/sensor/lin_func.cpp \ tests/sensor/resist_func.cpp \ tests/sensor/therm_func.cpp \ - tests/sensor/func_chain.cpp + tests/sensor/func_chain.cpp \ + tests/sensor/redundant.cpp \ + tests/sensor/test_sensor_init.cpp \ + tests/test_closed_loop_controller.cpp \ + tests/test_gppwm.cpp \ + diff --git a/unit_tests/triggers.txt b/unit_tests/triggers.txt deleted file mode 100644 index 22706e689e..0000000000 --- a/unit_tests/triggers.txt +++ /dev/null @@ -1,2467 +0,0 @@ -# Generated by rusEfi unit test suite -# This file is used by TriggerImage tool -# See 'gen_trigger_images.bat' -TRIGGERTYPE 1 10 TT_FORD_ASPIRE 0.00 -# duty 0.50 0.38 -event 0 1 0.00 -event 1 1001 52.76 -event 2 1000 121.90 -event 3 1001 232.76 -event 4 1000 301.90 -event 5 0 360.00 -event 6 1001 412.76 -event 7 1000 481.90 -event 8 1001 592.76 -event 9 1000 661.90 -TRIGGERTYPE 2 36 TT_DODGE_NEON_1995 0.00 -# duty 0.49 0.21 -event 0 0 0.00 -event 1 1001 20.00 -event 2 1000 60.00 -event 3 1001 75.00 -event 4 1000 79.00 -event 5 1001 101.00 -event 6 1000 106.00 -event 7 1001 130.00 -event 8 1000 135.00 -event 9 1 200.00 -event 10 1001 236.00 -event 11 1000 239.00 -event 12 1001 250.00 -event 13 1000 255.00 -event 14 1001 277.00 -event 15 1000 282.00 -event 16 1001 305.00 -event 17 1000 310.00 -event 18 1001 374.00 -event 19 0 395.00 -event 20 1000 418.00 -event 21 1001 436.00 -event 22 1000 441.00 -event 23 1001 463.00 -event 24 1000 468.00 -event 25 1001 492.00 -event 26 1000 497.00 -event 27 1 560.00 -event 28 1001 600.00 -event 29 1000 604.00 -event 30 1001 616.00 -event 31 1000 620.00 -event 32 1001 643.00 -event 33 1000 648.00 -event 34 1001 671.00 -event 35 1000 676.00 -TRIGGERTYPE 3 12 TT_MAZDA_MIATA_NA 294.00 -# duty 0.30 0.39 -event 0 0 0.00 -event 1 1001 52.96 -event 2 1000 122.64 -event 3 1 216.90 -event 4 1001 232.64 -event 5 0 288.82 -event 6 1000 302.65 -event 7 1001 412.45 -event 8 1000 482.82 -event 9 1 577.04 -event 10 1001 592.88 -event 11 1000 662.90 -TRIGGERTYPE 4 22 TT_MAZDA_MIATA_NB1 276.00 -# duty 0.08 0.04 -event 0 0 0.00 -event 1 1001 26.00 -event 2 1000 30.00 -event 3 1001 96.00 -event 4 1000 100.00 -event 5 1001 206.00 -event 6 1000 210.00 -event 7 1001 276.00 -event 8 1000 280.00 -event 9 1 320.00 -event 10 0 340.00 -event 11 1001 386.00 -event 12 1000 390.00 -event 13 1001 456.00 -event 14 1000 460.00 -event 15 1001 566.00 -event 16 1000 570.00 -event 17 1001 636.00 -event 18 1000 640.00 -event 19 1 660.00 -event 20 0 680.00 -event 21 1 700.00 -TRIGGERTYPE 5 28 TT_GM_7X 0.00 -# duty 0.90 0.00 -event 0 1 0.00 -event 1 0 5.00 -event 2 1 60.00 -event 3 0 65.00 -event 4 1 120.00 -event 5 0 125.00 -event 6 1 180.00 -event 7 0 185.00 -event 8 1 240.00 -event 9 0 245.00 -event 10 1 290.00 -event 11 0 295.00 -event 12 1 300.00 -event 13 0 305.00 -event 14 1 360.00 -event 15 0 365.00 -event 16 1 420.00 -event 17 0 425.00 -event 18 1 480.00 -event 19 0 485.00 -event 20 1 540.00 -event 21 0 545.00 -event 22 1 600.00 -event 23 0 605.00 -event 24 1 650.00 -event 25 0 655.00 -event 26 1 660.00 -event 27 0 665.00 -TRIGGERTYPE 6 234 TT_MINI_COOPER_R50 0.00 -# duty 0.52 0.50 -event 0 1 0.00 -event 1 1001 0.36 -event 2 1000 3.34 -event 3 1001 6.31 -event 4 1000 9.29 -event 5 1001 12.26 -event 6 1000 15.24 -event 7 1001 18.22 -event 8 1000 21.19 -event 9 1001 24.17 -event 10 1000 27.14 -event 11 1001 30.12 -event 12 1000 33.09 -event 13 1001 36.07 -event 14 1000 39.04 -event 15 1001 42.02 -event 16 1000 44.99 -event 17 1001 47.97 -event 18 1000 50.94 -event 19 1001 53.92 -event 20 1000 56.89 -event 21 1001 59.87 -event 22 1000 62.84 -event 23 1001 65.82 -event 24 1000 68.79 -event 25 1001 71.77 -event 26 1000 74.74 -event 27 1001 77.72 -event 28 1000 80.69 -event 29 1001 83.67 -event 30 1000 86.65 -event 31 1001 89.62 -event 32 1000 92.60 -event 33 1001 95.57 -event 34 1000 98.55 -event 35 1001 101.52 -event 36 1000 104.50 -event 37 1001 107.47 -event 38 1000 110.45 -event 39 1001 113.42 -event 40 1000 116.40 -event 41 1001 119.37 -event 42 1000 122.35 -event 43 1001 134.25 -event 44 1000 143.17 -event 45 1001 146.15 -event 46 1000 149.12 -event 47 1001 152.10 -event 48 1000 155.08 -event 49 1001 158.05 -event 50 1000 161.03 -event 51 1001 164.00 -event 52 1000 166.98 -event 53 1001 169.95 -event 54 1000 172.93 -event 55 1001 175.90 -event 56 1000 178.88 -event 57 1001 181.85 -event 58 1000 184.83 -event 59 1001 187.80 -event 60 1000 190.78 -event 61 1001 193.75 -event 62 1000 196.73 -event 63 1001 199.70 -event 64 1000 202.68 -event 65 1001 205.65 -event 66 1000 208.63 -event 67 1001 211.60 -event 68 1000 214.58 -event 69 1001 217.55 -event 70 1000 220.53 -event 71 1001 223.51 -event 72 1000 226.48 -event 73 1001 229.46 -event 74 1000 232.43 -event 75 1001 235.41 -event 76 1000 238.38 -event 77 1001 241.36 -event 78 1000 244.33 -event 79 1001 247.31 -event 80 1000 250.28 -event 81 1001 253.26 -event 82 1000 256.23 -event 83 1001 259.21 -event 84 1000 262.18 -event 85 1001 265.16 -event 86 1000 268.13 -event 87 1001 271.11 -event 88 1000 274.08 -event 89 1001 277.06 -event 90 1000 280.03 -event 91 1001 283.01 -event 92 1000 285.99 -event 93 1001 288.96 -event 94 1000 291.94 -event 95 1001 294.91 -event 96 1000 297.89 -event 97 1001 300.86 -event 98 1000 303.84 -event 99 1001 306.81 -event 100 1000 309.79 -event 101 1001 312.76 -event 102 1000 315.74 -event 103 1001 318.71 -event 104 1000 321.69 -event 105 1001 324.66 -event 106 1000 327.64 -event 107 1001 330.61 -event 108 1000 333.59 -event 109 1001 336.56 -event 110 1000 339.54 -event 111 1001 342.51 -event 112 0 344.00 -event 113 1000 345.49 -event 114 1001 348.46 -event 115 1000 351.44 -event 116 1001 354.41 -event 117 1000 357.39 -event 118 1001 360.36 -event 119 1000 363.34 -event 120 1001 366.31 -event 121 1000 369.29 -event 122 1001 372.26 -event 123 1000 375.24 -event 124 1001 378.21 -event 125 1000 381.19 -event 126 1001 384.17 -event 127 1000 387.14 -event 128 1001 390.12 -event 129 1000 393.09 -event 130 1001 396.07 -event 131 1000 399.04 -event 132 1001 402.02 -event 133 1000 404.99 -event 134 1001 407.97 -event 135 1000 410.94 -event 136 1001 413.92 -event 137 1000 416.89 -event 138 1001 419.87 -event 139 1000 422.84 -event 140 1001 425.82 -event 141 1000 428.79 -event 142 1001 431.77 -event 143 1000 434.74 -event 144 1001 437.72 -event 145 1000 440.69 -event 146 1001 443.67 -event 147 1000 446.64 -event 148 1001 449.62 -event 149 1000 452.60 -event 150 1001 455.57 -event 151 1000 458.55 -event 152 1001 461.52 -event 153 1000 464.50 -event 154 1001 467.47 -event 155 1000 470.45 -event 156 1001 473.42 -event 157 1000 476.40 -event 158 1001 479.37 -event 159 1000 482.35 -event 160 1001 494.25 -event 161 1000 503.17 -event 162 1001 506.15 -event 163 1000 509.12 -event 164 1001 512.10 -event 165 1000 515.07 -event 166 1001 518.05 -event 167 1000 521.02 -event 168 1001 524.00 -event 169 1000 526.98 -event 170 1001 529.95 -event 171 1000 532.93 -event 172 1001 535.90 -event 173 1000 538.88 -event 174 1001 541.85 -event 175 1000 544.83 -event 176 1001 547.80 -event 177 1000 550.78 -event 178 1001 553.75 -event 179 1000 556.73 -event 180 1001 559.70 -event 181 1000 562.68 -event 182 1001 565.65 -event 183 1000 568.63 -event 184 1001 571.60 -event 185 1000 574.58 -event 186 1001 577.55 -event 187 1000 580.53 -event 188 1001 583.50 -event 189 1000 586.48 -event 190 1001 589.45 -event 191 1000 592.43 -event 192 1001 595.40 -event 193 1000 598.38 -event 194 1001 601.36 -event 195 1000 604.33 -event 196 1001 607.31 -event 197 1000 610.28 -event 198 1001 613.26 -event 199 1000 616.23 -event 200 1001 619.21 -event 201 1000 622.18 -event 202 1001 625.16 -event 203 1000 628.13 -event 204 1001 631.11 -event 205 1000 634.08 -event 206 1001 637.06 -event 207 1000 640.03 -event 208 1001 643.01 -event 209 1000 645.98 -event 210 1001 648.96 -event 211 1000 651.93 -event 212 1001 654.91 -event 213 1000 657.88 -event 214 1001 660.86 -event 215 1000 663.83 -event 216 1001 666.81 -event 217 1000 669.79 -event 218 1001 672.76 -event 219 1000 675.74 -event 220 1001 678.71 -event 221 1000 681.69 -event 222 1001 684.66 -event 223 1000 687.64 -event 224 1001 690.61 -event 225 1000 693.59 -event 226 1001 696.56 -event 227 1000 699.54 -event 228 1001 702.51 -event 229 1000 705.49 -event 230 1001 708.46 -event 231 1000 711.44 -event 232 1001 714.41 -event 233 1000 717.39 -TRIGGERTYPE 7 8 TT_MAZDA_SOHC_4 0.00 -# duty 0.63 0.00 -event 0 1 0.00 -event 1 0 66.96 -event 2 1 180.00 -event 3 0 246.96 -event 4 1 360.00 -event 5 0 426.96 -event 6 1 540.00 -event 7 0 606.96 -TRIGGERTYPE 8 116 TT_TOOTHED_WHEEL_60_2 0.00 -# duty 0.48 0.00 -event 0 1 0.00 -event 1 0 6.00 -event 2 1 12.00 -event 3 0 18.00 -event 4 1 24.00 -event 5 0 30.00 -event 6 1 36.00 -event 7 0 42.00 -event 8 1 48.00 -event 9 0 54.00 -event 10 1 60.00 -event 11 0 66.00 -event 12 1 72.00 -event 13 0 78.00 -event 14 1 84.00 -event 15 0 90.00 -event 16 1 96.00 -event 17 0 102.00 -event 18 1 108.00 -event 19 0 114.00 -event 20 1 120.00 -event 21 0 126.00 -event 22 1 132.00 -event 23 0 138.00 -event 24 1 144.00 -event 25 0 150.00 -event 26 1 156.00 -event 27 0 162.00 -event 28 1 168.00 -event 29 0 174.00 -event 30 1 180.00 -event 31 0 186.00 -event 32 1 192.00 -event 33 0 198.00 -event 34 1 204.00 -event 35 0 210.00 -event 36 1 216.00 -event 37 0 222.00 -event 38 1 228.00 -event 39 0 234.00 -event 40 1 240.00 -event 41 0 246.00 -event 42 1 252.00 -event 43 0 258.00 -event 44 1 264.00 -event 45 0 270.00 -event 46 1 276.00 -event 47 0 282.00 -event 48 1 288.00 -event 49 0 294.00 -event 50 1 300.00 -event 51 0 306.00 -event 52 1 312.00 -event 53 0 318.00 -event 54 1 324.00 -event 55 0 330.00 -event 56 1 336.00 -event 57 0 342.00 -event 58 1 348.00 -event 59 0 354.00 -event 60 1 360.00 -event 61 0 366.00 -event 62 1 372.00 -event 63 0 378.00 -event 64 1 384.00 -event 65 0 390.00 -event 66 1 396.00 -event 67 0 402.00 -event 68 1 408.00 -event 69 0 414.00 -event 70 1 420.00 -event 71 0 426.00 -event 72 1 432.00 -event 73 0 438.00 -event 74 1 444.00 -event 75 0 450.00 -event 76 1 456.00 -event 77 0 462.00 -event 78 1 468.00 -event 79 0 474.00 -event 80 1 480.00 -event 81 0 486.00 -event 82 1 492.00 -event 83 0 498.00 -event 84 1 504.00 -event 85 0 510.00 -event 86 1 516.00 -event 87 0 522.00 -event 88 1 528.00 -event 89 0 534.00 -event 90 1 540.00 -event 91 0 546.00 -event 92 1 552.00 -event 93 0 558.00 -event 94 1 564.00 -event 95 0 570.00 -event 96 1 576.00 -event 97 0 582.00 -event 98 1 588.00 -event 99 0 594.00 -event 100 1 600.00 -event 101 0 606.00 -event 102 1 612.00 -event 103 0 618.00 -event 104 1 624.00 -event 105 0 630.00 -event 106 1 636.00 -event 107 0 642.00 -event 108 1 648.00 -event 109 0 654.00 -event 110 1 660.00 -event 111 0 666.00 -event 112 1 672.00 -event 113 0 678.00 -event 114 1 684.00 -event 115 0 714.00 -TRIGGERTYPE 9 70 TT_TOOTHED_WHEEL_36_1 0.00 -# duty 0.49 0.00 -event 0 1 0.00 -event 1 0 10.00 -event 2 1 20.00 -event 3 0 30.00 -event 4 1 40.00 -event 5 0 50.00 -event 6 1 60.00 -event 7 0 70.00 -event 8 1 80.00 -event 9 0 90.00 -event 10 1 100.00 -event 11 0 110.00 -event 12 1 120.00 -event 13 0 130.00 -event 14 1 140.00 -event 15 0 150.00 -event 16 1 160.00 -event 17 0 170.00 -event 18 1 180.00 -event 19 0 190.00 -event 20 1 200.00 -event 21 0 210.00 -event 22 1 220.00 -event 23 0 230.00 -event 24 1 240.00 -event 25 0 250.00 -event 26 1 260.00 -event 27 0 270.00 -event 28 1 280.00 -event 29 0 290.00 -event 30 1 300.00 -event 31 0 310.00 -event 32 1 320.00 -event 33 0 330.00 -event 34 1 340.00 -event 35 0 350.00 -event 36 1 360.00 -event 37 0 370.00 -event 38 1 380.00 -event 39 0 390.00 -event 40 1 400.00 -event 41 0 410.00 -event 42 1 420.00 -event 43 0 430.00 -event 44 1 440.00 -event 45 0 450.00 -event 46 1 460.00 -event 47 0 470.00 -event 48 1 480.00 -event 49 0 490.00 -event 50 1 500.00 -event 51 0 510.00 -event 52 1 520.00 -event 53 0 530.00 -event 54 1 540.00 -event 55 0 550.00 -event 56 1 560.00 -event 57 0 570.00 -event 58 1 580.00 -event 59 0 590.00 -event 60 1 600.00 -event 61 0 610.00 -event 62 1 620.00 -event 63 0 630.00 -event 64 1 640.00 -event 65 0 650.00 -event 66 1 660.00 -event 67 0 670.00 -event 68 1 680.00 -event 69 0 710.00 -TRIGGERTYPE 10 58 TT_HONDA_4_24_1 0.00 -# duty 0.81 0.50 -event 0 1 0.00 -event 1 1001 8.37 -event 2 1000 23.37 -event 3 0 33.37 -event 4 1001 38.37 -event 5 1000 53.37 -event 6 1001 68.37 -event 7 1000 83.37 -event 8 1001 98.37 -event 9 1000 113.37 -event 10 1001 128.37 -event 11 1000 143.37 -event 12 1001 158.37 -event 13 1000 173.37 -event 14 1 180.00 -event 15 1001 188.37 -event 16 1000 203.37 -event 17 0 213.37 -event 18 1001 218.37 -event 19 1000 233.37 -event 20 1001 248.37 -event 21 1000 263.37 -event 22 1001 278.37 -event 23 1000 293.37 -event 24 1001 308.37 -event 25 1000 323.37 -event 26 1001 338.37 -event 27 1000 353.37 -event 28 1 360.00 -event 29 1001 368.37 -event 30 1000 383.37 -event 31 0 393.37 -event 32 1001 398.37 -event 33 1000 413.37 -event 34 1001 428.37 -event 35 1000 443.37 -event 36 1001 458.37 -event 37 1000 473.37 -event 38 1001 488.37 -event 39 1000 503.37 -event 40 1001 518.37 -event 41 1000 533.37 -event 42 1 540.00 -event 43 1001 548.37 -event 44 1000 563.37 -event 45 0 573.37 -event 46 1001 578.37 -event 47 1000 593.37 -event 48 2001 600.87 -event 49 1001 608.37 -event 50 1000 623.37 -event 51 1001 638.37 -event 52 1000 653.37 -event 53 2000 660.87 -event 54 1001 668.37 -event 55 1000 683.37 -event 56 1001 698.37 -event 57 1000 713.37 -TRIGGERTYPE 11 12 TT_MITSUBISHI 0.00 -# duty 0.36 0.38 -event 0 0 0.00 -event 1 1001 13.32 -event 2 1000 81.30 -event 3 1 179.55 -event 4 1001 192.10 -event 5 0 248.14 -event 6 1000 259.90 -event 7 1001 369.67 -event 8 1000 437.19 -event 9 1 532.74 -event 10 1001 546.37 -event 11 1000 613.22 -TRIGGERTYPE 12 56 TT_HONDA_4_24 0.00 -# duty 0.81 0.50 -event 0 1 0.00 -event 1 1001 8.37 -event 2 1000 23.37 -event 3 0 33.37 -event 4 1001 38.37 -event 5 1000 53.37 -event 6 1001 68.37 -event 7 1000 83.37 -event 8 1001 98.37 -event 9 1000 113.37 -event 10 1001 128.37 -event 11 1000 143.37 -event 12 1001 158.37 -event 13 1000 173.37 -event 14 1 180.00 -event 15 1001 188.37 -event 16 1000 203.37 -event 17 0 213.37 -event 18 1001 218.37 -event 19 1000 233.37 -event 20 1001 248.37 -event 21 1000 263.37 -event 22 1001 278.37 -event 23 1000 293.37 -event 24 1001 308.37 -event 25 1000 323.37 -event 26 1001 338.37 -event 27 1000 353.37 -event 28 1 360.00 -event 29 1001 368.37 -event 30 1000 383.37 -event 31 0 393.37 -event 32 1001 398.37 -event 33 1000 413.37 -event 34 1001 428.37 -event 35 1000 443.37 -event 36 1001 458.37 -event 37 1000 473.37 -event 38 1001 488.37 -event 39 1000 503.37 -event 40 1001 518.37 -event 41 1000 533.37 -event 42 1 540.00 -event 43 1001 548.37 -event 44 1000 563.37 -event 45 0 573.37 -event 46 1001 578.37 -event 47 1000 593.37 -event 48 1001 608.37 -event 49 1000 623.37 -event 50 1001 638.37 -event 51 1000 653.37 -event 52 1001 668.37 -event 53 1000 683.37 -event 54 1001 698.37 -event 55 1000 713.37 -TRIGGERTYPE 13 58 TT_HONDA_1_4_24 0.00 -# duty 0.50 0.50 -event 0 1 0.00 -event 1 1001 7.50 -event 2 2001 15.00 -event 3 2000 22.50 -event 4 2001 45.00 -event 5 2000 52.50 -event 6 2001 75.00 -event 7 2000 82.50 -event 8 1000 97.50 -event 9 2001 105.00 -event 10 2000 112.50 -event 11 2001 135.00 -event 12 2000 142.50 -event 13 2001 165.00 -event 14 2000 172.50 -event 15 1001 187.50 -event 16 2001 195.00 -event 17 2000 202.50 -event 18 2001 225.00 -event 19 2000 232.50 -event 20 2001 255.00 -event 21 2000 262.50 -event 22 1000 277.50 -event 23 2001 285.00 -event 24 2000 292.50 -event 25 2001 315.00 -event 26 2000 322.50 -event 27 2001 345.00 -event 28 2000 352.50 -event 29 0 360.00 -event 30 1001 367.50 -event 31 2001 375.00 -event 32 2000 382.50 -event 33 2001 405.00 -event 34 2000 412.50 -event 35 2001 435.00 -event 36 2000 442.50 -event 37 1000 457.50 -event 38 2001 465.00 -event 39 2000 472.50 -event 40 2001 495.00 -event 41 2000 502.50 -event 42 2001 525.00 -event 43 2000 532.50 -event 44 1001 547.50 -event 45 2001 555.00 -event 46 2000 562.50 -event 47 2001 585.00 -event 48 2000 592.50 -event 49 2001 615.00 -event 50 2000 622.50 -event 51 1000 637.50 -event 52 2001 645.00 -event 53 2000 652.50 -event 54 2001 675.00 -event 55 2000 682.50 -event 56 2001 705.00 -event 57 2000 712.50 -TRIGGERTYPE 14 14 TT_DODGE_NEON_2003_CAM 496.00 -# duty 0.50 0.00 -event 0 1 0.00 -event 1 0 144.00 -event 2 1 180.00 -event 3 0 216.00 -event 4 1 252.00 -event 5 0 288.00 -event 6 1 324.00 -event 7 0 360.00 -event 8 1 504.00 -event 9 0 540.00 -event 10 1 576.00 -event 11 0 612.00 -event 12 1 648.00 -event 13 0 684.00 -TRIGGERTYPE 15 10 TT_MAZDA_DOHC_1_4 137.12 -# duty 0.81 0.38 -event 0 1 0.00 -event 1 1001 14.88 -event 2 1000 82.69 -event 3 0 137.12 -event 4 1001 192.38 -event 5 1000 261.56 -event 6 1001 373.06 -event 7 1000 443.50 -event 8 1001 555.35 -event 9 1000 624.67 -TRIGGERTYPE 16 4 TT_ONE_PLUS_ONE 0.00 -# duty 0.75 0.25 -event 0 1 0.00 -event 1 0 180.00 -event 2 1001 360.00 -event 3 1000 540.00 -TRIGGERTYPE 17 234 TT_ONE_PLUS_TOOTHED_WHEEL_60_2 0.00 -# duty 0.97 0.52 -event 0 1 0.00 -event 1 1001 1.00 -event 2 1000 4.00 -event 3 1001 7.00 -event 4 1000 10.00 -event 5 1001 13.00 -event 6 1000 16.00 -event 7 0 18.00 -event 8 1001 19.00 -event 9 1000 22.00 -event 10 1001 25.00 -event 11 1000 28.00 -event 12 1001 31.00 -event 13 1000 34.00 -event 14 1001 37.00 -event 15 1000 40.00 -event 16 1001 43.00 -event 17 1000 46.00 -event 18 1001 49.00 -event 19 1000 52.00 -event 20 1001 55.00 -event 21 1000 58.00 -event 22 1001 61.00 -event 23 1000 64.00 -event 24 1001 67.00 -event 25 1000 70.00 -event 26 1001 73.00 -event 27 1000 76.00 -event 28 1001 79.00 -event 29 1000 82.00 -event 30 1001 85.00 -event 31 1000 88.00 -event 32 1001 91.00 -event 33 1000 94.00 -event 34 1001 97.00 -event 35 1000 100.00 -event 36 1001 103.00 -event 37 1000 106.00 -event 38 1001 109.00 -event 39 1000 112.00 -event 40 1001 115.00 -event 41 1000 118.00 -event 42 1001 121.00 -event 43 1000 124.00 -event 44 1001 127.00 -event 45 1000 130.00 -event 46 1001 133.00 -event 47 1000 136.00 -event 48 1001 139.00 -event 49 1000 142.00 -event 50 1001 145.00 -event 51 1000 148.00 -event 52 1001 151.00 -event 53 1000 154.00 -event 54 1001 157.00 -event 55 1000 160.00 -event 56 1001 163.00 -event 57 1000 166.00 -event 58 1001 169.00 -event 59 1000 172.00 -event 60 1001 175.00 -event 61 1000 178.00 -event 62 1001 181.00 -event 63 1000 184.00 -event 64 1001 187.00 -event 65 1000 190.00 -event 66 1001 193.00 -event 67 1000 196.00 -event 68 1001 199.00 -event 69 1000 202.00 -event 70 1001 205.00 -event 71 1000 208.00 -event 72 1001 211.00 -event 73 1000 214.00 -event 74 1001 217.00 -event 75 1000 220.00 -event 76 1001 223.00 -event 77 1000 226.00 -event 78 1001 229.00 -event 79 1000 232.00 -event 80 1001 235.00 -event 81 1000 238.00 -event 82 1001 241.00 -event 83 1000 244.00 -event 84 1001 247.00 -event 85 1000 250.00 -event 86 1001 253.00 -event 87 1000 256.00 -event 88 1001 259.00 -event 89 1000 262.00 -event 90 1001 265.00 -event 91 1000 268.00 -event 92 1001 271.00 -event 93 1000 274.00 -event 94 1001 277.00 -event 95 1000 280.00 -event 96 1001 283.00 -event 97 1000 286.00 -event 98 1001 289.00 -event 99 1000 292.00 -event 100 1001 295.00 -event 101 1000 298.00 -event 102 1001 301.00 -event 103 1000 304.00 -event 104 1001 307.00 -event 105 1000 310.00 -event 106 1001 313.00 -event 107 1000 316.00 -event 108 1001 319.00 -event 109 1000 322.00 -event 110 1001 325.00 -event 111 1000 328.00 -event 112 1001 331.00 -event 113 1000 334.00 -event 114 1001 337.00 -event 115 1000 340.00 -event 116 1001 343.00 -event 117 1000 358.00 -event 118 1001 361.00 -event 119 1000 364.00 -event 120 1001 367.00 -event 121 1000 370.00 -event 122 1001 373.00 -event 123 1000 376.00 -event 124 1001 379.00 -event 125 1000 382.00 -event 126 1001 385.00 -event 127 1000 388.00 -event 128 1001 391.00 -event 129 1000 394.00 -event 130 1001 397.00 -event 131 1000 400.00 -event 132 1001 403.00 -event 133 1000 406.00 -event 134 1001 409.00 -event 135 1000 412.00 -event 136 1001 415.00 -event 137 1000 418.00 -event 138 1001 421.00 -event 139 1000 424.00 -event 140 1001 427.00 -event 141 1000 430.00 -event 142 1001 433.00 -event 143 1000 436.00 -event 144 1001 439.00 -event 145 1000 442.00 -event 146 1001 445.00 -event 147 1000 448.00 -event 148 1001 451.00 -event 149 1000 454.00 -event 150 1001 457.00 -event 151 1000 460.00 -event 152 1001 463.00 -event 153 1000 466.00 -event 154 1001 469.00 -event 155 1000 472.00 -event 156 1001 475.00 -event 157 1000 478.00 -event 158 1001 481.00 -event 159 1000 484.00 -event 160 1001 487.00 -event 161 1000 490.00 -event 162 1001 493.00 -event 163 1000 496.00 -event 164 1001 499.00 -event 165 1000 502.00 -event 166 1001 505.00 -event 167 1000 508.00 -event 168 1001 511.00 -event 169 1000 514.00 -event 170 1001 517.00 -event 171 1000 520.00 -event 172 1001 523.00 -event 173 1000 526.00 -event 174 1001 529.00 -event 175 1000 532.00 -event 176 1001 535.00 -event 177 1000 538.00 -event 178 1001 541.00 -event 179 1000 544.00 -event 180 1001 547.00 -event 181 1000 550.00 -event 182 1001 553.00 -event 183 1000 556.00 -event 184 1001 559.00 -event 185 1000 562.00 -event 186 1001 565.00 -event 187 1000 568.00 -event 188 1001 571.00 -event 189 1000 574.00 -event 190 1001 577.00 -event 191 1000 580.00 -event 192 1001 583.00 -event 193 1000 586.00 -event 194 1001 589.00 -event 195 1000 592.00 -event 196 1001 595.00 -event 197 1000 598.00 -event 198 1001 601.00 -event 199 1000 604.00 -event 200 1001 607.00 -event 201 1000 610.00 -event 202 1001 613.00 -event 203 1000 616.00 -event 204 1001 619.00 -event 205 1000 622.00 -event 206 1001 625.00 -event 207 1000 628.00 -event 208 1001 631.00 -event 209 1000 634.00 -event 210 1001 637.00 -event 211 1000 640.00 -event 212 1001 643.00 -event 213 1000 646.00 -event 214 1001 649.00 -event 215 1000 652.00 -event 216 1001 655.00 -event 217 1000 658.00 -event 218 1001 661.00 -event 219 1000 664.00 -event 220 1001 667.00 -event 221 1000 670.00 -event 222 1001 673.00 -event 223 1000 676.00 -event 224 1001 679.00 -event 225 1000 682.00 -event 226 1001 685.00 -event 227 1000 688.00 -event 228 1001 691.00 -event 229 1000 694.00 -event 230 1001 697.00 -event 231 1000 700.00 -event 232 1001 703.00 -event 233 1000 718.00 -TRIGGERTYPE 18 2 TT_ONE 0.00 -# duty 0.50 0.00 -event 0 1 0.00 -event 1 0 360.00 -TRIGGERTYPE 19 34 TT_DODGE_RAM 0.00 -# duty 0.50 0.06 -event 0 1 0.00 -event 1 1001 17.30 -event 2 1000 20.00 -event 3 1001 62.30 -event 4 1000 65.00 -event 5 1001 107.30 -event 6 1000 110.00 -event 7 1001 152.30 -event 8 1000 155.00 -event 9 1001 197.30 -event 10 1000 200.00 -event 11 1001 242.30 -event 12 1000 245.00 -event 13 1001 287.30 -event 14 1000 290.00 -event 15 1001 332.30 -event 16 1000 335.00 -event 17 0 360.00 -event 18 1001 377.30 -event 19 1000 380.00 -event 20 1001 422.30 -event 21 1000 425.00 -event 22 1001 467.30 -event 23 1000 470.00 -event 24 1001 512.30 -event 25 1000 515.00 -event 26 1001 557.30 -event 27 1000 560.00 -event 28 1001 602.30 -event 29 1000 605.00 -event 30 1001 647.30 -event 31 1000 650.00 -event 32 1001 692.30 -event 33 1000 695.00 -TRIGGERTYPE 20 232 TT_60_2_VW 0.00 -# duty 0.50 0.00 -event 0 1 0.00 -event 1 0 9.00 -event 2 1 12.00 -event 3 0 15.00 -event 4 1 18.00 -event 5 0 21.00 -event 6 1 24.00 -event 7 0 27.00 -event 8 1 30.00 -event 9 0 33.00 -event 10 1 36.00 -event 11 0 39.00 -event 12 1 42.00 -event 13 0 45.00 -event 14 1 48.00 -event 15 0 51.00 -event 16 1 54.00 -event 17 0 57.00 -event 18 1 60.00 -event 19 0 63.00 -event 20 1 66.00 -event 21 0 69.00 -event 22 1 72.00 -event 23 0 75.00 -event 24 1 78.00 -event 25 0 81.00 -event 26 1 84.00 -event 27 0 87.00 -event 28 1 90.00 -event 29 0 93.00 -event 30 1 96.00 -event 31 0 99.00 -event 32 1 102.00 -event 33 0 105.00 -event 34 1 108.00 -event 35 0 111.00 -event 36 1 114.00 -event 37 0 117.00 -event 38 1 120.00 -event 39 0 123.00 -event 40 1 126.00 -event 41 0 129.00 -event 42 1 132.00 -event 43 0 135.00 -event 44 1 138.00 -event 45 0 141.00 -event 46 1 144.00 -event 47 0 147.00 -event 48 1 150.00 -event 49 0 153.00 -event 50 1 156.00 -event 51 0 159.00 -event 52 1 162.00 -event 53 0 165.00 -event 54 1 168.00 -event 55 0 171.00 -event 56 1 174.00 -event 57 0 177.00 -event 58 1 180.00 -event 59 0 183.00 -event 60 1 186.00 -event 61 0 189.00 -event 62 1 192.00 -event 63 0 195.00 -event 64 1 198.00 -event 65 0 201.00 -event 66 1 204.00 -event 67 0 207.00 -event 68 1 210.00 -event 69 0 213.00 -event 70 1 216.00 -event 71 0 219.00 -event 72 1 222.00 -event 73 0 225.00 -event 74 1 228.00 -event 75 0 231.00 -event 76 1 234.00 -event 77 0 237.00 -event 78 1 240.00 -event 79 0 243.00 -event 80 1 246.00 -event 81 0 249.00 -event 82 1 252.00 -event 83 0 255.00 -event 84 1 258.00 -event 85 0 261.00 -event 86 1 264.00 -event 87 0 267.00 -event 88 1 270.00 -event 89 0 273.00 -event 90 1 276.00 -event 91 0 279.00 -event 92 1 282.00 -event 93 0 285.00 -event 94 1 288.00 -event 95 0 291.00 -event 96 1 294.00 -event 97 0 297.00 -event 98 1 300.00 -event 99 0 303.00 -event 100 1 306.00 -event 101 0 309.00 -event 102 1 312.00 -event 103 0 315.00 -event 104 1 318.00 -event 105 0 321.00 -event 106 1 324.00 -event 107 0 327.00 -event 108 1 330.00 -event 109 0 333.00 -event 110 1 336.00 -event 111 0 339.00 -event 112 1 342.00 -event 113 0 345.00 -event 114 1 348.00 -event 115 0 351.00 -event 116 1 360.00 -event 117 0 369.00 -event 118 1 372.00 -event 119 0 375.00 -event 120 1 378.00 -event 121 0 381.00 -event 122 1 384.00 -event 123 0 387.00 -event 124 1 390.00 -event 125 0 393.00 -event 126 1 396.00 -event 127 0 399.00 -event 128 1 402.00 -event 129 0 405.00 -event 130 1 408.00 -event 131 0 411.00 -event 132 1 414.00 -event 133 0 417.00 -event 134 1 420.00 -event 135 0 423.00 -event 136 1 426.00 -event 137 0 429.00 -event 138 1 432.00 -event 139 0 435.00 -event 140 1 438.00 -event 141 0 441.00 -event 142 1 444.00 -event 143 0 447.00 -event 144 1 450.00 -event 145 0 453.00 -event 146 1 456.00 -event 147 0 459.00 -event 148 1 462.00 -event 149 0 465.00 -event 150 1 468.00 -event 151 0 471.00 -event 152 1 474.00 -event 153 0 477.00 -event 154 1 480.00 -event 155 0 483.00 -event 156 1 486.00 -event 157 0 489.00 -event 158 1 492.00 -event 159 0 495.00 -event 160 1 498.00 -event 161 0 501.00 -event 162 1 504.00 -event 163 0 507.00 -event 164 1 510.00 -event 165 0 513.00 -event 166 1 516.00 -event 167 0 519.00 -event 168 1 522.00 -event 169 0 525.00 -event 170 1 528.00 -event 171 0 531.00 -event 172 1 534.00 -event 173 0 537.00 -event 174 1 540.00 -event 175 0 543.00 -event 176 1 546.00 -event 177 0 549.00 -event 178 1 552.00 -event 179 0 555.00 -event 180 1 558.00 -event 181 0 561.00 -event 182 1 564.00 -event 183 0 567.00 -event 184 1 570.00 -event 185 0 573.00 -event 186 1 576.00 -event 187 0 579.00 -event 188 1 582.00 -event 189 0 585.00 -event 190 1 588.00 -event 191 0 591.00 -event 192 1 594.00 -event 193 0 597.00 -event 194 1 600.00 -event 195 0 603.00 -event 196 1 606.00 -event 197 0 609.00 -event 198 1 612.00 -event 199 0 615.00 -event 200 1 618.00 -event 201 0 621.00 -event 202 1 624.00 -event 203 0 627.00 -event 204 1 630.00 -event 205 0 633.00 -event 206 1 636.00 -event 207 0 639.00 -event 208 1 642.00 -event 209 0 645.00 -event 210 1 648.00 -event 211 0 651.00 -event 212 1 654.00 -event 213 0 657.00 -event 214 1 660.00 -event 215 0 663.00 -event 216 1 666.00 -event 217 0 669.00 -event 218 1 672.00 -event 219 0 675.00 -event 220 1 678.00 -event 221 0 681.00 -event 222 1 684.00 -event 223 0 687.00 -event 224 1 690.00 -event 225 0 693.00 -event 226 1 696.00 -event 227 0 699.00 -event 228 1 702.00 -event 229 0 705.00 -event 230 1 708.00 -event 231 0 711.00 -TRIGGERTYPE 21 50 TT_HONDA_1_24 0.00 -# duty 0.92 0.50 -event 0 1 0.00 -event 1 1001 7.50 -event 2 1000 22.50 -event 3 1001 37.50 -event 4 1000 52.50 -event 5 0 60.00 -event 6 1001 67.50 -event 7 1000 82.50 -event 8 1001 97.50 -event 9 1000 112.50 -event 10 1001 127.50 -event 11 1000 142.50 -event 12 1001 157.50 -event 13 1000 172.50 -event 14 1001 187.50 -event 15 1000 202.50 -event 16 1001 217.50 -event 17 1000 232.50 -event 18 1001 247.50 -event 19 1000 262.50 -event 20 1001 277.50 -event 21 1000 292.50 -event 22 1001 307.50 -event 23 1000 322.50 -event 24 1001 337.50 -event 25 1000 352.50 -event 26 1001 367.50 -event 27 1000 382.50 -event 28 1001 397.50 -event 29 1000 412.50 -event 30 1001 427.50 -event 31 1000 442.50 -event 32 1001 457.50 -event 33 1000 472.50 -event 34 1001 487.50 -event 35 1000 502.50 -event 36 1001 517.50 -event 37 1000 532.50 -event 38 1001 547.50 -event 39 1000 562.50 -event 40 1001 577.50 -event 41 1000 592.50 -event 42 1001 607.50 -event 43 1000 622.50 -event 44 1001 637.50 -event 45 1000 652.50 -event 46 1001 667.50 -event 47 1000 682.50 -event 48 1001 697.50 -event 49 1000 712.50 -TRIGGERTYPE 22 24 TT_DODGE_STRATUS 150.00 -# duty 0.88 0.00 -event 0 1 0.00 -event 1 0 7.00 -event 2 1 20.00 -event 3 0 27.00 -event 4 1 120.00 -event 5 0 127.00 -event 6 1 140.00 -event 7 0 147.00 -event 8 1 160.00 -event 9 0 167.00 -event 10 1 240.00 -event 11 0 247.00 -event 12 1 260.00 -event 13 0 267.00 -event 14 1 360.00 -event 15 0 367.00 -event 16 1 480.00 -event 17 0 487.00 -event 18 1 500.00 -event 19 0 507.00 -event 20 1 520.00 -event 21 0 527.00 -event 22 1 600.00 -event 23 0 607.00 -TRIGGERTYPE 23 60 TT_36_2_2_2 0.00 -# duty 0.50 0.00 -event 0 1 0.00 -event 1 0 10.00 -event 2 1 20.00 -event 3 0 30.00 -event 4 1 40.00 -event 5 0 50.00 -event 6 1 60.00 -event 7 0 70.00 -event 8 1 80.00 -event 9 0 90.00 -event 10 1 100.00 -event 11 0 110.00 -event 12 1 120.00 -event 13 0 130.00 -event 14 1 140.00 -event 15 0 150.00 -event 16 1 160.00 -event 17 0 170.00 -event 18 1 180.00 -event 19 0 190.00 -event 20 1 200.00 -event 21 0 210.00 -event 22 1 220.00 -event 23 0 230.00 -event 24 1 240.00 -event 25 0 250.00 -event 26 1 260.00 -event 27 0 270.00 -event 28 1 300.00 -event 29 0 330.00 -event 30 1 360.00 -event 31 0 390.00 -event 32 1 400.00 -event 33 0 410.00 -event 34 1 420.00 -event 35 0 430.00 -event 36 1 440.00 -event 37 0 450.00 -event 38 1 460.00 -event 39 0 470.00 -event 40 1 480.00 -event 41 0 490.00 -event 42 1 500.00 -event 43 0 510.00 -event 44 1 520.00 -event 45 0 530.00 -event 46 1 540.00 -event 47 0 550.00 -event 48 1 560.00 -event 49 0 570.00 -event 50 1 580.00 -event 51 0 590.00 -event 52 1 600.00 -event 53 0 610.00 -event 54 1 620.00 -event 55 0 630.00 -event 56 1 660.00 -event 57 0 690.00 -event 58 1 700.00 -event 59 0 710.00 -TRIGGERTYPE 24 8 TT_NISSAN_SR20VE 630.00 -# duty 0.96 0.00 -event 0 1 0.00 -event 1 0 4.00 -event 2 1 180.00 -event 3 0 184.00 -event 4 1 360.00 -event 5 0 364.00 -event 6 1 528.00 -event 7 0 544.00 -TRIGGERTYPE 25 136 TT_2JZ_3_34 0.00 -# duty 0.47 0.00 -event 0 1 0.00 -event 1 0 5.00 -event 2 1 10.00 -event 3 0 15.00 -event 4 1 20.00 -event 5 0 25.00 -event 6 1 30.00 -event 7 0 35.00 -event 8 1 40.00 -event 9 0 45.00 -event 10 1 50.00 -event 11 0 55.00 -event 12 1 60.00 -event 13 0 65.00 -event 14 1 70.00 -event 15 0 75.00 -event 16 1 80.00 -event 17 0 85.00 -event 18 1 90.00 -event 19 0 95.00 -event 20 1 100.00 -event 21 0 105.00 -event 22 1 110.00 -event 23 0 115.00 -event 24 1 120.00 -event 25 0 125.00 -event 26 1 130.00 -event 27 0 135.00 -event 28 1 140.00 -event 29 0 145.00 -event 30 1 150.00 -event 31 0 155.00 -event 32 1 160.00 -event 33 0 165.00 -event 34 1 170.00 -event 35 0 175.00 -event 36 1 180.00 -event 37 0 185.00 -event 38 1 190.00 -event 39 0 195.00 -event 40 1 200.00 -event 41 0 205.00 -event 42 1 210.00 -event 43 0 215.00 -event 44 1 220.00 -event 45 0 225.00 -event 46 1 230.00 -event 47 0 235.00 -event 48 1 240.00 -event 49 0 245.00 -event 50 1 250.00 -event 51 0 255.00 -event 52 1 260.00 -event 53 0 265.00 -event 54 1 270.00 -event 55 0 275.00 -event 56 1 280.00 -event 57 0 285.00 -event 58 1 290.00 -event 59 0 295.00 -event 60 1 300.00 -event 61 0 305.00 -event 62 1 310.00 -event 63 0 315.00 -event 64 1 320.00 -event 65 0 325.00 -event 66 1 330.00 -event 67 0 355.00 -event 68 1 360.00 -event 69 0 365.00 -event 70 1 370.00 -event 71 0 375.00 -event 72 1 380.00 -event 73 0 385.00 -event 74 1 390.00 -event 75 0 395.00 -event 76 1 400.00 -event 77 0 405.00 -event 78 1 410.00 -event 79 0 415.00 -event 80 1 420.00 -event 81 0 425.00 -event 82 1 430.00 -event 83 0 435.00 -event 84 1 440.00 -event 85 0 445.00 -event 86 1 450.00 -event 87 0 455.00 -event 88 1 460.00 -event 89 0 465.00 -event 90 1 470.00 -event 91 0 475.00 -event 92 1 480.00 -event 93 0 485.00 -event 94 1 490.00 -event 95 0 495.00 -event 96 1 500.00 -event 97 0 505.00 -event 98 1 510.00 -event 99 0 515.00 -event 100 1 520.00 -event 101 0 525.00 -event 102 1 530.00 -event 103 0 535.00 -event 104 1 540.00 -event 105 0 545.00 -event 106 1 550.00 -event 107 0 555.00 -event 108 1 560.00 -event 109 0 565.00 -event 110 1 570.00 -event 111 0 575.00 -event 112 1 580.00 -event 113 0 585.00 -event 114 1 590.00 -event 115 0 595.00 -event 116 1 600.00 -event 117 0 605.00 -event 118 1 610.00 -event 119 0 615.00 -event 120 1 620.00 -event 121 0 625.00 -event 122 1 630.00 -event 123 0 635.00 -event 124 1 640.00 -event 125 0 645.00 -event 126 1 650.00 -event 127 0 655.00 -event 128 1 660.00 -event 129 0 665.00 -event 130 1 670.00 -event 131 0 675.00 -event 132 1 680.00 -event 133 0 685.00 -event 134 1 690.00 -event 135 0 715.00 -TRIGGERTYPE 26 128 TT_ROVER_K 0.00 -# duty 0.56 0.00 -event 0 1 0.00 -event 1 0 5.00 -event 2 1 10.00 -event 3 0 15.00 -event 4 1 20.00 -event 5 0 25.00 -event 6 1 30.00 -event 7 0 35.00 -event 8 1 40.00 -event 9 0 45.00 -event 10 1 50.00 -event 11 0 55.00 -event 12 1 60.00 -event 13 0 65.00 -event 14 1 70.00 -event 15 0 75.00 -event 16 1 80.00 -event 17 0 85.00 -event 18 1 90.00 -event 19 0 95.00 -event 20 1 100.00 -event 21 0 105.00 -event 22 1 110.00 -event 23 0 115.00 -event 24 1 120.00 -event 25 0 125.00 -event 26 1 130.00 -event 27 0 135.00 -event 28 1 150.00 -event 29 0 155.00 -event 30 1 160.00 -event 31 0 165.00 -event 32 1 170.00 -event 33 0 175.00 -event 34 1 190.00 -event 35 0 195.00 -event 36 1 200.00 -event 37 0 205.00 -event 38 1 210.00 -event 39 0 215.00 -event 40 1 220.00 -event 41 0 225.00 -event 42 1 230.00 -event 43 0 235.00 -event 44 1 240.00 -event 45 0 245.00 -event 46 1 250.00 -event 47 0 255.00 -event 48 1 260.00 -event 49 0 265.00 -event 50 1 270.00 -event 51 0 275.00 -event 52 1 280.00 -event 53 0 285.00 -event 54 1 290.00 -event 55 0 295.00 -event 56 1 300.00 -event 57 0 305.00 -event 58 1 310.00 -event 59 0 315.00 -event 60 1 330.00 -event 61 0 335.00 -event 62 1 340.00 -event 63 0 345.00 -event 64 1 360.00 -event 65 0 365.00 -event 66 1 370.00 -event 67 0 375.00 -event 68 1 380.00 -event 69 0 385.00 -event 70 1 390.00 -event 71 0 395.00 -event 72 1 400.00 -event 73 0 405.00 -event 74 1 410.00 -event 75 0 415.00 -event 76 1 420.00 -event 77 0 425.00 -event 78 1 430.00 -event 79 0 435.00 -event 80 1 440.00 -event 81 0 445.00 -event 82 1 450.00 -event 83 0 455.00 -event 84 1 460.00 -event 85 0 465.00 -event 86 1 470.00 -event 87 0 475.00 -event 88 1 480.00 -event 89 0 485.00 -event 90 1 490.00 -event 91 0 495.00 -event 92 1 510.00 -event 93 0 515.00 -event 94 1 520.00 -event 95 0 525.00 -event 96 1 530.00 -event 97 0 535.00 -event 98 1 550.00 -event 99 0 555.00 -event 100 1 560.00 -event 101 0 565.00 -event 102 1 570.00 -event 103 0 575.00 -event 104 1 580.00 -event 105 0 585.00 -event 106 1 590.00 -event 107 0 595.00 -event 108 1 600.00 -event 109 0 605.00 -event 110 1 610.00 -event 111 0 615.00 -event 112 1 620.00 -event 113 0 625.00 -event 114 1 630.00 -event 115 0 635.00 -event 116 1 640.00 -event 117 0 645.00 -event 118 1 650.00 -event 119 0 655.00 -event 120 1 660.00 -event 121 0 665.00 -event 122 1 670.00 -event 123 0 675.00 -event 124 1 690.00 -event 125 0 695.00 -event 126 1 700.00 -event 127 0 705.00 -TRIGGERTYPE 27 96 TT_GM_LS_24 0.00 -# duty 0.50 0.00 -event 0 1 0.00 -event 1 0 5.00 -event 2 1 15.00 -event 3 0 20.00 -event 4 1 30.00 -event 5 0 35.00 -event 6 1 45.00 -event 7 0 50.00 -event 8 1 60.00 -event 9 0 65.00 -event 10 1 70.00 -event 11 0 80.00 -event 12 1 85.00 -event 13 0 95.00 -event 14 1 100.00 -event 15 0 110.00 -event 16 1 115.00 -event 17 0 125.00 -event 18 1 130.00 -event 19 0 140.00 -event 20 1 150.00 -event 21 0 155.00 -event 22 1 160.00 -event 23 0 170.00 -event 24 1 175.00 -event 25 0 185.00 -event 26 1 190.00 -event 27 0 200.00 -event 28 1 210.00 -event 29 0 215.00 -event 30 1 225.00 -event 31 0 230.00 -event 32 1 235.00 -event 33 0 245.00 -event 34 1 250.00 -event 35 0 260.00 -event 36 1 270.00 -event 37 0 275.00 -event 38 1 285.00 -event 39 0 290.00 -event 40 1 300.00 -event 41 0 305.00 -event 42 1 310.00 -event 43 0 320.00 -event 44 1 330.00 -event 45 0 335.00 -event 46 1 340.00 -event 47 0 350.00 -event 48 1 360.00 -event 49 0 365.00 -event 50 1 375.00 -event 51 0 380.00 -event 52 1 390.00 -event 53 0 395.00 -event 54 1 405.00 -event 55 0 410.00 -event 56 1 420.00 -event 57 0 425.00 -event 58 1 430.00 -event 59 0 440.00 -event 60 1 445.00 -event 61 0 455.00 -event 62 1 460.00 -event 63 0 470.00 -event 64 1 475.00 -event 65 0 485.00 -event 66 1 490.00 -event 67 0 500.00 -event 68 1 510.00 -event 69 0 515.00 -event 70 1 520.00 -event 71 0 530.00 -event 72 1 535.00 -event 73 0 545.00 -event 74 1 550.00 -event 75 0 560.00 -event 76 1 570.00 -event 77 0 575.00 -event 78 1 585.00 -event 79 0 590.00 -event 80 1 595.00 -event 81 0 605.00 -event 82 1 610.00 -event 83 0 620.00 -event 84 1 630.00 -event 85 0 635.00 -event 86 1 645.00 -event 87 0 650.00 -event 88 1 660.00 -event 89 0 665.00 -event 90 1 670.00 -event 91 0 680.00 -event 92 1 690.00 -event 93 0 695.00 -event 94 1 700.00 -event 95 0 710.00 -TRIGGERTYPE 28 54 TT_HONDA_CBR_600 0.00 -# duty 0.51 0.50 -event 0 1 0.00 -event 1 1000 0.20 -event 2 1001 15.00 -event 3 1000 30.00 -event 4 1001 45.00 -event 5 1000 60.00 -event 6 1001 75.00 -event 7 1000 90.00 -event 8 1001 105.00 -event 9 1000 120.00 -event 10 1001 135.00 -event 11 1000 150.00 -event 12 1001 165.00 -event 13 1000 180.00 -event 14 1001 195.00 -event 15 1000 210.00 -event 16 1001 225.00 -event 17 1000 240.00 -event 18 1001 255.00 -event 19 1000 270.00 -event 20 1001 285.00 -event 21 0 290.00 -event 22 1 300.00 -event 23 1000 300.20 -event 24 1001 315.00 -event 25 1000 330.00 -event 26 1001 345.00 -event 27 0 350.00 -event 28 1000 359.00 -event 29 1 360.00 -event 30 1001 375.00 -event 31 1000 390.00 -event 32 1001 405.00 -event 33 1000 420.00 -event 34 1001 435.00 -event 35 1000 450.00 -event 36 1001 465.00 -event 37 1000 480.00 -event 38 1001 495.00 -event 39 1000 510.00 -event 40 1001 525.00 -event 41 1000 540.00 -event 42 1001 555.00 -event 43 1000 570.00 -event 44 1001 585.00 -event 45 1000 600.00 -event 46 1001 615.00 -event 47 1000 630.00 -event 48 1001 645.00 -event 49 1000 660.00 -event 50 1001 675.00 -event 51 1000 690.00 -event 52 1001 705.00 -event 53 0 710.00 -TRIGGERTYPE 29 50 TT_2JZ_1_12 0.00 -# duty 0.01 0.50 -event 0 1001 0.00 -event 1 1000 15.00 -event 2 1001 30.00 -event 3 1000 45.00 -event 4 0 50.00 -event 5 1001 60.00 -event 6 1000 75.00 -event 7 1001 90.00 -event 8 1000 105.00 -event 9 1001 120.00 -event 10 1000 135.00 -event 11 1001 150.00 -event 12 1000 165.00 -event 13 1001 180.00 -event 14 1000 195.00 -event 15 1001 210.00 -event 16 1000 225.00 -event 17 1001 240.00 -event 18 1000 255.00 -event 19 1001 270.00 -event 20 1000 285.00 -event 21 1001 300.00 -event 22 1000 315.00 -event 23 1001 330.00 -event 24 1000 345.00 -event 25 1001 360.00 -event 26 1000 375.00 -event 27 1001 390.00 -event 28 1000 405.00 -event 29 1001 420.00 -event 30 1000 435.00 -event 31 1001 450.00 -event 32 1000 465.00 -event 33 1001 480.00 -event 34 1000 495.00 -event 35 1001 510.00 -event 36 1000 525.00 -event 37 1001 540.00 -event 38 1000 555.00 -event 39 1001 570.00 -event 40 1000 585.00 -event 41 1001 600.00 -event 42 1000 615.00 -event 43 1001 630.00 -event 44 1000 645.00 -event 45 1001 660.00 -event 46 1000 675.00 -event 47 1001 690.00 -event 48 1 695.00 -event 49 1000 705.00 -TRIGGERTYPE 30 52 TT_HONDA_CBR_600_CUSTOM 0.00 -# duty 0.89 0.49 -event 0 1 0.00 -event 1 1001 15.00 -event 2 1000 29.00 -event 3 1001 45.00 -event 4 0 52.40 -event 5 1000 59.00 -event 6 1001 75.00 -event 7 1000 90.00 -event 8 1001 105.00 -event 9 1000 120.00 -event 10 1001 135.00 -event 11 1000 150.00 -event 12 1001 165.00 -event 13 1000 180.00 -event 14 1001 195.00 -event 15 1000 210.00 -event 16 1001 225.00 -event 17 1000 240.00 -event 18 1001 255.00 -event 19 1000 270.00 -event 20 1001 285.00 -event 21 1000 300.00 -event 22 1001 315.00 -event 23 1000 330.00 -event 24 1001 345.00 -event 25 1000 360.00 -event 26 1001 375.00 -event 27 1 381.34 -event 28 1000 389.00 -event 29 1001 405.00 -event 30 1000 420.00 -event 31 1001 435.00 -event 32 0 449.10 -event 33 1000 450.00 -event 34 1001 465.00 -event 35 1000 480.00 -event 36 1001 495.00 -event 37 1000 510.00 -event 38 1001 525.00 -event 39 1000 540.00 -event 40 1001 555.00 -event 41 1000 570.00 -event 42 1001 585.00 -event 43 1000 600.00 -event 44 1001 615.00 -event 45 1000 630.00 -event 46 1001 645.00 -event 47 1000 660.00 -event 48 1001 675.00 -event 49 1000 690.00 -event 50 1001 705.00 -event 51 1000 719.00 -TRIGGERTYPE 31 10 TT_3_1_CAM 0.00 -# duty 0.94 0.33 -event 0 1 0.00 -event 1 0 40.00 -event 2 1001 170.00 -event 3 1000 230.00 -event 4 1001 290.00 -event 5 1000 350.00 -event 6 1001 530.00 -event 7 1000 590.00 -event 8 1001 650.00 -event 9 1000 710.00 -TRIGGERTYPE 32 14 TT_DODGE_NEON_2003_CRANK 496.00 -# duty 0.50 0.00 -event 0 1 0.00 -event 1 0 144.00 -event 2 1 180.00 -event 3 0 216.00 -event 4 1 252.00 -event 5 0 288.00 -event 6 1 324.00 -event 7 0 360.00 -event 8 1 504.00 -event 9 0 540.00 -event 10 1 576.00 -event 11 0 612.00 -event 12 1 648.00 -event 13 0 684.00 -TRIGGERTYPE 33 16 TT_MIATA_VVT 715.00 -# duty 0.04 0.00 -event 0 1 0.00 -event 1 0 96.00 -event 2 1 100.00 -event 3 0 176.00 -event 4 1 180.00 -event 5 0 276.00 -event 6 1 280.00 -event 7 0 356.00 -event 8 1 360.00 -event 9 0 456.00 -event 10 1 460.00 -event 11 0 536.00 -event 12 1 540.00 -event 13 0 636.00 -event 14 1 640.00 -event 15 0 716.00 -TRIGGERTYPE 34 50 TT_HONDA_ACCORD_1_24_SHIFTED 0.00 -# duty 0.97 0.50 -event 0 1 0.00 -event 1 1000 14.90 -event 2 0 21.90 -event 3 1001 29.90 -event 4 1000 44.90 -event 5 1001 59.90 -event 6 1000 74.90 -event 7 1001 89.90 -event 8 1000 104.90 -event 9 1001 119.90 -event 10 1000 134.90 -event 11 1001 149.90 -event 12 1000 164.90 -event 13 1001 179.90 -event 14 1000 194.90 -event 15 1001 209.90 -event 16 1000 224.90 -event 17 1001 239.90 -event 18 1000 254.90 -event 19 1001 269.90 -event 20 1000 284.90 -event 21 1001 299.90 -event 22 1000 314.90 -event 23 1001 329.90 -event 24 1000 344.90 -event 25 1001 359.90 -event 26 1000 374.90 -event 27 1001 389.90 -event 28 1000 404.90 -event 29 1001 419.90 -event 30 1000 434.90 -event 31 1001 449.90 -event 32 1000 464.90 -event 33 1001 479.90 -event 34 1000 494.90 -event 35 1001 509.90 -event 36 1000 524.90 -event 37 1001 539.90 -event 38 1000 554.90 -event 39 1001 569.90 -event 40 1000 584.90 -event 41 1001 599.90 -event 42 1000 614.90 -event 43 1001 629.90 -event 44 1000 644.90 -event 45 1001 659.90 -event 46 1000 674.90 -event 47 1001 689.90 -event 48 1000 704.90 -event 49 1001 719.90 -TRIGGERTYPE 35 22 TT_MAZDA_MIATA_VVT_TEST 276.00 -# duty 0.08 0.04 -event 0 0 0.00 -event 1 1001 4.00 -event 2 1000 8.00 -event 3 1001 74.00 -event 4 1000 78.00 -event 5 1001 184.00 -event 6 1000 188.00 -event 7 1001 254.00 -event 8 1000 258.00 -event 9 1 320.00 -event 10 0 340.00 -event 11 1001 364.00 -event 12 1000 368.00 -event 13 1001 434.00 -event 14 1000 438.00 -event 15 1001 544.00 -event 16 1000 548.00 -event 17 1001 614.00 -event 18 1000 618.00 -event 19 1 660.00 -event 20 0 680.00 -event 21 1 700.00 -TRIGGERTYPE 36 38 TT_SUBARU_7_6 0.00 -# duty 0.95 0.08 -event 0 1 0.00 -event 1 0 5.00 -event 2 1001 68.00 -event 3 1000 73.00 -event 4 1001 100.00 -event 5 1000 105.00 -event 6 1001 155.00 -event 7 1000 160.00 -event 8 1 182.00 -event 9 0 187.00 -event 10 1 207.00 -event 11 0 212.00 -event 12 1001 248.00 -event 13 1000 253.00 -event 14 1001 280.00 -event 15 1000 285.00 -event 16 1001 335.00 -event 17 1000 340.00 -event 18 1 364.00 -event 19 0 369.00 -event 20 1001 428.00 -event 21 1000 433.00 -event 22 1001 460.00 -event 23 1000 465.00 -event 24 1001 515.00 -event 25 1000 520.00 -event 26 1 525.00 -event 27 0 530.00 -event 28 1 548.00 -event 29 0 553.00 -event 30 1 566.00 -event 31 0 571.00 -event 32 1001 608.00 -event 33 1000 613.00 -event 34 1001 640.00 -event 35 1000 645.00 -event 36 1001 695.00 -event 37 1000 700.00 -TRIGGERTYPE 37 50 TT_JEEP_18_2_2_2 581.00 -# duty 0.50 0.93 -event 0 1001 0.00 -event 1 1000 2.00 -event 2 1001 20.00 -event 3 1000 22.00 -event 4 1001 40.00 -event 5 1000 42.00 -event 6 1001 60.00 -event 7 1000 62.00 -event 8 1001 120.00 -event 9 1000 122.00 -event 10 1001 140.00 -event 11 1000 142.00 -event 12 1001 160.00 -event 13 1000 162.00 -event 14 1001 180.00 -event 15 1000 182.00 -event 16 1001 240.00 -event 17 1000 242.00 -event 18 1001 260.00 -event 19 1000 262.00 -event 20 1001 280.00 -event 21 1000 282.00 -event 22 1001 300.00 -event 23 1000 302.00 -event 24 1 334.00 -event 25 1001 360.00 -event 26 1000 362.00 -event 27 1001 380.00 -event 28 1000 382.00 -event 29 1001 400.00 -event 30 1000 402.00 -event 31 1001 420.00 -event 32 1000 422.00 -event 33 1001 480.00 -event 34 1000 482.00 -event 35 1001 500.00 -event 36 1000 502.00 -event 37 1001 520.00 -event 38 1000 522.00 -event 39 1001 540.00 -event 40 1000 542.00 -event 41 1001 600.00 -event 42 1000 602.00 -event 43 1001 620.00 -event 44 1000 622.00 -event 45 1001 640.00 -event 46 1000 642.00 -event 47 1001 660.00 -event 48 1000 662.00 -event 49 0 694.00 -TRIGGERTYPE 38 186 TT_NISSAN_SR20VE_360 630.00 -# duty 0.96 0.12 -event 0 1 0.00 -event 1 0 4.00 -event 2 1 180.00 -event 3 0 184.00 -event 4 1 360.00 -event 5 0 364.00 -event 6 1001 365.00 -event 7 1000 366.00 -event 8 1001 367.00 -event 9 1000 368.00 -event 10 1001 369.00 -event 11 1000 370.00 -event 12 1001 371.00 -event 13 1000 372.00 -event 14 1001 373.00 -event 15 1000 374.00 -event 16 1001 375.00 -event 17 1000 376.00 -event 18 1001 377.00 -event 19 1000 378.00 -event 20 1001 379.00 -event 21 1000 380.00 -event 22 1001 381.00 -event 23 1000 382.00 -event 24 1001 383.00 -event 25 1000 384.00 -event 26 1001 385.00 -event 27 1000 386.00 -event 28 1001 387.00 -event 29 1000 388.00 -event 30 1001 389.00 -event 31 1000 390.00 -event 32 1001 391.00 -event 33 1000 392.00 -event 34 1001 393.00 -event 35 1000 394.00 -event 36 1001 395.00 -event 37 1000 396.00 -event 38 1001 397.00 -event 39 1000 398.00 -event 40 1001 399.00 -event 41 1000 400.00 -event 42 1001 401.00 -event 43 1000 402.00 -event 44 1001 403.00 -event 45 1000 404.00 -event 46 1001 405.00 -event 47 1000 406.00 -event 48 1001 407.00 -event 49 1000 408.00 -event 50 1001 409.00 -event 51 1000 410.00 -event 52 1001 411.00 -event 53 1000 412.00 -event 54 1001 413.00 -event 55 1000 414.00 -event 56 1001 415.00 -event 57 1000 416.00 -event 58 1001 417.00 -event 59 1000 418.00 -event 60 1001 419.00 -event 61 1000 420.00 -event 62 1001 421.00 -event 63 1000 422.00 -event 64 1001 423.00 -event 65 1000 424.00 -event 66 1001 425.00 -event 67 1000 426.00 -event 68 1001 427.00 -event 69 1000 428.00 -event 70 1001 429.00 -event 71 1000 430.00 -event 72 1001 431.00 -event 73 1000 432.00 -event 74 1001 433.00 -event 75 1000 434.00 -event 76 1001 435.00 -event 77 1000 436.00 -event 78 1001 437.00 -event 79 1000 438.00 -event 80 1001 439.00 -event 81 1000 440.00 -event 82 1001 441.00 -event 83 1000 442.00 -event 84 1001 443.00 -event 85 1000 444.00 -event 86 1001 445.00 -event 87 1000 446.00 -event 88 1001 447.00 -event 89 1000 448.00 -event 90 1001 449.00 -event 91 1000 450.00 -event 92 1001 451.00 -event 93 1000 452.00 -event 94 1001 453.00 -event 95 1000 454.00 -event 96 1001 455.00 -event 97 1000 456.00 -event 98 1001 457.00 -event 99 1000 458.00 -event 100 1001 459.00 -event 101 1000 460.00 -event 102 1001 461.00 -event 103 1000 462.00 -event 104 1001 463.00 -event 105 1000 464.00 -event 106 1001 465.00 -event 107 1000 466.00 -event 108 1001 467.00 -event 109 1000 468.00 -event 110 1001 469.00 -event 111 1000 470.00 -event 112 1001 471.00 -event 113 1000 472.00 -event 114 1001 473.00 -event 115 1000 474.00 -event 116 1001 475.00 -event 117 1000 476.00 -event 118 1001 477.00 -event 119 1000 478.00 -event 120 1001 479.00 -event 121 1000 480.00 -event 122 1001 481.00 -event 123 1000 482.00 -event 124 1001 483.00 -event 125 1000 484.00 -event 126 1001 485.00 -event 127 1000 486.00 -event 128 1001 487.00 -event 129 1000 488.00 -event 130 1001 489.00 -event 131 1000 490.00 -event 132 1001 491.00 -event 133 1000 492.00 -event 134 1001 493.00 -event 135 1000 494.00 -event 136 1001 495.00 -event 137 1000 496.00 -event 138 1001 497.00 -event 139 1000 498.00 -event 140 1001 499.00 -event 141 1000 500.00 -event 142 1001 501.00 -event 143 1000 502.00 -event 144 1001 503.00 -event 145 1000 504.00 -event 146 1001 505.00 -event 147 1000 506.00 -event 148 1001 507.00 -event 149 1000 508.00 -event 150 1001 509.00 -event 151 1000 510.00 -event 152 1001 511.00 -event 153 1000 512.00 -event 154 1001 513.00 -event 155 1000 514.00 -event 156 1001 515.00 -event 157 1000 516.00 -event 158 1001 517.00 -event 159 1000 518.00 -event 160 1001 519.00 -event 161 1000 520.00 -event 162 1001 521.00 -event 163 1000 522.00 -event 164 1001 523.00 -event 165 1000 524.00 -event 166 1001 525.00 -event 167 1000 526.00 -event 168 1001 527.00 -event 169 1 528.00 -event 170 1001 529.00 -event 171 1000 530.00 -event 172 1001 531.00 -event 173 1000 532.00 -event 174 1001 533.00 -event 175 1000 534.00 -event 176 1001 535.00 -event 177 1000 536.00 -event 178 1001 537.00 -event 179 1000 538.00 -event 180 1001 539.00 -event 181 1000 540.00 -event 182 1001 541.00 -event 183 1000 542.00 -event 184 1001 543.00 -event 185 0 544.00 -TRIGGERTYPE 39 32 TT_DODGE_NEON_1995_ONLY_CRANK 279.00 -# duty 0.80 0.00 -event 0 1 0.00 -event 1 0 4.00 -event 2 1 16.00 -event 3 0 20.00 -event 4 1 43.00 -event 5 0 48.00 -event 6 1 71.00 -event 7 0 76.00 -event 8 1 140.00 -event 9 0 180.00 -event 10 1 195.00 -event 11 0 199.00 -event 12 1 221.00 -event 13 0 226.00 -event 14 1 250.00 -event 15 0 255.00 -event 16 1 360.00 -event 17 0 364.00 -event 18 1 376.00 -event 19 0 380.00 -event 20 1 403.00 -event 21 0 408.00 -event 22 1 431.00 -event 23 0 436.00 -event 24 1 500.00 -event 25 0 540.00 -event 26 1 555.00 -event 27 0 559.00 -event 28 1 581.00 -event 29 0 586.00 -event 30 1 610.00 -event 31 0 615.00 -TRIGGERTYPE 40 34 TT_JEEP_4_CYL 484.00 -# duty 0.50 0.96 -event 0 1001 0.00 -event 1 1000 2.00 -event 2 1001 20.00 -event 3 1000 22.00 -event 4 1001 40.00 -event 5 1000 42.00 -event 6 1001 60.00 -event 7 1000 62.00 -event 8 1001 180.00 -event 9 1000 182.00 -event 10 1001 200.00 -event 11 1000 202.00 -event 12 1001 220.00 -event 13 1000 222.00 -event 14 1001 240.00 -event 15 1000 242.00 -event 16 1 302.00 -event 17 1001 360.00 -event 18 1000 362.00 -event 19 1001 380.00 -event 20 1000 382.00 -event 21 1001 400.00 -event 22 1000 402.00 -event 23 1001 420.00 -event 24 1000 422.00 -event 25 1001 540.00 -event 26 1000 542.00 -event 27 1001 560.00 -event 28 1000 562.00 -event 29 1001 580.00 -event 30 1000 582.00 -event 31 1001 600.00 -event 32 1000 602.00 -event 33 0 662.00 -TRIGGERTYPE 41 4 TT_FIAT_IAW_P8 60.00 -# duty 0.17 0.00 -event 0 1 0.00 -event 1 0 120.00 -event 2 1 180.00 -event 3 0 660.00 -TRIGGERTYPE 42 8 TT_MAZDA_Z5 0.00 -# duty 0.36 0.00 -event 0 0 0.00 -event 1 1 120.00 -event 2 0 180.00 -event 3 1 300.00 -event 4 0 360.00 -event 5 1 480.00 -event 6 0 558.00 -event 7 1 660.00 -TRIGGERTYPE 43 6 TT_MIATA_NB2_VVT_CAM 0.00 -# duty 0.13 0.00 -event 0 1 0.00 -event 1 0 281.00 -event 2 1 317.00 -event 3 0 340.00 -event 4 1 360.00 -event 5 0 685.00 diff --git a/unit_tests/unit_test_framework.cpp b/unit_tests/unit_test_framework.cpp index a1ea3b3e73..3718966e07 100644 --- a/unit_tests/unit_test_framework.cpp +++ b/unit_tests/unit_test_framework.cpp @@ -2,7 +2,7 @@ * @file unit_test_framework.cpp * * Created on: Mar 4, 2018 - * Author: Andrey Belomutskiy, (c) 2012-2018 + * @author Andrey Belomutskiy, (c) 2012-2020 */ #include diff --git a/work_in_progress.md b/work_in_progress.md index 8b9efab9df..ba146a5c16 100644 --- a/work_in_progress.md +++ b/work_in_progress.md @@ -1,3 +1,9 @@ +Apr, 20 2020 status: +* Nick and Chris are focusing on GDI progress +* Matt is focusing on ETB https://github.com/rusefi/rusefi/issues/1240 https://github.com/rusefi/rusefi/issues/1336 +* x number of Andreys are focusing on data gathering usability https://github.com/rusefi/rusefi/issues/1337 +* andreika is currently focusing on Hellen, SD-card/binary logging, TS plugin and online connectivity + Mar, 02 2020 status: * playing with some GDI software, but now waiting for repaired MC33816 to come from Seattle * Matt and DronoGus are working on different parts of getting stepper control using two universal H-bridged, that would give us stepper idle control on microRusEfi.