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

Scripting: Update Rockblock and MAVLinkHL scripts #29192

Merged
merged 1 commit into from
Feb 7, 2025

Conversation

stephendade
Copy link
Contributor

Updating the RockBlock and MAVLinkHL scripts to take advantage of the new gcs:run_command_int command.

Also added the gcs:run_command_long lua binding

Trying to debug the merge commits this time....

@stephendade stephendade marked this pull request as ready for review January 30, 2025 10:24
@stephendade stephendade force-pushed the rockblock4 branch 4 times, most recently from 400b90e to c77ba5d Compare January 30, 2025 10:30
@stephendade stephendade reopened this Jan 30, 2025
@stephendade
Copy link
Contributor Author

Having trouble with git here ... I can't find any merge commits in my tree, so not sure why Github thinks there is a merge commit in here.

Sigh .... will leave this for tomorrow.

@stephendade stephendade force-pushed the rockblock4 branch 2 times, most recently from c307eb8 to 6bfe458 Compare February 4, 2025 09:51
@stephendade
Copy link
Contributor Author

A few changes here:

  • The COMMAND_LONG to COMMAND_INT conversion now takes place in lua, using the conversion code in convert_COMMAND_LONG_to_COMMAND_INT() in libraries/GCS_MAVLink/GCS_Common.cpp
  • I've added a GCS timeout option, where if it's been >5 seconds since a packet (heartbeat?) from a GCS, MAV_CMD_CONTROL_HIGH_LATENCY will automatically be enabled. So if the main telemetry link is lost, the High Latency link will automatically start (and vice-versa)

@peterbarker and @IamPete1 - not fussed as to whether we do the command_long -> command_int conversion in C or Lua. The Lua version's not too bad.

Copy link
Member

@IamPete1 IamPete1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Passes the scripting checks (now without cheating) so I'm happy.

@peterbarker peterbarker merged commit d5c1478 into ArduPilot:master Feb 7, 2025
101 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants