diff --git a/firmware/controllers/algo/engine_configuration_generated_structures.h b/firmware/controllers/algo/engine_configuration_generated_structures.h index ad0f6cb193..2927f9cf76 100644 --- a/firmware/controllers/algo/engine_configuration_generated_structures.h +++ b/firmware/controllers/algo/engine_configuration_generated_structures.h @@ -1,4 +1,4 @@ -// this section was generated by config_definition.jar on Fri May 22 22:10:47 EDT 2015 +// this section was generated by config_definition.jar on Sat May 23 19:27:45 EDT 2015 // begin #include "rusefi_types.h" typedef struct { @@ -738,7 +738,11 @@ typedef struct { /** * offset 320 */ - float unused[4]; + float unused[3]; + /** + * offset 332 + */ + float knockBandCustom; /** * offset 336 */ @@ -1329,4 +1333,4 @@ typedef struct { } persistent_config_s; // end -// this section was generated by config_definition.jar on Fri May 22 22:10:47 EDT 2015 +// this section was generated by config_definition.jar on Sat May 23 19:27:45 EDT 2015 diff --git a/firmware/controllers/algo/rusefi_generated.h b/firmware/controllers/algo/rusefi_generated.h index f28377d775..200af58a95 100644 --- a/firmware/controllers/algo/rusefi_generated.h +++ b/firmware/controllers/algo/rusefi_generated.h @@ -108,6 +108,7 @@ #define iat_adcChannel_offset 316 #define unused_offset 320 #define unused_offset_hex 140 +#define knockBandCustom_offset 332 #define sparkDwellBins_offset 336 #define sparkDwellBins_offset_hex 150 #define sparkDwell_offset 368 diff --git a/firmware/hw_layer/HIP9011.cpp b/firmware/hw_layer/HIP9011.cpp index 026e85f17e..584bd6affa 100644 --- a/firmware/hw_layer/HIP9011.cpp +++ b/firmware/hw_layer/HIP9011.cpp @@ -34,6 +34,7 @@ #include "HIP9011.h" #include "adc_inputs.h" #include "efilib2.h" +#include "engine_controller.h" #if EFI_HIP_9011 || defined(__DOXYGEN__) @@ -102,6 +103,7 @@ static SPIDriver *driver = &SPID2; EXTERN_ENGINE ; +static char pinNameBuffer[16]; static void showHipInfo(void) { if (!boardConfiguration->isHip9011Enabled) { scheduleMsg(logger, "hip9011 driver not active"); @@ -109,18 +111,18 @@ static void showHipInfo(void) { } printSpiState(logger, boardConfiguration); - scheduleMsg(logger, "bore=%f freq=%f", engineConfiguration->cylinderBore, BAND(engineConfiguration->cylinderBore)); + scheduleMsg(logger, "bore=%fmm freq=%fkHz", engineConfiguration->cylinderBore, BAND(engineConfiguration->cylinderBore)); scheduleMsg(logger, "band_index=%d gain %f/index=%d", bandIndex, boardConfiguration->hip9011Gain, currentGainIndex); scheduleMsg(logger, "integrator index=%d hip_threshold=%f totalKnockEventsCount=%d", currentIntergratorIndex, engineConfiguration->hipThreshold, totalKnockEventsCount); - scheduleMsg(logger, "spi= int=%s response count=%d", hwPortname(boardConfiguration->hip9011IntHoldPin), + scheduleMsg(logger, "spi= IntHold@%s response count=%d", hwPortname(boardConfiguration->hip9011IntHoldPin), nonZeroResponse); - scheduleMsg(logger, "CS=%s updateCount=%d", hwPortname(boardConfiguration->hip9011CsPin), settingUpdateCount); + scheduleMsg(logger, "CS@%s updateCount=%d", hwPortname(boardConfiguration->hip9011CsPin), settingUpdateCount); - scheduleMsg(logger, "value=%f@#%d", getVoltageDivided("hip", engineConfiguration->hipOutputChannel), - engineConfiguration->hipOutputChannel); + scheduleMsg(logger, "hip output=%fv@%s", getVoltageDivided("hip", engineConfiguration->hipOutputChannel), + getPinNameByAdcChannel(engineConfiguration->hipOutputChannel, pinNameBuffer)); } void setHip9011FrankensoPinout(void) { diff --git a/firmware/integration/rusefi_config.txt b/firmware/integration/rusefi_config.txt index 4b559e570d..ff84f18773 100644 --- a/firmware/integration/rusefi_config.txt +++ b/firmware/integration/rusefi_config.txt @@ -159,7 +159,8 @@ MAP_sensor_config_s map;@see hasMapSensor\n@see isMapAveragingEnabled ThermistorConf clt;todo: merge with channel settings, use full-scale Thermistor here! ThermistorConf iat; - float[4] unused; + float[3] unused; + float knockBandCustom; float[DWELL_CURVE_SIZE] sparkDwellBins;;"RPM", 1, 0.0, 0.0, 18000, 2 diff --git a/java_console/autotest/src/com/rusefi/AutoTest.java b/java_console/autotest/src/com/rusefi/AutoTest.java index 9ee56811ba..f9ce58bafd 100644 --- a/java_console/autotest/src/com/rusefi/AutoTest.java +++ b/java_console/autotest/src/com/rusefi/AutoTest.java @@ -214,7 +214,7 @@ public class AutoTest { String msg = "ford 6"; - double x = 12.84; + double x = 8.16; assertWave(msg, chart, EngineChart.SPARK_1, 0.01666, x, x + 120, x + 240, x + 360, x + 480, x + 600); assertWaveNull(msg, chart, EngineChart.TRIGGER_2); diff --git a/java_console/autotest/src/com/rusefi/TestingUtils.java b/java_console/autotest/src/com/rusefi/TestingUtils.java index 776445ed5b..f8fe7c9da0 100644 --- a/java_console/autotest/src/com/rusefi/TestingUtils.java +++ b/java_console/autotest/src/com/rusefi/TestingUtils.java @@ -96,7 +96,6 @@ public class TestingUtils { System.out.println("t " + revolutionLog.getCrankAngleByTime(ud.upTime)); } assertCloseEnough(msg + " width for " + key, actualWidth, widthRatio, expectedWidth); - } }