Skip to content

Commit 4792c91

Browse files
committed
SD - Add UART GPS
1 parent c6d6482 commit 4792c91

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/provisioning/sdcard/ws_sdcard.cpp

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -499,9 +499,12 @@ bool ws_sdcard::ParseUartAdd(JsonObject &component,
499499
// set UartDeviceType
500500
const char *device_type = component["deviceType"] | "UNKNOWN";
501501
if (strcmp(device_type, "GPS") == 0) {
502-
msg_uart_add.cfg_device.device_type =
503-
wippersnapper_uart_UartDeviceType_UART_DEVICE_TYPE_GPS;
504-
// Fill the config field
502+
msg_uart_add.cfg_device.device_type = wippersnapper_uart_UartDeviceType_UART_DEVICE_TYPE_GPS;
503+
msg_uart_add.cfg_device.which_config = wippersnapper_uart_UartDeviceConfig_gps_tag;
504+
msg_uart_add.cfg_device.config.gps.period = component["period"] | 0.0;
505+
// TODO: We do not have parsing for GPS PMTK or UBX implemented yet
506+
// This is a minimum possible implementation
507+
// TODO: We will want to add parsing for GPS PMTK, at least
505508
} else if (strcmp(device_type, "PM25AQI") == 0) {
506509
msg_uart_add.cfg_device.device_type =
507510
wippersnapper_uart_UartDeviceType_UART_DEVICE_TYPE_PM25AQI;

0 commit comments

Comments
 (0)