Need some help with a Canon S100 script - Script Writing - CHDK Forum supplierdeeply

Need some help with a Canon S100 script

  • 2 Replies
  • 2568 Views
Need some help with a Canon S100 script
« on: 11 / August / 2013, 08:29:14 »
Advertisements
Trying to get the below script working.. On the S100 screen, its displaying that it received "ch1up","ch1mid". and "ch1down" but its not executing anything..  Can anyone see an error with the script?

Code: [Select]
@title 3DR Shooter
rem author Brandon Basso, 3D Robotics
rem author Dave Mitchell - dave@zenoshrdlu.com
rem This script is based on the basic Gentled CHDK2 script
rem It takes pictures and sets zooms to a few different levels

@param o Zoom-extended
@default o 100
@param i Zoom-stowed
@default i 30
@param s Zoom-shoot
@default s 10

while 1
   do
      k = get_usb_power
   until k>0
   if k < 5 then gosub "ch1up"
   if k > 4 and k < 8 then gosub "ch1mid"
   if k > 7 and k < 11 then gosub "ch1down"
   if k > 10 and k < 14 then gosub "ch2up"
   if k > 13 and k < 17 then gosub "ch2mid"
   if k > 16 and k < 20 then gosub "ch2down"
   if k > 19 then print "error"
wend
end

:ch1up
   print "Ch1Up-Shoot"; k
   set_zoom s
   shoot
   sleep 1000
   return

:ch1mid
   print "Ch1Mid-Stowed"; k
   set_zoom i
   sleep 1000
   return

:ch1down
   print "Ch1Down-Extended"; k
   set_zoom o
   sleep 1000
   return

:ch2up
   return

:ch2mid
   return

:ch2down
   return


Re: Need some help with a Canon S100 script
« Reply #1 on: 11 / August / 2013, 08:40:36 »
What the...  of course immediately after posting my question it starts working.. ARGH!

Re: Need some help with a Canon S100 script
« Reply #2 on: 11 / August / 2013, 23:03:18 »
Trying to get the below script working.. On the S100 screen, its displaying that it received "ch1up","ch1mid". and "ch1down" but its not executing anything..  Can anyone see an error with the script?
That can happen if you are running the script when the camera is in "playback" rather than "shooting" mode.

Adding this code to your script (before the first while statement) will put the camera into shooting mode if you forget :

Code: [Select]
if get_mode = 0 then goto "in_rec"
  set_record 1
:wait_rec
  sleep 100
  if get_mode <> 0 then goto "wait_rec"
:in_rec



Ported :   A1200    SD940   G10    Powershot N    G16

 

Related Topics