Look along path while approaching beds

This commit is contained in:
Tanner
2026-11-07 23:21:41 +00:00
parent 9cbadbd551
commit 11add13779
4 changed files with 64 additions and 6 deletions
+8 -2
View File
@@ -126,7 +126,7 @@ class SleepWithBedStates:
self.g.path = navpath[:-1]
self.opening_deadline = time.monotonic() + max(
8.0, len(navpath) * 0.75)
self.g.look_at = self.area
self.g.look_at = None
self.state = self.going_to_bed
return
@@ -149,7 +149,10 @@ class SleepWithBedStates:
print('Could not reach bed opening', self.opening,
'; trying another bed')
self.bad_beds.append(self.area)
self.g.look_at = None
self.state = self.choose_bed
else:
self.g.look_at = None
def turn_to_bed(self):
self.g.look_at = self.area
@@ -209,7 +212,7 @@ class SleepWithBedStates:
self.g.path = navpath
self.opening_deadline = time.monotonic() + max(
8.0, len(navpath) * 0.75)
self.g.look_at = self.area
self.g.look_at = None
self.state = self.going_to_area
def going_to_area(self):
@@ -222,7 +225,10 @@ class SleepWithBedStates:
elif time.monotonic() >= self.opening_deadline:
print('Could not reach bed placement opening', self.opening)
self.bad_areas.append(self.area)
self.g.look_at = None
self.state = self.cleanup
else:
self.g.look_at = None
def turn_to_bed_area(self):
self.g.look_at = self.area