mirror of https://github.com/ArduPilot/ardupilot
1d810bfa6f
This script uses the scaled output from the antennatracker servos and map them to corresponding Pelco-D messages to be sent via a RS-485 interface to a motorized base (can be anything from motorized tracker to a PTZ camera). If your FCU doesnt offer a RS-485 interface by default, you can use or TTL-RS485- or USB-RS485-adapters. Pelco-D allows to control using either speed-/differential- or absolute-control control of the pan-/tilt-axis. Currently the script uses speed based control using by mapping the "ContinuousRotation" type servos outputs to the corresponding Pelco-D messages. The absolute control messages are implemented nevertheless for future use. The script assumes therefor at least the following parameters to be set: SCR_ENABLE = 1 SERVO_PITCH_TYPE = 2 # ContinuousRotation type servo SERVO_YAW_TYPE = 2 # ContinuousRotation type servo SERIALx_PROTOCOL = 28 # serial port used by luascript Additionally the PITCH2SRV and YAW2SRV tuning needs to be done as described by the antennatracker description. Also keep attention to the PITCH_MIN, PITCH_MAX and YAW_RANGE parameters to fit your Pelco-D hardware! |
||
---|---|---|
.. | ||
Aerobatics/FixedWing | ||
WebExamples | ||
BattEstimate.lua | ||
BattEstimate.md | ||
Gimbal_Camera_Mode.lua | ||
Gimbal_Camera_Mode.md | ||
Heli_IM_COL_Tune.lua | ||
Heli_IM_Col_Tune.md | ||
Heli_idle_control.lua | ||
Heli_idle_control.md | ||
Hexsoon LEDs.lua | ||
Hexsoon LEDs.md | ||
MissionSelector.lua | ||
MissionSelector.md | ||
ONVIF_Camera_Control.lua | ||
ONVIF_Camera_Control.md | ||
QuadPlane_Low_Alt_FW_mode_prevention.lua | ||
QuadPlane_Low_Alt_FW_mode_prevention.md | ||
README.md | ||
RockBlock.lua | ||
RockBlock.md | ||
Script_Controller.lua | ||
Script_Controller.md | ||
SmartAudio.lua | ||
SmartAudio.md | ||
VTOL-quicktune.lua | ||
VTOL-quicktune.md | ||
ahrs-source-extnav-optflow.lua | ||
ahrs-source-extnav-optflow.md | ||
copter-deadreckon-home.lua | ||
copter-deadreckon-home.md | ||
copter_terrain_brake.lua | ||
copter_terrain_brake.md | ||
forward_flight_motor_shutdown.lua | ||
forward_flight_motor_shutdown.md | ||
leds_on_a_switch.lua | ||
leds_on_a_switch.md | ||
motor_failure_test.lua | ||
motor_failure_test.md | ||
mount-poi.lua | ||
mount-poi.md | ||
net_webserver.lua | ||
net_webserver.md | ||
pelco_d_antennatracker.lua | ||
pelco_d_antennatracker.md | ||
plane_package_place.lua | ||
plane_package_place.md | ||
plane_precland.lua | ||
plane_precland.md | ||
plane_ship_landing.lua | ||
revert_param.lua | ||
revert_param.md | ||
rover-quicktune.lua | ||
rover-quicktune.md | ||
runcam_on_arm.lua | ||
runcam_on_arm.md | ||
winch-control.lua | ||
winch-control.md |
README.md
LUA Applets
Unlike the code in the examples directory, these are complete applets that required no user editing of the file for use. Each one has an .md file describing its operation and any switches or parameters in ArduPilot that are required for operation. The user only has to copy the applet to APM/scripts directory on their SD card, in order to install. Of course, scripting must be enabled via SCR_ENABLE =1 and the autopilot be capable of running scripts. See the Wiki for Lua Scripting under Advanced Configuration.
Each will have a Wiki entry mirroring the .md file'd contents with a link back to this directory.