billw2 / pikrellcam

Raspberry Pi motion vector detection program with OSD web interface.
GNU General Public License v3.0
261 stars 70 forks source link

Display Additional Info On screen #39

Closed cmedianu closed 6 years ago

cmedianu commented 6 years ago

Hi Bill,

I'd like to implement the ability to display additional information on screen (sensor readings, etc.) , preferably by writing the info to the FIFO.

Any advice, before I get started, regarding where things should go?

Thanks!

billw2 commented 6 years ago

On Fri, 01 Jun 2018 23:44:09 -0700 C Medianu notifications@github.com wrote:

Hi Bill,

I'd like to implement the ability to display additional information on screen (sensor readings, etc.) , preferably by writing the info to the FIFO.

Any advice, before I get started, regarding where things should go?

Thanks!

-- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/billw2/pikrellcam/issues/39

You can display info at the top to the left or right of the displayed date by sending annotate_string commands to the FIFO. This is the only way to display anything that also shows up on videos.

Search for annotate_string in the help page, and look at the ds18b20.py script in the scripts dir for an example of displaying temperature data. Scripts can free run and periodically write annotate_string commands to the FIFO, or they can be run from cron or the at-commands.conf file.

Also, here's a short script that demonstrates:

!/bin/bash

echo "annotate_string prepend label test" > /home/pi/pikrellcam/www/FIFO

for i in 1 2 3 4 5 do x=$((i * 2)) echo "annotate_string append sensor1 count1-$i" > /home/pi/pikrellcam/www/FIFO echo "annotate_string append sensor2 count2-$x" > /home/pi/pikrellcam/www/FIFO sleep 1 done

echo "annotate_string prepend label end test" > /home/pi/pikrellcam/www/FIFO sleep 1 echo "annotate_string remove sensor1" > /home/pi/pikrellcam/www/FIFO sleep 1 echo "annotate_string remove sensor2" > /home/pi/pikrellcam/www/FIFO sleep 1 echo "annotate_string remove label" > /home/pi/pikrellcam/www/FIFO

cmedianu commented 6 years ago

This works great, thanks!