Skip to content

Commit

Permalink
complete merge, annotate a breaking change with the new protobufs
Browse files Browse the repository at this point in the history
  • Loading branch information
brentru committed Sep 6, 2023
1 parent 2b4317f commit f7318b2
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 33 deletions.
1 change: 1 addition & 0 deletions src/components/uart/ws_uart.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ void ws_uart::initUARTBus(
wippersnapper_uart_v1_UARTDeviceAttachRequest *msgUARTRequest) {
// Parse bus_info
int32_t baud = msgUARTRequest->bus_info.baudrate;
// TODO: These should be strings instead of int32_t type
int32_t rx = msgUARTRequest->bus_info.pin_rx;
int32_t tx = msgUARTRequest->bus_info.pin_tx;
bool invert = msgUARTRequest->bus_info.is_invert;
Expand Down
33 changes: 0 additions & 33 deletions src/wippersnapper/uart/v1/uart.pb.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,6 @@ extern "C" {
#endif

/* Initializer values for message structs */
<<<<<<< HEAD
#define wippersnapper_uart_v1_UARTBusData_init_default {0, 0, 0, 0}
#define wippersnapper_uart_v1_UARTDeviceAttachRequest_init_default {false, wippersnapper_uart_v1_UARTBusData_init_default, "", 0}
#define wippersnapper_uart_v1_UARTDeviceAttachResponse_init_default {"", 0}
#define wippersnapper_uart_v1_UARTDeviceEvent_init_default {"", 0, {wippersnapper_i2c_v1_SensorEvent_init_default, wippersnapper_i2c_v1_SensorEvent_init_default, wippersnapper_i2c_v1_SensorEvent_init_default, wippersnapper_i2c_v1_SensorEvent_init_default, wippersnapper_i2c_v1_SensorEvent_init_default, wippersnapper_i2c_v1_SensorEvent_init_default, wippersnapper_i2c_v1_SensorEvent_init_default, wippersnapper_i2c_v1_SensorEvent_init_default, wippersnapper_i2c_v1_SensorEvent_init_default, wippersnapper_i2c_v1_SensorEvent_init_default, wippersnapper_i2c_v1_SensorEvent_init_default, wippersnapper_i2c_v1_SensorEvent_init_default, wippersnapper_i2c_v1_SensorEvent_init_default, wippersnapper_i2c_v1_SensorEvent_init_default, wippersnapper_i2c_v1_SensorEvent_init_default}}
#define wippersnapper_uart_v1_UARTBusData_init_zero {0, 0, 0, 0}
#define wippersnapper_uart_v1_UARTDeviceAttachRequest_init_zero {false, wippersnapper_uart_v1_UARTBusData_init_zero, "", 0}
#define wippersnapper_uart_v1_UARTDeviceAttachResponse_init_zero {"", 0}
=======
#define wippersnapper_uart_v1_UARTBusData_init_default {0, "", "", 0}
#define wippersnapper_uart_v1_UARTDeviceAttachRequest_init_default {false, wippersnapper_uart_v1_UARTBusData_init_default, "", 0}
#define wippersnapper_uart_v1_UARTDeviceAttachResponse_init_default {"", 0}
Expand All @@ -65,7 +56,6 @@ extern "C" {
#define wippersnapper_uart_v1_UARTDeviceAttachRequest_init_zero {false, wippersnapper_uart_v1_UARTBusData_init_zero, "", 0}
#define wippersnapper_uart_v1_UARTDeviceAttachResponse_init_zero {"", 0}
#define wippersnapper_uart_v1_UARTDeviceDetachRequest_init_zero {""}
>>>>>>> b4cc4ef7c5ddd6ff630e9801de6d5524ba53ca1a
#define wippersnapper_uart_v1_UARTDeviceEvent_init_zero {"", 0, {wippersnapper_i2c_v1_SensorEvent_init_zero, wippersnapper_i2c_v1_SensorEvent_init_zero, wippersnapper_i2c_v1_SensorEvent_init_zero, wippersnapper_i2c_v1_SensorEvent_init_zero, wippersnapper_i2c_v1_SensorEvent_init_zero, wippersnapper_i2c_v1_SensorEvent_init_zero, wippersnapper_i2c_v1_SensorEvent_init_zero, wippersnapper_i2c_v1_SensorEvent_init_zero, wippersnapper_i2c_v1_SensorEvent_init_zero, wippersnapper_i2c_v1_SensorEvent_init_zero, wippersnapper_i2c_v1_SensorEvent_init_zero, wippersnapper_i2c_v1_SensorEvent_init_zero, wippersnapper_i2c_v1_SensorEvent_init_zero, wippersnapper_i2c_v1_SensorEvent_init_zero, wippersnapper_i2c_v1_SensorEvent_init_zero}}

/* Field tags (for use in manual encoding/decoding) */
Expand All @@ -75,10 +65,7 @@ extern "C" {
#define wippersnapper_uart_v1_UARTBusData_is_invert_tag 4
#define wippersnapper_uart_v1_UARTDeviceAttachResponse_device_id_tag 1
#define wippersnapper_uart_v1_UARTDeviceAttachResponse_is_success_tag 2
<<<<<<< HEAD
=======
#define wippersnapper_uart_v1_UARTDeviceDetachRequest_device_id_tag 1
>>>>>>> b4cc4ef7c5ddd6ff630e9801de6d5524ba53ca1a
#define wippersnapper_uart_v1_UARTDeviceEvent_device_id_tag 1
#define wippersnapper_uart_v1_UARTDeviceEvent_sensor_event_tag 2
#define wippersnapper_uart_v1_UARTDeviceAttachRequest_bus_info_tag 1
Expand All @@ -88,13 +75,8 @@ extern "C" {
/* Struct field encoding specification for nanopb */
#define wippersnapper_uart_v1_UARTBusData_FIELDLIST(X, a) \
X(a, STATIC, SINGULAR, INT32, baudrate, 1) \
<<<<<<< HEAD
X(a, STATIC, SINGULAR, INT32, pin_rx, 2) \
X(a, STATIC, SINGULAR, INT32, pin_tx, 3) \
=======
X(a, STATIC, SINGULAR, STRING, pin_rx, 2) \
X(a, STATIC, SINGULAR, STRING, pin_tx, 3) \
>>>>>>> b4cc4ef7c5ddd6ff630e9801de6d5524ba53ca1a
X(a, STATIC, SINGULAR, BOOL, is_invert, 4)
#define wippersnapper_uart_v1_UARTBusData_CALLBACK NULL
#define wippersnapper_uart_v1_UARTBusData_DEFAULT NULL
Expand All @@ -113,14 +95,11 @@ X(a, STATIC, SINGULAR, BOOL, is_success, 2)
#define wippersnapper_uart_v1_UARTDeviceAttachResponse_CALLBACK NULL
#define wippersnapper_uart_v1_UARTDeviceAttachResponse_DEFAULT NULL

<<<<<<< HEAD
=======
#define wippersnapper_uart_v1_UARTDeviceDetachRequest_FIELDLIST(X, a) \
X(a, STATIC, SINGULAR, STRING, device_id, 1)
#define wippersnapper_uart_v1_UARTDeviceDetachRequest_CALLBACK NULL
#define wippersnapper_uart_v1_UARTDeviceDetachRequest_DEFAULT NULL

>>>>>>> b4cc4ef7c5ddd6ff630e9801de6d5524ba53ca1a
#define wippersnapper_uart_v1_UARTDeviceEvent_FIELDLIST(X, a) \
X(a, STATIC, SINGULAR, STRING, device_id, 1) \
X(a, STATIC, REPEATED, MESSAGE, sensor_event, 2)
Expand All @@ -131,24 +110,13 @@ X(a, STATIC, REPEATED, MESSAGE, sensor_event, 2)
extern const pb_msgdesc_t wippersnapper_uart_v1_UARTBusData_msg;
extern const pb_msgdesc_t wippersnapper_uart_v1_UARTDeviceAttachRequest_msg;
extern const pb_msgdesc_t wippersnapper_uart_v1_UARTDeviceAttachResponse_msg;
<<<<<<< HEAD
=======
extern const pb_msgdesc_t wippersnapper_uart_v1_UARTDeviceDetachRequest_msg;
>>>>>>> b4cc4ef7c5ddd6ff630e9801de6d5524ba53ca1a
extern const pb_msgdesc_t wippersnapper_uart_v1_UARTDeviceEvent_msg;

/* Defines for backwards compatibility with code written before nanopb-0.4.0 */
#define wippersnapper_uart_v1_UARTBusData_fields &wippersnapper_uart_v1_UARTBusData_msg
#define wippersnapper_uart_v1_UARTDeviceAttachRequest_fields &wippersnapper_uart_v1_UARTDeviceAttachRequest_msg
#define wippersnapper_uart_v1_UARTDeviceAttachResponse_fields &wippersnapper_uart_v1_UARTDeviceAttachResponse_msg
<<<<<<< HEAD
#define wippersnapper_uart_v1_UARTDeviceEvent_fields &wippersnapper_uart_v1_UARTDeviceEvent_msg

/* Maximum encoded size of messages (where known) */
#define wippersnapper_uart_v1_UARTBusData_size 35
#define wippersnapper_uart_v1_UARTDeviceAttachRequest_size 64
#define wippersnapper_uart_v1_UARTDeviceAttachResponse_size 18
=======
#define wippersnapper_uart_v1_UARTDeviceDetachRequest_fields &wippersnapper_uart_v1_UARTDeviceDetachRequest_msg
#define wippersnapper_uart_v1_UARTDeviceEvent_fields &wippersnapper_uart_v1_UARTDeviceEvent_msg

Expand All @@ -157,7 +125,6 @@ extern const pb_msgdesc_t wippersnapper_uart_v1_UARTDeviceEvent_msg;
#define wippersnapper_uart_v1_UARTDeviceAttachRequest_size 56
#define wippersnapper_uart_v1_UARTDeviceAttachResponse_size 18
#define wippersnapper_uart_v1_UARTDeviceDetachRequest_size 16
>>>>>>> b4cc4ef7c5ddd6ff630e9801de6d5524ba53ca1a
#define wippersnapper_uart_v1_UARTDeviceEvent_size 151

#ifdef __cplusplus
Expand Down

0 comments on commit f7318b2

Please sign in to comment.