From 402860f46f20596ef5fce45b29e014b15717d53f Mon Sep 17 00:00:00 2001 From: mdankov Date: Mon, 28 May 2012 18:42:29 +0000 Subject: [PATCH] Fix:wince:Made WinCE GPS reading thread less noisy. git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@5118 ffa7fe5e-494d-0410-b361-a75ebd5db220 --- navit/navit/vehicle/wince/vehicle_wince.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/navit/navit/vehicle/wince/vehicle_wince.c b/navit/navit/vehicle/wince/vehicle_wince.c index 058fcc2..71cabc9 100644 --- a/navit/navit/vehicle/wince/vehicle_wince.c +++ b/navit/navit/vehicle/wince/vehicle_wince.c @@ -290,18 +290,24 @@ static DWORD WINAPI wince_reader_thread (LPVOID lParam) /* TODO (rikky#1#): should use blocking */ if ( priv->file_type != file_type_file ) { - dbg(0, "GPS data comes too fast. Have to wait here\n"); + dbg(3, "GPS data comes too fast. Have to wait here\n"); } Sleep(50); waitcounter++; if ( waitcounter % 8 == 0 ) { - dbg(0, "Remind them of the data\n"); + dbg(1, "Remind them of the data\n"); event_call_callback(priv->priv_cbl); } + if(waitcounter%2000) { + dbg(0,"Will GPS data be ever processed by the main thread? Already %d intervals gone.\n",waitcounter); + } } + + if(waitcounter>2) + dbg(0,"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 ); -- 2.7.4