uBasic get_time epoch option pretty please? - Script Writing - CHDK Forum supplierdeeply

uBasic get_time epoch option pretty please?

  • 16 Replies
  • 8261 Views
uBasic get_time epoch option pretty please?
« on: 13 / June / 2009, 02:20:24 »
Advertisements
Is there a method to access epoch time in uBasic?  My searching didn't turn up anything.

(epoch time is time in seconds from some arbitrary point, eg. 1/1/1970 for unix).

*

Online reyalp

  • ******
  • 14117
Re: uBasic get_time epoch option pretty please?
« Reply #1 on: 13 / June / 2009, 02:28:16 »
This is not currently available in ubasic. It is available in lua, via the standard os functions.
Don't forget what the H stands for.

Re: uBasic get_time epoch option pretty please?
« Reply #2 on: 13 / June / 2009, 04:28:46 »
This is not currently available in ubasic. It is available in lua, via the standard os functions.

Yes, you can tell I'm avoiding Lua, perhaps it's time to change over.  See what tomorrow brings...

Re: uBasic get_time epoch option pretty please?
« Reply #3 on: 13 / June / 2009, 06:14:51 »
As a matter of interest, what do you need that function for ?


Re: uBasic get_time epoch option pretty please?
« Reply #4 on: 13 / June / 2009, 07:27:15 »
As a matter of interest, what do you need that function for ?

For long interval timelapse script I'm working on, makes working out time remaining, or time difference, across midnight a bit easier to work with. 

Re: uBasic get_time epoch option pretty please?
« Reply #5 on: 13 / June / 2009, 08:45:25 »
Just for the record, that is how the SDM time-lapse works :-


http://stereo.jpn.org/eng/sdm/tlapse.htm
http://stereo.jpn.org/eng/sdm/tlapse2.htm


SDM 1.81 will also display time remaining (in days, hours, minutes and seconds) and shots remaining before the card is filled.

Re: uBasic get_time epoch option pretty please?
« Reply #6 on: 13 / June / 2009, 10:11:55 »
Just for the record, that is how the SDM time-lapse works :-

http://stereo.jpn.org/eng/sdm/tlapse.htm
http://stereo.jpn.org/eng/sdm/tlapse2.htm

But there's no script at those links, been there a few times.

Re: uBasic get_time epoch option pretty please?
« Reply #7 on: 13 / June / 2009, 10:21:19 »
Temporarily rename your existing DISKBOOT.BIN and download the SDM version for your camera from SDM website.

Also download Common_files.zip.

In the Scripts folder you will find time_lapse.bas.

Copy to your existing Scripts folder.


*

Online reyalp

  • ******
  • 14117
Re: uBasic get_time epoch option pretty please?
« Reply #8 on: 13 / June / 2009, 19:38:49 »
This is not currently available in ubasic. It is available in lua, via the standard os functions.

Yes, you can tell I'm avoiding Lua, perhaps it's time to change over.  See what tomorrow brings...
It would be pretty trivial to add to ubasic, but lua is a far more flexible language.
Don't forget what the H stands for.

Re: uBasic get_time epoch option pretty please?
« Reply #9 on: 17 / June / 2009, 08:58:28 »
Well I went back to the ticks counter, is working well now without playing games with 'real time'.  Too steep a learning curve grok camera stuff as well as learn Lua :) 

Now I'm using get_prop for some camera features, these should be 'get_some_feature' some time to hide the property number and to work across different cams?  With a590 reliably using digic III's:

6 - focus mode 0, 1, 3, 4, 5 - normal, macro, infinity, manual, super-macro(sx10)

115 - camera ready 0, 1 - no, yes (indicates camera is focused, for fast autofocus or manual focus set)

Still need a590 LED control, shut_down doesn't... Dunno where to start looking for these.

Cheers!

 

Related Topics


SimplePortal 2.3.6 © 2008-2014, SimplePortal