Skip to content

Commit a6d0042

Browse files
committed
Update local_example.py
1 parent 152fa14 commit a6d0042

File tree

1 file changed

+12
-10
lines changed

1 file changed

+12
-10
lines changed

local_example.py

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,13 @@ async def main():
5050
ct_g = millis()
5151
while not sm.quit:
5252
print("Throttle:", await Throttle.value)
53-
print("Alt=%f Lat=%f Lon=%f Kohlsman=%.2f" % (
54-
await aq.PositionandSpeedData.get('PLANE_ALTITUDE'),
55-
await aq.PositionandSpeedData.get('PLANE_LATITUDE'),
56-
await aq.PositionandSpeedData.get('PLANE_LONGITUDE'),
57-
await aq.FlightInstrumentationData.get('KOHLSMAN_SETTING_HG')
53+
print("Lat=%f Lon=%f Alt=%f Kohlsman=%.2f" % tuple(
54+
await asyncio.gather(
55+
aq.PositionandSpeedData.get('PLANE_LATITUDE'),
56+
aq.PositionandSpeedData.get('PLANE_LONGITUDE'),
57+
aq.PositionandSpeedData.get('PLANE_ALTITUDE'),
58+
aq.FlightInstrumentationData.get('KOHLSMAN_SETTING_HG')
59+
)
5860
))
5961
sleep(2)
6062

@@ -67,11 +69,11 @@ async def main():
6769
# PARKING_BRAKES()
6870

6971
# send new data inine @ 5s
70-
if ct_g + 5000 < millis():
71-
if await Throttle.value < 100:
72-
Throttle.set(await Throttle.value + 5)
73-
print("THROTTLE SET")
74-
ct_g = millis()
72+
# if ct_g + 5000 < millis():
73+
# if await Throttle.value < 100:
74+
# Throttle.set(await Throttle.value + 5)
75+
# print("THROTTLE SET")
76+
# ct_g = millis()
7577
sm.exit()
7678

7779
asyncio.run(main())

0 commit comments

Comments
 (0)