get_tv crashes Powershot SX110IS - Script Writing - CHDK Forum
supplierdeeply

get_tv crashes Powershot SX110IS

  • 6 Replies
  • 4114 Views
get_tv crashes Powershot SX110IS
« on: 01 / May / 2009, 12:01:54 »
Advertisements
Hi

I'm using autobuild 757 and trying to write a script for tv bracketing. At the beginning of my script I'm trying to read the current tv, at the end of my script I want to restore it. Unfortunatly the script crashes when it gets to the get_tv command, requiring a power cycle to get the cam working.

This is what UBasic Debugger says whenn running my code:

92 lines loaded
starting ...
>>> initializing...
*** shooting_get_user_av_id ***
Script has ended!
Ubasic error near Line 27: Parse err



What did I do wrong?

Here is my code:


@title shutter_bracket
rem version 122
rem -12 - +35

@param a start
@default a -3

@param b end
@default b 30

@param c stepsize
@default c 1

rem sleep before first shot
@param d wait (secs)
@default d 5

print "initializing..."
get_av z
get_tv y

rem check and calc params
if c < 1 then
print "Error: c < 1"
print "a: ",a, " b: ",b
print "c: ",c, " d: ",d
sleep 5000
end
endif

[...]



Any help would be highly appreciated

with kind regards

Errorsmith


Re: get_tv crashes Powershot SX110IS
« Reply #2 on: 16 / May / 2009, 04:23:59 »
I have a similar problem with get_tv using an A610 - camera shuts down.  This occurs when running the ult_intvl script with the current CHDK build.  get_av works okay but not get_tv.
Any ideas?

*

Offline fudgey

  • *****
  • 1705
  • a570is
Re: get_tv crashes Powershot SX110IS
« Reply #3 on: 16 / May / 2009, 04:51:25 »
I'll make a bold statement that get_tv has not been a command in ubasic since allbest became trunk in July 2007. As to why an invalid command would crash the camera, I have no clue... but I think you can use get_user_tv_id in place of get_tv in old scripts.

get_av is deprecated as well, but seems to be still implemented (it is an alias to the get_user_av_id command).

Yes, it seems wiki still lists get_tv in ubasic docs.


Re: get_tv crashes Powershot SX110IS
« Reply #4 on: 16 / May / 2009, 07:01:13 »
Thanks fudgey.

get_user_tv_id works but does not appear to be directly compatible with get_tv as the return values are mapped to shutter speeds differently?  Not too hard to fix, but I wonder how many other scripts still use get_tv...

*

Offline fudgey

  • *****
  • 1705
  • a570is
Re: get_tv crashes Powershot SX110IS
« Reply #5 on: 16 / May / 2009, 08:48:31 »
get_user_tv_id works but does not appear to be directly compatible with get_tv as the return values are mapped to shutter speeds differently?  Not too hard to fix, but I wonder how many other scripts still use get_tv...

Don't shoot me if I'm wrong but I think that's why get_tv and get_av are obsolete... they aren't mapped the same way in all cameras, so using them (or get_user_*_id) in scripts can only be recommended if the script first reads the value it later sets (if matching set_* function exists) and if this value happens to be more user friendly than ?v96 values.

In other words, I think the script you're attempting to use doesn't work properly with get_user_tv_id because was written for some other camera, not because that command is different from get_tv. But I may be wrong, I didn't check against ancient sources ;).

Re: get_tv crashes Powershot SX110IS
« Reply #6 on: 16 / May / 2009, 09:15:28 »
I'll go along with that - no one wants to go trawling through old code unless absolutely essential  :)
Thanks again.

 

Related Topics


SimplePortal 2.3.6 © 2008-2014, SimplePortal