fix roaming
This commit is contained in:
parent
ab3a4477c7
commit
15ef7493c7
2
app.py
2
app.py
|
@ -18,8 +18,6 @@ lcd = kuukar_lcd.lcd(motion, sensors)
|
||||||
environment = kuukar_environment.environment(lcd, leds, sensors)
|
environment = kuukar_environment.environment(lcd, leds, sensors)
|
||||||
collision = kuukar_collision.collision(mcu, lcd, leds)
|
collision = kuukar_collision.collision(mcu, lcd, leds)
|
||||||
|
|
||||||
motion.roam_start()
|
|
||||||
|
|
||||||
while True:
|
while True:
|
||||||
temp = sensors.get_temperature()
|
temp = sensors.get_temperature()
|
||||||
humid = sensors.get_humidity_pct()
|
humid = sensors.get_humidity_pct()
|
||||||
|
|
|
@ -93,6 +93,8 @@ class motion:
|
||||||
|
|
||||||
def roam_stop(self):
|
def roam_stop(self):
|
||||||
self.roaming = False
|
self.roaming = False
|
||||||
|
time.sleep(0.5)
|
||||||
|
self.stop()
|
||||||
|
|
||||||
def is_roaming(self) -> bool:
|
def is_roaming(self) -> bool:
|
||||||
return self.roaming
|
return self.roaming
|
||||||
|
@ -133,7 +135,4 @@ class motion:
|
||||||
else:
|
else:
|
||||||
self.turn(-23, TURN_TIME_FS_90DEG_MS)
|
self.turn(-23, TURN_TIME_FS_90DEG_MS)
|
||||||
self.drive(30)
|
self.drive(30)
|
||||||
self.stop()
|
|
||||||
|
|
||||||
print("stopping")
|
|
||||||
time.sleep(0.5)
|
time.sleep(0.5)
|
Loading…
Reference in New Issue