Changeset 161:5d4225002097


Ignore:
Timestamp:
05/05/12 14:11:19 (13 years ago)
Author:
István Váradi <ivaradi@…>
Branch:
default
Phase:
public
Message:

Made FS time sync a bit more correct

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/mlx/fsuipc.py

    r152 r161  
    712712        self._scroll = data[7]!=0
    713713
    714         self._checkTimeSync()
    715        
    716714        if self._monitoringRequested and not self._monitoring:
    717715            self._stopNormal()
     
    724722            aircraftState = self._aircraftModel.getAircraftState(self._aircraft,
    725723                                                                 timestamp, data)
     724
     725            self._checkTimeSync(aircraftState)
     726       
    726727            self._aircraft.handleState(aircraftState)
    727728
    728     def _checkTimeSync(self):
     729    def _checkTimeSync(self, aircraftState):
    729730        """Check if we need to synchronize the FS time."""
    730         if not self._syncTime: return
     731        if not self._syncTime or aircraftState.paused or \
     732           self._flareRequestID is not None:
     733            self._nextSyncTime = -1
     734            return
    731735
    732736        now = time.time()
Note: See TracChangeset for help on using the changeset viewer.