From: Jan Michel Date: Fri, 14 Apr 2017 17:29:55 +0000 (+0200) Subject: Add display from webcam to stage controller X-Git-Url: https://jspc29.x-matter.uni-frankfurt.de/git/?a=commitdiff_plain;h=1a565eaee0b6ef4d85f4451d737f6350fd09b787;p=labtools.git Add display from webcam to stage controller --- diff --git a/stages/index.html b/stages/index.html index 0bac9ec..267acc8 100644 --- a/stages/index.html +++ b/stages/index.html @@ -88,7 +88,7 @@ var data; case "zero": commands += "DP 0,0;"; break; case "anycommand": commands += val+";";break; } - commands += "PA?;PA,?;PR?;PR,?;"; + commands += "PA?;PA,?;"; runcmd(commands); } @@ -109,6 +109,7 @@ var data;
Last Update:
--

Move

+

Enter value (in mm) and press Enter to execute command

@@ -120,5 +121,11 @@ var data;

Run any other command

Console

-
- +
+ + diff --git a/stages/style.css b/stages/style.css index eb546f1..f498e5d 100644 --- a/stages/style.css +++ b/stages/style.css @@ -19,3 +19,8 @@ div.position .value{ text-align:right; font-family:monospace; } + +img { + display:block; + float:right; +} diff --git a/stages/webcam.pl b/stages/webcam.pl new file mode 100755 index 0000000..4f4d325 --- /dev/null +++ b/stages/webcam.pl @@ -0,0 +1,9 @@ +#!/usr/bin/perl +if ($ENV{'SERVER_SOFTWARE'} =~ /HTTP-?i/i) { + &htsponse(200, "OK"); + } + +print "Content-Type: image/jpeg;\r\n\r\n"; + +system("fswebcam -F5 -d /dev/video1 -r 1280x720 --scale 844x475 --jpeg 80 '-' 2>/dev/null"); +return 1;