diff --git a/ground/src/experimental/SerialLogger/analyzeINSGPS.m b/ground/src/experimental/SerialLogger/analyzeINSGPS.m index 318689a9e..5b3cae5fe 100644 --- a/ground/src/experimental/SerialLogger/analyzeINSGPS.m +++ b/ground/src/experimental/SerialLogger/analyzeINSGPS.m @@ -9,7 +9,7 @@ fid = fopen(fn); i = 1; data(i).block = -1; tline = fgetl(fid); -while ischar(tline) +while ischar(tline) && ~isempty(tline) switch(tline(1)) case 'q' c = textscan(tline,'q: %f %f %f %f'); diff --git a/ground/src/plugins/logging/loggingplugin.cpp b/ground/src/plugins/logging/loggingplugin.cpp index 788dce431..b90ba7a0c 100644 --- a/ground/src/plugins/logging/loggingplugin.cpp +++ b/ground/src/plugins/logging/loggingplugin.cpp @@ -276,7 +276,7 @@ void LoggingPlugin::stopReplay() { logFile.stopReplay(); logFile.close(); - free(uavTalk); + delete(uavTalk); uavTalk = 0; state = IDLE; diff --git a/ground/src/plugins/uavtalk/uavtalk.cpp b/ground/src/plugins/uavtalk/uavtalk.cpp index 19cef7985..b1f138b63 100644 --- a/ground/src/plugins/uavtalk/uavtalk.cpp +++ b/ground/src/plugins/uavtalk/uavtalk.cpp @@ -61,6 +61,11 @@ UAVTalk::UAVTalk(QIODevice* iodev, UAVObjectManager* objMngr) connect(io, SIGNAL(readyRead()), this, SLOT(processInputStream())); } +UAVTalk::~UAVTalk() +{ + disconnect(io, SIGNAL(readyRead()), this, SLOT(processInputStream())); +} + /** * Reset the statistics counters */ diff --git a/ground/src/plugins/uavtalk/uavtalk.h b/ground/src/plugins/uavtalk/uavtalk.h index bae57a746..a269779cf 100644 --- a/ground/src/plugins/uavtalk/uavtalk.h +++ b/ground/src/plugins/uavtalk/uavtalk.h @@ -50,7 +50,7 @@ public: } ComStats; UAVTalk(QIODevice* iodev, UAVObjectManager* objMngr); - + ~UAVTalk(); bool sendObject(UAVObject* obj, bool acked, bool allInstances); bool sendObjectRequest(UAVObject* obj, bool allInstances); void cancelTransaction();