S100, Using the RING FUNC key in scripts? - Script Writing - CHDK Forum supplierdeeply

S100, Using the RING FUNC key in scripts?

  • 8 Replies
  • 2956 Views
S100, Using the RING FUNC key in scripts?
« on: 24 / February / 2013, 23:55:13 »
Advertisements
I'm trying to get a time lapse script to use the assigned property of the RING FUNC key on a S100.  There was some talk about this in another thread (http://chdk.setepontos.com/index.php?topic=6829.msg72927#msg72927 and http://chdk.setepontos.com/index.php?topic=7887.msg90866#msg90866), but as far as I can tell, no resolution. 

Is there a specific name for this key to use in scripts?
Does this key, when referenced in scripts, just delete the previous picture?

Thanks, been looking at old threads for the past couple of hours on this.

Steve

*

Offline lapser

  • *****
  • 1093
Re: S100, Using the RING FUNC key in scripts?
« Reply #1 on: 25 / February / 2013, 04:50:08 »
http://chdk.setepontos.com/index.php?topic=8696.0

It looks like it accessed as the "erase" button.
EOS-M3_120f / SX50_100b / SX260_101a / G1X_100g / D20_100b
https://www.youtube.com/user/DrLapser/videos

Re: S100, Using the RING FUNC key in scripts?
« Reply #2 on: 25 / February / 2013, 08:26:46 »
I still get the red error message as a script is running, "uBASIC:49 Unk key".  I've used KEY_ERASE and ERASE for the reference in the script, with the same result.  The RING FUNC key is assigned to sleep the LCD.  Below is the script:



rem Author - Keoeeit
 rem Upgraded by Mika Tanninen
 rem Time accuracy and shutdown for a710is by Viktoras Stanaitis
 rem h-accuracy for delay, j-accuracy for interval
 rem must have print set to sleep, alt to turn of power saving
 h=-1
 j=-1755
 @title Ultra Intervalometer Sleep
 @param a Delay 1st Shot (Mins)
 @default a 0
 @param b Delay 1st Shot (Secs)
 @default b 0
 @param c Number of Shots (0 inf)
 @default c 0
 @param d Interval (Minutes)
 @default d 0
 @param e Interval (Seconds)
 @default e 10
 @param f Interval (10th Seconds)
 @default f 0
 n=0
 t=(d*600+e*10+f)*100+j
 if c<1 then let c=0
 if t<100 then let t=100
 g=(a*60)+b+h
 if g<=0 then goto "interval"
 for m=1 to g
  print "Intvl Begins:", (g-m)/60; "min", (g-m)%60; "sec"
  sleep 930
  next m
 


 :interval
   n=n+1
   if c=0 then print "Shot", n else print "Shot", n, "of", c
   shoot
   
press "ERASE"
sleep 150
release "ERASE"

   
   
   if n=c then shut_down
   sleep t
   

   goto "interval"

*

Offline msl

  • *****
  • 1269
  • A720 IS, SX220 HS 1.01a
    • CHDK-DE links
Re: S100, Using the RING FUNC key in scripts?
« Reply #3 on: 25 / February / 2013, 08:32:38 »
Use lower case: press "erase". Upper case for the keys is the wrong syntax.

msl
CHDK-DE:  CHDK-DE links


Re: S100, Using the RING FUNC key in scripts?
« Reply #4 on: 25 / February / 2013, 08:46:12 »
Does this key, when referenced in scripts, just delete the previous picture?
When a script is running,  all the camera keys are essentially disconnected from the Canon firmware.  So nothing gets deleted unless your script has code to do so.
Ported :   A1200    SD940   G10    Powershot N    G16

Re: S100, Using the RING FUNC key in scripts?
« Reply #5 on: 25 / February / 2013, 09:27:01 »
Ok, the lower case erase worked.  Thank you!! 

Is there a way to not have the LCD go on at all during a time lapse script?  The image being taken still appears on the screen just before and just after the shutter.

Steve

Re: S100, Using the RING FUNC key in scripts?
« Reply #6 on: 25 / February / 2013, 10:09:47 »
Is there a way to not have the LCD go on at all during a time lapse script? 
On cameras with an optical viewfinder (OVF) is possible to set the display to stay OFF.  But for the others,  what you are seeing is about as good as it gets.   More info on power saving techniques here :  http://chdk.setepontos.com/index.php?topic=9049.0 and http://chdk.wikia.com/wiki/Battery_Intervalometer
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline lapser

  • *****
  • 1093
Re: S100, Using the RING FUNC key in scripts?
« Reply #7 on: 25 / February / 2013, 14:39:09 »
Is there a way to not have the LCD go on at all during a time lapse script?  The image being taken still appears on the screen just before and just after the shutter.
You can shorten the amount of time the screen is on, but it still will flash. You probably want to use the set_backlight function, not the "erase" button. If you sleep 10 msec at a time, and set_backlight 0 every 10 msec, that's the best you can do.

http://chdk.wikia.com/wiki/Script_commands#set_backlight.28.29
EOS-M3_120f / SX50_100b / SX260_101a / G1X_100g / D20_100b
https://www.youtube.com/user/DrLapser/videos


*

Offline srsa_4c

  • ******
  • 4263
Re: S100, Using the RING FUNC key in scripts?
« Reply #8 on: 25 / February / 2013, 15:31:17 »
You probably want to use the set_backlight function, not the "erase" button.
set_backlight only has an influence on the backlight. On the other hand, the "sleep" or "display off" function assigned to the ring func button shuts down live view and the sensor too (most probably), so it conserves more power. The only way to use the latter is to use keypresses from a script, there isn't a way to use it directly.

 

Related Topics