52 bool ignoreRecentTransmit =
false;
66 size_t len =
readWhileGives(serialSource, bufferIn,
sizeof(bufferIn));
75 efiPrintf(
"kline: got count 0x%02x", len);
77 for (
size_t i =0;i<len;i++) {
79 efiPrintf(
"kline: got 0x%02x", bufferIn[i]);
85 uint8_t low = bufferIn[0] & 0xF;
86 if (crc == bufferIn[len - 1]) {
88 efiPrintf(
"happy CRC 0x%02x", crc);
90 if (low == HONDA_K_BCM_STATUS_NIBBLE) {
94 if (low == HONDA_K_BCM_REQ_NIBBLE) {
96 efiPrintf(
"BCM request 0x%02x", bufferIn[0]);
100 }
else if (low == HONDA_K_BCM_STATUS_NIBBLE && bufferIn[4] ==
crc_hondak_calc(bufferIn, 4)) {
102 efiPrintf(
"hack for now, happy CRC 0x%02x", crc);
118 if (sendCounter % 30 == 0) {
128 efiPrintf(
"kline doSend");
130 int positiveCltWithHighishValueInCaseOfSensorIssue = maxI(1,
131#ifdef HW_HELLEN_HONDA
142 kvalues[3] = positiveCltWithHighishValueInCaseOfSensorIssue;
146 chnWrite(
klDriver, (
const uint8_t *)&crc, 1);
147 ignoreRecentTransmit =
true;
149 ignoreRecentTransmit =
false;
void efiSetPadMode(const char *msg, brain_pin_e brainPin, iomode_t mode)