Jump to content

CHDK code? Should be C language for those programmers here.

Flight1sim

Canon Hack Development Kit is like an unlocked firmware for Canon Point-And-Shoots.

 

I want to modify this script to use the control dial on the front of the camera instead of the buttons for manual focusing (something restricted using default firmware):

Script Code (save as "ZoomVdeo.bas" to your /CHDK/SCRIPTS/ folder)

rem mart22, based on kamil@title Zoom and Focus videos=3z=sget_prop 12 qif q=0 then set_prop 12 1press "shoot_half"sleep 800click "shoot_full":loopwait_clickif is_key "zoom_in" then goto "in"if is_key "zoom_out" then goto "out"if is_key "erase" then set_focus 59if is_key "up" then set_focus 120if is_key "set" then set_focus 600if is_key "down" then set_focus 2000if is_key "display" then set_focus 65535if is_key "left" then set_zoom_rel -15if is_key "right" then set_zoom_rel 15if is_key "shoot_half" then goto "changestep"if is_key "shoot_full" then goto "xend"if is_key "menu" then goto "xend"goto "loop":changestepif s=7 then s=1 else s=s+2z=sprint "step ",zgoto "loop":inif z<0 then z=1if z>13 then z=13set_zoom_rel zget_zoom rprint "zoom ", rgoto "loop":outif z<0 then z=1if z>13 then z=13set_zoom_rel -zget_zoom rprint "zoom ", rgoto "loop":xendclick "shoot_full"set_prop 12 qend

Site: http://chdk.wikia.com/wiki/UBASIC/Scripts:_Easy_Zoom_%26_MF_while_Video_Recording

 

Any help here?

Are you new? Please read CoC  Before posting! PLEASE SELECT 'AUTOMATIC' FOR FONT COLOR FOR US DARK THEME USERS (Only for dark shades)If you can read this, it means you need to change to NIGHT THEME (bottom left above LMG logo) Please follow your threads and Quote people when replying to them. Mark your problem as solved if answered. Don't spam, nobody likes a spammer. DO NOT QUOTE IMAGES! BE NICE!

Link to comment
Share on other sites

Link to post
Share on other sites

i kinda know the basics of CDHK and magic lantern.

never looked in the code tohu, but i guess if you find the line that is defines the actions of the wheel in front you might be able to change it by just changing words and/or code paths.

 

you might want to look into magic lantern, it's a bit more advanced then CDHK and based on the CDHK files, but adds way more options, maybe it's glued into that.

 

EDIT:

if i remember correctly, you need to use linux to open the source code completely and see all of the lines in the files, could be wrong thou.(atleast ML required linux for something)

May the light have your back and your ISO low.

Link to comment
Share on other sites

Link to post
Share on other sites

i kinda know the basics of CDHK and magic lantern.

never looked in the code tohu, but i guess if you find the line that is defines the actions of the wheel in front you might be able to change it by just changing words and/or code paths.

 

you might want to look into magic lantern, it's a bit more advanced then CDHK and based on the CDHK files, but adds way more options, maybe it's glued into that.

Sadly Magic Lantern only works on DSLR's

Do you know of any way to make it work on a PowerShot G12? (sort of a semi-Dslr really)

Are you new? Please read CoC  Before posting! PLEASE SELECT 'AUTOMATIC' FOR FONT COLOR FOR US DARK THEME USERS (Only for dark shades)If you can read this, it means you need to change to NIGHT THEME (bottom left above LMG logo) Please follow your threads and Quote people when replying to them. Mark your problem as solved if answered. Don't spam, nobody likes a spammer. DO NOT QUOTE IMAGES! BE NICE!

Link to comment
Share on other sites

Link to post
Share on other sites

Sadly Magic Lantern only works on DSLR's

Do you know of any way to make it work on a PowerShot G12? (sort of a semi-Dslr really)

 

sadly not, i guess this topic might be more something for the software/coding/programming section of this forum thou, since most people here don't fiddle around with the codes themselves if they install CDHK or ML.

May the light have your back and your ISO low.

Link to comment
Share on other sites

Link to post
Share on other sites

sadly not, i guess this topic might be more something for the software/coding/programming section of this forum thou, since most people here don't fiddle around with the codes themselves if they install CDHK or ML.

Well thanks anyways! I got another script that might work too so it might be solved

Are you new? Please read CoC  Before posting! PLEASE SELECT 'AUTOMATIC' FOR FONT COLOR FOR US DARK THEME USERS (Only for dark shades)If you can read this, it means you need to change to NIGHT THEME (bottom left above LMG logo) Please follow your threads and Quote people when replying to them. Mark your problem as solved if answered. Don't spam, nobody likes a spammer. DO NOT QUOTE IMAGES! BE NICE!

Link to comment
Share on other sites

Link to post
Share on other sites

Well thanks anyways! I got another script that might work too so it might be solved

 

good luck, hopefully it works.

May the light have your back and your ISO low.

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×