diff --git a/firmware/controllers/settings.cpp b/firmware/controllers/settings.cpp index 033cf8b139..febd539624 100644 --- a/firmware/controllers/settings.cpp +++ b/firmware/controllers/settings.cpp @@ -949,6 +949,8 @@ static void getValue(const char *paramStr) { scheduleMsg(&logger, "isCJ125Enabled=%d", boardConfiguration->isCJ125Enabled); } else if (strEqualCaseInsensitive(paramStr, "warningPeriod")) { scheduleMsg(&logger, "warningPeriod=%d", engineConfiguration->warningPeriod); + } else if (strEqualCaseInsensitive(paramStr, "isHip9011Enabled")) { + scheduleMsg(&logger, "isHip9011Enabled=%d", boardConfiguration->isHip9011Enabled); } #if EFI_RTC || defined(__DOXYGEN__) diff --git a/firmware/hw_layer/sensors/CJ125.cpp b/firmware/hw_layer/sensors/CJ125.cpp index c44a7957cb..8505976e70 100644 --- a/firmware/hw_layer/sensors/CJ125.cpp +++ b/firmware/hw_layer/sensors/CJ125.cpp @@ -23,6 +23,9 @@ static SimplePwm wboHeaderControl; static OutputPin wboHeaderPin; static OutputPin cj125Cs; static Logging *logger; +static unsigned char tx_buff[1]; +static unsigned char rx_buff[1]; + static THD_WORKING_AREA(cjThreadStack, UTILITY_THREAD_STACK_SIZE); @@ -79,6 +82,20 @@ static msg_t cjThread(void) static void cj125test(void) { + // read identity command + spiSelect(driver); + tx_buff[0] = IDENT_REG_RD; + spiSend(driver, 1, tx_buff); + + spiReceive(driver, 1, rx_buff); + int value = rx_buff[0] & 0xF8; + + spiUnselect(driver); + + scheduleMsg(logger, "cj125 got %x", value); + + + } void initCJ125(Logging *sharedLogger) {