From fb7871cdca5a1d84f90760128d4bd92a6f8dcc2b Mon Sep 17 00:00:00 2001 From: rusEfi Date: Sat, 28 Jan 2017 19:03:06 -0500 Subject: [PATCH] auto-sync --- firmware/hw_layer/HIP9011.cpp | 10 ++++++++-- firmware/tunerstudio/rusefi.ini | 26 +++++++++++++------------- firmware/tunerstudio/rusefi.input | 24 ++++++++++++------------ 3 files changed, 33 insertions(+), 27 deletions(-) diff --git a/firmware/hw_layer/HIP9011.cpp b/firmware/hw_layer/HIP9011.cpp index f9cd1c3d18..b86eca7c37 100644 --- a/firmware/hw_layer/HIP9011.cpp +++ b/firmware/hw_layer/HIP9011.cpp @@ -129,6 +129,8 @@ static float getBand(void) { BAND(engineConfiguration->cylinderBore) : engineConfiguration->knockBandCustom; } +static char hipPinNameBuffer[16]; + static void showHipInfo(void) { if (!boardConfiguration->isHip9011Enabled) { scheduleMsg(logger, "hip9011 driver not active"); @@ -142,15 +144,19 @@ static void showHipInfo(void) { engineConfiguration->cylinderBore, getBand(), engineConfiguration->hip9011PrescalerAndSDO); - scheduleMsg(logger, "band_index=%d gain %f/index=%d", currentBandIndex, boardConfiguration->hip9011Gain, currentGainIndex); + char *outputName = getPinNameByAdcChannel("hip", engineConfiguration->hipOutputChannel, hipPinNameBuffer); + + scheduleMsg(logger, "band_index=%d gain %f/index=%d output=%s", currentBandIndex, boardConfiguration->hip9011Gain, currentGainIndex, + outputName); scheduleMsg(logger, "integrator index=%d knockVThreshold=%f knockCount=%d maxKnockSubDeg=%f", currentIntergratorIndex, engineConfiguration->knockVThreshold, engine->knockCount, engineConfiguration->maxKnockSubDeg); const char * msg = invalidResponse > 0 ? "NOT GOOD" : "ok"; - scheduleMsg(logger, "spi=%s IntHold@%s response count=%d incorrect response=%d %s", + scheduleMsg(logger, "spi=%s IntHold@%s/%d response count=%d incorrect response=%d %s", getSpi_device_e(hipSpiDevice), hwPortname(boardConfiguration->hip9011IntHoldPin), + boardConfiguration->hip9011IntHoldPinMode, correctResponse, invalidResponse, msg); scheduleMsg(logger, "CS@%s updateCount=%d", hwPortname(boardConfiguration->hip9011CsPin), settingUpdateCount); diff --git a/firmware/tunerstudio/rusefi.ini b/firmware/tunerstudio/rusefi.ini index acb13088a2..f521d8619b 100644 --- a/firmware/tunerstudio/rusefi.ini +++ b/firmware/tunerstudio/rusefi.ini @@ -42,7 +42,7 @@ enable2ndByteCanID = false ; see PAGE_0_SIZE in C source code ; CONFIG_DEFINITION_START -; this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Sat Jan 28 17:49:53 EST 2017 +; this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Sat Jan 28 18:08:48 EST 2017 pageSize = 16376 page = 1 @@ -1826,19 +1826,19 @@ cmd_test_idle_valve = "w\x00\x17\x00\x01" ; Engine->hip9011 Settings dialog = hipFunction, "HIP9011 Settings (knock decoder)" field = "Enabled", isHip9011Enabled - field = "Threshold", knockVThreshold + field = "Threshold", knockVThreshold, {isHip9011Enabled == 1} field = "!ECU reboot needed to apply these settings" - field = "IntHold pin (hip9011 input)", hip9011IntHoldPin - field = "IntHold pin (hip9011 input) mode", hip9011IntHoldPinMode - field = "ChipSelect pin", hip9011CsPin - field = "ChipSelect mode", hip9011CsPinMode - field = "hip Output/stm input", hipOutputChannel - field = "prescaler & SDO", hip9011PrescalerAndSDO - field = "Band Freq override", knockBandCustom - field = "SPI device", hip9011SpiDevice - field = "SPI2sck", spi2SckMode - field = "SPI2mosi", spi2MosiMode - field = "SPI2miso", spi2MisoMode + field = "IntHold pin (hip9011 input)", hip9011IntHoldPin, {isHip9011Enabled == 1} + field = "IntHold pin (hip9011 input) mode", hip9011IntHoldPinMode, {isHip9011Enabled == 1} + field = "ChipSelect pin", hip9011CsPin, {isHip9011Enabled == 1} + field = "ChipSelect mode", hip9011CsPinMode, {isHip9011Enabled == 1} + field = "hip Output/stm input", hipOutputChannel, {isHip9011Enabled == 1} + field = "prescaler & SDO", hip9011PrescalerAndSDO, {isHip9011Enabled == 1} + field = "Band Freq override", knockBandCustom, {isHip9011Enabled == 1} + field = "SPI device", hip9011SpiDevice, {isHip9011Enabled == 1} + field = "SPI2sck", spi2SckMode, {isHip9011Enabled == 1} + field = "SPI2mosi", spi2MosiMode, {isHip9011Enabled == 1} + field = "SPI2miso", spi2MisoMode, {isHip9011Enabled == 1} panel = knockThresholdCurve ; Engine->cj125 Settings diff --git a/firmware/tunerstudio/rusefi.input b/firmware/tunerstudio/rusefi.input index 66f2848803..cae9b1995f 100644 --- a/firmware/tunerstudio/rusefi.input +++ b/firmware/tunerstudio/rusefi.input @@ -1761,19 +1761,19 @@ cmd_test_idle_valve = "w\x00\x17\x00\x01" ; Engine->hip9011 Settings dialog = hipFunction, "HIP9011 Settings (knock decoder)" field = "Enabled", isHip9011Enabled - field = "Threshold", knockVThreshold + field = "Threshold", knockVThreshold, {isHip9011Enabled == 1} field = "!ECU reboot needed to apply these settings" - field = "IntHold pin (hip9011 input)", hip9011IntHoldPin - field = "IntHold pin (hip9011 input) mode", hip9011IntHoldPinMode - field = "ChipSelect pin", hip9011CsPin - field = "ChipSelect mode", hip9011CsPinMode - field = "hip Output/stm input", hipOutputChannel - field = "prescaler & SDO", hip9011PrescalerAndSDO - field = "Band Freq override", knockBandCustom - field = "SPI device", hip9011SpiDevice - field = "SPI2sck", spi2SckMode - field = "SPI2mosi", spi2MosiMode - field = "SPI2miso", spi2MisoMode + field = "IntHold pin (hip9011 input)", hip9011IntHoldPin, {isHip9011Enabled == 1} + field = "IntHold pin (hip9011 input) mode", hip9011IntHoldPinMode, {isHip9011Enabled == 1} + field = "ChipSelect pin", hip9011CsPin, {isHip9011Enabled == 1} + field = "ChipSelect mode", hip9011CsPinMode, {isHip9011Enabled == 1} + field = "hip Output/stm input", hipOutputChannel, {isHip9011Enabled == 1} + field = "prescaler & SDO", hip9011PrescalerAndSDO, {isHip9011Enabled == 1} + field = "Band Freq override", knockBandCustom, {isHip9011Enabled == 1} + field = "SPI device", hip9011SpiDevice, {isHip9011Enabled == 1} + field = "SPI2sck", spi2SckMode, {isHip9011Enabled == 1} + field = "SPI2mosi", spi2MosiMode, {isHip9011Enabled == 1} + field = "SPI2miso", spi2MisoMode, {isHip9011Enabled == 1} panel = knockThresholdCurve ; Engine->cj125 Settings