Skip to content

Commit

Permalink
helpful message if no v4l cameras are there
Browse files Browse the repository at this point in the history
  • Loading branch information
jo-m committed Nov 25, 2023
1 parent ab81985 commit 32f10f5
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion internal/pkg/server/wwwdata/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@
camOptions += `--input ${cam.DeviceFile} --camera-format-fourcc ${cam.Format} --camera-w ${cam.FrameSize.X} --camera-h ${cam.FrameSize.Y}\n`
}

if (cameras.length === 0) {
camOptions = "No v4l cameras detected."
}

document.querySelector("#cameraOptions").innerHTML = camOptions
}).
catch(function(error){
Expand Down Expand Up @@ -160,7 +164,7 @@ <h1>Trainbot Confighelper</h1>
<img id="stream" src="stream.mjpeg" />
</div>
<pre id="rectOptions"></pre>
<button id="detectCameras">Detect cameras</button>
<button id="detectCameras">Detect v4l cameras</button>
<pre id="cameraOptions"></pre>
</body>
</html>

0 comments on commit 32f10f5

Please sign in to comment.