Skip to content

Commit

Permalink
Test file for follow me
Browse files Browse the repository at this point in the history
  • Loading branch information
SantamRC committed Mar 14, 2024
1 parent 3192cae commit 8ce11d8
Showing 1 changed file with 55 additions and 0 deletions.
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)

0 comments on commit 8ce11d8

Please sign in to comment.