Night-time time-lapse - sunsetF16.lua - Completed and Working Scripts - CHDK Forum supplierdeeply

Night-time time-lapse - sunsetF16.lua

  • 40 Replies
Night-time time-lapse - sunsetF16.lua
« on: 01 / February / 2009, 11:17:39 »
This is a new version of the sunset time lapse script.

The script has been modified to achieve several goals -

- Move functionality that would be useful for other scripts into library files.
- Separate code into functions based on intended functionality (i.e. initCamera, initScript, calcNextExposure) and move functions into script specific library to increase script readability
- Save settings and exposure data so they may persist through script resets

built up the work of fbonomi and fudgey -,2156.msg20057.html


Offline fudgey

  • *****
  • 1705
  • a570is
Re: Night-time time-lapse - sunsetF16.lua
« Reply #1 on: 01 / February / 2009, 12:25:51 »
Hmm...  that can't be right... your zip has a copy of sunsetF15.lua renamed sunsetF16.lua... I guess you zipped in the wrong version?

Btw the name confuses me a bit since a couple of months ago I started improving sunsetF15 and named it sunsetF16 but never finished it.

Re: Night-time time-lapse - sunsetF16.lua
« Reply #2 on: 01 / February / 2009, 12:33:48 »
ah, i see the problem, thanks.

« Last Edit: 01 / February / 2009, 12:45:16 by mattkime »

Re: Night-time time-lapse - sunsetF16.lua
« Reply #3 on: 10 / February / 2009, 23:55:38 »
Hi everyone, I just tried sunsetF16, it dies on sunset line 12, initConfig:
It says current_tv is null.

Has anyone else experienced similar problems?

BTW, As much as I like the concept of LUALIB libraries, I'm rapidly coming to the conclusion that there's just not enough confidence that any of them, e.g.  date.lua, is inter-operable between different scripts that use it. There should probably be at least a numeric suffix, so let's just assume SunsetF15 uses Date.lua Version 1, then Date.lua is modified for SunsetF16, now SunsetF15 is possibly broken. It seems like a nice idea, but in practice, with many people developing, I think I'm going to stick with merging the library functions into the mainline script.

Also, huge kudos, to whoever started emu.lua, I like the concept and hope it continues to be developed. For example, I quickly found that it didn't have get_zoom() or set_zoom(), which were easy enough to add.

Re: Night-time time-lapse - sunsetF16.lua
« Reply #4 on: 11 / February / 2009, 00:20:11 »
I'm working on that problem tonight. i have no idea where or how current_tv is getting set to null.

SunsetF15 relies on the libraries it includes. SunsetF16 is being developed with libraries lacking the "f" prefix.

SunsetF16 and the lualibs i'm developing aren't quite ready for prime time. there are some bugs to be worked out. i posted them because people may still find them useful and perhaps someone smarter than me will fix my subtle problem.


Offline fudgey

  • *****
  • 1705
  • a570is
Re: Night-time time-lapse - sunsetF16.lua
« Reply #5 on: 11 / February / 2009, 12:27:19 »
Yes, library versioning is very much something that needs to be handled. But aside from propcase.lua, there are no official libraries yet. What mattkime is releasing here are development previews that we hope to include with CHDK distributions one day soon(ish).

Obviously, after a library is released with CHDK it can't be modified in a way which would make it incompatible with old scripts. Then the new version must be renamed (log.lua -> log2.lua for instance). My old libs had an "f-" prefix for "fudgey" so that they wouldn't reserve short, good names for generic libraries we may once decide to include in CHDK.

Merging library functions to your own version of a script is OK (even if not everyone is skilled enough to do that), and it may actually spare you some RAM when you strip away functions that aren't used from large libraries (or the other way around if it's some helper function that gets run once and then garbage collection gets rid of it).

Re: Night-time time-lapse - sunsetF16.lua
« Reply #6 on: 06 / April / 2009, 10:54:14 »
version 1.0.1 of sunsetF16.lua

- fixed infrequent crash.

to do - examine system which determines exposure. i need to do this for my own understanding but i may change the code as a result.


for my purposes the code is extremely stable. it _SHOULD_ be able to take pics forever. restarts should only be needed if the eye-fi card loses connection. however, i would be more comfortable stating this if it was thoroughly tested by others. i'm also interested in hearing what features others would like so it better suits their needs.


Offline jetzt

  • ****
  • 316
  • [A710IS,(SD200)]
Re: Night-time time-lapse - sunsetF16.lua
« Reply #7 on: 24 / May / 2009, 13:36:42 »
While trying this script my A710 {0.9.8-758} tells me:
Code: [Select]
:68 module 'util' not foung 00no field package.preload['util']Where can I find that lib and where do I have to put it? ::)

Take it as FAQ: Yes: Placing the content of the folder lualib from the zip to CHDK/LUALIB solved the problem. :D
« Last Edit: 24 / May / 2009, 14:21:09 by jetzt »

Re: Night-time time-lapse - sunsetF16.lua
« Reply #8 on: 02 / September / 2009, 09:47:42 »
anyone have issues with the length of exposure setting?  I have it set to just a couple settings for testing, and it is still doing loooooooong exposures.....thoughts? thanks!
Canon PowerShot S5 IS
chdk-fw:101b build:0.5.1-499
motion detect = MDFB-080419-DigicIII


Offline Mac

  • *
  • 40
Re: Night-time time-lapse - sunsetF16.lua
« Reply #9 on: 02 / September / 2009, 11:30:14 »
Hi mattkime!
Had a problem with downloading
Contain a number of extraneous folders and a number of zero content files.
Library directory was empty???


Related Topics