Skip to content

atcommander: force out of bootload mode, Python3 compatible #22 - #10

Merged
kaklik merged 4 commits into
ThunderFly-aerospace:masterfrom
mikeclement:mc_atc_unstick
Nov 6, 2022
Merged

kaklik merged 4 commits into
ThunderFly-aerospace:masterfrom
mikeclement:mc_atc_unstick

Conversation

@kaklik

@kaklik kaklik commented Nov 6, 2022

Copy link
Copy Markdown
Member

Merge pull-request from upstream: ArduPilot#22

Mike Clement and others added 4 commits August 5, 2015 16:33
The radio occasionally gets stuck in bootloader mode. This patch replicates
a solution from ardupilot (libraries/GCS_MAVLink/GCS_Common.cpp) to unstick
the radio. The solution is incorporated into the --force option, making it
more assertive than before.

This patch also slightly adjusts some of the radio response timeouts.
This patch contains several changes to make both the API and CLI
more consistent as well as minor code cleanup, including:
 - Added param 15 (MAX_WINDOW)
 - Moved CLI-only module imports into "if __name__ ..." section
 - Allow user-specified serial read timeout
 - Always enter command mode in "local" mode
 - Added "__" to class data members
 - Class methods now have consistent return values:
   - Methods that "do" things return True or False
   - Methods that return data either return that data or None
   - Exceptions should be handled within class methods
 - Int/float queries support negative numbers
 - Exact query supports re patterns and strips trailing newline
 - 1-second waits for entering command mode are properly set
 - Slightly more aggressive ATO and ATZ usage
 - get_radio_version() handles trailing non-numeric characters
   (hattip github user mw46d for fixing this a different way)
 - Consistent CLI exit codes that report all interesting errors
 - Shortened CLI arguments for list and set operations
 - Several CLI operations are implicitly retried
 - Radio parameters are listed using the same names used to set them
 - Indenting and trailing whitespace cleaned up
@kaklik
kaklik merged commit 89f8109 into ThunderFly-aerospace:master Nov 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants