Python Script not releasing control

I wrote a python script to move the elevator, but after it finishes running I do not have control of the elevator. I can move the elevator with my transmitter before running the script, but not after. I tried adding a line to change the mode back to manual, but that did not work. The print window reports that I start in Manual mode and I finish in Manual mode.

print 'Start Script’
mode = cs.mode
print mode
elev = cs.ch2in
print elev
elev_up = elev + 200
print elev_up
elev_dn = elev - 200
print elev_dn
Script.SendRC(2,elev,True)
Script.Sleep(2000)
Script.SendRC(2,elev_up,True)
Script.Sleep(2000)
Script.SendRC(2,elev_dn,True)
Script.Sleep(2000)
Script.SendRC(2,elev,True)
Script.ChangeMode(‘Manual’)
mode = cs.mode
print mode
print ‘Script Stop’

you need to send pwm’s of 0 to release.

1 Like

That worked!!!

Thank you very much.