Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

darkCapture.sh: bug fix with dirname #1019

Merged
merged 1 commit into from
Feb 12, 2022
Merged

Conversation

EricClaeys
Copy link
Collaborator

Need to copy the dark frame to the original directory $CURRENT_IMAGE was in, otherwise it goes in the directory that allsky.sh was executed in (usually $ALLSKY_HOME).

Need to copy the dark frame to the original directory $CURRENT_IMAGE was in, otherwise it goes in the directory that allsky.sh was executed in (usually $ALLSKY_HOME).
Copy link
Collaborator

@AndreasLMeg AndreasLMeg left a comment

Choose a reason for hiding this comment

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

++ MOVE_TO_FILE=/home/pi/allsky/darks/dark.jpg
++ mv /home/pi/allsky/tmp/dark.jpg /home/pi/allsky/darks/dark.jpg
+++ jq -r .notificationimages /home/pi/allsky/config/settings_RPiHQ.json
++ USE_NOTIFICATION_IMAGES=0
++ '[' 0 = 0 ']'
+++ dirname /home/pi/allsky/tmp/dark.jpg
++ cp /home/pi/allsky/darks/dark.jpg /home/pi/allsky/tmp/image.jpg
++ exit 0
21:07:03 ======================================================================
21:07:03 TEST: s ./test_saveImage_darks.sh: 
21:07:03 TEST: i Testcase: saveImage.sh NIGHT /home/pi/allsky/tmp/dark.jpg (darks)
21:07:03 TEST: i   Testimage = dark.jpg
21:07:03 TEST: i   darkframe = 1: image should be copied to dark
21:07:03 TEST: i   notificationimages = 0: image should be shown in webserver (/home/pi/allsky/tmp/image.jpg)
21:07:03 TEST: i   /home/pi/allsky/tmp/dark.jpg should be deleted
21:07:03 TEST: i SETUP
21:07:03 TEST: i /home/pi/allsky/config/config.sh: IMG_RESIZE=true
21:07:03 TEST: i /home/pi/allsky/config/config.sh: IMG_WIDTH=2028
21:07:03 TEST: i /home/pi/allsky/config/config.sh: IMG_HEIGHT=1520
21:07:03 TEST: i /home/pi/allsky/config/config.sh: CROP_IMAGE=true
21:07:04 TEST: i /home/pi/allsky/config/config.sh: CROP_WIDTH=640
21:07:04 TEST: i /home/pi/allsky/config/config.sh: CROP_HEIGHT=480
21:07:04 TEST: i /home/pi/allsky/config/config.sh: CROP_OFFSET_X=0
21:07:04 TEST: i /home/pi/allsky/config/config.sh: CROP_OFFSET_Y=0
21:07:04 TEST: i /home/pi/allsky/config/config.sh: AUTO_STRETCH=true
21:07:04 TEST: i /home/pi/allsky/config/config.sh: AUTO_STRETCH_AMOUNT=10
21:07:04 TEST: i /home/pi/allsky/config/config.sh: AUTO_STRETCH_MID_POINT=10%
21:07:04 TEST: i /home/pi/allsky/config/config.sh: IMG_CREATE_THUMBNAILS=true
21:07:04 TEST: i /home/pi/allsky/config/config.sh: IMG_UPLOAD=true
21:07:04 TEST: i /home/pi/allsky/config/config.sh: RESIZE_UPLOADS=true
21:07:04 TEST: i /home/pi/allsky/config/config.sh: RESIZE_UPLOADS_SIZE=962x720
21:07:04 TEST: i /home/pi/allsky/config/config.sh: DARK_FRAME_SUBTRACTION=true
21:07:04 TEST: i /home/pi/allsky/config/settings_RPiHQ.json: darkframe=1
21:07:04 TEST: i /home/pi/allsky/config/settings_RPiHQ.json: notificationimages=0
21:07:04 TEST: i EXECUTION
21:07:04 MOCK: > /home/pi/allsky/scripts/saveImage.sh: NIGHT /home/pi/allsky/tmp/dark.jpg
21:07:05 TEST: i EVALUATION
21:07:05 TEST: i /home/pi/allsky/darks exists OK
21:07:05 TEST: i /home/pi/allsky/darks/dark.jpg darkframe exists OK
21:07:06 TEST: i /home/pi/allsky/darks/dark.jpg darkframe -> image should not change (identify) OK
21:07:06 TEST: i /home/pi/allsky/images/20220212/dark.jpg darkframe -> should not exists in date-dir OK
21:07:06 TEST: i /home/pi/allsky/images/20220212/thumbnails/dark.jpg darkframe -> should not exists in date-dir/thumbnails OK
21:07:06 TEST: i /home/pi/allsky/tmp/dark.jpg removed by script OK
21:07:06 TEST: i /home/pi/allsky/tmp/resize-dark.jpg darkframe -> not to resize and upload OK
21:07:06 TEST: i /home/pi/allsky/tmp/image.jpg exists OK
21:07:06 TEST: i /home/pi/allsky/tmp/image.jpg  notificationimages=0, show darkframe (identify) OK
21:07:06 TEST: i TEARDOWN
21:07:06 TEST: i ERR_CNT=0
21:07:06 ======================================================================

@EricClaeys EricClaeys merged commit 98a9cb0 into master Feb 12, 2022
@EricClaeys EricClaeys deleted the darkCapture.sh-bug-dirname branch February 12, 2022 22:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants