mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2024-12-02 10: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:
parent
2a9fd99b06
commit
b376350bc2
@ -9,7 +9,7 @@ fid = fopen(fn);
|
|||||||
i = 1;
|
i = 1;
|
||||||
data(i).block = -1;
|
data(i).block = -1;
|
||||||
tline = fgetl(fid);
|
tline = fgetl(fid);
|
||||||
while ischar(tline)
|
while ischar(tline) && ~isempty(tline)
|
||||||
switch(tline(1))
|
switch(tline(1))
|
||||||
case 'q'
|
case 'q'
|
||||||
c = textscan(tline,'q: %f %f %f %f');
|
c = textscan(tline,'q: %f %f %f %f');
|
||||||
|
@ -276,7 +276,7 @@ void LoggingPlugin::stopReplay()
|
|||||||
{
|
{
|
||||||
logFile.stopReplay();
|
logFile.stopReplay();
|
||||||
logFile.close();
|
logFile.close();
|
||||||
free(uavTalk);
|
delete(uavTalk);
|
||||||
uavTalk = 0;
|
uavTalk = 0;
|
||||||
state = IDLE;
|
state = IDLE;
|
||||||
|
|
||||||
|
@ -61,6 +61,11 @@ UAVTalk::UAVTalk(QIODevice* iodev, UAVObjectManager* objMngr)
|
|||||||
connect(io, SIGNAL(readyRead()), this, SLOT(processInputStream()));
|
connect(io, SIGNAL(readyRead()), this, SLOT(processInputStream()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
UAVTalk::~UAVTalk()
|
||||||
|
{
|
||||||
|
disconnect(io, SIGNAL(readyRead()), this, SLOT(processInputStream()));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Reset the statistics counters
|
* Reset the statistics counters
|
||||||
*/
|
*/
|
||||||
|
@ -50,7 +50,7 @@ public:
|
|||||||
} ComStats;
|
} ComStats;
|
||||||
|
|
||||||
UAVTalk(QIODevice* iodev, UAVObjectManager* objMngr);
|
UAVTalk(QIODevice* iodev, UAVObjectManager* objMngr);
|
||||||
|
~UAVTalk();
|
||||||
bool sendObject(UAVObject* obj, bool acked, bool allInstances);
|
bool sendObject(UAVObject* obj, bool acked, bool allInstances);
|
||||||
bool sendObjectRequest(UAVObject* obj, bool allInstances);
|
bool sendObjectRequest(UAVObject* obj, bool allInstances);
|
||||||
void cancelTransaction();
|
void cancelTransaction();
|
||||||
|
Loading…
Reference in New Issue
Block a user