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

uBasic get_time epoch option pretty please?

  • 16 Replies
  • 8272 Views
*

Offline fudgey

  • *****
  • 1705
  • a570is
Re: uBasic get_time epoch option pretty please?
« Reply #10 on: 17 / June / 2009, 17:34:11 »
Advertisements
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:

On the other hand adding more and more commands makes CHDK bigger and the script languages slower... for propcases we have a clean and portable way in Lua using CHDK/LUALIB/propcase.lua. If a useful property doesn't exist in the generated files, it needs to be added to svn.


*

Online reyalp

  • ******
  • 14118
Re: uBasic get_time epoch option pretty please?
« Reply #11 on: 17 / June / 2009, 17:41:30 »
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!
Since there are two main sets of property cases (digic II and digic III/IV) you can handle this with get_propset and then use variables to store the propcase numbers. If you run out of ubasic variables, it's time to go to lua anyway ;)

On the other hand adding more and more commands makes CHDK bigger and the script languages slower... for propcases we have a clean and portable way in Lua using CHDK/LUALIB/propcase.lua. If a useful property doesn't exist in the generated files, it needs to be added to svn.
The trivial wrappers needed to add stuff like this isn't a big deal, but I'd agree that functions that just set a propcase should just use the propcase functions (and conditionals as above if needed).
Don't forget what the H stands for.

Re: uBasic get_time epoch option pretty please?
« Reply #12 on: 17 / June / 2009, 19:05:33 »
... you can handle this with get_propset and then use variables to store the propcase numbers. If you run out of ubasic variables, it's time to go to lua anyway ;)

I used to write assembler for 8048: 1k ROM and 32 byte RAM that included return stack and 2 register sets :)  Got lots of variables to play with in ubasic! Yes I can add the get_propset.  Was unsure if you intended to add more useful status accessors to ubasic.  My testing indicated both 6 and 115 (DigicIII) props are read-only.  I should better document where I've been, testing cam's property values.

*

Online reyalp

  • ******
  • 14118
Re: uBasic get_time epoch option pretty please?
« Reply #13 on: 17 / June / 2009, 19:46:25 »
Please feel free to update/correct/expand http://chdk.wikia.com/wiki/Propertycase !

Also, if anyone wants to add the useful/well tested stuff from to propset*.h, that could be useful.
Don't forget what the H stands for.


Re: uBasic get_time epoch option pretty please?
« Reply #14 on: 20 / June / 2009, 21:54:50 »
Please feel free to update/correct/expand http://chdk.wikia.com/wiki/Propertycase !

Did some editing yesterday :)

Also, if anyone wants to add the useful/well tested stuff from to propset*.h, that could be useful.

Will CHDK compile on a 64-bit OS?  Slackware64-current if it matters.  Or should I install 32-bit slackware for this?  Still downloading stuff, gonna try it soon and find out.

*

Online reyalp

  • ******
  • 14118
Re: uBasic get_time epoch option pretty please?
« Reply #15 on: 20 / June / 2009, 22:20:44 »
Will CHDK compile on a 64-bit OS?  Slackware64-current if it matters.  Or should I install 32-bit slackware for this?  Still downloading stuff, gonna try it soon and find out.
Not a problem. I've built CHDK under 64 bit ubuntu, and know others use 64 bit linux as well. Getting the toolchain setup correctly under linux (32 or 64 bit) can be tricky, consult the wiki.
Don't forget what the H stands for.

Re: uBasic get_time epoch option pretty please?
« Reply #16 on: 21 / June / 2009, 00:54:25 »
Yeah I updated link to mpfr source as www.mpfr.org not reachable from here.

Edit: Second try compile, had to remove the arm9 flag...

main.elf -> main.bin
<< Leaving loader/a590
<< Leaving loader
>> Entering to CHDK
-> LUALIB/GEN/propset1.lua
-> LUALIB/GEN/propset2.lua
<< Leaving CHDK
dance -> DISKBOOT.BIN
**** Firmware creation completed successfully


Even better, it booted!  :lol
« Last Edit: 21 / June / 2009, 01:42:57 by scattered »

 

Related Topics


SimplePortal 2.3.6 © 2008-2014, SimplePortal