Skip to content
Snippets Groups Projects
Commit a32abf94 authored by Compiler bot's avatar Compiler bot
Browse files

autogen lib 2021-07-04T17:06:27+00:00

parent 5a887451
No related branches found
No related tags found
No related merge requests found
...@@ -15,14 +15,21 @@ static const char SETSERVOPOSITION[] = "multiclamp_srvs/SetServoPosition"; ...@@ -15,14 +15,21 @@ static const char SETSERVOPOSITION[] = "multiclamp_srvs/SetServoPosition";
public: public:
typedef uint8_t _servos_pos_type; typedef uint8_t _servos_pos_type;
_servos_pos_type servos_pos; _servos_pos_type servos_pos;
enum { SERVO_OPEN_1 = 1 }; typedef uint8_t _servos_mask_type;
enum { SERVO_OPEN_2 = 2 }; _servos_mask_type servos_mask;
enum { SERVO_OPEN_3 = 4 }; enum { SERVO_1 = 1 };
enum { SERVO_OPEN_4 = 8 }; enum { SERVO_2 = 2 };
enum { SERVO_OPEN_5 = 16 }; enum { SERVO_3 = 4 };
enum { SERVO_4 = 8 };
enum { SERVO_5 = 16 };
enum { POS_REST = 0 };
enum { POS_OPEN = 1 };
enum { POS_CLOSE = 2 };
enum { POS_TIGH = 3 };
SetServoPositionRequest(): SetServoPositionRequest():
servos_pos(0) servos_pos(0),
servos_mask(0)
{ {
} }
...@@ -31,6 +38,8 @@ static const char SETSERVOPOSITION[] = "multiclamp_srvs/SetServoPosition"; ...@@ -31,6 +38,8 @@ static const char SETSERVOPOSITION[] = "multiclamp_srvs/SetServoPosition";
int offset = 0; int offset = 0;
*(outbuffer + offset + 0) = (this->servos_pos >> (8 * 0)) & 0xFF; *(outbuffer + offset + 0) = (this->servos_pos >> (8 * 0)) & 0xFF;
offset += sizeof(this->servos_pos); offset += sizeof(this->servos_pos);
*(outbuffer + offset + 0) = (this->servos_mask >> (8 * 0)) & 0xFF;
offset += sizeof(this->servos_mask);
return offset; return offset;
} }
...@@ -39,11 +48,13 @@ static const char SETSERVOPOSITION[] = "multiclamp_srvs/SetServoPosition"; ...@@ -39,11 +48,13 @@ static const char SETSERVOPOSITION[] = "multiclamp_srvs/SetServoPosition";
int offset = 0; int offset = 0;
this->servos_pos = ((uint8_t) (*(inbuffer + offset))); this->servos_pos = ((uint8_t) (*(inbuffer + offset)));
offset += sizeof(this->servos_pos); offset += sizeof(this->servos_pos);
this->servos_mask = ((uint8_t) (*(inbuffer + offset)));
offset += sizeof(this->servos_mask);
return offset; return offset;
} }
virtual const char * getType() override { return SETSERVOPOSITION; }; virtual const char * getType() override { return SETSERVOPOSITION; };
virtual const char * getMD5() override { return "56c12d1c04536f553d43afcdde068aac"; }; virtual const char * getMD5() override { return "fb0d68a788ef5a49a575e476a4834ace"; };
}; };
......
...@@ -4,8 +4,8 @@ ...@@ -4,8 +4,8 @@
#include <string.h> #include <string.h>
#include <stdlib.h> #include <stdlib.h>
#include "ros/msg.h" #include "ros/msg.h"
#include "nav_msgs/Path.h"
#include "geometry_msgs/PoseStamped.h" #include "geometry_msgs/PoseStamped.h"
#include "nav_msgs/Path.h"
namespace nav_msgs namespace nav_msgs
{ {
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment