@@ -41,8 +41,7 @@ typedef struct _wippersnapper_i2c_output_LedBackpackConfig {
4141typedef struct _wippersnapper_i2c_output_CharLCDConfig {
4242 uint32_t rows ; /* * Number of rows for the character LCD. * */
4343 uint32_t columns ; /* * Number of columns for the character LCD. * */
44- bool backlight_enable ; /* * Backlight state for the character LCD. * */
45- char backlight_color [15 ]; /* * Backlight color for the character LCD, in Hex. * */
44+ char backlight_color [15 ]; /* * Optional Backlight color for the character LCD, in Hex. * */
4645} wippersnapper_i2c_output_CharLCDConfig ;
4746
4847/* *
@@ -69,21 +68,14 @@ typedef struct _wippersnapper_i2c_output_LedBackpackWrite {
6968 wippersnapper_i2c_output_LedBackpackBlinkRate blink_rate ; /* * Optionally sets the blink rate for the LED backpack. * */
7069 bool enable_scroll_marquee ; /* * Optionally enables automatic text scrolling * */
7170 float scroll_marquee_speed ; /* * Speed for the scrolling marquee. * */
72- bool enable_ampm_dot ; /* * Enable AM/PM dot. * */
7371} wippersnapper_i2c_output_LedBackpackWrite ;
7472
7573/* *
7674 CharLCDWrite represents a request from the broker to write to a character LCD. */
7775typedef struct _wippersnapper_i2c_output_CharLCDWrite {
78- pb_size_t which_message ;
79- union {
80- char text [100 ]; /* * Text to write to the character LCD. * */
81- int32_t number_int ; /* * Number to write to the character LCD. * */
82- float number_float ; /* * Float to write to the character LCD. * */
83- } message ;
84- bool enable_backlight ; /* * Enable backlight for the character LCD. * */
85- char backlight_color [20 ]; /* * Backlight color for the character LCD, in Hex. * */
86- bool enable_scroll ; /* * Enable automatic scrolling for the character LCD. * */
76+ char message [128 ]; /* * Message to write to the character LCD. * */
77+ char backlight_color [20 ]; /* * Optional Backlight color for the character LCD, in Hex. * */
78+ bool enable_scroll ; /* * Optional Enable automatic scrolling for the character LCD. * */
8779} wippersnapper_i2c_output_CharLCDWrite ;
8880
8981
@@ -110,23 +102,22 @@ extern "C" {
110102
111103/* Initializer values for message structs */
112104#define wippersnapper_i2c_output_LedBackpackConfig_init_default {0, _wippersnapper_i2c_output_LedBackpackAlignment_MIN}
113- #define wippersnapper_i2c_output_CharLCDConfig_init_default {0, 0, 0, ""}
105+ #define wippersnapper_i2c_output_CharLCDConfig_init_default {0, 0, ""}
114106#define wippersnapper_i2c_output_I2cOutputAdd_init_default {0, {wippersnapper_i2c_output_LedBackpackConfig_init_default}}
115- #define wippersnapper_i2c_output_LedBackpackWrite_init_default {0, {""}, 0, 0, _wippersnapper_i2c_output_LedBackpackBlinkRate_MIN, 0, 0, 0 }
116- #define wippersnapper_i2c_output_CharLCDWrite_init_default {0, {""}, 0 , "", 0}
107+ #define wippersnapper_i2c_output_LedBackpackWrite_init_default {0, {""}, 0, 0, _wippersnapper_i2c_output_LedBackpackBlinkRate_MIN, 0, 0}
108+ #define wippersnapper_i2c_output_CharLCDWrite_init_default {"" , "", 0}
117109#define wippersnapper_i2c_output_LedBackpackConfig_init_zero {0, _wippersnapper_i2c_output_LedBackpackAlignment_MIN}
118- #define wippersnapper_i2c_output_CharLCDConfig_init_zero {0, 0, 0, ""}
110+ #define wippersnapper_i2c_output_CharLCDConfig_init_zero {0, 0, ""}
119111#define wippersnapper_i2c_output_I2cOutputAdd_init_zero {0, {wippersnapper_i2c_output_LedBackpackConfig_init_zero}}
120- #define wippersnapper_i2c_output_LedBackpackWrite_init_zero {0, {""}, 0, 0, _wippersnapper_i2c_output_LedBackpackBlinkRate_MIN, 0, 0, 0 }
121- #define wippersnapper_i2c_output_CharLCDWrite_init_zero {0, {""}, 0 , "", 0}
112+ #define wippersnapper_i2c_output_LedBackpackWrite_init_zero {0, {""}, 0, 0, _wippersnapper_i2c_output_LedBackpackBlinkRate_MIN, 0, 0}
113+ #define wippersnapper_i2c_output_CharLCDWrite_init_zero {"" , "", 0}
122114
123115/* Field tags (for use in manual encoding/decoding) */
124116#define wippersnapper_i2c_output_LedBackpackConfig_brightness_tag 1
125117#define wippersnapper_i2c_output_LedBackpackConfig_alignment_tag 2
126118#define wippersnapper_i2c_output_CharLCDConfig_rows_tag 1
127119#define wippersnapper_i2c_output_CharLCDConfig_columns_tag 2
128- #define wippersnapper_i2c_output_CharLCDConfig_backlight_enable_tag 3
129- #define wippersnapper_i2c_output_CharLCDConfig_backlight_color_tag 4
120+ #define wippersnapper_i2c_output_CharLCDConfig_backlight_color_tag 3
130121#define wippersnapper_i2c_output_I2cOutputAdd_led_backpack_config_tag 1
131122#define wippersnapper_i2c_output_I2cOutputAdd_char_lcd_config_tag 2
132123#define wippersnapper_i2c_output_LedBackpackWrite_text_tag 1
@@ -137,13 +128,9 @@ extern "C" {
137128#define wippersnapper_i2c_output_LedBackpackWrite_blink_rate_tag 6
138129#define wippersnapper_i2c_output_LedBackpackWrite_enable_scroll_marquee_tag 7
139130#define wippersnapper_i2c_output_LedBackpackWrite_scroll_marquee_speed_tag 8
140- #define wippersnapper_i2c_output_LedBackpackWrite_enable_ampm_dot_tag 9
141- #define wippersnapper_i2c_output_CharLCDWrite_text_tag 1
142- #define wippersnapper_i2c_output_CharLCDWrite_number_int_tag 2
143- #define wippersnapper_i2c_output_CharLCDWrite_number_float_tag 3
144- #define wippersnapper_i2c_output_CharLCDWrite_enable_backlight_tag 4
145- #define wippersnapper_i2c_output_CharLCDWrite_backlight_color_tag 5
146- #define wippersnapper_i2c_output_CharLCDWrite_enable_scroll_tag 6
131+ #define wippersnapper_i2c_output_CharLCDWrite_message_tag 1
132+ #define wippersnapper_i2c_output_CharLCDWrite_backlight_color_tag 2
133+ #define wippersnapper_i2c_output_CharLCDWrite_enable_scroll_tag 3
147134
148135/* Struct field encoding specification for nanopb */
149136#define wippersnapper_i2c_output_LedBackpackConfig_FIELDLIST (X , a ) \
@@ -155,8 +142,7 @@ X(a, STATIC, SINGULAR, UENUM, alignment, 2)
155142#define wippersnapper_i2c_output_CharLCDConfig_FIELDLIST (X , a ) \
156143X(a, STATIC, SINGULAR, UINT32, rows, 1) \
157144X(a, STATIC, SINGULAR, UINT32, columns, 2) \
158- X(a, STATIC, SINGULAR, BOOL, backlight_enable, 3) \
159- X(a, STATIC, SINGULAR, STRING, backlight_color, 4)
145+ X(a, STATIC, SINGULAR, STRING, backlight_color, 3)
160146#define wippersnapper_i2c_output_CharLCDConfig_CALLBACK NULL
161147#define wippersnapper_i2c_output_CharLCDConfig_DEFAULT NULL
162148
@@ -176,18 +162,14 @@ X(a, STATIC, SINGULAR, BOOL, adjust_brightness, 4) \
176162X(a, STATIC, SINGULAR, INT32, brightness, 5) \
177163X(a, STATIC, SINGULAR, UENUM, blink_rate, 6) \
178164X(a, STATIC, SINGULAR, BOOL, enable_scroll_marquee, 7) \
179- X(a, STATIC, SINGULAR, FLOAT, scroll_marquee_speed, 8) \
180- X(a, STATIC, SINGULAR, BOOL, enable_ampm_dot, 9)
165+ X(a, STATIC, SINGULAR, FLOAT, scroll_marquee_speed, 8)
181166#define wippersnapper_i2c_output_LedBackpackWrite_CALLBACK NULL
182167#define wippersnapper_i2c_output_LedBackpackWrite_DEFAULT NULL
183168
184169#define wippersnapper_i2c_output_CharLCDWrite_FIELDLIST (X , a ) \
185- X(a, STATIC, ONEOF, STRING, (message,text,message.text), 1) \
186- X(a, STATIC, ONEOF, INT32, (message,number_int,message.number_int), 2) \
187- X(a, STATIC, ONEOF, FLOAT, (message,number_float,message.number_float), 3) \
188- X(a, STATIC, SINGULAR, BOOL, enable_backlight, 4) \
189- X(a, STATIC, SINGULAR, STRING, backlight_color, 5) \
190- X(a, STATIC, SINGULAR, BOOL, enable_scroll, 6)
170+ X(a, STATIC, SINGULAR, STRING, message, 1) \
171+ X(a, STATIC, SINGULAR, STRING, backlight_color, 2) \
172+ X(a, STATIC, SINGULAR, BOOL, enable_scroll, 3)
191173#define wippersnapper_i2c_output_CharLCDWrite_CALLBACK NULL
192174#define wippersnapper_i2c_output_CharLCDWrite_DEFAULT NULL
193175
@@ -206,11 +188,11 @@ extern const pb_msgdesc_t wippersnapper_i2c_output_CharLCDWrite_msg;
206188
207189/* Maximum encoded size of messages (where known) */
208190#define WIPPERSNAPPER_I2C_OUTPUT_I2C_OUTPUT_PB_H_MAX_SIZE wippersnapper_i2c_output_CharLCDWrite_size
209- #define wippersnapper_i2c_output_CharLCDConfig_size 30
210- #define wippersnapper_i2c_output_CharLCDWrite_size 46
211- #define wippersnapper_i2c_output_I2cOutputAdd_size 32
191+ #define wippersnapper_i2c_output_CharLCDConfig_size 28
192+ #define wippersnapper_i2c_output_CharLCDWrite_size 153
193+ #define wippersnapper_i2c_output_I2cOutputAdd_size 30
212194#define wippersnapper_i2c_output_LedBackpackConfig_size 13
213- #define wippersnapper_i2c_output_LedBackpackWrite_size 45
195+ #define wippersnapper_i2c_output_LedBackpackWrite_size 43
214196
215197#ifdef __cplusplus
216198} /* extern "C" */
0 commit comments