Fix build errors 75/321675/1
authorAbhimanyu Swami <abhimanyu1.s@samsung.com>
Wed, 26 Mar 2025 11:07:42 +0000 (16:37 +0530)
committerAbhimanyu Swami <abhimanyu1.s@samsung.com>
Wed, 26 Mar 2025 11:07:42 +0000 (16:37 +0530)
Change-Id: I61a545e54d7ff5f37241879532d70a40baa0cb39

gps-plugin/src/gps_plugin_replay.c
gps-plugin/src/nmea_parser.c

index 6a01af60f4811ed5380b5dc5f510730d513a1033..2db586ed65d1e8c71c4a7f56a946e725c8321393 100755 (executable)
@@ -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(&timestamp);
 
-       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(&timestamp);
-       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(&timestamp);
 
-       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:
index 78d3df4a5e9ce1fadf757833449419c1866eed5a..2e7f837fc6421bc927f98fd91c368ea969c9a8ad 100644 (file)
@@ -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;
        }