diff --git a/examples/SimpleBMS/SimpleBMS.ino b/examples/SimpleBMS/SimpleBMS.ino index 3e93182..fa598cc 100644 --- a/examples/SimpleBMS/SimpleBMS.ino +++ b/examples/SimpleBMS/SimpleBMS.ino @@ -195,7 +195,7 @@ void bmsTicker(unsigned int clockCnt) { void setup() { - Serial.begin(115200); + Serial.begin(1000000); twizy.begin(); twizy.attachTicker(bmsTicker); diff --git a/examples/Template/Template.ino b/examples/Template/Template.ino index 4e87575..3a21fbe 100644 --- a/examples/Template/Template.ino +++ b/examples/Template/Template.ino @@ -112,7 +112,7 @@ void bmsTicker(unsigned int clockCnt) { void setup() { - Serial.begin(115200); + Serial.begin(1000000); // Init TwizyVirtualBMS: twizy.begin(); diff --git a/src/TwizyVirtualBMS.h b/src/TwizyVirtualBMS.h index 61caead..9a8004a 100644 --- a/src/TwizyVirtualBMS.h +++ b/src/TwizyVirtualBMS.h @@ -1027,7 +1027,7 @@ void TwizyVirtualBMS::looper() { #ifndef TWIZY_CAN_IRQ_PIN // No IRQ, we need to poll: - twizyCanMsgReceived = twizyCAN.checkReceive(); + twizyCanMsgReceived = (twizyCAN.checkReceive() == CAN_MSGAVAIL); #endif if (twizyCanMsgReceived) {