Changeset 609:4eac92648123


Ignore:
Timestamp:
03/05/15 18:14:49 (10 years ago)
Author:
István Váradi <ivaradi@…>
Branch:
default
Phase:
public
Message:

Disconnection from the simulator is logged (re #249)

Location:
src/mlx
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/mlx/flight.py

    r594 r609  
    356356        return self.isTimeDifferenceTooMuch(self.bookedFlight.arrivalTime,
    357357                                            self.blockTimeEnd)
     358
     359    def disconnected(self):
     360        """Called when the connection to the simulator has failed."""
     361        if self.aircraft is not None and self.aircraft.state is not None:
     362            self.logger.message(self.aircraft.state.timestamp,
     363                                "The connection to the simulator has failed")
    358364
    359365    def handleState(self, oldState, currentState):
  • src/mlx/gui/gui.py

    r606 r609  
    481481        self._connected = False
    482482        self._logger.untimedMessage("Disconnected from the simulator")
     483        if self._flight is not None:
     484            self._flight.disconnected()
    483485
    484486        gobject.idle_add(self._disconnected)
Note: See TracChangeset for help on using the changeset viewer.