This is a fork from the original, including a small change in the buffer size of the hardware interface (increased to 2048) and decreasing the number of publishers and subscribers to 5. Besides, the library about the message Adc.h was modified so as to increase the number of available Adc channels to be read ( from 6 to 7 ) For this modification, a change in checksum was required

Dependencies:   BufferedSerial

Fork of ros_lib_kinetic by Gary Servin

Revision:
2:9114cc24ddcf
Parent:
0:9e9b7db60fd5
--- a/rosserial_mbed/Adc.h	Sat Dec 31 00:59:58 2016 +0000
+++ b/rosserial_mbed/Adc.h	Tue Oct 17 18:49:03 2017 +0000
@@ -1,11 +1,16 @@
 #ifndef _ROS_rosserial_mbed_Adc_h
 #define _ROS_rosserial_mbed_Adc_h
 
+/*
+MODIFIED BY JACOB : ADDED AN EXTRA ADC CHANNEL
+*/
+
 #include <stdint.h>
 #include <string.h>
 #include <stdlib.h>
 #include "ros/msg.h"
 
+
 namespace rosserial_mbed
 {
 
@@ -24,6 +29,8 @@
       _adc4_type adc4;
       typedef uint16_t _adc5_type;
       _adc5_type adc5;
+      typedef uint16_t _adc6_type;
+      _adc6_type adc6;
 
     Adc():
       adc0(0),
@@ -31,7 +38,8 @@
       adc2(0),
       adc3(0),
       adc4(0),
-      adc5(0)
+      adc5(0),
+      adc6(0)
     {
     }
 
@@ -56,6 +64,9 @@
       *(outbuffer + offset + 0) = (this->adc5 >> (8 * 0)) & 0xFF;
       *(outbuffer + offset + 1) = (this->adc5 >> (8 * 1)) & 0xFF;
       offset += sizeof(this->adc5);
+      *(outbuffer + offset + 0) = (this->adc6 >> (8 * 0)) & 0xFF;
+      *(outbuffer + offset + 1) = (this->adc6 >> (8 * 1)) & 0xFF;
+      offset += sizeof(this->adc6);
       return offset;
     }
 
@@ -80,11 +91,15 @@
       this->adc5 =  ((uint16_t) (*(inbuffer + offset)));
       this->adc5 |= ((uint16_t) (*(inbuffer + offset + 1))) << (8 * 1);
       offset += sizeof(this->adc5);
+      this->adc6 =  ((uint16_t) (*(inbuffer + offset)));
+      this->adc6 |= ((uint16_t) (*(inbuffer + offset + 1))) << (8 * 1);
+      offset += sizeof(this->adc6);
      return offset;
     }
 
     const char * getType(){ return "rosserial_mbed/Adc"; };
-    const char * getMD5(){ return "6d7853a614e2e821319068311f2af25b"; };
+    const char * getMD5(){ return "a1c93390d0a5d50b5be382174396ec0c"; };    
+    //const char * getMD5(){ return "6d7853a614e2e821319068311f2af25b"; };
 
   };