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