Wonseok Kwak

Update : IMU Serial logging 및 monitoring을 위한 소스

...@@ -18,7 +18,7 @@ def main(): ...@@ -18,7 +18,7 @@ def main():
18 drone.pair() 18 drone.pair()
19 19
20 # print the acceleration of drone 20 # print the acceleration of drone
21 - while 1: 21 + while drone.isConnected():
22 normal_x = 0 22 normal_x = 0
23 normal_y = 0 23 normal_y = 0
24 normal_z = 0 24 normal_z = 0
...@@ -81,7 +81,7 @@ def main(): ...@@ -81,7 +81,7 @@ def main():
81 deltha_z[0] = abs(deltha_z[1]-deltha_z[2]) 81 deltha_z[0] = abs(deltha_z[1]-deltha_z[2])
82 deltha = deltha_x[0] + deltha_y[0] + deltha_z[0] 82 deltha = deltha_x[0] + deltha_y[0] + deltha_z[0]
83 print("AcX : ", deltha_x[0], "AcY : ", deltha_y[0], "AcZ : ", deltha_z[0], "Total : ", deltha) 83 print("AcX : ", deltha_x[0], "AcY : ", deltha_y[0], "AcZ : ", deltha_z[0], "Total : ", deltha)
84 - 84 +
85 - 85 + drone.close()
86 if __name__ == '__main__': 86 if __name__ == '__main__':
87 main() 87 main()
......