From 291010a9565cfbb4432dc61dba2ce4f660381b62 Mon Sep 17 00:00:00 2001 From: rusEfi Date: Fri, 30 Jan 2015 15:04:02 -0600 Subject: [PATCH] auto-sync --- firmware/controllers/algo/rusefi_types.h | 2 + firmware/rusefi_config.ini | 50 +++++++++++------------- 2 files changed, 25 insertions(+), 27 deletions(-) diff --git a/firmware/controllers/algo/rusefi_types.h b/firmware/controllers/algo/rusefi_types.h index 7e081e20d2..03327ae382 100644 --- a/firmware/controllers/algo/rusefi_types.h +++ b/firmware/controllers/algo/rusefi_types.h @@ -89,6 +89,8 @@ typedef int32_t bool32_t; typedef int16_t fsio_pwm_freq_t; +typedef float fsio_setting_t; + typedef fuel_table_t ve_table_t; typedef fuel_table_t afr_table_t; diff --git a/firmware/rusefi_config.ini b/firmware/rusefi_config.ini index ea2a82cc52..847517836f 100644 --- a/firmware/rusefi_config.ini +++ b/firmware/rusefi_config.ini @@ -12,6 +12,25 @@ ! needed to get a proper TunerStudio file struct engine_configuration_s +#define MAP_ANGLE_SIZE 8 +#define MAP_WINDOW_SIZE 8 +#define CLT_CURVE_SIZE 16 +#define IAT_CURVE_SIZE 16 +#define VBAT_INJECTOR_CURVE_SIZE 8 +#define DWELL_COUNT 8 +#define CRANKING_CURVE_SIZE 8 +#define IGN_LOAD_COUNT 16 +#define IGN_RPM_COUNT 16 +#define INJECTION_PIN_COUNT 12 +#define IGNITION_PIN_COUNT 12 +#define MAX31855_CS_COUNT 8 +#define JOYSTICK_PIN_COUNT 5 +#define DIGIPOT_COUNT 4 +#define HW_MAX_ADC_INDEX 16 +#define TRIGGER_SIMULATOR_PIN_COUNT 3 +#define LOGIC_ANALYZER_CHANNEL_COUNT 4 +#define LE_COMMAND_COUNT 16 + #define FUEL_RPM_COUNT 16 #define FUEL_LOAD_COUNT 16 #define IGN_LOAD_COUNT 16 @@ -25,26 +44,6 @@ custom afr_table_t 1024 array, F32, @OFFSET@, [16x16],"deg", 1, 0, ! please note that 1024 here is 4 * IGN_LOAD_COUNT * IGN_RPM_COUNT custom ignition_table_t 1024 array, F32, @OFFSET@, [16x16],"deg", 1, 0, -360, 360, 2 -#define MAP_ANGLE_SIZE 8 -#define MAP_WINDOW_SIZE 8 - -#define CLT_CURVE_SIZE 16 -#define IAT_CURVE_SIZE 16 -#define VBAT_INJECTOR_CURVE_SIZE 8 - -#define DWELL_COUNT 8 - -#define CRANKING_CURVE_SIZE 8 - -#define IGN_LOAD_COUNT 16 -#define IGN_RPM_COUNT 16 - -#define INJECTION_PIN_COUNT 12 -#define IGNITION_PIN_COUNT 12 - -#define MAX31855_CS_COUNT 8 - -#define JOYSTICK_PIN_COUNT 5 struct cranking_parameters_s float baseFuel;;"ms", 1, 0, 0, 200, 1 @@ -295,10 +294,8 @@ brain_pin_e clutchDownPin;some cars have a switch to indicate that clutch pedal int triggerSimulatorFrequency;;"Rpm", 1, 0, 0,30000, 0 spi_device_e digitalPotentiometerSpiDevice;Digital Potentiometer is used by stock ECU stimulation code -#define DIGIPOT_COUNT 4 brain_pin_e[DIGIPOT_COUNT iterate] digitalPotentiometerChipSelect; -#define HW_MAX_ADC_INDEX 16 custom adc_channel_mode_e 4 bits, U32, @OFFSET@, [0:1], "Off", "Slow", "Fast", "INVALID" adc_channel_mode_e[HW_MAX_ADC_INDEX iterate] adcHwChannelEnabled; @@ -321,7 +318,6 @@ custom adc_channel_mode_e 4 bits, U32, @OFFSET@, [0:1], "Off", "Slow", "Fas brain_pin_e canTxPin; brain_pin_e canRxPin; -#define TRIGGER_SIMULATOR_PIN_COUNT 3 brain_pin_e[TRIGGER_SIMULATOR_PIN_COUNT iterate] triggerSimulatorPins; pin_output_mode_e[TRIGGER_SIMULATOR_PIN_COUNT iterate] triggerSimulatorPinModes; @@ -336,7 +332,6 @@ bit is_enabled_spi_2 bit isEngineControlEnabled bit isHip9011Enabled -#define LOGIC_ANALYZER_CHANNEL_COUNT 4 brain_pin_e[LOGIC_ANALYZER_CHANNEL_COUNT iterate] logicAnalyzerPins; uint8_t[LOGIC_ANALYZER_CHANNEL_COUNT] logicAnalyzerMode;default or inverted input @@ -349,7 +344,6 @@ custom egt_cs_array_t 32 todo array? type? egt_cs_array_t max31855_cs; spi_device_e max31855spiDevice; -#define LE_COMMAND_COUNT 16 brain_pin_e[LE_COMMAND_COUNT iterate] fsioPins; pin_output_mode_e[LE_COMMAND_COUNT iterate] gpioPinModes; @@ -364,13 +358,15 @@ custom egt_cs_array_t 32 todo array? type? brain_pin_e acRelayPin; pin_output_mode_e acRelayPinMode; - fsio_pwm_freq_t[LE_COMMAND_COUNT] fsioFrequency; +custom fsio_pwm_freq_t 2 scalar, U16, @OFFSET@, "Hz", 1, 0, 0, 3000, 0 + fsio_pwm_freq_t[LE_COMMAND_COUNT iterate] fsioFrequency; brain_pin_e hip9011CsPin; brain_pin_e hip9011IntHoldPin; brain_pin_e hip9011OutPin; - float[LE_COMMAND_COUNT] fsio_setting; +custom fsio_setting_t 4 scalar, F32, @OFFSET@, "Val", 1, 0, 0, 18000, 0 + fsio_setting_t[LE_COMMAND_COUNT iterate] fsio_setting; brain_pin_e spi1mosiPin; brain_pin_e spi1misoPin; brain_pin_e spi1sckPin;