Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test module file for follow me #1339

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 55 additions & 0 deletions MAVProxy/modules/mavproxy_followme.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
#!/usr/bin/env python

import time, math
from pymavlink import mavutil
from MAVProxy.modules.lib import mp_module
from MAVProxy.modules.lib.mp_settings import MPSetting


class TestModule(mp_module.MPModule):
def __init__(self, mpstate):
super(TestModule, self).__init__(mpstate, "followme", "followme module")
self.add_command(
"followme", self.followme, "show some information about follow me"
)
self.add_command(
"followme2", self.followme2, "show some information about follow me"
)

def followme(self, args):
self.master.mav.command_long_send(
self.settings.target_system,
self.settings.target_component,
mavutil.mavlink.MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW,
0,
0,
0,
10,
10,
16,
0,
0,
)

def followme2(self, args):
self.master.mav.command_long_send(
self.settings.target_system,
self.settings.target_component,
mavutil.mavlink.MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW,
0,
0,
150,
10,
10,
16,
0,
0,
)

def mavlink_packet(self, m):
"""handle a mavlink packet"""


def init(mpstate):
"""initialise module"""
return TestModule(mpstate)
Loading