Skip to content
This repository has been archived by the owner on Aug 26, 2021. It is now read-only.

Commit

Permalink
Remove parts of camera constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
BrandonWerbel authored and AndrewLester committed Feb 17, 2020
1 parent 0b840d0 commit 33b6708
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
7 changes: 4 additions & 3 deletions src/camera.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,16 @@ class Camera {
* @param {Integer} loadingImgId
* @param {Integer} failedImgId
*/
constructor(parent, cameraLink, loadingImgId, failedImgId) {

constructor(parent, cameraLink) {
if (parent != null){
this.container = parent.querySelector('.stream');
this.crosshair = parent.querySelector('.crosshair');
}
this.stream = cameraLink + '/stream.mjpg';
this.testPage = cameraLink + '/settings.json';
this.loadingImg = loadingImgId;
this.failedImg = failedImgId;
this.loadingImg = '../images/spinner.svg';
this.failedImg = '../images/error.svg';
this.cameraConnected = false;

if (cameraLink == 'http://10.14.18.11:5801'){
Expand Down
6 changes: 3 additions & 3 deletions src/connections.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ const cameraLink2 = 'http://10.14.18.2:1182';
const limelightLink = 'http://10.14.18.11:5801';

const cameras = [
new Camera(document.getElementById('camera1'), cameraLink1, '../images/spinner.svg', '../images/error.svg'),
new Camera(document.getElementById('camera2'), cameraLink2, '../images/spinner.svg', '../images/error.svg'),
new Camera(null, limelightLink, '../images/spinner.svg', '../images/error.svg')
new Camera(document.getElementById('camera1'), cameraLink1),
new Camera(document.getElementById('camera2'), cameraLink2),
new Camera(null, limelightLink)
];

let initialLoad = true;
Expand Down

0 comments on commit 33b6708

Please sign in to comment.