Changeset 390:7378fc230e10 for src/mlx
- Timestamp:
- 12/22/12 06:43:00 (12 years ago)
- Branch:
- default
- Phase:
- public
- Location:
- src/mlx
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
src/mlx/fs.py
r366 r390 269 269 - elevatorTrim: a float value indicating the deflection of the elevator 270 270 trim in degrees 271 - antiIceOn: a boolean value indicating if some anti-ice system is turned 272 on. It may be None, if the state of the anti-ice system cannot be read 273 reliably 271 274 """ -
src/mlx/fsuipc.py
r382 r390 1196 1196 ("apAltitudeHold", 0x07d0, "d"), 1197 1197 ("apAltitude", 0x07d4, "u"), 1198 ("elevatorTrim", 0x2ea0, "f")] 1198 ("elevatorTrim", 0x2ea0, "f"), 1199 ("eng1DeIce", 0x08b2, "H"), 1200 ("eng2DeIce", 0x094a, "H"), 1201 ("propDeIce", 0x337c, "b"), 1202 ("structDeIce", 0x337d, "b")] 1199 1203 1200 1204 specialModels = [] … … 1409 1413 1410 1414 state.elevatorTrim = data[self._monidx_elevatorTrim] * 180.0 / math.pi 1415 1416 state.antiIceOn = data[self._monidx_eng1DeIce]!=0 or \ 1417 data[self._monidx_eng2DeIce]!=0 or \ 1418 data[self._monidx_propDeIce]!=0 or \ 1419 data[self._monidx_structDeIce]!=0 1411 1420 1412 1421 return state -
src/mlx/gui/monitor.py
r367 r390 59 59 60 60 self._onTheGround = gtk.Label("ONTHEGROUND") 61 table.attach(self._onTheGround, 10, 12, 0, 1) 61 table.attach(self._onTheGround, 10, 11, 0, 1) 62 63 self._antiIceOn = gtk.Label("ANTI-ICE") 64 table.attach(self._antiIceOn, 11, 12, 0, 1) 62 65 63 66 (label, self._zfw) = self._createLabeledEntry("ZFW:", 6) … … 259 262 self._stalled.set_sensitive(False) 260 263 self._onTheGround.set_sensitive(False) 264 self._antiIceOn.set_sensitive(False) 261 265 self._zfw.set_text("-") 262 266 self._grossWeight.set_text("-") … … 311 315 self._stalled.set_sensitive(aircraftState.stalled) 312 316 self._onTheGround.set_sensitive(aircraftState.onTheGround) 317 self._antiIceOn.set_sensitive(aircraftState.antiIceOn) 313 318 self._zfw.set_text("%.0f" % (aircraftState.zfw,)) 314 319 self._grossWeight.set_text("%.0f" % (aircraftState.grossWeight,)) -
src/mlx/pyuipc_sim.py
r343 r390 323 323 324 324 self.elevatorTrim = 0.0 325 326 self.eng1DeIce = False 327 self.eng2DeIce = False 328 self.eng3DeIce = False 329 self.propDeIce = False 330 self.structDeIce = False 325 331 326 332 def read(self, offset, type): … … 410 416 elif offset==0x088c: # Engine #1 throttle 411 417 return self._getThrottle(self.ENGINE_1) 418 elif offset==0x08b2: # Engine #1 de-ice 419 return 1 if self.eng1DeIce else 0 412 420 elif offset==0x0924: # Engine #2 throttle 413 421 return self._getThrottle(self.ENGINE_2) 422 elif offset==0x094a: # Engine #2 de-ice 423 return 1 if self.eng2DeIce else 0 414 424 elif offset==0x09bc: # Engine #3 throttle 415 425 return self._getThrottle(self.ENGINE_3) 426 elif offset==0x09e2: # Engine #3 de-ice 427 return 1 if self.eng3DeIce else 0 416 428 elif offset==0x0af4: # Fuel weight 417 429 return int(self.fuelWeight * 256.0) … … 559 571 elif offset==0x32fa: # Message duration 560 572 return self.messageDuration 573 elif offset==0x337c: # Prop de-ice 574 return 1 if self.propDeIce else 0 575 elif offset==0x337d: # Structural de-ice 576 return 1 if self.structDeIce else 0 561 577 elif offset==0x3380: # Message 562 578 return self.message … … 666 682 elif offset==0x088c: # Engine #1 throttle 667 683 self._setThrottle(self.ENGINE_1, value) 684 elif offset==0x08b2: # Engine #1 de-ice 685 self.eng1DeIce = value!=0 668 686 elif offset==0x0924: # Engine #2 throttle 669 687 self._setThrottle(self.ENGINE_2, value) 688 elif offset==0x094a: # Engine #2 de-ice 689 self.eng2DeIce = value!=0 670 690 elif offset==0x09bc: # Engine #3 throttle 671 691 self._setThrottle(self.ENGINE_3, value) 692 elif offset==0x09e2: # Engine #3 de-ice 693 self.eng3DeIce = value!=0 672 694 elif offset==0x0af4: # Fuel weight 673 695 self.fuelWeight = value / 256.0 … … 803 825 elif offset==0x32fa: # Message duration 804 826 self.messageDuration = value 827 elif offset==0x3364: # Frozen 828 self.frozen = value!=0 829 elif offset==0x337c: # Propeller de-ice 830 self.propDeIce = value!=0 831 elif offset==0x337d: # Structural de-ice 832 self.structDeIce = value!=0 805 833 elif offset==0x3380: # Message 806 834 self.message = value 807 elif offset==0x3364: # Frozen808 self.frozen = value!=0809 835 elif offset==0x3bfc: # ZFW 810 836 self.zfw = value * const.LBSTOKG / 256.0 … … 1451 1477 float(word) * math.pi / 180.0) 1452 1478 1479 self._valueHandlers["eng1Deice"] = ([(0x08b2, "H")], 1480 CLI.bool2str, CLI.str2bool) 1481 self._valueHandlers["eng2Deice"] = ([(0x094a, "H")], 1482 CLI.bool2str, CLI.str2bool) 1483 self._valueHandlers["eng3Deice"] = ([(0x09e2, "H")], 1484 CLI.bool2str, CLI.str2bool) 1485 self._valueHandlers["propDeice"] = ([(0x337c, "b")], 1486 CLI.bool2str, CLI.str2bool) 1487 self._valueHandlers["structDeice"] = ([(0x337d, "b")], 1488 CLI.bool2str, CLI.str2bool) 1489 1453 1490 def default(self, line): 1454 1491 """Handle unhandle commands."""
Note:
See TracChangeset
for help on using the changeset viewer.