mirror of
https://github.com/SemvdH/OBD2-car-display.git
synced 2025-12-16 04:31:04 +00:00
add waiting for ELM327 before init state
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
#include <string.h>
|
||||
#include "ELMduino.h"
|
||||
|
||||
|
||||
#include "obd2_elm327.h"
|
||||
|
||||
@@ -13,6 +13,7 @@ char obd2_elm327_init(obd2_elm327_t *elm327)
|
||||
ELM327_SERIAL.begin(ELM327_BAUD);
|
||||
|
||||
elm327->bt_state = BT_INITIALISING;
|
||||
elm327->elm327 = &elm327_obj;
|
||||
|
||||
if (!elm327_obj.begin(ELM327_SERIAL, false, 5000))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user