From 2567d53b08a0861a7cf165a4bfbc7650e70ef6ed Mon Sep 17 00:00:00 2001 From: racarla96 Date: Thu, 25 Apr 2024 13:37:50 +0200 Subject: [PATCH] Patch for support Arduino Due Programming Port as Default Option --- rosserial_arduino/src/ros_lib/ArduinoHardware.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/rosserial_arduino/src/ros_lib/ArduinoHardware.h b/rosserial_arduino/src/ros_lib/ArduinoHardware.h index 08fbbd5e6..083ce1e0b 100644 --- a/rosserial_arduino/src/ros_lib/ArduinoHardware.h +++ b/rosserial_arduino/src/ros_lib/ArduinoHardware.h @@ -71,8 +71,12 @@ class ArduinoHardware { ArduinoHardware() { #if defined(USBCON) and !(defined(USE_USBCON)) - /* Leonardo support */ - iostream = &Serial1; + #if defined(_SAM3XA_) + iostream = &Serial; + #else + /* Leonardo support */ + iostream = &Serial1; + #endif #elif defined(USE_TEENSY_HW_SERIAL) or defined(USE_STM32_HW_SERIAL) iostream = &Serial1; #else