parent
2a7436c090
commit
b606a141e8
|
@ -20,6 +20,8 @@ size_t readWhileGives(ByteSource source, uint8_t *buffer, int bufferSize) {
|
|||
|
||||
bool kAcRequestState;
|
||||
|
||||
static bool doSend = false;
|
||||
|
||||
static void handleHonda(uint8_t *bufferIn) {
|
||||
uint8_t acByte = bufferIn[2];
|
||||
kAcRequestState = acByte & 0x80;
|
||||
|
@ -80,6 +82,13 @@ void kLineThread(void*) {
|
|||
}
|
||||
handleHonda(bufferIn);
|
||||
}
|
||||
|
||||
|
||||
if (doSend) {
|
||||
const char out[] = {0x2, 0x0, 0x0, 0x50, 0x0, 0x0, 149};
|
||||
efiPrintf("kline doSend");
|
||||
chnWrite(klDriver, (const uint8_t *)out, 7);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (kLineOutPending) {
|
||||
|
@ -148,6 +157,14 @@ void initKLine() {
|
|||
addConsoleAction("kline", [](){
|
||||
efiPrintf("kline totalBytes %d", totalBytes);
|
||||
});
|
||||
addConsoleAction("klineyes", [](){
|
||||
doSend = true;
|
||||
efiPrintf("kline send %d", doSend);
|
||||
});
|
||||
addConsoleAction("klineyes", [](){
|
||||
doSend = false;
|
||||
efiPrintf("kline send %d", doSend);
|
||||
});
|
||||
addConsoleActionI("klinesend", [](int value){
|
||||
kLineOutPending = true;
|
||||
kLineOut = value;
|
||||
|
|
Loading…
Reference in New Issue