From e314f841bba40bf4dd1cf8c9a4d4d3d765f87736 Mon Sep 17 00:00:00 2001 From: Adrian Del Grosso <10929341+ad3154@users.noreply.github.com> Date: Wed, 11 Oct 2023 19:34:11 -0500 Subject: [PATCH] [Arduino]: Improved reliability of transmitting ETP via FlexCAN Added missing sequential message flag and increased TX buffers. --- .../hardware_integration/flex_can_t4_plugin.hpp | 10 +++++----- hardware_integration/src/flex_can_t4_plugin.cpp | 11 ++++++----- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/hardware_integration/include/isobus/hardware_integration/flex_can_t4_plugin.hpp b/hardware_integration/include/isobus/hardware_integration/flex_can_t4_plugin.hpp index 5f508314..456b3655 100644 --- a/hardware_integration/include/isobus/hardware_integration/flex_can_t4_plugin.hpp +++ b/hardware_integration/include/isobus/hardware_integration/flex_can_t4_plugin.hpp @@ -49,12 +49,12 @@ namespace isobus private: #if defined(__IMXRT1062__) - static FlexCAN_T4 can0; - static FlexCAN_T4 can1; - static FlexCAN_T4 can2; + static FlexCAN_T4 can0; + static FlexCAN_T4 can1; + static FlexCAN_T4 can2; #elif defined(__MK20DX256__) || defined(__MK64FX512__) || defined(__MK66FX1M0__) - static FlexCAN_T4 can0; - static FlexCAN_T4 can1; + static FlexCAN_T4 can0; + static FlexCAN_T4 can1; #endif std::uint8_t selectedChannel; bool isOpen = false; diff --git a/hardware_integration/src/flex_can_t4_plugin.cpp b/hardware_integration/src/flex_can_t4_plugin.cpp index 46418ae1..ff0c6399 100644 --- a/hardware_integration/src/flex_can_t4_plugin.cpp +++ b/hardware_integration/src/flex_can_t4_plugin.cpp @@ -14,12 +14,12 @@ namespace isobus { #if defined(__IMXRT1062__) - FlexCAN_T4 FlexCANT4Plugin::can0; - FlexCAN_T4 FlexCANT4Plugin::can1; - FlexCAN_T4 FlexCANT4Plugin::can2; + FlexCAN_T4 FlexCANT4Plugin::can0; + FlexCAN_T4 FlexCANT4Plugin::can1; + FlexCAN_T4 FlexCANT4Plugin::can2; #elif defined(__MK20DX256__) || defined(__MK64FX512__) || defined(__MK66FX1M0__) - FlexCAN_T4 FlexCANT4Plugin::can0; - FlexCAN_T4 FlexCANT4Plugin::can1; + FlexCAN_T4 FlexCANT4Plugin::can0; + FlexCAN_T4 FlexCANT4Plugin::can1; #endif FlexCANT4Plugin::FlexCANT4Plugin(std::uint8_t channel) : @@ -104,6 +104,7 @@ namespace isobus message.id = canFrame.identifier; message.len = canFrame.dataLength; message.flags.extended = true; + message.seq = true; // Ask for sequential transmission memcpy(message.buf, canFrame.data, canFrame.dataLength); if (0 == selectedChannel)