diff --git a/index.js b/index.js
index 3738c74..f250204 100644
--- a/index.js
+++ b/index.js
@@ -1,10 +1,10 @@
const gphoto2 = require('./tools/tools-gphoto2')
const server = require('./server')
-// gphoto2.init(function (pErr) {
- // console.log('DONE')
+gphoto2.init(function (pErr) {
+ console.log('[>] Checking list done with success')
let app = server()
-// })
+})
// // Initialize the library
// BOB_var_gamepad.init()
@@ -22,4 +22,4 @@ const server = require('./server')
// id : pId,
// num : pNum
// });
-// })
\ No newline at end of file
+// })
diff --git a/server/index.js b/server/index.js
index 3476e8d..edfd208 100644
--- a/server/index.js
+++ b/server/index.js
@@ -4,6 +4,7 @@ const app = express()
const logger = require('morgan')
const cookieParser = require('cookie-parser')
const bodyParser = require('body-parser')
+const opn = require('opn')
const booth = require('./booth')
@@ -52,5 +53,9 @@ module.exports = function () {
app.locals.io = require('socket.io')(server)
booth.setSocketIo(app.locals.io)
+ console.log(`[-] Starting chromium...`)
+ opn('http://localhost:3111/bobinoscope', {
+ app: ['chromium-browser', '--app=http://localhost:3111/bobinoscope', '--start-fullscreen', '--password-store=basic']
+ })
return app
}
diff --git a/server/views/scope.ejs b/server/views/scope.ejs
index 2be7097..118ea0c 100644
--- a/server/views/scope.ejs
+++ b/server/views/scope.ejs
@@ -32,7 +32,7 @@
Bobinogramme en cours de génération...
-
Merci de bien vouloir patienter
une quinzaine de secondes
+
Merci de bien vouloir patienter
quelques secondes
@@ -151,7 +151,7 @@
BOB_countdown();
}, 1000)
} else {
- $('#idViewCountdown').html("Smile");
+ $('#idViewCountdown').html("Souriez");
BOB_takeThe1Pictures();
}
}
diff --git a/tools/tools-gphoto2.js b/tools/tools-gphoto2.js
index 2fc17c2..c8c417f 100644
--- a/tools/tools-gphoto2.js
+++ b/tools/tools-gphoto2.js
@@ -15,8 +15,12 @@ function execGphoto2 (pArgs, pCallback) {
exec(`gphoto2 ${pArgs}`, function (pErr, pStdout, pStderr) {
if (pErr) {
console.log(`[!] Please install gphoto2`.red)
- console.log(`sudo apt-get install gphoto2`)
- process.exit(1)
+ console.log(`sudo apt-get install gphoto2`.bgMagenta)
+ console.log(`[-] Bobinoscope will close in 10 seconds...`)
+ setTimeout(function () {
+ process.exit(1)
+ }, 10000)
+ return
}
let error = null
let outInLines = []
@@ -44,9 +48,14 @@ tools.checkCameraConnection = function (pCb) {
let device = pStdout[2]
if (!device) {
console.log(`[!] Camera not connected`.red)
- console.log('1. Connect camera via USB')
- console.log('2. Turn on the camera')
- process.exit(1)
+ console.log('1. Connect camera via USB'.bgMagenta)
+ console.log('2. Turn on the camera'.bgMagenta)
+ console.log('3. Maybe - Force manual focus on camera'.bgMagenta)
+ console.log(`\n\n[-] Bobinoscope will close in 10 seconds...`)
+ setTimeout(function () {
+ process.exit(1)
+ }, 10000)
+ return
}
console.log(`OK: ${device}`.green)
pCb()
diff --git a/tools/tools-photobooth.js b/tools/tools-photobooth.js
index 40ec94b..fea68ca 100644
--- a/tools/tools-photobooth.js
+++ b/tools/tools-photobooth.js
@@ -151,5 +151,5 @@ function BOB_generatePictLayout (pBoothName) {
})
})
- console.log('INIT DONE')
+ // console.log('INIT DONE')
}