-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d937a25
commit 7bd8a0a
Showing
6 changed files
with
33 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,27 @@ | ||
var settings = require("./JS/Resources/settings.json") | ||
var width = settings.User.Camera["Width"] | ||
var height = settings.User.Camera["Height"] | ||
var time = settings.User.Camera["Time"] | ||
var extraCommands = settings.User.Camera["Extra Commands"] | ||
var port = settings.User.Camera.Network["Port"] | ||
var ip = settings.User.Camera.Network["IP"] | ||
var command = `raspivid -w ${width} -h ${height} -t ${time} ${extraCommands} | nc ${ip} ${port}` | ||
var settings = require("./JS/Resources/settings.json"); | ||
var width = settings.User.Camera["Width"]; | ||
var height = settings.User.Camera["Height"]; | ||
var time = settings.User.Camera["Time"]; | ||
var extraCommands = settings.User.Camera["Extra Commands"]; | ||
var port = settings.User.Camera.Network["Port"]; | ||
var ip = settings.User.Camera.Network["IP"]; | ||
var command = `raspivid -w ${width} -h ${height} -t ${time} ${extraCommands} | nc ${ip} ${port}`; | ||
|
||
//Put in default text | ||
function loaded() { | ||
console.log("Loaded!") | ||
document.forms[0].elements[0].value = command | ||
document.forms[0].elements[2].placeholder = height | ||
document.forms[0].elements[3].placeholder = width | ||
document.forms[0].elements[4].placeholder = time | ||
document.forms[0].elements[5].placeholder = port | ||
document.getElementById('settingsIP').innerHTMl = ip | ||
console.log(document.getElementById('settingsIP')) | ||
console.log(document.forms) | ||
console.log("Loaded!"); | ||
document.forms[0].elements[1].value = height; | ||
document.forms[0].elements[2].value = width; | ||
document.forms[0].elements[3].value = time; | ||
document.forms[0].elements[4].value = port; | ||
document.getElementById('settingsIP').innerHTMl = ip; | ||
} | ||
|
||
function startCamera() { | ||
console.log("placeholder") | ||
height = document.forms[0].elements[1].value | ||
width = document.forms[0].elements[2].value | ||
time = document.forms[0].elements[3].value | ||
port = document.forms[0].elements[4].value | ||
command = `raspivid -w ${width} -h ${height} -t ${time} ${extraCommands} | nc ${ip} ${port}`; | ||
execute(`sshpass -p \"raspberry\" ssh [email protected] '${command}'`) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters