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

Chat: target sysid fix #1295

Merged
merged 2 commits into from
Jan 2, 2024
Merged
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
"parameters": {
"type": "object",
"properties": {
"target_system": {"type": "integer", "minimum":0, "maximum":255, "description": "vehicle autopilot System ID. normally 1"},
"target_component": {"type": "integer", "minimum":0, "maximum":255, "description": "vehicle autopilot Component ID. normally 1"},
"target_system": {"type": "integer", "minimum":0, "maximum":255, "description": "vehicle autopilot System ID. can be omitted"},
"target_component": {"type": "integer", "minimum":0, "maximum":255, "description": "vehicle autopilot Component ID. can be omitted"},
"frame": {"type": "integer", "minimum":0, "maximum":21, "description": "altitude type. see MAV_FRAME. 0 for altitude above sea level, 3 for altitude above home, 10 for altitude above terrain"},
"command": {"type": "integer", "minimum":0, "maximum":65535, "description": "MAVLink command id. See MAV_CMD for a full list of available commands"},
"current": {"type": "integer", "description": "not used. always zero"},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
"type": "object",
"properties": {
"time_boot_ms": {"type": "integer", "description": "system timestamp. can be left as 0"},
"target_system": {"type": "integer", "minimum":0, "maximum":255, "description": "vehicle autopilot System ID. normally 1"},
"target_component": {"type": "integer", "minimum":0, "maximum":255, "description": "vehicle autopilot Component ID. normally 1"},
"target_system": {"type": "integer", "minimum":0, "maximum":255, "description": "vehicle autopilot System ID. can be omitted"},
"target_component": {"type": "integer", "minimum":0, "maximum":255, "description": "vehicle autopilot Component ID. can be omitted"},
"coordinate_frame": {"type": "integer", "minimum":0, "maximum":21, "description": "altitude type. see MAV_FRAME. 5 for altitude above sea level, 6 for altitude above home, 11 for altitude above terrain"},
"type_mask": {"type": "integer", "minimum":0, "maximum":65535, "description": "Bitmap to indicate which dimensions should be ignored by the vehicle. see POSITION_TARGET_TYPEMASK. If location (e.g. lat_int, lon_int and alt) are sent use 3576. If a location (e.g. lat_int, lon_int and alt) and yaw are sent use 2552. If velocity (e.g. vx, vy, vz) is sent use 2552. if velocity (e.g. vx, vy, vz) and yaw are sent use 2503. If only yaw is sent use 2559"},
"lat_int": {"type": "integer", "description": "latitude in degrees * 10^7"},
Expand Down
4 changes: 2 additions & 2 deletions MAVProxy/modules/mavproxy_chat/chat_openai.py
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,7 @@ def get_location_plus_offset(self, arguments):

# send a mavlink command_int message to the vehicle
def send_mavlink_command_int(self, arguments):
target_system = arguments.get("target_system", 1)
target_system = arguments.get("target_system", self.mpstate.settings.target_system)
target_component = arguments.get("target_component", 1)
frame = arguments.get("frame", 0)
if ("command" not in arguments):
Expand Down Expand Up @@ -519,7 +519,7 @@ def send_mavlink_set_position_target_global_int(self, arguments):
if arguments is None:
return "send_mavlink_set_position_target_global_int: arguments is None"
time_boot_ms = arguments.get("time_boot_ms", 0)
target_system = arguments.get("target_system", 1)
target_system = arguments.get("target_system", self.mpstate.settings.target_system)
target_component = arguments.get("target_component", 1)
coordinate_frame = arguments.get("coordinate_frame", 5)
type_mask = arguments.get("type_mask", 0)
Expand Down