raspimjpeg: replace FIFO location

This commit is contained in:
Romain Bazile 2020-12-08 16:52:22 +01:00
parent 9852c3c469
commit dfdcf66be5
2 changed files with 10 additions and 5 deletions

View file

@ -24,7 +24,7 @@ class raspimjpeg(object):
self.__configfile = "/home/pi/PlanktonScope/scripts/raspimjpeg/raspimjpeg.conf" self.__configfile = "/home/pi/PlanktonScope/scripts/raspimjpeg/raspimjpeg.conf"
self.__binary = "/home/pi/PlanktonScope/scripts/raspimjpeg/bin/raspimjpeg" self.__binary = "/home/pi/PlanktonScope/scripts/raspimjpeg/bin/raspimjpeg"
self.__statusfile = "/dev/shm/mjpeg/status_mjpeg.txt" 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 = "" self.__sensor_name = ""
# make sure the status file exists and is empty # make sure the status file exists and is empty
@ -472,3 +472,8 @@ class raspimjpeg(object):
logger.debug("Killing raspimjpeg in a nice way") logger.debug("Killing raspimjpeg in a nice way")
self.__process.terminate() self.__process.terminate()
self.__process.wait() self.__process.wait()
def kill(self):
"""Kill the process."""
logger.debug("Killing raspimjpeg in a very dirty way")
self.__process.terminate()

View file

@ -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 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 video_path /home/pi/media/vi_%v_%Y%M%D_%h%m%s.mp4
status_file /dev/shm/mjpeg/status_mjpeg.txt 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/ media_path /home/pi/data/
macros_path /home/pi/PlanktonScope/scripts/raspimjpeg/macros macros_path /home/pi/PlanktonScope/scripts/raspimjpeg/macros
user_annotate /dev/shm/mjpeg/user_annotate.txt user_annotate /dev/shm/mjpeg/user_annotate.txt
@ -160,8 +160,8 @@ motion_detection false
# Watchdog # Watchdog
# Interval in 0.1 secs # Interval in 0.1 secs
# Errors is Number of times cam.jpg doesn't change before exit # Errors is Number of times cam.jpg doesn't change before exit
watchdog_interval 30 watchdog_interval 100
watchdog_errors 3 watchdog_errors 5
# Set callback_timeout to 0 to disable it # Set callback_timeout to 0 to disable it
callback_timeout 30 callback_timeout 30
#optional user_config file to overwrite (persist) changes #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 set to 1 to only process FIFO commands when terminated with LF
enforce_lf 1 enforce_lf 1
#FIFO poll interval microseconds 1000000 minimum #FIFO poll interval microseconds 100000 minimum
fifo_interval 100000 fifo_interval 100000