Skip to content

Commit

Permalink
close #55
Browse files Browse the repository at this point in the history
  • Loading branch information
saoron committed Feb 11, 2018
1 parent 1c020a5 commit 1131a9d
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 3 deletions.
4 changes: 2 additions & 2 deletions defaults.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ in_calibration=False
dvr=True

[video]
flip=True
flip=False

[gps]
gps=True
Expand All @@ -27,4 +27,4 @@ mute=False
mic=True

[os]
version=0.7.1
version=0.8
6 changes: 5 additions & 1 deletion modules/video/helpers/record.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,14 @@ var RaspiCam = require("raspicam");
var exec = require('child_process').exec;
var fs = require('fs');
var spawn = require("child_process").spawn;
ini = require('ini');

var recordClip = (timestamp, interval) => {
return new Promise((resolve, reject) => {

var settings = ini.parse(fs.readFileSync('/home/Cardigan/defaults.cfg', 'utf-8'))


if (!/^\d+$/.test(timestamp)) {
reject('Err: input issues, Who are you?');
return;
Expand All @@ -17,7 +21,7 @@ var recordClip = (timestamp, interval) => {
timeout: interval,
width: 1280,
height: 720,
rotation: 0,
rotation: settings.video.flip ? 180 : 0,
log: function (d) {
//detect camera error and put steady red LED
//mmal: main: Failed to create camera component
Expand Down
39 changes: 39 additions & 0 deletions modules/video/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions modules/video/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"license": "ISC",
"dependencies": {
"diskusage": "^0.2.4",
"ini": "^1.3.5",
"raspicam": "^0.2.14"
}
}

0 comments on commit 1131a9d

Please sign in to comment.