Changeset 209:3172e5cab96e
- Timestamp:
- 05/31/12 15:20:55 (13 years ago)
- Branch:
- default
- Phase:
- public
- Location:
- src/mlx
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
src/mlx/checks.py
r197 r209 455 455 """Construct the logger.""" 456 456 StateChangeLogger.__init__(self, logInitial = True) 457 SingleValueMixin.__init__(self, "gear sDown")457 SingleValueMixin.__init__(self, "gearControlDown") 458 458 459 459 def _getMessage(self, state): 460 460 """Get the message to log on a change.""" 461 return "Gears %s at %.0f knots, %.0f feet" % \ 462 ("DOWN" if state.gearsDown else "UP", state.ias, state.altitude) 461 return "Gears SET to %s at %.0f knots, %.0f feet" % \ 462 ("DOWN" if state.gearControlDown else "UP", 463 state.ias, state.altitude) 463 464 464 465 #--------------------------------------------------------------------------------------- -
src/mlx/fs.py
r197 r209 201 201 - pitotHeatOn: a boolean indicating if the pitot heat is on 202 202 - parking: a boolean indicating if the parking brake is set 203 - gearControlDown: a boolean indicating if the gear control is set to down 203 204 - gearsDown: a boolean indicating if the gears are down 204 205 - spoilersArmed: a boolean indicating if the spoilers have been armed for -
src/mlx/fsuipc.py
r191 r209 1145 1145 ("pitot", 0x029c, "b"), 1146 1146 ("parking", 0x0bc8, "H"), 1147 ("gearControl", 0x0be8, "d"), 1147 1148 ("noseGear", 0x0bec, "d"), 1148 1149 ("spoilersArmed", 0x0bcc, "d"), … … 1308 1309 state.parking = data[self._monidx_parking]!=0 1309 1310 1311 state.gearControlDown = data[self._monidx_gearControl]==16383 1310 1312 state.gearsDown = data[self._monidx_noseGear]==16383 1311 1313 -
src/mlx/gui/monitor.py
r202 r209 141 141 142 142 self._antiCollisionLightsOn = gtk.Label("ANTICOLLISION") 143 table.attach(self._antiCollisionLightsOn, 1, 3, 5, 6)143 table.attach(self._antiCollisionLightsOn, 1, 2, 5, 6) 144 144 145 145 self._strobeLightsOn = gtk.Label("STROBE") 146 table.attach(self._strobeLightsOn, 3, 4, 5, 6)146 table.attach(self._strobeLightsOn, 2, 3, 5, 6) 147 147 148 148 self._landingLightsOn = gtk.Label("LANDING") 149 table.attach(self._landingLightsOn, 4, 5, 5, 6)149 table.attach(self._landingLightsOn, 3, 4, 5, 6) 150 150 151 151 self._pitotHeatOn = gtk.Label("PITOT HEAT") 152 table.attach(self._pitotHeatOn, 5, 7, 5, 6)152 table.attach(self._pitotHeatOn, 4, 5, 5, 6) 153 153 154 154 self._parking = gtk.Label("PARKING") 155 table.attach(self._parking, 7, 8, 5, 6) 155 table.attach(self._parking, 5, 6, 5, 6) 156 157 self._gearControlDown = gtk.Label("GEAR LEVER DOWN") 158 table.attach(self._gearControlDown, 6, 8, 5, 6) 156 159 157 160 self._gearsDown = gtk.Label("GEARS DOWN") … … 241 244 self._pitotHeatOn.set_sensitive(False) 242 245 self._parking.set_sensitive(False) 246 self._gearControlDown.set_sensitive(False) 243 247 self._gearsDown.set_sensitive(False) 244 248 self._spoilersArmed.set_sensitive(False) … … 308 312 self._pitotHeatOn.set_sensitive(aircraftState.pitotHeatOn) 309 313 self._parking.set_sensitive(aircraftState.parking) 314 self._gearControlDown.set_sensitive(aircraftState.gearControlDown) 310 315 self._gearsDown.set_sensitive(aircraftState.gearsDown) 311 316 self._spoilersArmed.set_sensitive(aircraftState.spoilersArmed) -
src/mlx/pyuipc_sim.py
r177 r209 229 229 self.parking = True 230 230 231 self.gearControl = 1.0 231 232 self.noseGear = 1.0 232 233 … … 385 386 elif offset==0x0be0 or offset==0x0be4: # Flaps left and right 386 387 return self.flaps * 16383.0 / self.flapsNotches[-1] 388 elif offset==0x0be8: # Gear control 389 return int(self.gearControl * 16383.0) 387 390 elif offset==0x0bec: # Nose gear 388 391 return int(self.noseGear * 16383.0) … … 602 605 elif offset==0x0be0 or offset==0x0be4: # Flaps left and right 603 606 self.flaps = value * self.flapsNotches[-1] / 16383.0 607 elif offset==0x0be8: # Gear control 608 self.gearControl = value / 16383.0 604 609 elif offset==0x0bec: # Nose gear 605 610 self.noseGear = value / 16383.0 … … 1092 1097 self._valueHandlers["pitot"] = (0x029c, "b", CLI.bool2str, CLI.str2bool) 1093 1098 self._valueHandlers["parking"] = (0x0bc8, "H", CLI.bool2str, CLI.str2bool) 1099 self._valueHandlers["gearControl"] = (0x0be8, "d", 1100 lambda value: value * 100.0 / 16383.0, 1101 lambda word: int(float(word) * 1102 16383.0 / 100.0)) 1094 1103 self._valueHandlers["noseGear"] = (0x0bec, "d", 1095 1104 lambda value: value * 100.0 / 16383.0,
Note:
See TracChangeset
for help on using the changeset viewer.