Addon to allow toggling between multiple camera views. Great if your robot has a back camera and a front one, or more.
- Copy the contents of
multicamera.html
to wherever in the dashboard you desire. For this addon, the HTML should already be on your dashboard, but it's included in case you removed it. - Copy
multicamera.js
into thecomponents
directory of your FRCDashboard system. - Link the script from
index.html
, for example:
<script src="components/multicamera.js"></script>
- If the camera's CSS does not appear in the default CSS, copy
multicamera.css
to thecss
directory in your FRCDashboard system. - Link the CSS from
index.html
, for example:
<link rel="stylesheet" href="css/multicamera.css">
- If you haven't already, replace the
url
of thebackground-image
with your desired default camera view's IP. - In
multicamera.js
, replace all sources with actual sources of your camera feeds. - If necessary, change the keys of the NetworkTables values used in
multicamera.js
to the keys your robot code uses.
Alternatively, you could just copy all the JavaScipt code into ui.js
or other preexisting JavaScript script, but that's a bit tougher to keep organized.