auto-sync

This commit is contained in:
rusEfi 2016-07-30 22:02:52 -04:00
parent a3ad82682f
commit ffe28254ac
2 changed files with 19 additions and 0 deletions

View File

@ -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__)

View File

@ -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) {