@@ -500,7 +500,7 @@ bool ws_sdcard::ParseUartAdd(JsonObject &component,
500500 sizeof (msg_uart_add.cfg_device .device_id ) - 1 );
501501 // set UartDeviceType
502502 const char *device_type = component[" deviceType" ] | " UNKNOWN" ;
503- if (strcmp (device_type, " GPS " ) == 0 ) {
503+ if (strcmp (device_type, " gps " ) == 0 ) {
504504 msg_uart_add.cfg_device .device_type =
505505 wippersnapper_uart_UartDeviceType_UART_DEVICE_TYPE_GPS;
506506 msg_uart_add.cfg_device .which_config =
@@ -509,7 +509,7 @@ bool ws_sdcard::ParseUartAdd(JsonObject &component,
509509 // TODO: We do not have parsing for GPS PMTK or UBX implemented yet
510510 // This is a minimum possible implementation
511511 // TODO: We will want to add parsing for GPS PMTK, at least
512- } else if (strcmp (device_type, " PM25AQI " ) == 0 ) {
512+ } else if (strcmp (device_type, " pm25aqi " ) == 0 ) {
513513 msg_uart_add.cfg_device .device_type =
514514 wippersnapper_uart_UartDeviceType_UART_DEVICE_TYPE_PM25AQI;
515515 msg_uart_add.cfg_device .which_config =
@@ -519,14 +519,14 @@ bool ws_sdcard::ParseUartAdd(JsonObject &component,
519519 component[" isPm1006" ] | false ;
520520 // Fill sensor types
521521 pb_size_t sensor_type_count = 0 ;
522- for (JsonObject sensor_type : component[" SensorTypes " ].as <JsonArray>()) {
522+ for (JsonObject sensor_type : component[" sensorTypes " ].as <JsonArray>()) {
523523 msg_uart_add.cfg_device .config .pm25aqi .sensor_types [sensor_type_count] =
524524 ParseSensorType (sensor_type[" type" ]);
525525 sensor_type_count++;
526526 }
527527 msg_uart_add.cfg_device .config .pm25aqi .sensor_types_count =
528528 sensor_type_count;
529- } else if (strcmp (device_type, " GENERIC-INPUT " ) == 0 ) {
529+ } else if (strcmp (device_type, " generic_input " ) == 0 ) {
530530 // TODO: Fill device name (requires an update to uart.pb.h so it's not a
531531 // pb_callback field)
532532 msg_uart_add.cfg_device .device_type =
@@ -539,7 +539,7 @@ bool ws_sdcard::ParseUartAdd(JsonObject &component,
539539 component[" period" ] | 0.0 ;
540540 // Fill sensor types
541541 pb_size_t sensor_type_count = 0 ;
542- for (JsonObject sensor_type : component[" SensorTypes " ].as <JsonArray>()) {
542+ for (JsonObject sensor_type : component[" sensorTypes " ].as <JsonArray>()) {
543543 msg_uart_add.cfg_device .config .generic_uart_input
544544 .sensor_types [sensor_type_count] =
545545 ParseSensorType (sensor_type[" type" ]);
0 commit comments