I successfully forced my will on the pixhawk and I got the PWM up to 32767 which is 32ms for the Canon.
That would let you use values up to 65 mSec.
--[[@title PWM Tester--]]set_console_layout(1, 1, 44, 10)print("USB pwm test started")set_config_value(121,1) -- make sure USB remote is enabledcount=0repeat x=get_usb_power(0) if ( x > 0 ) then print("width ="..(x*1).." mSec") count=count+1 enduntil is_pressed("menu")set_config_value(121,0) -- make sure USB remote is disabled
YOu got that right and I did go up to 65000 initially and it was stable BUT at the first restart it automatically rewrote to 32767.
Even though I can only speculate, as I am neither a computer nor an electronics expert, the 32*1024 on a 32 bit CPU looks to me as some system limit that I don't want to mess with.
I have made the circuit ready but it is not working correctly for some reason. It gets some PWMs, but it doesn't make sense.
Quote from: netptl39 on 09 / July / 2015, 09:13:50YOu got that right and I did go up to 65000 initially and it was stable BUT at the first restart it automatically rewrote to 32767. How did you set that? In Mission Planner? Or manually editing the MAVLink file?
The code alterations are relatively minor and there is not likely to be other talk about the rest of the script so I would not favour a split.
Occasionally there is a 37-38 but I guess that is when it misses a pause.
Quote from: netptl39 on 09 / July / 2015, 12:11:56 Occasionally there is a 37-38 but I guess that is when it misses a pause. What determine the time between pulses?
function pwm1(pwidth) if( repeat_check("mode=2",pwidth ) >= PWM_required_repeats ) then usb_shooting_mode = 2 -- request the next shot end end function pwm2(pwidth) if( repeat_check("mode=1",pwidth ) >= PWM_required_repeats ) then usb_shooting_mode = 1 -- neutral position - do nothing end end function pwm3(pwidth) if( repeat_check("nothing",pwidth ) >= PWM_required_repeats ) then --usb_shooting_mode = 1 -- set camera as waiting to shoot end end function pwm4(pwidth) repeat_check("shut down",pwidth) shut_down() -- = 0 -- put camera into playback / sleep mode end function pwm_mode() -- sample PWM code for Gentles gentwire-usb2 - note that values are in milliseconds local pw = get_usb_power(2) * usb_precision if pw > 0 then if ((pw < 1) or (pw > 20)) then repeat_check("invalid pulse",pw) elseif pw < 5 then pwm1(pw) elseif pw < 10 then pwm2(pw) elseif pw < 15 then pwm3(pw) elseif pw < 20 then pwm4(pw) elseif pw < 225 then repeat_check("idle pulse",pw) end end end
QuoteWhat determine the time between pulses?It might sound strange, but I have no idea. I will look into it once I have a little time.
What determine the time between pulses?
Pixhawk generates output continuously so Camera continuously gets PWM input. If each input is considered as executable we will have a huge backlog pile-up. this might be a problem.The idea of executing only the first and disregard subsequent identical shoot inputs within 0.55s (so far the minimum shot interval I have seen) seems necessary. Unfortunately this cannot be the same for the pause(usb_shooting_mode = 1 ) as 0.6-0.7s shot interval should be usable.
Started by Jim
Completed and Working Scripts
Started by nadavofi
« 1 2 »
Started by Benny_H88
« 1 2 3 »
Started by davefolts
Creative Uses of CHDK
Started by GlobalSurvey
General Help and Assistance on using CHDK stable releases