From dfdcf66be5871a943068a6af1e5628f6a8db6fe6 Mon Sep 17 00:00:00 2001 From: Romain Bazile Date: Tue, 8 Dec 2020 16:52:22 +0100 Subject: [PATCH] raspimjpeg: replace FIFO location --- scripts/planktoscope/raspimjpeg.py | 7 ++++++- scripts/raspimjpeg/raspimjpeg.conf | 8 ++++---- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/scripts/planktoscope/raspimjpeg.py b/scripts/planktoscope/raspimjpeg.py index 01b703d..0ac8586 100644 --- a/scripts/planktoscope/raspimjpeg.py +++ b/scripts/planktoscope/raspimjpeg.py @@ -24,7 +24,7 @@ class raspimjpeg(object): self.__configfile = "/home/pi/PlanktonScope/scripts/raspimjpeg/raspimjpeg.conf" self.__binary = "/home/pi/PlanktonScope/scripts/raspimjpeg/bin/raspimjpeg" self.__statusfile = "/dev/shm/mjpeg/status_mjpeg.txt" - self.__pipe = "/home/pi/PlanktonScope/scripts/raspimjpeg/FIFO" + self.__pipe = "/dev/shm/mjpeg/FIFO" self.__sensor_name = "" # make sure the status file exists and is empty @@ -472,3 +472,8 @@ class raspimjpeg(object): logger.debug("Killing raspimjpeg in a nice way") self.__process.terminate() self.__process.wait() + + def kill(self): + """Kill the process.""" + logger.debug("Killing raspimjpeg in a very dirty way") + self.__process.terminate() diff --git a/scripts/raspimjpeg/raspimjpeg.conf b/scripts/raspimjpeg/raspimjpeg.conf index 3a3c162..877c68a 100644 --- a/scripts/raspimjpeg/raspimjpeg.conf +++ b/scripts/raspimjpeg/raspimjpeg.conf @@ -124,7 +124,7 @@ image_path /home/pi/data/%Y%M%D/im_%i_%h%m%s.jpg lapse_path /home/pi/media/tl_%i_%t_%Y%M%D_%h%m%s.jpg video_path /home/pi/media/vi_%v_%Y%M%D_%h%m%s.mp4 status_file /dev/shm/mjpeg/status_mjpeg.txt -control_file /home/pi/PlanktonScope/scripts/raspimjpeg/FIFO +control_file /dev/shm/mjpeg/FIFO media_path /home/pi/data/ macros_path /home/pi/PlanktonScope/scripts/raspimjpeg/macros user_annotate /dev/shm/mjpeg/user_annotate.txt @@ -160,8 +160,8 @@ motion_detection false # Watchdog # Interval in 0.1 secs # Errors is Number of times cam.jpg doesn't change before exit -watchdog_interval 30 -watchdog_errors 3 +watchdog_interval 100 +watchdog_errors 5 # Set callback_timeout to 0 to disable it callback_timeout 30 #optional user_config file to overwrite (persist) changes @@ -175,6 +175,6 @@ motion_logfile /home/pi/PlanktonScope/scripts/raspimjpeg/motion.log #enforce_lf set to 1 to only process FIFO commands when terminated with LF enforce_lf 1 -#FIFO poll interval microseconds 1000000 minimum +#FIFO poll interval microseconds 100000 minimum fifo_interval 100000