@@ -499,8 +499,10 @@ 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 = wippersnapper_uart_UartDeviceType_UART_DEVICE_TYPE_GPS;
503- msg_uart_add.cfg_device .which_config = wippersnapper_uart_UartDeviceConfig_gps_tag;
502+ msg_uart_add.cfg_device .device_type =
503+ wippersnapper_uart_UartDeviceType_UART_DEVICE_TYPE_GPS;
504+ msg_uart_add.cfg_device .which_config =
505+ wippersnapper_uart_UartDeviceConfig_gps_tag;
504506 msg_uart_add.cfg_device .config .gps .period = component[" period" ] | 0.0 ;
505507 // TODO: We do not have parsing for GPS PMTK or UBX implemented yet
506508 // This is a minimum possible implementation
@@ -907,7 +909,6 @@ bool ws_sdcard::ParseFileConfig() {
907909*/
908910/* *************************************************************************/
909911bool ws_sdcard::ParseComponents (JsonArray &components) {
910- delay (9000 );
911912 if (components.isNull ()) {
912913 WS_DEBUG_PRINTLN (" [SD] Error: File missing required components[] array" );
913914 return false ;
@@ -1359,7 +1360,6 @@ bool ws_sdcard::LogEventGps(wippersnapper_gps_GPSEvent *msg_gps_event) {
13591360 // Log RMC responses
13601361 for (pb_size_t rmc_resp = 0 ; rmc_resp < msg_gps_event->rmc_responses_count ;
13611362 rmc_resp++) {
1362- WS_DEBUG_PRINTLN (" [SD] Logging RMC response..." );
13631363 // Log GPS DateTime
13641364 if (msg_gps_event->rmc_responses [rmc_resp].has_datetime ) {
13651365 wippersnapper_gps_GPSDateTime gps_dt =
@@ -1376,14 +1376,15 @@ bool ws_sdcard::LogEventGps(wippersnapper_gps_GPSEvent *msg_gps_event) {
13761376 doc[" lon_dir" ] = msg_gps_event->rmc_responses [rmc_resp].lon_dir ;
13771377 doc[" speed" ] = msg_gps_event->rmc_responses [rmc_resp].speed ;
13781378 doc[" angle" ] = msg_gps_event->rmc_responses [rmc_resp].angle ;
1379- if (!LogJSONDoc (doc))
1379+ if (!LogJSONDoc (doc)) {
1380+ WS_DEBUG_PRINTLN (" [SD] Error: Unable to log RMC response!" );
13801381 return false ;
1382+ }
13811383 }
13821384
13831385 // Log GGA responses
13841386 for (pb_size_t gga_resp = 0 ; gga_resp < msg_gps_event->gga_responses_count ;
13851387 gga_resp++) {
1386- WS_DEBUG_PRINTLN (" [SD] Logging GGA response..." );
13871388 // Log GPS DateTime
13881389 if (msg_gps_event->gga_responses [gga_resp].has_datetime ) {
13891390 wippersnapper_gps_GPSDateTime gps_dt =
@@ -1403,8 +1404,10 @@ bool ws_sdcard::LogEventGps(wippersnapper_gps_GPSEvent *msg_gps_event) {
14031404 doc[" hdop" ] = msg_gps_event->gga_responses [gga_resp].hdop ;
14041405 doc[" altitude" ] = msg_gps_event->gga_responses [gga_resp].altitude ;
14051406 doc[" geoid_height" ] = msg_gps_event->gga_responses [gga_resp].geoid_height ;
1406- if (!LogJSONDoc (doc))
1407+ if (!LogJSONDoc (doc)) {
1408+ WS_DEBUG_PRINTLN (" [SD] Error: Unable to log GGA response!" );
14071409 return false ;
1410+ }
14081411 }
14091412
14101413 return true ;
0 commit comments