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.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