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

Commit

Permalink
implement countdown offset to compensate shutter-delay and cheese time
Browse files Browse the repository at this point in the history
  • Loading branch information
Metropo committed Aug 3, 2021
1 parent fbd0b44 commit b697d46
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 1 deletion.
1 change: 1 addition & 0 deletions config/config.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
// P I C T U R E S
// control countdown timer in seconds
$config['picture']['cntdwn_time'] = '5';
$config['picture']['cntdwn_offset'] = '0';
$config['picture']['no_cheese'] = false;
// control time for cheeeeese! in milliseconds
$config['picture']['cheese_time'] = '1000';
Expand Down
11 changes: 11 additions & 0 deletions lib/configsetup.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,17 @@
'range_step' => 1,
'unit' => 'seconds',
],
'picture_cntdwn_offset' => [
'view' => 'advanced',
'type' => 'range',
'name' => 'picture[cntdwn_offset]',
'placeholder' => $defaultConfig['picture']['cntdwn_offset'],
'value' => $config['picture']['cntdwn_offset'],
'range_min' => 0,
'range_max' => 10,
'range_step' => 1,
'unit' => 'seconds',
],
'picture_no_cheese' => [
'view' => 'basic',
'type' => 'checkbox',
Expand Down
2 changes: 2 additions & 0 deletions resources/lang/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,7 @@
"manual:pictures:picture_allow_delete": "Wenn diese Option aktiviert ist, können Bilder direkt nach der Aufnahme auf der Ergebnisseite gelöscht werden.",
"manual:pictures:picture_cheese_time": "Legen Sie eine Zeit fest zur Anzeige von \"Cheeeeeeeese!\" nach dem Countdown.",
"manual:pictures:picture_cntdwn_time": "Legen Sie Ihre Countdown-Zeit fest.",
"manual:pictures:picture_cntdwn_offset": "Legen Sie einen Countdown-Offset fest, um die Chessse Zeit und die Auslöseverzögerung der Kamera zu kompensieren.",
"manual:pictures:picture_flip": "Wählen Sie, ob Ihr Bild nach der Aufnahme gespiegelt wird.",
"manual:pictures:picture_frame": "Geben Sie den Pfad des Rahmens ein, der nach der Aufnahme auf Ihr Bild angewendet wird.",
"manual:pictures:picture_keep_original": "Wenn diese Option aktiviert ist, werden die Originalbilder im tmp-Ordner gespeichert.",
Expand Down Expand Up @@ -388,6 +389,7 @@
"pictures:picture_allow_delete": "Löschen des Bildes erlauben",
"pictures:picture_cheese_time": "Cheeeeeeeese!-Timer:",
"pictures:picture_cntdwn_time": "Countdown Timer:",
"pictures:picture_cntdwn_offset": "Countdown Offset:",
"pictures:picture_flip": "Bild spiegeln:",
"pictures:picture_frame": "Rahmen",
"pictures:picture_keep_original": "Original Bilder im tmp Ordner behalten",
Expand Down
2 changes: 2 additions & 0 deletions resources/lang/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,7 @@
"manual:pictures:picture_allow_delete": "If enabled pictures can be deleted on result page directly after they have been taken.",
"manual:pictures:picture_cheese_time": "Set a time to display \"Cheeeeeeeese!\" after the countdown.",
"manual:pictures:picture_cntdwn_time": "Set your countdown time.",
"manual:pictures:picture_cntdwn_offset": "Set an offset to the contdown to compensate for cheese and or focus and shutter delay.",
"manual:pictures:picture_flip": "Choose if your picture is flipped after taken.",
"manual:pictures:picture_frame": "Enter the path of the frame which is applied to your picture after taking it.",
"manual:pictures:picture_keep_original": "If enabled, original images will be kept inside tmp folder.",
Expand Down Expand Up @@ -415,6 +416,7 @@
"pictures:picture_allow_delete": "Allow deletion of the image",
"pictures:picture_cheese_time": "Cheeeeeeeese!-Timer:",
"pictures:picture_cntdwn_time": "Countdown timer:",
"pictures:picture_cntdwn_offset": "Countdown offset:",
"pictures:picture_flip": "Flip image:",
"pictures:picture_frame": "Frame",
"pictures:picture_keep_original": "Keep original images in tmp folder",
Expand Down
2 changes: 1 addition & 1 deletion src/js/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -899,7 +899,7 @@ const photoBooth = (function () {
const stop = start > 2 ? start - 2 : start;

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

element.removeClass('tick');
Expand Down

0 comments on commit b697d46

Please sign in to comment.