You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

21 lines
584 B

-- Testing set_output_pwm_chan_timeout
--
-- This will set MAIN1 servo to 1700 pwm for 1 second,
-- then assigned function behavior for 1 second, and then 1100 pwm for 1 second
local flipflop = true
function update()
if flipflop then
SRV_Channels:set_output_pwm_chan_timeout(0, 1700, 1000)
gcs:send_text(6, "flip---")
else
SRV_Channels:set_output_pwm_chan_timeout(0, 1100, 1000)
gcs:send_text(6, "---flop")
end
flipflop = not flipflop
return update, 2000
end
gcs:send_text(6, "servo_override.lua is running")
return update, 1000