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

ci/Compilation of messages-schemas/088cb1c3325672fd293f3c998b1e41c3140e02d5

parent a893d559
No related branches found
No related tags found
No related merge requests found
......@@ -20,3 +20,11 @@ PB_BIND(Msg_mccd_order, Msg_mccd_order, AUTO)
#ifndef PB_CONVERT_DOUBLE_FLOAT
/* On some platforms (such as AVR), double is really float.
* To be able to encode/decode double on these platforms, you need.
* to define PB_CONVERT_DOUBLE_FLOAT in pb.h or compiler command line.
*/
PB_STATIC_ASSERT(sizeof(double) == 8, DOUBLE_MUST_BE_8_BYTES)
#endif
......@@ -24,18 +24,18 @@ typedef enum _Status {
/* Struct definitions */
typedef struct _Msg_mccd_order {
float linearSpeed;
float angularSpeed;
double linearSpeed;
double angularSpeed;
} Msg_mccd_order;
typedef struct _Point2D {
float x;
float y;
double x;
double y;
} Point2D;
typedef struct _Msg_mccd_odom {
Point2D pos;
float ang;
double ang;
} Msg_mccd_odom;
typedef struct _Msg_mccd {
......@@ -77,8 +77,8 @@ typedef struct _Msg_mccd {
/* Struct field encoding specification for nanopb */
#define Point2D_FIELDLIST(X, a) \
X(a, STATIC, SINGULAR, FLOAT, x, 1) \
X(a, STATIC, SINGULAR, FLOAT, y, 2)
X(a, STATIC, SINGULAR, DOUBLE, x, 1) \
X(a, STATIC, SINGULAR, DOUBLE, y, 2)
#define Point2D_CALLBACK NULL
#define Point2D_DEFAULT NULL
......@@ -93,14 +93,14 @@ X(a, STATIC, ONEOF, ENUM, (payload,status,payload.status), 3)
#define Msg_mccd_odom_FIELDLIST(X, a) \
X(a, STATIC, SINGULAR, MESSAGE, pos, 1) \
X(a, STATIC, SINGULAR, FLOAT, ang, 2)
X(a, STATIC, SINGULAR, DOUBLE, ang, 2)
#define Msg_mccd_odom_CALLBACK NULL
#define Msg_mccd_odom_DEFAULT NULL
#define Msg_mccd_odom_pos_MSGTYPE Point2D
#define Msg_mccd_order_FIELDLIST(X, a) \
X(a, STATIC, SINGULAR, FLOAT, linearSpeed, 1) \
X(a, STATIC, SINGULAR, FLOAT, angularSpeed, 2)
X(a, STATIC, SINGULAR, DOUBLE, linearSpeed, 1) \
X(a, STATIC, SINGULAR, DOUBLE, angularSpeed, 2)
#define Msg_mccd_order_CALLBACK NULL
#define Msg_mccd_order_DEFAULT NULL
......@@ -116,10 +116,10 @@ extern const pb_msgdesc_t Msg_mccd_order_msg;
#define Msg_mccd_order_fields &Msg_mccd_order_msg
/* Maximum encoded size of messages (where known) */
#define Point2D_size 10
#define Msg_mccd_size 19
#define Msg_mccd_odom_size 17
#define Msg_mccd_order_size 10
#define Point2D_size 18
#define Msg_mccd_size 31
#define Msg_mccd_odom_size 29
#define Msg_mccd_order_size 18
#ifdef __cplusplus
} /* extern "C" */
......
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