Skip to content
This repository was archived by the owner on Aug 27, 2022. It is now read-only.

Commit d6643b8

Browse files
committed
implement countdown offset to compensate shutter-delay and cheese time
1 parent fbd0b44 commit d6643b8

File tree

4 files changed

+15
-1
lines changed

4 files changed

+15
-1
lines changed

config/config.inc.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646
// P I C T U R E S
4747
// control countdown timer in seconds
4848
$config['picture']['cntdwn_time'] = '5';
49+
$config['picture']['cntdwn_offset'] = '0';
4950
$config['picture']['no_cheese'] = false;
5051
// control time for cheeeeese! in milliseconds
5152
$config['picture']['cheese_time'] = '1000';

lib/configsetup.inc.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -326,6 +326,17 @@
326326
'range_step' => 1,
327327
'unit' => 'seconds',
328328
],
329+
'picture_cntdwn_offset' => [
330+
'view' => 'advanced',
331+
'type' => 'range',
332+
'name' => 'picture[cntdwn_offset]',
333+
'placeholder' => $defaultConfig['picture']['cntdwn_offset'],
334+
'value' => $config['picture']['cntdwn_offset'],
335+
'range_min' => 0,
336+
'range_max' => 10,
337+
'range_step' => 1,
338+
'unit' => 'seconds',
339+
],
329340
'picture_no_cheese' => [
330341
'view' => 'basic',
331342
'type' => 'checkbox',

resources/lang/en.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -311,6 +311,7 @@
311311
"manual:pictures:picture_allow_delete": "If enabled pictures can be deleted on result page directly after they have been taken.",
312312
"manual:pictures:picture_cheese_time": "Set a time to display \"Cheeeeeeeese!\" after the countdown.",
313313
"manual:pictures:picture_cntdwn_time": "Set your countdown time.",
314+
"manual:pictures:picture_cntdwn_offset": "Set an offset to the contdown to compensate for cheese and or focus and shutter delay.",
314315
"manual:pictures:picture_flip": "Choose if your picture is flipped after taken.",
315316
"manual:pictures:picture_frame": "Enter the path of the frame which is applied to your picture after taking it.",
316317
"manual:pictures:picture_keep_original": "If enabled, original images will be kept inside tmp folder.",
@@ -415,6 +416,7 @@
415416
"pictures:picture_allow_delete": "Allow deletion of the image",
416417
"pictures:picture_cheese_time": "Cheeeeeeeese!-Timer:",
417418
"pictures:picture_cntdwn_time": "Countdown timer:",
419+
"pictures:picture_cntdwn_offset": "Countdown offset:",
418420
"pictures:picture_flip": "Flip image:",
419421
"pictures:picture_frame": "Frame",
420422
"pictures:picture_keep_original": "Keep original images in tmp folder",

src/js/core.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -899,7 +899,7 @@ const photoBooth = (function () {
899899
const stop = start > 2 ? start - 2 : start;
900900

901901
function timerFunction() {
902-
element.text(current);
902+
element.text(Number(current) + Number(config.picture.cntdwn_offset));
903903
current--;
904904

905905
element.removeClass('tick');

0 commit comments

Comments
 (0)