diff options
author | sleske <sleske@ffa7fe5e-494d-0410-b361-a75ebd5db220> | 2014-11-22 22:36:24 +0000 |
---|---|---|
committer | sleske <sleske@ffa7fe5e-494d-0410-b361-a75ebd5db220> | 2014-11-22 22:36:24 +0000 |
commit | cb575bf823793db3620c77a3c7bf12a7d3856ed3 (patch) | |
tree | 0118c6ec64520748c7daefd46e57c226343621d2 /navit/vehicle | |
parent | 72471adee798a3a1d8414f0d4f77be816fb4dad6 (diff) | |
download | navit-cb575bf823793db3620c77a3c7bf12a7d3856ed3.tar.gz |
Fix:core:Change all logging at lvl_error/warning to lvl_debug, unless it looks like an error message.|#1269, part 5
git-svn-id: http://svn.code.sf.net/p/navit/code/trunk/navit@5967 ffa7fe5e-494d-0410-b361-a75ebd5db220
Diffstat (limited to 'navit/vehicle')
-rw-r--r-- | navit/vehicle/android/vehicle_android.c | 34 | ||||
-rw-r--r-- | navit/vehicle/demo/vehicle_demo.c | 20 | ||||
-rw-r--r-- | navit/vehicle/file/vehicle_file.c | 34 | ||||
-rw-r--r-- | navit/vehicle/gpsd/vehicle_gpsd.c | 26 | ||||
-rw-r--r-- | navit/vehicle/gpsd_dbus/vehicle_gpsd_dbus.c | 2 | ||||
-rw-r--r-- | navit/vehicle/gypsy/vehicle_gypsy.c | 6 | ||||
-rw-r--r-- | navit/vehicle/iphone/vehicle_iphone.c | 8 | ||||
-rw-r--r-- | navit/vehicle/maemo/vehicle_maemo.c | 64 | ||||
-rw-r--r-- | navit/vehicle/null/vehicle_null.c | 12 | ||||
-rw-r--r-- | navit/vehicle/webos/bluetooth.c | 36 | ||||
-rw-r--r-- | navit/vehicle/webos/vehicle_webos.c | 4 | ||||
-rw-r--r-- | navit/vehicle/wince/vehicle_wince.c | 46 |
12 files changed, 155 insertions, 137 deletions
diff --git a/navit/vehicle/android/vehicle_android.c b/navit/vehicle/android/vehicle_android.c index 31f130315..03ac56649 100644 --- a/navit/vehicle/android/vehicle_android.c +++ b/navit/vehicle/android/vehicle_android.c @@ -67,7 +67,7 @@ struct vehicle_priv { static void vehicle_android_destroy(struct vehicle_priv *priv) { - dbg(lvl_error,"enter\n"); + dbg(lvl_debug,"enter\n"); g_free(priv); } @@ -83,7 +83,7 @@ static int vehicle_android_position_attr_get(struct vehicle_priv *priv, enum attr_type type, struct attr *attr) { - dbg(lvl_warning,"enter %s\n",attr_to_name(type)); + dbg(lvl_debug,"enter %s\n",attr_to_name(type)); switch (type) { case attr_position_fix_type: attr->u.num = priv->fix_type; @@ -120,7 +120,7 @@ vehicle_android_position_attr_get(struct vehicle_priv *priv, default: return 0; } - dbg(lvl_warning,"ok\n"); + dbg(lvl_debug,"ok\n"); attr->type = type; return 1; } @@ -142,7 +142,7 @@ static void vehicle_android_position_callback(struct vehicle_priv *v, jobject location) { time_t tnow; struct tm *tm; - dbg(lvl_warning,"enter\n"); + dbg(lvl_debug,"enter\n"); v->geo.lat = (*jnienv)->CallDoubleMethod(jnienv, location, v->Location_getLatitude); v->geo.lng = (*jnienv)->CallDoubleMethod(jnienv, location, v->Location_getLongitude); @@ -153,7 +153,7 @@ vehicle_android_position_callback(struct vehicle_priv *v, jobject location) { tnow=(*jnienv)->CallLongMethod(jnienv, location, v->Location_getTime)/1000; tm = gmtime(&tnow); strftime(v->fixiso8601, sizeof(v->fixiso8601), "%Y-%m-%dT%TZ", tm); - dbg(lvl_warning,"lat %f lon %f time %s\n",v->geo.lat,v->geo.lng,v->fixiso8601); + dbg(lvl_debug,"lat %f lon %f time %s\n",v->geo.lat,v->geo.lng,v->fixiso8601); if (v->valid != attr_position_valid_valid) { v->valid = attr_position_valid_valid; callback_list_call_attr_0(v->cbl, attr_position_valid); @@ -236,6 +236,7 @@ vehicle_android_init(struct vehicle_priv *ret) if (!android_find_class_global("org/navitproject/navit/NavitVehicle", &ret->NavitVehicleClass)) return 0; <<<<<<< HEAD +<<<<<<< HEAD dbg(0,"at 3\n"); cid = (*jnienv)->GetMethodID(jnienv, ret->NavitVehicleClass, "<init>", "(Landroid/content/Context;III)V"); ||||||| merged common ancestors @@ -243,6 +244,11 @@ vehicle_android_init(struct vehicle_priv *ret) cid = (*jnienv)->GetMethodID(jnienv, ret->NavitVehicleClass, "<init>", "(Landroid/content/Context;I)V"); ======= dbg(lvl_error,"at 3\n"); +||||||| merged common ancestors + dbg(lvl_error,"at 3\n"); +======= + dbg(lvl_debug,"at 3\n"); +>>>>>>> Fix:core:Change all logging at lvl_error/warning to lvl_debug, unless it looks like an error message.|#1269, part 5 cid = (*jnienv)->GetMethodID(jnienv, ret->NavitVehicleClass, "<init>", "(Landroid/content/Context;I)V"); >>>>>>> Refactor:core:Introduce enum for debug levels, and use it everywhere.|First part of #1269. if (cid == NULL) { @@ -250,6 +256,7 @@ vehicle_android_init(struct vehicle_priv *ret) return 0; /* exception thrown */ } <<<<<<< HEAD +<<<<<<< HEAD dbg(0,"at 4 android_activity=%p\n",android_activity); ret->NavitVehicle=(*jnienv)->NewObject(jnienv, ret->NavitVehicleClass, cid, android_activity, (int) ret->pcb, (int) ret->scb, (int) ret->fcb); dbg(0,"result=%p\n",ret->NavitVehicle); @@ -259,9 +266,20 @@ vehicle_android_init(struct vehicle_priv *ret) dbg(0,"result=%p\n",ret->NavitVehicle); ======= dbg(lvl_error,"at 4 android_activity=%p\n",android_activity); +||||||| merged common ancestors + dbg(lvl_error,"at 4 android_activity=%p\n",android_activity); +======= + dbg(lvl_debug,"at 4 android_activity=%p\n",android_activity); +>>>>>>> Fix:core:Change all logging at lvl_error/warning to lvl_debug, unless it looks like an error message.|#1269, part 5 ret->NavitVehicle=(*jnienv)->NewObject(jnienv, ret->NavitVehicleClass, cid, android_activity, (int) ret->cb); +<<<<<<< HEAD dbg(lvl_error,"result=%p\n",ret->NavitVehicle); >>>>>>> Refactor:core:Introduce enum for debug levels, and use it everywhere.|First part of #1269. +||||||| merged common ancestors + dbg(lvl_error,"result=%p\n",ret->NavitVehicle); +======= + dbg(lvl_debug,"result=%p\n",ret->NavitVehicle); +>>>>>>> Fix:core:Change all logging at lvl_error/warning to lvl_debug, unless it looks like an error message.|#1269, part 5 if (!ret->NavitVehicle) return 0; if (ret->NavitVehicle) @@ -285,7 +303,7 @@ vehicle_android_new_android(struct vehicle_methods *meth, { struct vehicle_priv *ret; - dbg(lvl_error, "enter\n"); + dbg(lvl_debug, "enter\n"); ret = g_new0(struct vehicle_priv, 1); ret->cbl = cbl; ret->pcb = callback_new_1(callback_cast(vehicle_android_position_callback), ret); @@ -296,7 +314,7 @@ vehicle_android_new_android(struct vehicle_methods *meth, ret->sats_used = 0; *meth = vehicle_android_methods; vehicle_android_init(ret); - dbg(lvl_error, "return\n"); + dbg(lvl_debug, "return\n"); return ret; } @@ -308,6 +326,6 @@ vehicle_android_new_android(struct vehicle_methods *meth, void plugin_init(void) { - dbg(lvl_error, "enter\n"); + dbg(lvl_debug, "enter\n"); plugin_register_vehicle_type("android", vehicle_android_new_android); } diff --git a/navit/vehicle/demo/vehicle_demo.c b/navit/vehicle/demo/vehicle_demo.c index f25918524..c5cf7e045 100644 --- a/navit/vehicle/demo/vehicle_demo.c +++ b/navit/vehicle/demo/vehicle_demo.c @@ -163,7 +163,7 @@ vehicle_demo_set_attr_do(struct vehicle_priv *priv, struct attr *attr) callback_list_call_attr_0(priv->cbl, attr_position_valid); } priv->position_set=1; - dbg(lvl_warning,"position_set %f %f\n", priv->geo.lat, priv->geo.lng); + dbg(lvl_debug,"position_set %f %f\n", priv->geo.lat, priv->geo.lng); break; case attr_profilename: case attr_source: @@ -200,7 +200,7 @@ vehicle_demo_timer(struct vehicle_priv *priv) struct item *item=NULL; len = (priv->config_speed * priv->interval / 1000)/ 3.6; - dbg(lvl_warning, "###### Entering simulation loop\n"); + dbg(lvl_debug, "###### Entering simulation loop\n"); if (!priv->config_speed) return; if (priv->route) @@ -219,8 +219,8 @@ vehicle_demo_timer(struct vehicle_priv *priv) item=map_rect_get_item(mr); if (item && item_coord_get(item, &pos, 1)) { priv->position_set=0; - dbg(lvl_warning, "current pos=0x%x,0x%x\n", pos.x, pos.y); - dbg(lvl_warning, "last pos=0x%x,0x%x\n", priv->last.x, priv->last.y); + dbg(lvl_debug, "current pos=0x%x,0x%x\n", pos.x, pos.y); + dbg(lvl_debug, "last pos=0x%x,0x%x\n", priv->last.x, priv->last.y); if (priv->last.x == pos.x && priv->last.y == pos.y) { dbg(lvl_warning, "endless loop\n"); } @@ -230,9 +230,9 @@ vehicle_demo_timer(struct vehicle_priv *priv) item=map_rect_get_item(mr); continue; } - dbg(lvl_warning, "next pos=0x%x,0x%x\n", c.x, c.y); + dbg(lvl_debug, "next pos=0x%x,0x%x\n", c.x, c.y); slen = transform_distance(projection_mg, &pos, &c); - dbg(lvl_warning, "len=%d slen=%d\n", len, slen); + dbg(lvl_debug, "len=%d slen=%d\n", len, slen); if (slen < len) { len -= slen; pos = c; @@ -249,9 +249,9 @@ vehicle_demo_timer(struct vehicle_priv *priv) ci.x = pos.x; ci.y = pos.y; priv->speed=0; - dbg(lvl_error,"destination reached\n"); + dbg(lvl_debug,"destination reached\n"); } - dbg(lvl_warning, "ci=0x%x,0x%x\n", ci.x, ci.y); + dbg(lvl_debug, "ci=0x%x,0x%x\n", ci.x, ci.y); transform_to_geo(projection_mg, &ci, &priv->geo); if (priv->valid != attr_position_valid_valid) { @@ -279,7 +279,7 @@ vehicle_demo_new(struct vehicle_methods { struct vehicle_priv *ret; - dbg(lvl_warning, "enter\n"); + dbg(lvl_debug, "enter\n"); ret = g_new0(struct vehicle_priv, 1); ret->cbl = cbl; ret->interval=1000; @@ -297,6 +297,6 @@ vehicle_demo_new(struct vehicle_methods void plugin_init(void) { - dbg(lvl_warning, "enter\n"); + dbg(lvl_debug, "enter\n"); plugin_register_vehicle_type("demo", vehicle_demo_new); } diff --git a/navit/vehicle/file/vehicle_file.c b/navit/vehicle/file/vehicle_file.c index f82e33fd5..f7a0024b9 100644 --- a/navit/vehicle/file/vehicle_file.c +++ b/navit/vehicle/file/vehicle_file.c @@ -148,7 +148,7 @@ static int vehicle_win32_serial_track(struct vehicle_priv *priv) int rc = 0; int dwBytes; - dbg(lvl_warning, "enter, *priv='%x', priv->source='%s'\n", priv, priv->source); + dbg(lvl_debug, "enter, *priv='%x', priv->source='%s'\n", priv, priv->source); if ( priv->no_data_count > 5 ) { @@ -329,7 +329,7 @@ vehicle_file_open(struct vehicle_priv *priv) static void vehicle_file_close(struct vehicle_priv *priv) { - dbg(lvl_warning, "enter, priv->fd='%d'\n", priv->fd); + dbg(lvl_debug, "enter, priv->fd='%d'\n", priv->fd); vehicle_file_disable_watch(priv); #ifdef _WIN32 if(priv->file_type == file_type_serial) @@ -369,7 +369,7 @@ vehicle_file_close(struct vehicle_priv *priv) static int vehicle_file_enable_watch_timer(struct vehicle_priv *priv) { - dbg(lvl_warning, "enter\n"); + dbg(lvl_debug, "enter\n"); vehicle_file_enable_watch(priv); return FALSE; @@ -603,7 +603,7 @@ vehicle_file_parse(struct vehicle_priv *priv, char *buffer) */ if (item[1]) { priv->magnetic_direction = g_ascii_strtod( item[1], NULL ); - dbg(lvl_warning,"magnetic %d\n", priv->magnetic_direction); + dbg(lvl_debug,"magnetic %d\n", priv->magnetic_direction); } } return ret; @@ -624,7 +624,7 @@ vehicle_file_io(struct vehicle_priv *priv) { int size, rc = 0; char *str, *tok; - dbg(lvl_warning, "vehicle_file_io : enter\n"); + dbg(lvl_debug, "vehicle_file_io : enter\n"); if (priv->process_statefile) { unsigned char *data; @@ -657,12 +657,12 @@ vehicle_file_io(struct vehicle_priv *priv) } priv->buffer_pos += size; priv->buffer[priv->buffer_pos] = '\0'; - dbg(lvl_warning, "size=%d pos=%d buffer='%s'\n", size, + dbg(lvl_debug, "size=%d pos=%d buffer='%s'\n", size, priv->buffer_pos, priv->buffer); str = priv->buffer; while ((tok = strchr(str, '\n'))) { *tok++ = '\0'; - dbg(lvl_warning, "line='%s'\n", str); + dbg(lvl_debug, "line='%s'\n", str); rc +=vehicle_file_parse(priv, str); str = tok; if (priv->file_type == file_type_file && rc) @@ -673,10 +673,10 @@ vehicle_file_io(struct vehicle_priv *priv) size = priv->buffer + priv->buffer_pos - str; memmove(priv->buffer, str, size + 1); priv->buffer_pos = size; - dbg(lvl_warning, "now pos=%d buffer='%s'\n", + dbg(lvl_debug, "now pos=%d buffer='%s'\n", priv->buffer_pos, priv->buffer); } else if (priv->buffer_pos == buffer_size - 1) { - dbg(lvl_error, + dbg(lvl_debug, "Overflow. Most likely wrong baud rate or no nmea protocol\n"); priv->buffer_pos = 0; } @@ -695,7 +695,7 @@ vehicle_file_io(struct vehicle_priv *priv) static void vehicle_file_enable_watch(struct vehicle_priv *priv) { - dbg(lvl_warning, "enter\n"); + dbg(lvl_debug, "enter\n"); #ifdef _WIN32 // add an event : don't use glib timers and g_timeout_add if (priv->file_type == file_type_serial) @@ -723,7 +723,7 @@ vehicle_file_enable_watch(struct vehicle_priv *priv) static void vehicle_file_disable_watch(struct vehicle_priv *priv) { - dbg(lvl_warning, "vehicle_file_disable_watch : enter\n"); + dbg(lvl_debug, "vehicle_file_disable_watch : enter\n"); #ifdef _WIN32 if(priv->file_type == file_type_serial) { @@ -844,7 +844,7 @@ vehicle_file_position_attr_get(struct vehicle_priv *priv, attr->u.str=priv->fixiso8601; break; case attr_position_sat_item: - dbg(lvl_error,"at here\n"); + dbg(lvl_debug,"at here\n"); priv->sat_item.id_lo++; if (priv->sat_item.id_lo > priv->current_count) { priv->sat_item.id_lo=0; @@ -951,7 +951,7 @@ vehicle_file_new_file(struct vehicle_methods struct attr *checksum_ignore; struct attr *state_file; - dbg(lvl_warning, "enter\n"); + dbg(lvl_debug, "enter\n"); source = attr_search(attrs, NULL, attr_source); if(source == NULL){ @@ -1009,7 +1009,7 @@ vehicle_file_new_file(struct vehicle_methods ret->on_eof=1; if (on_eof && !g_ascii_strcasecmp(on_eof->u.str, "exit")) ret->on_eof=2; - dbg(lvl_error,"on_eof=%d\n", ret->on_eof); + dbg(lvl_debug,"on_eof=%d\n", ret->on_eof); *meth = vehicle_file_methods; ret->cb=callback_new_1(callback_cast(vehicle_file_io), ret); ret->cbt=callback_new_1(callback_cast(vehicle_file_enable_watch_timer), ret); @@ -1025,7 +1025,7 @@ vehicle_file_new_file(struct vehicle_methods ret->no_data_count = 0; #endif - dbg(lvl_warning, "vehicle_file_new_file:open\n"); + dbg(lvl_debug, "vehicle_file_new_file:open\n"); if (!vehicle_file_open(ret)) { dbg(lvl_error, "Failed to open '%s'\n", ret->source); } @@ -1033,7 +1033,7 @@ vehicle_file_new_file(struct vehicle_methods vehicle_file_enable_watch(ret); // vehicle_file_destroy(ret); // return NULL; - dbg(lvl_warning, "leave\n"); + dbg(lvl_debug, "leave\n"); return ret; } @@ -1045,7 +1045,7 @@ vehicle_file_new_file(struct vehicle_methods **/ void plugin_init(void) { - dbg(lvl_warning, "vehicle_file:plugin_init:enter\n"); + dbg(lvl_debug, "vehicle_file:plugin_init:enter\n"); plugin_register_vehicle_type("file", vehicle_file_new_file); plugin_register_vehicle_type("pipe", vehicle_file_new_file); plugin_register_vehicle_type("socket", vehicle_file_new_file); diff --git a/navit/vehicle/gpsd/vehicle_gpsd.c b/navit/vehicle/gpsd/vehicle_gpsd.c index a871cb074..aa3b62eec 100644 --- a/navit/vehicle/gpsd/vehicle_gpsd.c +++ b/navit/vehicle/gpsd/vehicle_gpsd.c @@ -101,7 +101,7 @@ vehicle_gpsd_callback(struct gps_data_t *data, const char *buf, size_t len, } } } - dbg(lvl_warning,"data->set="LONGLONG_HEX_FMT"\n", data->set); + dbg(lvl_debug,"data->set="LONGLONG_HEX_FMT"\n", data->set); if (data->set & SPEED_SET) { priv->speed = data->fix.speed * 3.6; if(!isnan(data->fix.speed)) @@ -164,12 +164,12 @@ vehicle_gpsd_callback(struct gps_data_t *data, const char *buf, size_t len, } #ifdef HAVE_LIBGPS19 if (data->set & DOP_SET) { - dbg(lvl_warning, "pdop : %g\n", data->dop.pdop); + dbg(lvl_debug, "pdop : %g\n", data->dop.pdop); priv->hdop = data->dop.pdop; data->set &= ~DOP_SET; #else if (data->set & PDOP_SET) { - dbg(lvl_warning, "pdop : %g\n", data->pdop); + dbg(lvl_debug, "pdop : %g\n", data->pdop); priv->hdop = data->hdop; data->set &= ~PDOP_SET; #endif @@ -177,7 +177,7 @@ vehicle_gpsd_callback(struct gps_data_t *data, const char *buf, size_t len, if (data->set & LATLON_SET) { priv->geo.lat = data->fix.latitude; priv->geo.lng = data->fix.longitude; - dbg(lvl_warning,"lat=%f lng=%f\n", priv->geo.lat, priv->geo.lng); + dbg(lvl_debug,"lat=%f lng=%f\n", priv->geo.lat, priv->geo.lng); g_free(priv->nmea_data); priv->nmea_data=priv->nmea_data_buf; priv->nmea_data_buf=NULL; @@ -205,7 +205,7 @@ vehicle_gpsd_try_open(struct vehicle_priv *priv) *colon = '\0'; port=colon+1; } - dbg(lvl_error,"Trying to connect to %s:%s\n",source+7,port?port:"default"); + dbg(lvl_debug,"Trying to connect to %s:%s\n",source+7,port?port:"default"); #if GPSD_API_MAJOR_VERSION >= 5 /* gps_open returns 0 on success */ @@ -238,7 +238,7 @@ vehicle_gpsd_try_open(struct vehicle_priv *priv) if (!priv->gps->gps_fd) { dbg(lvl_error,"Warning: gps_fd is 0, most likely you have used a gps.h incompatible to libgps"); } - dbg(lvl_error,"Connected to gpsd fd=%d evwatch=%p\n", priv->gps->gps_fd, priv->evwatch); + dbg(lvl_debug,"Connected to gpsd fd=%d evwatch=%p\n", priv->gps->gps_fd, priv->evwatch); event_remove_timeout(priv->retry_timer2); priv->retry_timer2=NULL; return FALSE; @@ -261,7 +261,7 @@ vehicle_gpsd_open(struct vehicle_priv *priv) errno, strerror(errno), errstr); } sleep(1); /* give gpsd time to start */ - dbg(lvl_warning,"gpsbt_start: completed\n"); + dbg(lvl_debug,"gpsbt_start: completed\n"); #endif priv->retry_timer2=NULL; if (vehicle_gpsd_try_open(priv)) @@ -303,14 +303,14 @@ vehicle_gpsd_close(struct vehicle_priv *priv) if (err < 0) { dbg(lvl_error,"Error %d while gpsbt_stop", err); } - dbg(lvl_warning,"gpsbt_stop: completed, (%d)",err); + dbg(lvl_debug,"gpsbt_stop: completed, (%d)",err); #endif } static void vehicle_gpsd_io(struct vehicle_priv *priv) { - dbg(lvl_warning, "enter\n"); + dbg(lvl_debug, "enter\n"); if (priv->gps) { vehicle_last = priv; #if GPSD_API_MAJOR_VERSION >= 5 @@ -427,7 +427,7 @@ vehicle_gpsd_new_gpsd(struct vehicle_methods struct vehicle_priv *ret; struct attr *source, *query, *retry_int; - dbg(lvl_warning, "enter\n"); + dbg(lvl_debug, "enter\n"); source = attr_search(attrs, NULL, attr_source); ret = g_new0(struct vehicle_priv, 1); #if GPSD_API_MAJOR_VERSION >= 5 @@ -440,7 +440,7 @@ vehicle_gpsd_new_gpsd(struct vehicle_methods } else { ret->gpsd_query = g_strdup("w+x\n"); } - dbg(lvl_warning,"Format string for gpsd_query: %s\n",ret->gpsd_query); + dbg(lvl_debug,"Format string for gpsd_query: %s\n",ret->gpsd_query); retry_int = attr_search(attrs, NULL, attr_retry_interval); if (retry_int) { ret->retry_interval = retry_int->u.num; @@ -449,7 +449,7 @@ vehicle_gpsd_new_gpsd(struct vehicle_methods ret->retry_interval = MIN_RETRY_INTERVAL; } } else { - dbg(lvl_warning, "Retry interval not defined, setting to %d\n", DEFAULT_RETRY_INTERVAL); + dbg(lvl_debug, "Retry interval not defined, setting to %d\n", DEFAULT_RETRY_INTERVAL); ret->retry_interval = DEFAULT_RETRY_INTERVAL; } ret->cbl = cbl; @@ -462,6 +462,6 @@ vehicle_gpsd_new_gpsd(struct vehicle_methods void plugin_init(void) { - dbg(lvl_warning, "enter\n"); + dbg(lvl_debug, "enter\n"); plugin_register_vehicle_type("gpsd", vehicle_gpsd_new_gpsd); } diff --git a/navit/vehicle/gpsd_dbus/vehicle_gpsd_dbus.c b/navit/vehicle/gpsd_dbus/vehicle_gpsd_dbus.c index c599d3cc4..dda774e35 100644 --- a/navit/vehicle/gpsd_dbus/vehicle_gpsd_dbus.c +++ b/navit/vehicle/gpsd_dbus/vehicle_gpsd_dbus.c @@ -243,6 +243,6 @@ vehicle_gpsd_dbus_new(struct vehicle_methods void plugin_init(void) { - dbg(lvl_warning, "enter\n"); + dbg(lvl_debug, "enter\n"); plugin_register_vehicle_type("gpsd_dbus", vehicle_gpsd_dbus_new); } diff --git a/navit/vehicle/gypsy/vehicle_gypsy.c b/navit/vehicle/gypsy/vehicle_gypsy.c index f63312bda..2ff9389f7 100644 --- a/navit/vehicle/gypsy/vehicle_gypsy.c +++ b/navit/vehicle/gypsy/vehicle_gypsy.c @@ -286,7 +286,7 @@ vehicle_gypsy_try_open(gpointer *data) } vehicle_last = priv; - dbg(lvl_error,"gypsy connected to %d\n", source+8); + dbg(lvl_debug,"gypsy connected to %d\n", source+8); g_free(source); return FALSE; } @@ -461,7 +461,7 @@ vehicle_gypsy_new_gypsy(struct vehicle_methods *meth, } } #endif - dbg(lvl_warning, "enter\n"); + dbg(lvl_debug, "enter\n"); source = attr_search(attrs, NULL, attr_source); ret = g_new0(struct vehicle_priv, 1); ret->have_cords = 0; @@ -492,6 +492,6 @@ vehicle_gypsy_new_gypsy(struct vehicle_methods *meth, void plugin_init(void) { - dbg(lvl_warning, "enter\n"); + dbg(lvl_debug, "enter\n"); plugin_register_vehicle_type("gypsy", vehicle_gypsy_new_gypsy); } diff --git a/navit/vehicle/iphone/vehicle_iphone.c b/navit/vehicle/iphone/vehicle_iphone.c index ad5fd6ea1..4c25c0235 100644 --- a/navit/vehicle/iphone/vehicle_iphone.c +++ b/navit/vehicle/iphone/vehicle_iphone.c @@ -119,7 +119,7 @@ vehicle_iphone_update(void *arg, strcpy(priv->str_time, str_time); priv->radius = radius; - dbg(lvl_error,"position_get lat:%f lng:%f (spd:%f dir:%f time:%s)\n", priv->geo.lat, priv->geo.lng, priv->speed, priv->direction, priv->str_time); + dbg(lvl_debug,"position_get lat:%f lng:%f (spd:%f dir:%f time:%s)\n", priv->geo.lat, priv->geo.lng, priv->speed, priv->direction, priv->str_time); callback_list_call_attr_0(priv->cbl, attr_position_coord_geo); } @@ -133,7 +133,7 @@ vehicle_iphone_new(struct vehicle_methods struct vehicle_priv *ret; struct attr *interval,*speed,*position_coord_geo; - dbg(lvl_warning, "enter\n"); + dbg(lvl_debug, "enter\n"); ret = g_new0(struct vehicle_priv, 1); ret->cbl = cbl; ret->interval=1000; @@ -146,7 +146,7 @@ vehicle_iphone_new(struct vehicle_methods if ((position_coord_geo=attr_search(attrs, NULL, attr_position_coord_geo))) { ret->geo=*(position_coord_geo->u.coord_geo); ret->position_set=1; - dbg(lvl_error,"position_set %f %f\n", ret->geo.lat, ret->geo.lng); + dbg(lvl_debug,"position_set %f %f\n", ret->geo.lat, ret->geo.lng); } *meth = vehicle_iphone_methods; ret->str_time[0] = '\0'; @@ -160,6 +160,6 @@ vehicle_iphone_new(struct vehicle_methods void plugin_init(void) { - dbg(lvl_warning, "enter\n"); + dbg(lvl_debug, "enter\n"); plugin_register_vehicle_type("iphone", vehicle_iphone_new); } diff --git a/navit/vehicle/maemo/vehicle_maemo.c b/navit/vehicle/maemo/vehicle_maemo.c index 67a311862..661202d67 100644 --- a/navit/vehicle/maemo/vehicle_maemo.c +++ b/navit/vehicle/maemo/vehicle_maemo.c @@ -67,7 +67,7 @@ static void vehicle_maemo_callback(LocationGPSDevice *device, gpointer user_data priv->sats_used=device->satellites_in_use; callback_list_call_attr_0(priv->cbl, attr_position_sats); - dbg(lvl_warning,"Got update with %u/%u satellites\n",priv->sats_used,priv->sats); + dbg(lvl_debug,"Got update with %u/%u satellites\n",priv->sats_used,priv->sats); if (device->fix) { switch(device->fix->mode) { @@ -86,28 +86,28 @@ static void vehicle_maemo_callback(LocationGPSDevice *device, gpointer user_data priv->geo.lng=device->fix->longitude; priv->hdop=device->fix->eph/100; callback_list_call_attr_0(priv->cbl, attr_position_coord_geo); - dbg(lvl_warning,"Position: %f %f with error %f meters\n",priv->geo.lat,priv->geo.lng,priv->hdop); + dbg(lvl_debug,"Position: %f %f with error %f meters\n",priv->geo.lat,priv->geo.lng,priv->hdop); } if (device->fix->fields & LOCATION_GPS_DEVICE_SPEED_SET) { priv->speed=device->fix->speed; callback_list_call_attr_0(priv->cbl, attr_position_speed); - dbg(lvl_warning,"Speed: %f\n ",priv->speed); + dbg(lvl_debug,"Speed: %f\n ",priv->speed); } if (device->fix->fields & LOCATION_GPS_DEVICE_TRACK_SET) { priv->direction=device->fix->track; - dbg(lvl_warning,"Direction: %f\n",priv->direction); + dbg(lvl_debug,"Direction: %f\n",priv->direction); } if (device->fix->fields & LOCATION_GPS_DEVICE_TIME_SET) { priv->fix_time=device->fix->time; - dbg(lvl_warning,"Time: %f\n",priv->fix_time); + dbg(lvl_debug,"Time: %f\n",priv->fix_time); } if (device->fix->fields & LOCATION_GPS_DEVICE_ALTITUDE_SET) { priv->height=device->fix->altitude; - dbg(lvl_warning,"Elevation: %f\n",priv->height); + dbg(lvl_debug,"Elevation: %f\n",priv->height); } } @@ -148,54 +148,54 @@ vehicle_maemo_open(struct vehicle_priv *priv) if (!strcasecmp(priv->source+8,"cwp")) { g_object_set(G_OBJECT(priv->control), "preferred-method", LOCATION_METHOD_CWP, NULL); - dbg(lvl_warning,"Method set: CWP\n"); + dbg(lvl_debug,"Method set: CWP\n"); } else if (!strcasecmp(priv->source+8,"acwp")) { g_object_set(G_OBJECT(priv->control), "preferred-method", LOCATION_METHOD_ACWP, NULL); - dbg(lvl_warning,"Method set: ACWP\n"); + dbg(lvl_debug,"Method set: ACWP\n"); } else if (!strcasecmp(priv->source+8,"gnss")) { g_object_set(G_OBJECT(priv->control), "preferred-method", LOCATION_METHOD_GNSS, NULL); - dbg(lvl_warning,"Method set: GNSS\n"); + dbg(lvl_debug,"Method set: GNSS\n"); } else if (!strcasecmp(priv->source+8,"agnss")) { g_object_set(G_OBJECT(priv->control), "preferred-method", LOCATION_METHOD_AGNSS, NULL); - dbg(lvl_warning,"Method set: AGNSS\n"); + dbg(lvl_debug,"Method set: AGNSS\n"); } else { g_object_set(G_OBJECT(priv->control), "preferred-method", LOCATION_METHOD_USER_SELECTED, NULL); - dbg(lvl_warning,"Method set: ANY\n"); + dbg(lvl_debug,"Method set: ANY\n"); } switch (priv->retry_interval) { case 2: g_object_set(G_OBJECT(priv->control), "preferred-interval", LOCATION_INTERVAL_2S, NULL); - dbg(lvl_warning,"Interval set: 2s\n"); + dbg(lvl_debug,"Interval set: 2s\n"); break; case 5: g_object_set(G_OBJECT(priv->control), "preferred-interval", LOCATION_INTERVAL_5S, NULL); - dbg(lvl_warning,"Interval set: 5s\n"); + dbg(lvl_debug,"Interval set: 5s\n"); break; case 10: g_object_set(G_OBJECT(priv->control), "preferred-interval", LOCATION_INTERVAL_10S, NULL); - dbg(lvl_warning,"Interval set: 10s\n"); + dbg(lvl_debug,"Interval set: 10s\n"); break; case 20: g_object_set(G_OBJECT(priv->control), "preferred-interval", LOCATION_INTERVAL_20S, NULL); - dbg(lvl_warning,"Interval set: 20s\n"); + dbg(lvl_debug,"Interval set: 20s\n"); break; case 30: g_object_set(G_OBJECT(priv->control), "preferred-interval", LOCATION_INTERVAL_30S, NULL); - dbg(lvl_warning,"Interval set: 30s\n"); + dbg(lvl_debug,"Interval set: 30s\n"); break; case 60: g_object_set(G_OBJECT(priv->control), "preferred-interval", LOCATION_INTERVAL_60S, NULL); - dbg(lvl_warning,"Interval set: 60s\n"); + dbg(lvl_debug,"Interval set: 60s\n"); break; case 120: g_object_set(G_OBJECT(priv->control), "preferred-interval", LOCATION_INTERVAL_120S, NULL); - dbg(lvl_warning,"Interval set: 120s\n"); + dbg(lvl_debug,"Interval set: 120s\n"); break; case 1: default: g_object_set(G_OBJECT(priv->control), "preferred-interval", LOCATION_INTERVAL_1S, NULL); - dbg(lvl_warning,"Interval set: 1s\n"); + dbg(lvl_debug,"Interval set: 1s\n"); break; } @@ -225,41 +225,41 @@ vehicle_maemo_position_attr_get(struct vehicle_priv *priv, struct attr * active=NULL; switch (type) { case attr_position_fix_type: - dbg(lvl_warning,"Attr requested: position_fix_type\n"); + dbg(lvl_debug,"Attr requested: position_fix_type\n"); attr->u.num = priv->fix_type; break; case attr_position_height: - dbg(lvl_warning,"Attr requested: position_height\n"); + dbg(lvl_debug,"Attr requested: position_height\n"); attr->u.numd = &priv->height; break; case attr_position_speed: - dbg(lvl_warning,"Attr requested: position_speed\n"); + dbg(lvl_debug,"Attr requested: position_speed\n"); attr->u.numd = &priv->speed; break; case attr_position_direction: - dbg(lvl_warning,"Attr requested: position_direction\n"); + dbg(lvl_debug,"Attr requested: position_direction\n"); attr->u.numd = &priv->direction; break; case attr_position_hdop: - dbg(lvl_warning,"Attr requested: position_hdop\n"); + dbg(lvl_debug,"Attr requested: position_hdop\n"); attr->u.numd = &priv->hdop; break; case attr_position_sats: - dbg(lvl_warning,"Attr requested: position_sats\n"); + dbg(lvl_debug,"Attr requested: position_sats\n"); attr->u.num = priv->sats; break; case attr_position_sats_used: - dbg(lvl_warning,"Attr requested: position_sats_used\n"); + dbg(lvl_debug,"Attr requested: position_sats_used\n"); attr->u.num = priv->sats_used; break; case attr_position_coord_geo: - dbg(lvl_warning,"Attr requested: position_coord_geo\n"); + dbg(lvl_debug,"Attr requested: position_coord_geo\n"); attr->u.coord_geo = &priv->geo; break; case attr_position_time_iso8601: { struct tm tm; - dbg(lvl_warning,"Attr requested: position_time_iso8601\n"); + dbg(lvl_debug,"Attr requested: position_time_iso8601\n"); if (!priv->fix_time) return 0; if (gmtime_r(&priv->fix_time, &tm)) { @@ -271,7 +271,7 @@ vehicle_maemo_position_attr_get(struct vehicle_priv *priv, } break; case attr_active: - dbg(lvl_warning,"Attr requested: position_active\n"); + dbg(lvl_debug,"Attr requested: position_active\n"); active = attr_search(priv->attrs,NULL,attr_active); if(active != NULL) { attr->u.num=active->u.num; @@ -299,7 +299,7 @@ vehicle_maemo_new_maemo(struct vehicle_methods struct vehicle_priv *ret; struct attr *source, *retry_int; - dbg(lvl_warning, "enter\n"); + dbg(lvl_debug, "enter\n"); source = attr_search(attrs, NULL, attr_source); ret = g_new0(struct vehicle_priv, 1); ret->source = g_strdup(source->u.str); @@ -313,7 +313,7 @@ vehicle_maemo_new_maemo(struct vehicle_methods } else { ret->retry_interval = 1; } - dbg(lvl_warning,"source: %s, interval: %u\n",ret->source,ret->retry_interval); + dbg(lvl_debug,"source: %s, interval: %u\n",ret->source,ret->retry_interval); ret->cbl = cbl; *meth = vehicle_maemo_methods; ret->attrs = attrs; @@ -324,6 +324,6 @@ vehicle_maemo_new_maemo(struct vehicle_methods void plugin_init(void) { - dbg(lvl_warning, "enter\n"); + dbg(lvl_debug, "enter\n"); plugin_register_vehicle_type("maemo", vehicle_maemo_new_maemo); } diff --git a/navit/vehicle/null/vehicle_null.c b/navit/vehicle/null/vehicle_null.c index 30e9a4d97..134538cc3 100644 --- a/navit/vehicle/null/vehicle_null.c +++ b/navit/vehicle/null/vehicle_null.c @@ -59,7 +59,7 @@ struct vehicle_priv { static void vehicle_null_destroy(struct vehicle_priv *priv) { - dbg(lvl_warning,"enter\n"); + dbg(lvl_debug,"enter\n"); g_free(priv); } @@ -75,7 +75,7 @@ static int vehicle_null_position_attr_get(struct vehicle_priv *priv, enum attr_type type, struct attr *attr) { - dbg(lvl_warning,"enter %s\n",attr_to_name(type)); + dbg(lvl_debug,"enter %s\n",attr_to_name(type)); switch (type) { #if 0 case attr_position_fix_type: @@ -114,7 +114,7 @@ vehicle_null_position_attr_get(struct vehicle_priv *priv, default: return 0; } - dbg(lvl_warning,"ok\n"); + dbg(lvl_debug,"ok\n"); attr->type = type; return 1; } @@ -162,11 +162,11 @@ vehicle_null_new_null(struct vehicle_methods *meth, { struct vehicle_priv *ret; - dbg(lvl_warning, "enter\n"); + dbg(lvl_debug, "enter\n"); ret = g_new0(struct vehicle_priv, 1); ret->cbl = cbl; *meth = vehicle_null_methods; - dbg(lvl_warning, "return\n"); + dbg(lvl_debug, "return\n"); return ret; } @@ -178,6 +178,6 @@ vehicle_null_new_null(struct vehicle_methods *meth, void plugin_init(void) { - dbg(lvl_warning, "enter\n"); + dbg(lvl_debug, "enter\n"); plugin_register_vehicle_type("null", vehicle_null_new_null); } diff --git a/navit/vehicle/webos/bluetooth.c b/navit/vehicle/webos/bluetooth.c index 13534237d..bc66fe6c1 100644 --- a/navit/vehicle/webos/bluetooth.c +++ b/navit/vehicle/webos/bluetooth.c @@ -25,7 +25,7 @@ static void mlPDL_ServiceCall_callback(struct callback_list *cbl, char *service, char *parameters/*, struct callback *fail_cb*/) { PDL_Err err; - dbg(lvl_warning,"PDL_ServiceCall(%s) parameters(%s)\n",service,parameters); + dbg(lvl_debug,"PDL_ServiceCall(%s) parameters(%s)\n",service,parameters); err = PDL_ServiceCall(service, parameters); if (err != PDL_NOERROR) { dbg(lvl_error,"PDL_ServiceCall to (%s) with (%s) failed with (%d): (%s)\n", service, parameters, err, PDL_GetError()); @@ -50,7 +50,7 @@ mlPDL_ServiceCall(const char *service, const char *parameters/*, struct callback callback_list_add(cbl, cb); -dbg(lvl_error,"event_call_callback(%p)\n",cbl); +dbg(lvl_debug,"event_call_callback(%p)\n",cbl); event_call_callback(cbl); } @@ -65,7 +65,7 @@ mlPDL_ServiceCallWithCallback_callback(struct callback_list *cbl, PDL_bool removeAfterResponse) { PDL_Err err; - dbg(lvl_warning,"PDL_ServiceCallWithCallback(%s) parameters(%s)\n",service,parameters); + dbg(lvl_debug,"PDL_ServiceCallWithCallback(%s) parameters(%s)\n",service,parameters); err = PDL_ServiceCallWithCallback(service, parameters, callback, user, removeAfterResponse); if (err != PDL_NOERROR) { dbg(lvl_error,"PDL_ServiceCallWithCallback to (%s) with (%s) failed with (%d): (%s)\n", service, parameters, err, PDL_GetError()); @@ -94,7 +94,7 @@ mlPDL_ServiceCallWithCallback(const char *service, callback_list_add(cbl, cb); - dbg(lvl_error,"event_call_callback(%p)\n",cbl); + dbg(lvl_debug,"event_call_callback(%p)\n",cbl); event_call_callback(cbl); } @@ -107,7 +107,7 @@ vehicle_webos_init_pdl_locationtracking_callback(struct vehicle_priv *priv, stru priv->gps_type = param ? GPS_TYPE_INT: GPS_TYPE_NONE; - dbg(lvl_warning,"Calling PDL_EnableLocationTracking(%i)\n",param); + dbg(lvl_debug,"Calling PDL_EnableLocationTracking(%i)\n",param); err = PDL_EnableLocationTracking(param); if (err != PDL_NOERROR) { @@ -380,7 +380,7 @@ vehicle_webos_parse_nmea(struct vehicle_priv *priv, char *buffer) */ if (item[1]) { priv->magnetic_direction = g_ascii_strtod( item[1], NULL ); - dbg(lvl_warning,"magnetic %d\n", priv->magnetic_direction); + dbg(lvl_debug,"magnetic %d\n", priv->magnetic_direction); } } return ret; @@ -411,12 +411,12 @@ vehicle_webos_spp_handle_read(PDL_ServiceParameters *params, void *user) priv->buffer_pos += size; priv->buffer[priv->buffer_pos] = '\0'; - dbg(lvl_warning, "size=%d pos=%d buffer='%s'\n", size, + dbg(lvl_debug, "size=%d pos=%d buffer='%s'\n", size, priv->buffer_pos, priv->buffer); str = priv->buffer; while ((tok = strchr(str, '\n'))) { *tok++ = '\0'; - dbg(lvl_warning, "line='%s'\n", str); + dbg(lvl_debug, "line='%s'\n", str); rc += vehicle_webos_parse_nmea(priv, str); str = tok; // if (priv->file_type == file_type_file && rc) @@ -427,7 +427,7 @@ vehicle_webos_spp_handle_read(PDL_ServiceParameters *params, void *user) size = priv->buffer + priv->buffer_pos - str; memmove(priv->buffer, str, size + 1); priv->buffer_pos = size; - dbg(lvl_warning,"now pos=%d buffer='%s'\n", + dbg(lvl_debug,"now pos=%d buffer='%s'\n", priv->buffer_pos, priv->buffer); } else if (priv->buffer_pos == buffer_size - 1) { dbg(lvl_error,"Overflow. Most likely wrong baud rate or no nmea protocol\n"); @@ -481,7 +481,7 @@ vehicle_webos_spp_handle_open(PDL_ServiceParameters *params, void *user) if (!priv->buffer) priv->buffer = g_malloc(buffer_size); - dbg(lvl_warning,"instanceId(%i)\n",priv->spp_instance_id); + dbg(lvl_debug,"instanceId(%i)\n",priv->spp_instance_id); priv->gps_type = GPS_TYPE_BT; @@ -513,7 +513,7 @@ vehicle_webos_spp_notify(PDL_ServiceParameters *params, void *user) if(strcmp(notification,"notifnservicenames") == 0) { int instance_id = PDL_GetParamInt(params, "instanceId"); - dbg(lvl_warning,"instanceId(%i)\n", instance_id); + dbg(lvl_debug,"instanceId(%i)\n", instance_id); cJSON *root = cJSON_Parse(params_json); if (!root) { @@ -563,7 +563,7 @@ vehicle_webos_init_bt_gps(struct vehicle_priv *priv, char *addr) { char parameters[128]; - dbg(lvl_warning,"subscribeNotifications\n"); + dbg(lvl_debug,"subscribeNotifications\n"); mlPDL_ServiceCallWithCallback("palm://com.palm.bluetooth/spp/subscribenotifications", "{\"subscribe\":true}", (PDL_ServiceCallbackFunc)vehicle_webos_spp_notify, @@ -598,7 +598,7 @@ vehicle_webos_bt_gap_callback(PDL_ServiceParameters *params, void *param) char *device_addr = NULL; cJSON *root; - dbg(lvl_warning,"enter\n"); + dbg(lvl_debug,"enter\n"); PDL_Err err; err = PDL_GetParamInt(params, "errorCode"); @@ -619,17 +619,17 @@ vehicle_webos_bt_gap_callback(PDL_ServiceParameters *params, void *param) cJSON *trusted_devices = cJSON_GetObjectItem(root, "trusteddevices"); unsigned int i,c = cJSON_GetArraySize(trusted_devices); - dbg(lvl_warning, "trusted_devices(%i)\n",c); + dbg(lvl_debug, "trusted_devices(%i)\n",c); for(i=0; i < c && !device_addr; i++) { cJSON *device = cJSON_GetArrayItem(trusted_devices,i); char *name = cJSON_GetObjectItem(device, "name")->valuestring; char *address = cJSON_GetObjectItem(device, "address")->valuestring; char *status = cJSON_GetObjectItem(device, "status")->valuestring; - dbg(lvl_warning,"i(%i) name(%s) address(%s) status(%s)\n",i,name,address,status); + dbg(lvl_debug,"i(%i) name(%s) address(%s) status(%s)\n",i,name,address,status); if (/*strncmp(status, "connected",9) == 0 && */strstr(name, "GPS") != NULL) { - dbg(lvl_warning,"choose name(%s) address(%s)\n",name,address); + dbg(lvl_debug,"choose name(%s) address(%s)\n",name,address); device_addr = g_strdup(address); break; } @@ -649,7 +649,7 @@ vehicle_webos_bt_open(struct vehicle_priv *priv) { // Try to connect to BT GPS, or use PDL method - dbg(lvl_warning,"enter\n"); + dbg(lvl_debug,"enter\n"); PDL_Err err; err = PDL_ServiceCallWithCallback("palm://com.palm.bluetooth/gap/gettrusteddevices", @@ -668,7 +668,7 @@ vehicle_webos_bt_open(struct vehicle_priv *priv) void vehicle_webos_bt_close(struct vehicle_priv *priv) { - dbg(lvl_error,"XXX\n"); + dbg(lvl_debug,"XXX\n"); char parameters[128]; if (priv->spp_instance_id) { snprintf(parameters, sizeof(parameters), "{\"instanceId\":%i}", priv->spp_instance_id); diff --git a/navit/vehicle/webos/vehicle_webos.c b/navit/vehicle/webos/vehicle_webos.c index f4fcb0f90..e0a849b97 100644 --- a/navit/vehicle/webos/vehicle_webos.c +++ b/navit/vehicle/webos/vehicle_webos.c @@ -157,7 +157,7 @@ vehicle_webos_open(struct vehicle_priv *priv) PDL_Err err; priv->pdk_version = PDL_GetPDKVersion(); - dbg(lvl_warning,"pdk_version(%d)\n", priv->pdk_version); + dbg(lvl_debug,"pdk_version(%d)\n", priv->pdk_version); if (priv->pdk_version <= 100) { // Use Location Service via callback interface @@ -380,7 +380,7 @@ vehicle_webos_new(struct vehicle_methods void plugin_init(void) { - dbg(lvl_warning, "enter\n"); + dbg(lvl_debug, "enter\n"); plugin_register_vehicle_type("webos", vehicle_webos_new); } diff --git a/navit/vehicle/wince/vehicle_wince.c b/navit/vehicle/wince/vehicle_wince.c index be68cd940..8dd3e40db 100644 --- a/navit/vehicle/wince/vehicle_wince.c +++ b/navit/vehicle/wince/vehicle_wince.c @@ -146,7 +146,7 @@ static void initBth(struct vehicle_priv *priv) priv->BthSetMode = (PFN_BthSetMode)GetProcAddress(priv->hBthDll, TEXT("BthSetMode") ); if( priv->BthSetMode && priv->BthSetMode(1) == ERROR_SUCCESS ) { - dbg(lvl_warning, "bluetooth activated\n"); + dbg(lvl_debug, "bluetooth activated\n"); succeeded = TRUE; } } @@ -178,7 +178,7 @@ static int initDevice(struct vehicle_priv *priv) if ( priv->file_type == file_type_device ) { - dbg(lvl_error, "Init Device\n"); + dbg(lvl_debug, "Init Device\n"); /* GPD0 is the control port for the GPS driver */ hGPS = CreateFile(L"GPD0:", GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_WRITE, 0, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, 0); if (hGPS != INVALID_HANDLE_VALUE) { @@ -199,7 +199,7 @@ static int initDevice(struct vehicle_priv *priv) NULL, OPEN_EXISTING, 0, 0)) == INVALID_HANDLE_VALUE) { Sleep(1000); - dbg(lvl_error, "Waiting to connect to %s\n", priv->source); + dbg(lvl_debug, "Waiting to connect to %s\n", priv->source); } GetCommTimeouts (priv->m_hGPSDevice, &commTiming); commTiming.ReadIntervalTimeout = 20; @@ -230,7 +230,7 @@ static int initDevice(struct vehicle_priv *priv) } else { - dbg(lvl_error, "Open File\n"); + dbg(lvl_debug, "Open File\n"); priv->m_hGPSDevice = CreateFileW( A2W(priv->source), GENERIC_READ, 0, NULL, OPEN_EXISTING, 0, 0); if ( priv->m_hGPSDevice == INVALID_HANDLE_VALUE) { @@ -264,7 +264,7 @@ static DWORD WINAPI wince_reader_thread (LPVOID lParam) DWORD bytes_read; int waitcounter; - dbg(lvl_error, "GPS Port:[%s]\n", priv->source); + dbg(lvl_debug, "GPS Port:[%s]\n", priv->source); priv->thread_up = 1; if ( !initDevice(priv) ) { @@ -272,7 +272,7 @@ static DWORD WINAPI wince_reader_thread (LPVOID lParam) } while (priv->is_running) { - dbg(lvl_warning,"readfile\n"); + dbg(lvl_debug,"readfile\n"); waitcounter = 0; status = ReadFile(priv->m_hGPSDevice, chunk_buffer, sizeof(chunk_buffer), @@ -297,7 +297,7 @@ static DWORD WINAPI wince_reader_thread (LPVOID lParam) waitcounter++; if ( waitcounter % 8 == 0 ) { - dbg(lvl_warning, "Remind them of the data\n"); + dbg(lvl_debug, "Remind them of the data\n"); event_call_callback(priv->priv_cbl); } if(waitcounter % 200 == 0) { @@ -307,7 +307,7 @@ static DWORD WINAPI wince_reader_thread (LPVOID lParam) } if(waitcounter>2) - dbg(lvl_error,"Sent GPS data to the main thread after %d intervals delay.\n",waitcounter); + dbg(lvl_debug,"Sent GPS data to the main thread after %d intervals delay.\n",waitcounter); g_mutex_lock(&priv->lock); memcpy(priv->read_buffer + priv->read_buffer_pos , chunk_buffer, bytes_read ); @@ -348,11 +348,11 @@ vehicle_wince_available_ports(void) regdevtype_length = sizeof(devicetype); if ( RegQueryValueEx( hkSubResult, L"Key", NULL, NULL, (LPBYTE)devicetype, ®devtype_length) == ERROR_SUCCESS ) { - dbg(lvl_error, "Found device '%s' (%s)\n", W2A(devicename), W2A(devicetype)); + dbg(lvl_debug, "Found device '%s' (%s)\n", W2A(devicename), W2A(devicetype)); } else { - dbg(lvl_error, "Found device '%s'\n", W2A(devicename)); + dbg(lvl_debug, "Found device '%s'\n", W2A(devicename)); } } RegCloseKey(hkSubResult); @@ -372,7 +372,7 @@ vehicle_wince_open(struct vehicle_priv *priv) char* strport; char* strsettings; - dbg(lvl_warning, "enter vehicle_wince_open, priv->source='%s'\n", priv->source); + dbg(lvl_debug, "enter vehicle_wince_open, priv->source='%s'\n", priv->source); if (priv->source ) { @@ -391,7 +391,7 @@ vehicle_wince_open(struct vehicle_priv *priv) *strsettings = '\0'; strsettings++; - dbg(lvl_error, "serial('%s', '%s')\n", strport, strsettings ); + dbg(lvl_debug, "serial('%s', '%s')\n", strport, strsettings ); } if (raw_setting_str) g_free( raw_setting_str ); @@ -402,7 +402,7 @@ vehicle_wince_open(struct vehicle_priv *priv) static void vehicle_wince_close(struct vehicle_priv *priv) { - dbg(lvl_warning,"enter"); + dbg(lvl_debug,"enter"); } static int @@ -613,7 +613,7 @@ vehicle_wince_parse(struct vehicle_priv *priv, char *buffer) */ if (item[1]) { priv->magnetic_direction = g_ascii_strtod( item[1], NULL ); - dbg(lvl_warning,"magnetic %d\n", priv->magnetic_direction); + dbg(lvl_debug,"magnetic %d\n", priv->magnetic_direction); } } return ret; @@ -625,7 +625,7 @@ vehicle_wince_io(struct vehicle_priv *priv) int size, rc = 0; char *str, *tok; - dbg(lvl_warning, "vehicle_file_io : enter\n"); + dbg(lvl_debug, "vehicle_file_io : enter\n"); size = read_win32(priv, priv->buffer + priv->buffer_pos, buffer_size - priv->buffer_pos - 1); @@ -646,12 +646,12 @@ vehicle_wince_io(struct vehicle_priv *priv) } priv->buffer_pos += size; priv->buffer[priv->buffer_pos] = '\0'; - dbg(lvl_warning, "size=%d pos=%d buffer='%s'\n", size, + dbg(lvl_debug, "size=%d pos=%d buffer='%s'\n", size, priv->buffer_pos, priv->buffer); str = priv->buffer; while ((tok = strchr(str, '\n'))) { *tok++ = '\0'; - dbg(lvl_warning, "line='%s'\n", str); + dbg(lvl_debug, "line='%s'\n", str); rc +=vehicle_wince_parse(priv, str); str = tok; if (priv->file_type == file_type_file && rc) @@ -676,7 +676,7 @@ vehicle_wince_io(struct vehicle_priv *priv) static void vehicle_wince_enable_watch(struct vehicle_priv *priv) { - dbg(lvl_warning, "enter"); + dbg(lvl_debug, "enter"); vehicle_wince_disable_watch(priv); priv->is_running = 1; @@ -697,7 +697,7 @@ vehicle_wince_disable_watch(struct vehicle_priv *priv) { int wait = 5000; - dbg(lvl_warning, "enter"); + dbg(lvl_debug, "enter"); priv->is_running = 0; while (wait-- > 0 && priv->thread_up) { @@ -791,7 +791,7 @@ vehicle_wince_position_attr_get(struct vehicle_priv *priv, attr->u.str=priv->fixiso8601; break; case attr_position_sat_item: - dbg(lvl_error,"at here\n"); + dbg(lvl_debug,"at here\n"); priv->sat_item.id_lo++; if (priv->sat_item.id_lo > priv->current_count) { priv->sat_item.id_lo=0; @@ -881,7 +881,7 @@ vehicle_wince_new(struct vehicle_methods struct attr *handle_bluetooth; char *cp; - dbg(lvl_warning, "enter\n"); + dbg(lvl_debug, "enter\n"); source = attr_search(attrs, NULL, attr_source); ret = g_new0(struct vehicle_priv, 1); ret->fd = -1; @@ -918,7 +918,7 @@ vehicle_wince_new(struct vehicle_methods ret->on_eof=1; if (on_eof && !g_strcasecmp(on_eof->u.str, "exit")) ret->on_eof=2; - dbg(lvl_error,"on_eof=%d\n", ret->on_eof); + dbg(lvl_debug,"on_eof=%d\n", ret->on_eof); *meth = vehicle_wince_methods; ret->priv_cbl = callback_list_new(); callback_list_add(ret->priv_cbl, callback_new_1(callback_cast(vehicle_wince_io), ret)); @@ -948,7 +948,7 @@ vehicle_wince_new(struct vehicle_methods void plugin_init(void) { - dbg(lvl_warning, "enter\n"); + dbg(lvl_debug, "enter\n"); plugin_register_vehicle_type("wince", vehicle_wince_new); plugin_register_vehicle_type("file", vehicle_wince_new); } |