void _satellite_updated_cb(int num_of_active, int num_of_inview, time_t timestamp, void *user_data)
{
- fprintf(stderr, "-------------------------- satellite updated --------------------------\n");
- fprintf(stderr, "num_of_active[%d] num_of_inview[%d] timestamp[%ld]\n", num_of_active, num_of_inview, timestamp);
+/* fprintf(stderr, "-------------------------- satellite updated --------------------------\n"); */
+ fprintf(stderr, "--- num_of_active[%d] num_of_inview[%d] timestamp[%ld]\n", num_of_active, num_of_inview, timestamp);
- test_timer = g_timeout_add_seconds(1, wait_test, NULL);
+ repeat_count++;
+ if (repeat_count > 60)
+ test_timer = g_timeout_add_seconds(1, wait_test, NULL);
}
static void print_location_status()
location_manager_is_enabled_method(LOCATIONS_METHOD_WPS, &is_enabled);
fprintf(stderr, "wps: %d, ", is_enabled);
-
- /* location_manager_is_test_location_enabled(&is_enabled); */
- location_manager_is_enabled_method(LOCATIONS_METHOD_MOCK, &is_enabled);
- fprintf(stderr, "mock: %d\n", is_enabled);
}
static int enable_method(location_method_e method, bool enable)
fprintf(stderr, "gps_status_set_satellite_updated_cb: %d\n", ret);
}
break;
- }
+ }
case 4:
case 5:
case 6: {
- int timeout = 30;
+ int timeout = 60;
fprintf(stderr, "\n Input timeout ==> ");
ret = scanf("%d", &timeout);
ret = location_manager_request_single_location(manager, timeout, _location_cb, manager);
fprintf(stderr, "request single_location (method: %d): %d\n", method, ret);
break;
- }
+ }
case 11:
case 12:
case 13: {
ret = location_manager_enable_mock_location(onoff);
fprintf(stderr, "Enabling mock test: ret=%d\n", ret);
- ret = location_manager_create(LOCATIONS_METHOD_MOCK, &manager);
- fprintf(stderr, "location_manager_create (method: %d): %d\n", LOCATIONS_METHOD_MOCK, ret);
+ ret = location_manager_create(LOCATIONS_METHOD_GPS, &manager);
+ fprintf(stderr, "location_manager_create (method: %d - mock): %d\n", LOCATIONS_METHOD_GPS, ret);
ret = location_manager_set_mock_location(manager, 10, 20, 0, 40, 50, 100);
fprintf(stderr, "location_manager_set_mock_location: %d\n", ret);