Skip to content

Commit 4c9922d

Browse files
authored
Finalize Takeoff Command Integration (#36)
* Fixed issue with readme * Integrate HRL Support (#8) * Added missing type hints * Refactored to cleanup message sending and added support to send msg until ack * Added support for new HRL messages * Updated devices to use tuple key and ensure msg target in network * Added requirement to clone repo in readme * Resolved grammatical error * Updated readme to reflect require_ack change * Updated python requirement in readme and updated setup version * Resolved errors in structuring named value int message * Cleaned up readme formatting * Created dependencies section in readme * Update Message Commands and Handlers (#15) * Add HRL Support (#10) * Fixed issue with readme * Integrate HRL Support (#8) * Added missing type hints * Refactored to cleanup message sending and added support to send msg until ack * Added support for new HRL messages * Updated devices to use tuple key and ensure msg target in network * Added requirement to clone repo in readme * Resolved grammatical error * Updated readme to reflect require_ack change * Updated python requirement in readme and updated setup version * Resolved errors in structuring named value int message * Cleaned up readme formatting * Created dependencies section in readme * Removed ros commands, fixed gps, renamed outgoingmsg to agentmsg, fixed ack issue * fixed setup version * Cleaned up debug messages and fixed readme example * Add Param Setting and Reading (#19) * Resolved typo in readme * Re-update send command methods to use timeout instead of infinite loop * Refactored various send message functions into single function * Implemented starter waypoint and mission support * Added mission to agent object * Updated agent to have name field * Rename timeout period in agent * Modified agentmsg to be parent class and updated send method to used full msg * Refactored send message to be more usable and added new commands * Added waypoint and takeoff messages * Added simple takeoff and takeoff command support * Add catches to prevent invalid altitude settings * Code cleanup * Added missing method type hints * Fixed mission init and msgmap init * Updated common messages to use msg timeout * Fixed variable naming in msgs * Updated senders to check ack instead of in retry function * Add support to set parameters * Added support to set parameters and started process of enabling reading parameters * Cleaned up agent and modified parameters stored to be circular buffer * Added interface to read parameters * Removed unused files * Added assertions to message construction to ensure proper msg type is provided * Added debug statements to parameter read method * Resolved bugs in message sending and message map * Wrapped up implementation of initial parameter setting and reading feature * Removed unused comments * Refactored send message implementation to create new thread on call * Refactored parameter implementation to use independent threads * Removed log option and made just debug * Cleaned up parameter read implementation * Update README to Reflect Usage Changes (#31) * Updated readme example to use latest version of pymavswarm * Updated readme example to use latest version of pymavswarm * Resolve param retry error * Fixed incorrect mavlink message sent on takeoff command (#35)
1 parent a11d1c8 commit 4c9922d

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

pymavswarm/Connection.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1129,7 +1129,7 @@ def sender(self, msg: TakeoffMsg, fn_id: int=0) -> None:
11291129
return
11301130

11311131
self.master.mav.command_long_send(msg.target_system, msg.target_comp,
1132-
mavutil.mavlink.MAV_CMD_NAV_LAND,
1132+
mavutil.mavlink.MAV_CMD_NAV_TAKEOFF,
11331133
0,
11341134
0, 0, 0, 0, 0, 0, msg.altitude)
11351135

@@ -1163,7 +1163,7 @@ def sender(self, msg: TakeoffMsg, fn_id: int=0) -> None:
11631163
return
11641164

11651165
self.master.mav.command_long_send(msg.target_system, msg.target_comp,
1166-
mavutil.mavlink.MAV_CMD_NAV_LAND,
1166+
mavutil.mavlink.MAV_CMD_NAV_TAKEOFF,
11671167
0,
11681168
0, 0, 0, 0, msg.lat, msg.lon, msg.altitude)
11691169

pymavswarm/msg/TakeoffMsg.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ class TakeoffMsg(AgentMsg):
1111
lon [float] : : Longitude - this is optional
1212
lat [float] : : Latitude - this is optional
1313
"""
14-
def __init__(self, altitude: float,
15-
msg_type: str,
14+
def __init__(self, msg_type: str,
15+
altitude: float,
1616
target_system: int,
1717
target_comp: int,
1818
retry: bool,

pymavswarm/param/Parameter.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def __init__(self, sys_id: int,
2929
self.param_id = param_id
3030
self.param_value = param_value
3131
self.retry = retry
32-
self.param_timeout = msg_timeout
32+
self.msg_timeout = msg_timeout
3333
self.ack_timeout = ack_timeout
3434

3535
return

0 commit comments

Comments
 (0)