This commit is contained in:
Lubos Petrovic
2020-12-20 17:14:56 +01:00
parent 5f1fd5350e
commit 09440f686b
2 changed files with 25 additions and 22 deletions

View File

@@ -332,7 +332,7 @@ void CommObd2Ble4::mainLoop() {
board->displayMessage(" > Processing init AT cmds", ""); board->displayMessage(" > Processing init AT cmds", "");
// Serve first command (ATZ) // Serve first command (ATZ)
doNextAtCommand(); doNextQueueCommand();
} else { } else {
Serial.println("We have failed to connect to the server; there is nothing more we will do."); Serial.println("We have failed to connect to the server; there is nothing more we will do.");

View File

@@ -22,6 +22,9 @@ void CommObd2Can::connectDevice() {
CAN.setMode(MCP_NORMAL); // Set operation mode to normal so the MCP2515 sends acks to received data. CAN.setMode(MCP_NORMAL); // Set operation mode to normal so the MCP2515 sends acks to received data.
pinMode(pinCanInt, INPUT); // Configuring pin for /INT input pinMode(pinCanInt, INPUT); // Configuring pin for /INT input
// Serve first command (ATZ)
doNextQueueCommand();
*/ */
Serial.println("init_can() done"); Serial.println("init_can() done");
} }
@@ -51,12 +54,12 @@ void CommObd2Can::mainLoop() {
} }
/** /**
* Send command to CAN bus Send command to CAN bus
*/ */
void executeCommand(String cmd) { void CommObd2Can::executeCommand(String cmd) {
/** /**
* Serial.println("BMS 220101"); Serial.println("BMS 220101");
sendPID(0x00, 0x00); sendPID(0x00, 0x00);
delay(delayTxRx); delay(delayTxRx);
byte b = receivePID(0); byte b = receivePID(0);