1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-01-31 16:52:10 +01:00

LP-485 GCS: Logfile replay playback speed too fast

wrong variable type
This commit is contained in:
Eric Price 2017-02-06 14:05:46 +01:00 committed by Philippe Renon
parent 758af312b5
commit 90ea704b31
2 changed files with 3 additions and 3 deletions

View File

@ -103,8 +103,8 @@ void LogFile::timerFired()
time = m_myTime.elapsed();
// TODO: going back in time will be a problem
while ((m_lastPlayed + ((time - m_timeOffset) * m_playbackSpeed) > m_lastTimeStamp)) {
m_lastPlayed += ((time - m_timeOffset) * m_playbackSpeed);
while ((m_lastPlayed + ((double)(time - m_timeOffset) * m_playbackSpeed) > m_lastTimeStamp)) {
m_lastPlayed += ((double)(time - m_timeOffset) * m_playbackSpeed);
if (m_file.bytesAvailable() < (qint64)sizeof(dataSize)) {
stopReplay();
return;

View File

@ -63,7 +63,7 @@ protected:
QTime m_myTime;
QFile m_file;
qint32 m_lastTimeStamp;
qint32 m_lastPlayed;
double m_lastPlayed;
QMutex m_mutex;