@@ -500,7 +500,7 @@ bool ws_sdcard::ParseUartAdd(JsonObject &component,
500
500
sizeof (msg_uart_add.cfg_device .device_id ) - 1 );
501
501
// set UartDeviceType
502
502
const char *device_type = component[" deviceType" ] | " UNKNOWN" ;
503
- if (strcmp (device_type, " GPS " ) == 0 ) {
503
+ if (strcmp (device_type, " gps " ) == 0 ) {
504
504
msg_uart_add.cfg_device .device_type =
505
505
wippersnapper_uart_UartDeviceType_UART_DEVICE_TYPE_GPS;
506
506
msg_uart_add.cfg_device .which_config =
@@ -509,7 +509,7 @@ bool ws_sdcard::ParseUartAdd(JsonObject &component,
509
509
// TODO: We do not have parsing for GPS PMTK or UBX implemented yet
510
510
// This is a minimum possible implementation
511
511
// 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 ) {
513
513
msg_uart_add.cfg_device .device_type =
514
514
wippersnapper_uart_UartDeviceType_UART_DEVICE_TYPE_PM25AQI;
515
515
msg_uart_add.cfg_device .which_config =
@@ -519,14 +519,14 @@ bool ws_sdcard::ParseUartAdd(JsonObject &component,
519
519
component[" isPm1006" ] | false ;
520
520
// Fill sensor types
521
521
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>()) {
523
523
msg_uart_add.cfg_device .config .pm25aqi .sensor_types [sensor_type_count] =
524
524
ParseSensorType (sensor_type[" type" ]);
525
525
sensor_type_count++;
526
526
}
527
527
msg_uart_add.cfg_device .config .pm25aqi .sensor_types_count =
528
528
sensor_type_count;
529
- } else if (strcmp (device_type, " GENERIC-INPUT " ) == 0 ) {
529
+ } else if (strcmp (device_type, " generic_input " ) == 0 ) {
530
530
// TODO: Fill device name (requires an update to uart.pb.h so it's not a
531
531
// pb_callback field)
532
532
msg_uart_add.cfg_device .device_type =
@@ -539,7 +539,7 @@ bool ws_sdcard::ParseUartAdd(JsonObject &component,
539
539
component[" period" ] | 0.0 ;
540
540
// Fill sensor types
541
541
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>()) {
543
543
msg_uart_add.cfg_device .config .generic_uart_input
544
544
.sensor_types [sensor_type_count] =
545
545
ParseSensorType (sensor_type[" type" ]);
0 commit comments