From 9759f07f7f9a43ec4e541acb665eb971036031cd Mon Sep 17 00:00:00 2001 From: Abhimanyu Swami Date: Wed, 26 Mar 2025 16:37:42 +0530 Subject: [PATCH] Fix build errors Change-Id: I61a545e54d7ff5f37241879532d70a40baa0cb39 --- gps-plugin/src/gps_plugin_replay.c | 30 +++++++++++++++--------------- gps-plugin/src/nmea_parser.c | 2 +- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/gps-plugin/src/gps_plugin_replay.c b/gps-plugin/src/gps_plugin_replay.c index 6a01af6..2db586e 100755 --- a/gps-plugin/src/gps_plugin_replay.c +++ b/gps-plugin/src/gps_plugin_replay.c @@ -80,7 +80,7 @@ void gps_plugin_replay_pos_event(hal_location_pos_data_s *data) memset(&gps_event, 0, sizeof(gps_event_info_s)); time(×tamp); - gps_event.hal_location_gps_event_id_e = GPS_EVENT_REPORT_POSITION; + gps_event.hal_location_gps_event_id_e = HAL_LOCATION_GPS_EVENT_REPORT_POSITION; if (data == NULL) { LOG_PLUGIN(DBG_ERR, "NULL POS data."); @@ -158,7 +158,7 @@ void gps_plugin_replay_batch_event(hal_location_pos_data_s *data, replay_timeout gps_event_info_s gps_event; memset(&gps_event, 0, sizeof(gps_event_info_s)); - gps_event.hal_location_gps_event_id_e = GPS_EVENT_REPORT_BATCH; + gps_event.hal_location_gps_event_id_e = HAL_LOCATION_GPS_EVENT_REPORT_BATCH; timer->batch_start_time = timestamp; timer->is_flush = FALSE; @@ -186,7 +186,7 @@ void gps_plugin_replay_sv_event(hal_location_sv_data_s *data) memset(&gps_event, 0, sizeof(gps_event_info_s)); time(×tamp); - gps_event.hal_location_gps_event_id_e = GPS_EVENT_REPORT_SATELLITE; + gps_event.hal_location_gps_event_id_e = HAL_LOCATION_GPS_EVENT_REPORT_SATELLITE; if (data == NULL) { LOG_PLUGIN(DBG_ERR, "NULL SV data."); @@ -217,7 +217,7 @@ void gps_plugin_replay_nmea_event(hal_location_nmea_data_s *data) memset(&gps_event, 0, sizeof(gps_event_info_s)); time(×tamp); - gps_event.hal_location_gps_event_id_e = GPS_EVENT_REPORT_NMEA; + gps_event.hal_location_gps_event_id_e = HAL_LOCATION_GPS_EVENT_REPORT_NMEA; if (data == NULL) { LOG_PLUGIN(DBG_ERR, "NULL NMEA data."); @@ -699,48 +699,48 @@ static int gps_plugin_replay_gps_deinit(gps_failure_reason_e *reason_code) static int gps_plugin_replay_gps_request(hal_location_gps_action_e gps_action, void *gps_action_data, gps_failure_reason_e *reason_code) { - gps_action_start_data_t *gps_start_data = gps_action_data; + hal_location_gps_action_start_data_s *gps_start_data = gps_action_data; switch (gps_action) { - case GPS_ACTION_SEND_PARAMS: + case HAL_LOCATION_GPS_ACTION_SEND_PARAMS: g_replay_timer->lcd_mode = *(int*)(gps_action_data); break; - case GPS_ACTION_START_SESSION: + case HAL_LOCATION_GPS_ACTION_START_SESSION: gps_plugin_start_replay_mode(g_replay_timer); break; - case GPS_ACTION_STOP_SESSION: + case HAL_LOCATION_GPS_ACTION_STOP_SESSION: gps_plugin_stop_replay_mode(g_replay_timer); break; - case GPS_ACTION_START_BATCH: + case HAL_LOCATION_GPS_ACTION_START_BATCH: if (!gps_start_data->session_status) /* need to start */ gps_plugin_start_replay_mode(g_replay_timer); gps_plugin_update_batch_mode(g_replay_timer, gps_start_data->interval, gps_start_data->period); break; - case GPS_ACTION_STOP_BATCH: + case HAL_LOCATION_GPS_ACTION_STOP_BATCH: if (!gps_start_data->session_status) /* need to stop */ gps_plugin_stop_replay_mode(g_replay_timer); gps_plugin_stop_batch_mode(g_replay_timer, gps_start_data->interval, gps_start_data->period); break; //error when adding new options, cannot build. so adding calling functions in existing cases for now which were unused - case GPS_INDI_SUPL_VERIFICATION: + case HAL_LOCATION_GPS_INDI_SUPL_VERIFICATION: display_mode_changed(); break; - case GPS_INDI_SUPL_DNSQUERY: + case HAL_LOCATION_GPS_INDI_SUPL_DNSQUERY: if (nmea_file_name) { free(nmea_file_name); nmea_file_name = NULL; } nmea_file_name = strdup(*(const char**)(gps_action_data)); break; - case GPS_ACTION_START_FACTTEST: + case HAL_LOCATION_GPS_ACTION_START_FACTTEST: g_replay_timer->replay_mode = *(int*)(gps_action_data); break; - case GPS_ACTION_STOP_FACTTEST: + case HAL_LOCATION_GPS_ACTION_STOP_FACTTEST: replay_mode_changed(); break; - case GPS_ACTION_REQUEST_SUPL_NI: + case HAL_LOCATION_GPS_ACTION_REQUEST_SUPL_NI: LOG_PLUGIN(DBG_LOW, "Don't use action type : [ %d ]", gps_action); break; default: diff --git a/gps-plugin/src/nmea_parser.c b/gps-plugin/src/nmea_parser.c index 78d3df4..2e7f837 100644 --- a/gps-plugin/src/nmea_parser.c +++ b/gps-plugin/src/nmea_parser.c @@ -287,7 +287,7 @@ static int nmea_parser_gpgsv(char *token[], hal_location_sv_data_s *sv) } num_sv = atoi(token[3]); - if (num_sv > MAX_GPS_NUM_SAT_IN_VIEW) { + if (num_sv > HAL_LOCATION_MAX_GPS_NUM_SAT_IN_VIEW) { LOG_PLUGIN(DBG_LOW, "num_of_sat(num_sv) size error"); return READ_ERROR; } -- 2.34.1