Skip to content

Commit

Permalink
fix - fix some issues
Browse files Browse the repository at this point in the history
  • Loading branch information
EtienneSchmitz committed Nov 16, 2023
1 parent 1c7fd9c commit 8f9942b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion rpi/manager/thymio/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ def run_process(self):
print()

script_path = f"/home/pi/rosa-master/rpi/mode/{self.tasks[self.current_mode]}"
self.current_process = subprocess.Popen(['python3', script_path])
self.current_process = subprocess.Popen(['/usr/bin/python3', script_path])


def close(self):
Expand Down
4 changes: 2 additions & 2 deletions rpi/vision/camera.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ def _detect_objects_continuously(self):
detected_img_path = os.path.join(self.image_dir, 'detected_img.jpg')
detected_data_path = os.path.join(self.image_dir, 'detected_data.json')

if self.last_found_obj or time.time() - self.last_detection_time >= 3:
self.last_detection_time = time.time()
if self.last_found_obj or time.time() - last_detection_time >= 3:
last_detection_time = time.time()

cv.imwrite(detected_img_path, frame)
with open(detected_data_path, 'w') as f:
Expand Down
4 changes: 3 additions & 1 deletion web/start.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#!/bin/bash

python3 /home/pi/rosa-master/web/wsgi.py
cd ~/rosa-master/web

/home/pi/.local/bin/gunicorn -w 2 wsgi:app -b 0.0.0.0:8000

0 comments on commit 8f9942b

Please sign in to comment.