Fixed time drifting sync for fast and turbo modes
This commit is contained in:
parent
e4d4487d23
commit
e7e7b49a5d
@ -8616,8 +8616,8 @@ void MainWindow::on_driftSyncButton_clicked(){
|
||||
auto now = QDateTime::currentDateTimeUtc();
|
||||
|
||||
int n = 0;
|
||||
int nPos = 15 - now.time().second() % m_TRperiod;
|
||||
int nNeg = now.time().second() % m_TRperiod - 15;
|
||||
int nPos = m_TRperiod - (now.time().second() % m_TRperiod);
|
||||
int nNeg = (now.time().second() % m_TRperiod) - m_TRperiod;
|
||||
|
||||
if(abs(nNeg) < nPos){
|
||||
n = nNeg;
|
||||
@ -8632,8 +8632,8 @@ void MainWindow::on_driftSyncEndButton_clicked(){
|
||||
auto now = QDateTime::currentDateTimeUtc();
|
||||
|
||||
int n = 0;
|
||||
int nPos = 15 - now.time().second() % m_TRperiod;
|
||||
int nNeg = now.time().second() % m_TRperiod - 15;
|
||||
int nPos = m_TRperiod - (now.time().second() % m_TRperiod);
|
||||
int nNeg = (now.time().second() % m_TRperiod) - m_TRperiod;
|
||||
|
||||
if(abs(nNeg) < nPos){
|
||||
n = nNeg + 2;
|
||||
|
@ -2037,10 +2037,10 @@ background: qlineargradient(x1:0, y1:0, x2:1, y2:1, stop:0 #2ecc71, stop:1 #00FF
|
||||
<string>Time Drift </string>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<number>-15000</number>
|
||||
<number>-30000</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>15000</number>
|
||||
<number>30000</number>
|
||||
</property>
|
||||
<property name="singleStep">
|
||||
<number>100</number>
|
||||
|
Loading…
Reference in New Issue
Block a user