From 3bb75e6245910ba2e79b9a9b6e05d01b23ee5422 Mon Sep 17 00:00:00 2001 From: yikth Date: Mon, 17 Feb 2020 20:09:54 +0800 Subject: [PATCH] align indentation --- python/IRremote_UltrasonicObstacleAvoidance.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/python/IRremote_UltrasonicObstacleAvoidance.py b/python/IRremote_UltrasonicObstacleAvoidance.py index dabb231..98ccb00 100644 --- a/python/IRremote_UltrasonicObstacleAvoidance.py +++ b/python/IRremote_UltrasonicObstacleAvoidance.py @@ -117,15 +117,15 @@ try: Ab.setPWMB(PWM) print(PWM) else: - if dist < 20: - n = 0 - Ab.stop() - print("run into obstabcle") - else: - n += 1 - if n > 20000: + if dist < 20: n = 0 - Ab.stop() + Ab.stop() + print("run into obstabcle") + else: + n += 1 + if n > 20000: + n = 0 + Ab.stop() except KeyboardInterrupt: GPIO.cleanup();