Changeset 290:1435334517fc for src


Ignore:
Timestamp:
07/10/12 14:42:15 (12 years ago)
Author:
István Váradi <ivaradi@…>
Branch:
default
Phase:
public
Message:

Fixed problem with querying the fuel tank info too early

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/mlx/fsuipc.py

    r289 r290  
    142142            self._id = id
    143143            self._period = period
    144             self._nextFire = time.time() + period
     144            self._nextFire = time.time()
    145145            self._data = data
    146146            self._preparedData = None
     
    571571
    572572        self._latin1decoder = codecs.getdecoder("iso-8859-1")
     573        self._fuelCallback = None
    573574
    574575    def connect(self, aircraft):
     
    667668        - the current total capacity of the tank (in kgs)."""
    668669        if self._aircraftModel is None:
    669             callback([])
     670            self._fuelCallback = callback
    670671        else:
    671672            self._aircraftModel.getFuel(self._handler, callback)
     
    801802
    802803        createdNewModel = self._setAircraftName(timestamp, data[5], data[6])
     804        if self._fuelCallback is not None:
     805            self._aircraftModel.getFuel(self._handler, self._fuelCallback)
     806            self._fuelCallback = None
    803807
    804808        self._scroll = data[7]!=0
Note: See TracChangeset for help on using the changeset viewer.