mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-02-20 10:54:14 +01:00
Merged in filnet/librepilot/LP-485_gcs_log_speed_fix (pull request #393)
LP-485 GCS: Logfile replay playback speed too fast Approved-by: Philippe Renon <philippe_renon@yahoo.fr> Approved-by: Lalanne Laurent <f5soh@free.fr> Approved-by: Alessio Morale <alessiomorale@gmail.com> Approved-by: Harold Hankins <hwh@hjns.net> Approved-by: Eric Price <corvuscorax@cybertrench.com>
This commit is contained in:
commit
ff81941aa5
@ -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;
|
||||
|
@ -63,7 +63,7 @@ protected:
|
||||
QTime m_myTime;
|
||||
QFile m_file;
|
||||
qint32 m_lastTimeStamp;
|
||||
qint32 m_lastPlayed;
|
||||
double m_lastPlayed;
|
||||
QMutex m_mutex;
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user