1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2024-11-30 08:24:11 +01:00

Ground/UAVTalk: Add destructor and make sure it's called in Logging when stopping logging to disconnect the signals.

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1713 ebee16cc-31ac-478f-84a7-5cbb03baadba
This commit is contained in:
peabody124 2010-09-21 22:52:49 +00:00 committed by peabody124
parent 2a9fd99b06
commit b376350bc2
4 changed files with 8 additions and 3 deletions

View File

@ -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');

View File

@ -276,7 +276,7 @@ void LoggingPlugin::stopReplay()
{
logFile.stopReplay();
logFile.close();
free(uavTalk);
delete(uavTalk);
uavTalk = 0;
state = IDLE;

View File

@ -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
*/

View File

@ -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();