Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of ros_lib_kinetic by
Revision 2:9114cc24ddcf, committed 2017-10-17
- Comitter:
- jacobepfl1692
- Date:
- Tue Oct 17 18:49:03 2017 +0000
- Parent:
- 1:a849bf78d77f
- Commit message:
- I increased the channels of the ADC to 6 (hence change in checksum) because my application needed it (STM32f407V6)
Changed in this revision
--- a/MbedHardware.h Sat Dec 31 00:59:58 2016 +0000 +++ b/MbedHardware.h Tue Oct 17 18:49:03 2017 +0000 @@ -21,8 +21,9 @@ } MbedHardware() - :iostream(USBTX, USBRX) { - baud_ = 57600; + //:iostream(USBTX, USBRX) { + :iostream(PA_2, PA_3) { // Modification to be able to use USART2 from the STM32F407V6 connect PA2 to RXD and PA3 to TXD + baud_ = 57600; //! 57600 t.start(); }
--- a/ros.h Sat Dec 31 00:59:58 2016 +0000 +++ b/ros.h Tue Oct 17 18:49:03 2017 +0000 @@ -40,7 +40,7 @@ namespace ros { - typedef NodeHandle_<MbedHardware> NodeHandle; + typedef NodeHandle_<MbedHardware,5,5,2048,2048> NodeHandle; } #endif
--- 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"; }; };