@@ -50,11 +50,13 @@ async def main():
50
50
ct_g = millis ()
51
51
while not sm .quit :
52
52
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
+ )
58
60
))
59
61
sleep (2 )
60
62
@@ -67,11 +69,11 @@ async def main():
67
69
# PARKING_BRAKES()
68
70
69
71
# 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()
75
77
sm .exit ()
76
78
77
79
asyncio .run (main ())
0 commit comments