release("shoot_half")sleep(1000)set_zoom(zoom_position)sleep(1000)
local count = get_exp_count()press("shoot_full_only")repeat sleep(10) until get_exp_count() ~= countrelease("shoot_full_only")
I have found different versions of how to wait for a recording to be made. Which is the preferred method?If is a disadvantage if sleep is 1 instead of 10?
Code: [Select]local count = get_exp_count()press("shoot_full_only")repeat sleep(10) until get_exp_count() ~= countrelease("shoot_full_only")
release("shoot_half")repeat sleep(10) until not get_shooting()
You can wait for get_shooting() to go false, but this requires that you have already released half press, and it's not guaranteed the shot will be finished at that point.
set_zoom() should wait for the zoom to complete, but it's possible a small additional delay is needed.
buffer_mode='sync'
I think I have to do something with the focus. Sometimes the focus distance has big variations (around 200)
I still have some question and I’m not sure if I can damage the cam if I do this:1) What happens if I set focus manually on beginning and the zoom changes?
2) What happens if I change zoom in ‘half shoot’?
I'm not sure what you mean? Setting MF and focus distance before setting zoom should fine, as much as these functions are ever fine in CHDK.
The Canon firmware doesn't let you do this using normal controls, so I would proceed with caution, or a camera you don't care much about
raw data not available
-- if warning LED specified, make sure it's turned off here if ui_interval_warn_led then set_led(ui_interval_warn_led,0) end ---------------------------------------------------------------------------------- -- Begin My Code shot_count = i if shot_count >= pre_shots then -- change the zoom position after user defined shot interval - reset focus and exposure if necessary zoom_pass = ((shot_count-pre_shots)%shots_per_step == 0) if zoom_pass then if ( (( zoom_direction >0) and (zoom_position>zoom_position_stop )) or (( zoom_direction <0) and (zoom_position<zoom_position_stop ))) then zoom_pass = false else if (half_shoot == true) then release("shoot_half") repeat sleep(10) until not get_shooting() sleep(Delay_after_Half) half_shoot = false print('Release Half') end print("setting zoom step:",zoom_position) set_zoom(zoom_position) sleep(Delay_after_Zoom) zoom_position = zoom_position + zoom_direction end end else print("Pre shoot") end -- Half shoot ------------------------------- if (half_shoot == false) then local fault = false local timeout = get_tick_count()+5000 press("shoot_half") print('Press Half') repeat sleep(10) fault = (get_tick_count() > timeout) until (get_shooting() == true) or fault if fault then print("Error Timeout Half") logdesc("Error Timeout Half"); end half_shoot = true end local dof=get_dofinfo() log:set{ focus_state=bool_to_number[get_focus_ok()], focus=dof.focus, focal_length=dof.focal_length, eff_focal_length=dof.eff_focal_length, zoom_step=get_zoom(), } -- End My Code ---------------------------------------------------------------------------------- exp:run()
My script is working very well. Only the exposure control is missing. Now maybe I thought too easy. I have integrated the following code in rawopint (before exp: run ()). As soon as the camera went into ‘Half Press Release’ and ‘Half Press’ again I get the error message in rawop.meter:
Maybe I'm missing something, but rawop.meter is only valid in the raw hook, after a shot has been taken but before the image has been processed.
but you might be able to use some of the lower level functions without too much work, e.g. call meter in the raw hook, and the rest after half press is released.
One thing you'll need to watch out for is the aperture changing with zoom.
Alternately, you could get scene brightness from BV between shots instead of meter, since you're doing a half press per shot anyway.
Quote from: reyalp on 23 / April / 2018, 13:10:58but you might be able to use some of the lower level functions without too much work, e.g. call meter in the raw hook, and the rest after half press is released. If I understand you correctly:I could do the zoom change after calc_exposure_params() and before set_cam_exposure_params()?
Started by jjudd General Help and Assistance on using CHDK stable releases
Started by fusionstream Script Writing
Started by mdebono Script Writing
Started by sarkar « 1 2 » Script Writing
Started by waldisobon Script Writing