add waiting for ELM327 before init state

This commit is contained in:
Sem van der Hoeven
2024-01-21 13:59:49 +01:00
parent 3f19ab4b7d
commit 5fbafa3dc9
5 changed files with 29 additions and 10 deletions

View File

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