- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/mlx/pyuipc_sim.py
r443 r408 158 158 ENGINE_3 = 2 159 159 160 ## Engine index: engine #4161 ENGINE_4 = 3162 163 160 ## The number of hotkey entries 164 161 HOTKEY_SIZE = 56 … … 298 295 self.visibility = 10000 299 296 300 self.n1 = [0.0, 0.0, 0.0 , 0.0]301 self.throttles = [0.0, 0.0, 0.0 , 0.0]297 self.n1 = [0.0, 0.0, 0.0] 298 self.throttles = [0.0, 0.0, 0.0] 302 299 303 300 self.payloadCount = 1 … … 331 328 self.eng2DeIce = False 332 329 self.eng3DeIce = False 333 self.eng4DeIce = False334 330 self.propDeIce = False 335 331 self.structDeIce = False … … 431 427 elif offset==0x09e2: # Engine #3 de-ice 432 428 return 1 if self.eng3DeIce else 0 433 elif offset==0x0a54: # Engine #4 throttle434 return self._getThrottle(self.ENGINE_4)435 elif offset==0x0a7a: # Engine #4 de-ice436 return 1 if self.eng4DeIce else 0437 429 elif offset==0x0af4: # Fuel weight 438 430 return int(self.fuelWeight * 256.0) … … 541 533 return self.n1[self.ENGINE_2] 542 534 elif offset==0x2200: # Engine #3 N1 543 return self.n1[self.ENGINE_3]544 elif offset==0x2300: # Engine #4 N1545 535 return self.n1[self.ENGINE_3] 546 536 elif offset==0x2ea0: # Elevator trim … … 705 695 elif offset==0x09e2: # Engine #3 de-ice 706 696 self.eng3DeIce = value!=0 707 elif offset==0x0a54: # Engine #4 throttle708 self._setThrottle(self.ENGINE_4, value)709 elif offset==0x0a7a: # Engine #4 de-ice710 self.eng4DeIce = value!=0711 697 elif offset==0x0af4: # Fuel weight 712 698 self.fuelWeight = value / 256.0 … … 810 796 elif offset==0x2200: # Engine #3 N1 811 797 self.n1[self.ENGINE_3] = value 812 elif offset==0x2300: # Engine #4 N1813 self.n1[self.ENGINE_4] = value814 798 elif offset==0x2ea0: # Elevator trim 815 799 self.elevatorTrim = value * 180.0 / math.pi … … 1429 1413 self._valueHandlers["n1_3"] = ([(0x2200, "f")], lambda value: value, 1430 1414 lambda word: float(word)) 1431 self._valueHandlers["n1_4"] = ([(0x2300, "f")], lambda value: value,1432 lambda word: float(word))1433 1415 1434 1416 self._valueHandlers["throttle_1"] = ([(0x088c, "H")], … … 1439 1421 CLI.throttle2pyuipc) 1440 1422 self._valueHandlers["throttle_3"] = ([(0x09bc, "H")], 1441 CLI.pyuipc2throttle,1442 CLI.throttle2pyuipc)1443 self._valueHandlers["throttle_4"] = ([(0x0a54, "H")],1444 1423 CLI.pyuipc2throttle, 1445 1424 CLI.throttle2pyuipc) … … 1511 1490 CLI.bool2str, CLI.str2bool) 1512 1491 self._valueHandlers["eng3Deice"] = ([(0x09e2, "H")], 1513 CLI.bool2str, CLI.str2bool)1514 self._valueHandlers["eng4Deice"] = ([(0x0a7a, "H")],1515 1492 CLI.bool2str, CLI.str2bool) 1516 1493 self._valueHandlers["propDeice"] = ([(0x337c, "b")],
Note:
See TracChangeset
for help on using the changeset viewer.