We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
arduino
Learn more about funding links in repositories.
Report abuse
There was an error while loading. Please reload this page.
1 parent 3374ec1 commit ef597e1Copy full SHA for ef597e1
ArduinoCloudThing.cpp
@@ -300,12 +300,20 @@ ArduinoCloudThing::MapParserState ArduinoCloudThing::handle_BaseTime(CborValue *
300
double val = 0.0;
301
if(cbor_value_get_double(value_iter, &val) == CborNoError) {
302
map_data->base_time.set(val);
303
- if(cbor_value_advance(value_iter) == CborNoError) {
304
- next_state = MapParserState::MapKey;
305
- }
306
}
307
308
+ if(cbor_value_is_integer(value_iter)) {
+ int val = 0;
+ if(cbor_value_get_int(value_iter, &val) == CborNoError) {
309
+ map_data->base_time.set(static_cast<double>(val));
310
+ }
311
312
+
313
+ if(cbor_value_advance(value_iter) == CborNoError) {
314
+ next_state = MapParserState::MapKey;
315
316
317
return next_state;
318
319
0 commit comments