@@ -41,8 +41,7 @@ typedef struct _wippersnapper_i2c_output_LedBackpackConfig {
41
41
typedef struct _wippersnapper_i2c_output_CharLCDConfig {
42
42
uint32_t rows ; /* * Number of rows for the character LCD. * */
43
43
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. * */
46
45
} wippersnapper_i2c_output_CharLCDConfig ;
47
46
48
47
/* *
@@ -69,21 +68,14 @@ typedef struct _wippersnapper_i2c_output_LedBackpackWrite {
69
68
wippersnapper_i2c_output_LedBackpackBlinkRate blink_rate ; /* * Optionally sets the blink rate for the LED backpack. * */
70
69
bool enable_scroll_marquee ; /* * Optionally enables automatic text scrolling * */
71
70
float scroll_marquee_speed ; /* * Speed for the scrolling marquee. * */
72
- bool enable_ampm_dot ; /* * Enable AM/PM dot. * */
73
71
} wippersnapper_i2c_output_LedBackpackWrite ;
74
72
75
73
/* *
76
74
CharLCDWrite represents a request from the broker to write to a character LCD. */
77
75
typedef 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. * */
87
79
} wippersnapper_i2c_output_CharLCDWrite ;
88
80
89
81
@@ -110,23 +102,22 @@ extern "C" {
110
102
111
103
/* Initializer values for message structs */
112
104
#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, ""}
114
106
#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}
117
109
#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, ""}
119
111
#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}
122
114
123
115
/* Field tags (for use in manual encoding/decoding) */
124
116
#define wippersnapper_i2c_output_LedBackpackConfig_brightness_tag 1
125
117
#define wippersnapper_i2c_output_LedBackpackConfig_alignment_tag 2
126
118
#define wippersnapper_i2c_output_CharLCDConfig_rows_tag 1
127
119
#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
130
121
#define wippersnapper_i2c_output_I2cOutputAdd_led_backpack_config_tag 1
131
122
#define wippersnapper_i2c_output_I2cOutputAdd_char_lcd_config_tag 2
132
123
#define wippersnapper_i2c_output_LedBackpackWrite_text_tag 1
@@ -137,13 +128,9 @@ extern "C" {
137
128
#define wippersnapper_i2c_output_LedBackpackWrite_blink_rate_tag 6
138
129
#define wippersnapper_i2c_output_LedBackpackWrite_enable_scroll_marquee_tag 7
139
130
#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
147
134
148
135
/* Struct field encoding specification for nanopb */
149
136
#define wippersnapper_i2c_output_LedBackpackConfig_FIELDLIST (X , a ) \
@@ -155,8 +142,7 @@ X(a, STATIC, SINGULAR, UENUM, alignment, 2)
155
142
#define wippersnapper_i2c_output_CharLCDConfig_FIELDLIST (X , a ) \
156
143
X(a, STATIC, SINGULAR, UINT32, rows, 1) \
157
144
X(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)
160
146
#define wippersnapper_i2c_output_CharLCDConfig_CALLBACK NULL
161
147
#define wippersnapper_i2c_output_CharLCDConfig_DEFAULT NULL
162
148
@@ -176,18 +162,14 @@ X(a, STATIC, SINGULAR, BOOL, adjust_brightness, 4) \
176
162
X(a, STATIC, SINGULAR, INT32, brightness, 5) \
177
163
X(a, STATIC, SINGULAR, UENUM, blink_rate, 6) \
178
164
X(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)
181
166
#define wippersnapper_i2c_output_LedBackpackWrite_CALLBACK NULL
182
167
#define wippersnapper_i2c_output_LedBackpackWrite_DEFAULT NULL
183
168
184
169
#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)
191
173
#define wippersnapper_i2c_output_CharLCDWrite_CALLBACK NULL
192
174
#define wippersnapper_i2c_output_CharLCDWrite_DEFAULT NULL
193
175
@@ -206,11 +188,11 @@ extern const pb_msgdesc_t wippersnapper_i2c_output_CharLCDWrite_msg;
206
188
207
189
/* Maximum encoded size of messages (where known) */
208
190
#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
212
194
#define wippersnapper_i2c_output_LedBackpackConfig_size 13
213
- #define wippersnapper_i2c_output_LedBackpackWrite_size 45
195
+ #define wippersnapper_i2c_output_LedBackpackWrite_size 43
214
196
215
197
#ifdef __cplusplus
216
198
} /* extern "C" */
0 commit comments