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

Improve/core #369

Merged
merged 17 commits into from Jan 31, 2022
Merged

Improve/core #369

merged 17 commits into from Jan 31, 2022

Conversation

andi34
Copy link
Owner

@andi34 andi34 commented Jan 19, 2022

Prerequisites checklist

What is the purpose of this pull request? (put an "x" next to an item)

  • Bug fix:

    • Fix gphoto preview on retry / next collage image.
    • fix taking pictures from gphoto preview (Note: Gphoto won't be used, it's more like taking a screenshot of the Preview. Since Gphoto won't be used there's no flash light of the camera!)
    • respect retry timeout:
      The timeout should not be a new countdown, it should be a timeout as it's name says. Retry notification will now be visible for defined time. Countdown for picture/next collage image is not touched and will be used as defined.
  • Other, please explain:

    • Let's start the picture process from beginning on retry.
      This saves some lines of code and also start all previews like defined at countdown.
    • add flip-horizontal class for preview if needed on api.reset
    • Centralized preview start/stop functions, this helps getting a better overview of the code.
    • log error messages to console from api.errorPic
    • optimize error messages
    • time configurations to constants
    • move more ID selector to constants

What changes did you make? (Give an overview)

See above.

Is there anything you'd like reviewers to focus on?

Copy link
Owner Author

@andi34 andi34 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

?

src/js/core.js Show resolved Hide resolved
Let's start the picture process from beginning on retry.
This saves some lines of code and also start all previews like defined
at countdown with one limitation:
gphoto preview without bsm needs to be adjusted on a follow up commit,
currently it's not started again on retry / next collage image.

Retry notification will be visible for 2 seconds until it starts
the new countdown.

Change-Id: I3d6e40b5b8ebc7fc6715f528ab38835ffd0255d5
…bled

Change-Id: I90b34965ae15a29ce3f65ed8f2245105c7651263
The timeout should not be a new countdown, it should be a timeout as
it's name says.

Change-Id: I46161bfc936a60baa51b9b312c05d74cb3365ea5
Change-Id: I0f7c32d17817ef6528ce9223f7c58994df6fffec
Change-Id: Ib47149b07c9ae187ba9ffbc58efd9c3e035541a0
We can draw an image from the gphoto preview we've got.
Image quality won't be good, but it's an option we should give to users.

Change-Id: Ie251857185357da3b2bebc74e828e12c1699c835
Let's "clean" api.takePic function while using a own function to stop preview
used at countdown and capture an image from preview if needed.

Change-Id: I0187318a19c89f0f987767bcd1545d703090251b
Move preview related code for countdown to api.startVideo function.

Change-Id: I0d331e125538d7719c1f1bad506658a33f064ce8
Change-Id: I1fbac4a2a2429e6c4b2d4e7b6457cfa8806d6f9c
Preview as background can only be used if preview by device cam or by gphoto
is enabled.

Change-Id: I4449da664c78588bc69360b9dbdeb49f101508b9
sendMail class selector was already added but not used in all places where
possible, let's fix that.

Change-Id: If868ddda06c8ff5f9b36e88878e4b86c7d6bddff
Change-Id: Ib23600739ba3b0d6b76f936c5ccfcbbd2ecf565b
Log to console from api.errorPic funtion.

Change-Id: I579c57b53b25010478d73c289d8bc2273be26665
Change-Id: I289dbe76b9289261bb706f419ffafb2c41bd2bc0
Change-Id: Iccfb83392dcbc2241d835d7da41cc3126c4c75ef
Change-Id: I4ca28d388e729642a8bbe685b3d49d7fd129ad62
Time settings should be defined once as constant.

Change-Id: I25623fcd819d0cdc0e21511cb577bbb03fa31474
@andi34 andi34 marked this pull request as ready for review January 30, 2022 20:11
@andi34
Copy link
Owner Author

andi34 commented Jan 30, 2022

@up-87 what do you think? IMO good to go.

@up-87
Copy link

up-87 commented Jan 31, 2022

Did a code review and looks really good. I didn't do any check if everything still works but I didn't notice any obvious error.

@andi34 andi34 merged commit 30cbea4 into dev Jan 31, 2022
@andi34 andi34 deleted the improve/core branch January 31, 2022 13:21
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants