https://github.com/Koseng/MSFSPythonSimConnectMobiFlightExtension
GitHub - Koseng/MSFSPythonSimConnectMobiFlightExtension: Extends the python simconnect library for MSFS2020 with the capability
Extends the python simconnect library for MSFS2020 with the capability to read A and L variables with help of the MobiFlight WASM module. - GitHub - Koseng/MSFSPythonSimConnectMobiFlightExtension: ...
github.com

Simconnect Mobiflight 를 활용하여 MCP 패널의 value 를 출력 해보자.
from simconnect_mobiflight import SimConnectMobiFlight
from mobiflight_variable_requests import MobiFlightVariableRequests
from time import sleep
sm = SimConnectMobiFlight()
vr = MobiFlightVariableRequests(sm)
vr.clear_sim_variables()
while True:
# PMDG 737 MCP Value
crs0 = vr.get("(L:ngx_CRSwindowL)") # CRS Left
spd = vr.get("(L:ngx_SPDwindow)") # Speed
hdg = vr.get("(L:ngx_HDGWindow)") # Heading
alt = vr.get("(L:ngx_ALTwindow)") # Altitude
vs = vr.get("(L:ngx_VSwindow)") # V/S Speed
crs1 = vr.get("(L:ngx_CRSwindowR)") # CRS Right
print(crs0)
print(spd)
print(hdg)
print(alt)
print(vs)
print(crs1)
print("###############")
sleep(1)
위의 예제 처럼 vr.get( SIM_VARS ) 를 활용하면 값을 가져올수 있다.
PMDG L VARS 를 가져오려면 예) MCP Speed
spd = vr.get("(L:ngx_SPDwindow)")
형식으로 가져오면 된다.
'Home Cockpit > DIY' 카테고리의 다른 글
[Falcon BMS] RTT 를 이용한 화면 만들기 (0) | 2023.04.27 |
---|---|
[MSFS] pmdg 737 Data Access (1) | 2023.04.20 |
[MSFS-DIY] simconnect documentation (0) | 2023.04.05 |
[MSFS-DIY] pyton simconnect 연결 예 (0) | 2023.04.04 |
[MSFS-DIY] arduino tm1637 segment 출 (0) | 2023.04.04 |
댓글