TS indicator of HIP9011 state
This commit is contained in:
parent
3dd9f103ae
commit
c7b604a0f6
|
@ -85,6 +85,7 @@ typedef struct {
|
||||||
unsigned int hasFatalError : 1; // bit 6
|
unsigned int hasFatalError : 1; // bit 6
|
||||||
unsigned int isWarnNow : 1; // bit 7
|
unsigned int isWarnNow : 1; // bit 7
|
||||||
unsigned int isCltBroken : 1; // bit 8
|
unsigned int isCltBroken : 1; // bit 8
|
||||||
|
unsigned int isKnockChipOk : 1; // bit 9
|
||||||
int tsConfigVersion; // 84
|
int tsConfigVersion; // 84
|
||||||
egt_values_s egtValues; // 88
|
egt_values_s egtValues; // 88
|
||||||
float unusedOffset104; // 104
|
float unusedOffset104; // 104
|
||||||
|
|
|
@ -653,7 +653,7 @@ static void lcdThread(void *arg) {
|
||||||
|
|
||||||
#if EFI_HIP_9011 || defined(__DOXYGEN__)
|
#if EFI_HIP_9011 || defined(__DOXYGEN__)
|
||||||
extern int correctResponsesCount;
|
extern int correctResponsesCount;
|
||||||
extern int invalidResponsesCount;
|
extern int invalidHip9011ResponsesCount;
|
||||||
#endif /* EFI_HIP_9011 */
|
#endif /* EFI_HIP_9011 */
|
||||||
|
|
||||||
#if EFI_TUNER_STUDIO || defined(__DOXYGEN__)
|
#if EFI_TUNER_STUDIO || defined(__DOXYGEN__)
|
||||||
|
@ -734,6 +734,7 @@ void updateTunerStudioState(TunerStudioOutputChannels *tsOutputChannels DECLARE_
|
||||||
|
|
||||||
tsOutputChannels->isWarnNow = isWarningNow(now, true);
|
tsOutputChannels->isWarnNow = isWarningNow(now, true);
|
||||||
tsOutputChannels->isCltBroken = engine->isCltBroken;
|
tsOutputChannels->isCltBroken = engine->isCltBroken;
|
||||||
|
tsOutputChannels->isKnockChipOk = (invalidHip9011ResponsesCount == 0);
|
||||||
|
|
||||||
switch (engineConfiguration->debugMode) {
|
switch (engineConfiguration->debugMode) {
|
||||||
case DBG_STATUS:
|
case DBG_STATUS:
|
||||||
|
@ -794,7 +795,7 @@ void updateTunerStudioState(TunerStudioOutputChannels *tsOutputChannels DECLARE_
|
||||||
#if EFI_HIP_9011 || defined(__DOXYGEN__)
|
#if EFI_HIP_9011 || defined(__DOXYGEN__)
|
||||||
case DBG_KNOCK:
|
case DBG_KNOCK:
|
||||||
tsOutputChannels->debugIntField1 = correctResponsesCount;
|
tsOutputChannels->debugIntField1 = correctResponsesCount;
|
||||||
tsOutputChannels->debugIntField2 = invalidResponsesCount;
|
tsOutputChannels->debugIntField2 = invalidHip9011ResponsesCount;
|
||||||
break;
|
break;
|
||||||
#endif /* EFI_HIP_9011 */
|
#endif /* EFI_HIP_9011 */
|
||||||
#if EFI_CJ125 || defined(__DOXYGEN__)
|
#if EFI_CJ125 || defined(__DOXYGEN__)
|
||||||
|
|
|
@ -68,7 +68,7 @@ static float hipValueMax = 0;
|
||||||
static unsigned char tx_buff[1];
|
static unsigned char tx_buff[1];
|
||||||
static unsigned char rx_buff[1];
|
static unsigned char rx_buff[1];
|
||||||
int correctResponsesCount = 0;
|
int correctResponsesCount = 0;
|
||||||
int invalidResponsesCount = 0;
|
int invalidHip9011ResponsesCount = 0;
|
||||||
static char pinNameBuffer[16];
|
static char pinNameBuffer[16];
|
||||||
static float currentAngleWindowWidth;
|
static float currentAngleWindowWidth;
|
||||||
|
|
||||||
|
@ -104,7 +104,7 @@ static void checkResponse(void) {
|
||||||
if (tx_buff[0] == rx_buff[0]) {
|
if (tx_buff[0] == rx_buff[0]) {
|
||||||
correctResponsesCount++;
|
correctResponsesCount++;
|
||||||
} else {
|
} else {
|
||||||
invalidResponsesCount++;
|
invalidHip9011ResponsesCount++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -149,12 +149,12 @@ static void showHipInfo(void) {
|
||||||
currentIntergratorIndex, engineConfiguration->knockVThreshold,
|
currentIntergratorIndex, engineConfiguration->knockVThreshold,
|
||||||
engine->knockCount, engineConfiguration->maxKnockSubDeg);
|
engine->knockCount, engineConfiguration->maxKnockSubDeg);
|
||||||
|
|
||||||
const char * msg = invalidResponsesCount > 0 ? "NOT GOOD" : "ok";
|
const char * msg = invalidHip9011ResponsesCount > 0 ? "NOT GOOD" : "ok";
|
||||||
scheduleMsg(logger, "spi=%s IntHold@%s/%d response count=%d incorrect response=%d %s",
|
scheduleMsg(logger, "spi=%s IntHold@%s/%d response count=%d incorrect response=%d %s",
|
||||||
getSpi_device_e(engineConfiguration->hip9011SpiDevice),
|
getSpi_device_e(engineConfiguration->hip9011SpiDevice),
|
||||||
hwPortname(boardConfiguration->hip9011IntHoldPin),
|
hwPortname(boardConfiguration->hip9011IntHoldPin),
|
||||||
boardConfiguration->hip9011IntHoldPinMode,
|
boardConfiguration->hip9011IntHoldPinMode,
|
||||||
correctResponsesCount, invalidResponsesCount,
|
correctResponsesCount, invalidHip9011ResponsesCount,
|
||||||
msg);
|
msg);
|
||||||
scheduleMsg(logger, "CS@%s updateCount=%d", hwPortname(boardConfiguration->hip9011CsPin), settingUpdateCount);
|
scheduleMsg(logger, "CS@%s updateCount=%d", hwPortname(boardConfiguration->hip9011CsPin), settingUpdateCount);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue