mirror of
https://github.com/dexterbg/Twizy-Virtual-BMS.git
synced 2024-11-08 12:25:42 +00:00
- Fixed polling check for CAN modules without IRQ
- Raised serial speed for examples to 1000000 baud
This commit is contained in:
parent
c20f5ba507
commit
3f97ae4cbe
3 changed files with 3 additions and 3 deletions
|
@ -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);
|
||||||
|
|
|
@ -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();
|
||||||
|
|
|
@ -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) {
|
||||||
|
|
Loading…
Reference in a new issue