You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using the "quick time lapse" feature, the very last picture in the burst will not get a title written to it, and will get overwritten by the next motion capture.
Looking at the code, the function takeQuickTimeLapse is taking pictures with the "yield" function, and if the timer is exceeded, the loop is exited - but this happens before the post image processing.
def takeQuickTimeLapse(moPath, imagePrefix, NumOn, motionNumCount,
currentDayMode, NumPath):
""" Take a quick timelapse sequence using yield if motion triggered """
logging.info("motion Quick Time Lapse for %i sec every %i sec",
motionQuickTLTimer, motionQuickTLInterval)
checkTimeLapseTimer = datetime.datetime.now()
keepTakingImages = True
filename = getImageName(moPath, imagePrefix, NumOn, motionNumCount)
while keepTakingImages:
yield filename
rightNow = datetime.datetime.now()
timelapseDiff = (rightNow - checkTimeLapseTimer).total_seconds()
if timelapseDiff > motionQuickTLTimer:
keepTakingImages = False
else:
motionNumCount = postImageProcessing(NumOn,
motionNumStart,
motionNumMax,
motionNumCount,
motionNumRecycle,
NumPath, filename,
currentDayMode)
filename = getImageName(moPath, imagePrefix, NumOn, motionNumCount)
time.sleep(motionQuickTLInterval)
Moving the "if" statement to the bottom fixes the issue
while keepTakingImages:
yield filename
rightNow = datetime.datetime.now()
timelapseDiff = (rightNow - checkTimeLapseTimer).total_seconds()
#Peter moved the if statement below the processing so last image will be saved
motionNumCount = postImageProcessing(NumOn,
motionNumStart,
motionNumMax,
motionNumCount,
motionNumRecycle,
NumPath, filename,
currentDayMode)
filename = getImageName(moPath, imagePrefix, NumOn, motionNumCount)
time.sleep(motionQuickTLInterval)
if timelapseDiff > motionQuickTLTimer:
keepTakingImages = False
The text was updated successfully, but these errors were encountered:
Updated GitHub pi-timolo.py ver 10.93 per your suggested fix.
Decided to release based on your testing. Will give it a try when I get a chance
Your work is appreciated.
Thanks Claude ...
When using the "quick time lapse" feature, the very last picture in the burst will not get a title written to it, and will get overwritten by the next motion capture.
Looking at the code, the function takeQuickTimeLapse is taking pictures with the "yield" function, and if the timer is exceeded, the loop is exited - but this happens before the post image processing.
Moving the "if" statement to the bottom fixes the issue
The text was updated successfully, but these errors were encountered: