mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-01-17 02:52:12 +01:00
OP37/GCS DB cache bug fix. Rebuild needed.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@899 ebee16cc-31ac-478f-84a7-5cbb03baadba
This commit is contained in:
parent
7f1c2c4114
commit
99ffd457fd
@ -235,7 +235,7 @@ namespace core {
|
||||
#ifdef DEBUG_GMAPS
|
||||
qDebug()<<"Add tile to DataBase";
|
||||
#endif //DEBUG_GMAPS
|
||||
CacheItemQueue item(type,pos,ret,zoom);
|
||||
CacheItemQueue * item=new CacheItemQueue(type,pos,ret,zoom);
|
||||
TileDBcacheQueue.EnqueueCacheTask(item);
|
||||
}
|
||||
|
||||
|
@ -36,7 +36,7 @@ TileCacheQueue::TileCacheQueue()
|
||||
|
||||
}
|
||||
|
||||
void TileCacheQueue::EnqueueCacheTask(CacheItemQueue &task)
|
||||
void TileCacheQueue::EnqueueCacheTask(CacheItemQueue *task)
|
||||
{
|
||||
#ifdef DEBUG_TILECACHEQUEUE
|
||||
qDebug()<<"DB Do I EnqueueCacheTask"<<task.GetPosition().X()<<","<<task.GetPosition().Y();
|
||||
@ -73,7 +73,7 @@ void TileCacheQueue::run()
|
||||
#endif //DEBUG_TILECACHEQUEUE
|
||||
while(true)
|
||||
{
|
||||
CacheItemQueue task;
|
||||
CacheItemQueue *task;
|
||||
#ifdef DEBUG_TILECACHEQUEUE
|
||||
qDebug()<<"Cache";
|
||||
#endif //DEBUG_TILECACHEQUEUE
|
||||
@ -83,10 +83,11 @@ void TileCacheQueue::run()
|
||||
task=tileCacheQueue.dequeue();
|
||||
mutex.unlock();
|
||||
#ifdef DEBUG_TILECACHEQUEUE
|
||||
qDebug()<<"Cache engine Put:"<<task.GetPosition().X()<<","<<task.GetPosition().Y();
|
||||
qDebug()<<"Cache engine Put:"<<task->GetPosition().X()<<","<<task->GetPosition().Y();
|
||||
#endif //DEBUG_TILECACHEQUEUE
|
||||
Cache::Instance()->ImageCache.PutImageToCache(task.GetImg(),task.GetMapType(),task.GetPosition(),task.GetZoom());
|
||||
Cache::Instance()->ImageCache.PutImageToCache(task->GetImg(),task->GetMapType(),task->GetPosition(),task->GetZoom());
|
||||
QThread::usleep(44);
|
||||
delete task;
|
||||
}
|
||||
|
||||
else
|
||||
|
@ -46,10 +46,10 @@ namespace core {
|
||||
public:
|
||||
TileCacheQueue();
|
||||
|
||||
void EnqueueCacheTask(CacheItemQueue &task);
|
||||
void EnqueueCacheTask(CacheItemQueue *task);
|
||||
|
||||
protected:
|
||||
QQueue<CacheItemQueue> tileCacheQueue;
|
||||
QQueue<CacheItemQueue*> tileCacheQueue;
|
||||
private:
|
||||
void run();
|
||||
QMutex mutex;
|
||||
|
Loading…
x
Reference in New Issue
Block a user