Closed hayden-t closed 9 years ago
https://github.com/stanleyhuangyc/Freematics/blob/master/firmware_v2/elm327emu/elm327emu.ino
Bug is that you are reading the char twice on incoming BT data, thus loosing data, and breaking the sketch. Below is how it could be instead.
@@ -46,7 +46,7 @@ void loop() cmdlen = 0; } } else if (cmdlen < sizeof(cmd)) { - cmd[cmdlen++] = SerialBT.read(); + cmd[cmdlen++] = c; } } }
That's really a shameful bug. :-) Thanks for figuring out.
no probs, happy to help.
https://github.com/stanleyhuangyc/Freematics/blob/master/firmware_v2/elm327emu/elm327emu.ino
Bug is that you are reading the char twice on incoming BT data, thus loosing data, and breaking the sketch. Below is how it could be instead.