-
Notifications
You must be signed in to change notification settings - Fork 88
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
Add tlog back, default to while arm #3181
base: master
Are you sure you want to change the base?
Add tlog back, default to while arm #3181
Conversation
Reviewer's Guide by SourceryThis pull request introduces the ability to configure when tlog files are written (always or while armed). It defaults to writing tlog files only while armed for Sequence diagram for MAVLinkRouter configuration file writingsequenceDiagram
participant MAVLinkRouter
MAVLinkRouter->>MAVLinkRouter: _write_configuration_file()
MAVLinkRouter->>MAVLinkRouter: convert_tlog_condition(tlog_condition)
alt tlog_condition is Always
MAVLinkRouter->>MAVLinkRouter: return 'always'
else tlog_condition is WhileArmed
MAVLinkRouter->>MAVLinkRouter: return 'while-armed'
end
MAVLinkRouter->>MAVLinkRouter: config['General'] = { 'LogMode': convert_tlog_condition(self.tlog_condition()) }
MAVLinkRouter->>MAVLinkRouter: Write config to temporary file
MAVLinkRouter->>MAVLinkRouter: Return temporary file name
MAVLinkRouter->>MAVLinkRouter: assemble_command with -c {config_file}
Updated class diagram for AbstractRouter and TLogConditionclassDiagram
class AbstractRouter {
- pathlib.Path _logdir
- TLogCondition _tlog_condition
+ set_logdir(directory: pathlib.Path) : None
+ tlog_condition() : TLogCondition
+ set_tlog_condition(tlog_condition: TLogCondition) : None
}
class TLogCondition {
<<enumeration>>
Always
WhileArmed
}
AbstractRouter -- TLogCondition : has a
File-Level Changes
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
4eebbc0
to
cdc5a5f
Compare
14a6429
to
6b1b2dd
Compare
…n to mavlink-server
…n to mavlink-router via conf file
…n set/get in ardupilot_manager
6b1b2dd
to
490d073
Compare
Merge after #3180
We want to default to write tlog files only while armed, but also allow the user to change it to always write tlog files, so this patch is:
note: mavlink-router default is to always write, and the only option to change it is using their config file.
note: by defaulting to while armed, we are introducing a breaking change to the current behavior.
Summary by Sourcery
Introduce the ability to configure when tlog files are written (always or while armed). The default behavior is now to only write tlog files while armed. This change affects both mavlink-server and mavlink-router.