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 authored and andi34 committed Aug 5, 2021
1 parent b063c75 commit 563f257
Show file tree
Hide file tree
Showing 4 changed files with 15 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/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,7 @@
"manual:pictures:filters_enabled": "If enabled, user can choose a imagefiler after taking a picture.",
"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_offset": "Set an offset to the countdown to compensate the delay because of cheese time, focus and shutter speed.",
"manual:pictures:picture_cntdwn_time": "Set your countdown time.",
"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.",
Expand Down Expand Up @@ -414,6 +415,7 @@
"pictures:filters_enabled": "Allow image filter",
"pictures:picture_allow_delete": "Allow deletion of the image",
"pictures:picture_cheese_time": "Cheeeeeeeese!-Timer:",
"pictures:picture_cntdwn_offset": "Countdown offset:",
"pictures:picture_cntdwn_time": "Countdown timer:",
"pictures:picture_flip": "Flip image:",
"pictures:picture_frame": "Frame",
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 563f257

Please sign in to comment.