- Fixed polling check for CAN modules without IRQ

- Raised serial speed for examples to 1000000 baud
This commit is contained in:
Michael Balzer 2017-07-04 19:19:28 +02:00
parent c20f5ba507
commit 3f97ae4cbe
3 changed files with 3 additions and 3 deletions

View file

@ -195,7 +195,7 @@ void bmsTicker(unsigned int clockCnt) {
void setup() { void setup() {
Serial.begin(115200); Serial.begin(1000000);
twizy.begin(); twizy.begin();
twizy.attachTicker(bmsTicker); twizy.attachTicker(bmsTicker);

View file

@ -112,7 +112,7 @@ void bmsTicker(unsigned int clockCnt) {
void setup() { void setup() {
Serial.begin(115200); Serial.begin(1000000);
// Init TwizyVirtualBMS: // Init TwizyVirtualBMS:
twizy.begin(); twizy.begin();

View file

@ -1027,7 +1027,7 @@ void TwizyVirtualBMS::looper() {
#ifndef TWIZY_CAN_IRQ_PIN #ifndef TWIZY_CAN_IRQ_PIN
// No IRQ, we need to poll: // No IRQ, we need to poll:
twizyCanMsgReceived = twizyCAN.checkReceive(); twizyCanMsgReceived = (twizyCAN.checkReceive() == CAN_MSGAVAIL);
#endif #endif
if (twizyCanMsgReceived) { if (twizyCanMsgReceived) {