-
Notifications
You must be signed in to change notification settings - Fork 4
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
Improve tlog writer: log when arm #118
Improve tlog writer: log when arm #118
Conversation
ce784ba
to
aea7ce8
Compare
a54ca13
to
78a385e
Compare
9f197af
to
3a3d20d
Compare
bddeba3
to
4a58dac
Compare
c92613e
to
fd76148
Compare
fd76148
to
05fe1f8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would make the logic simpler if this relies on #119 to see if the vehicle is armed
05fe1f8
to
53ad3a8
Compare
Yeah, I thought about that when implementing the arm detection, but I've chosen to work directly with the bytes to avoid the impact of converting every message to mavlink (which is basically parsing the message twice). |
But this will already be done by the control PR nevertheless |
I know, but the control does not parse every message. I'm working on a better approach for translating between the lib's types without preparing. |
Expected behavior:
tlogwriter
driver now accepts awhen
argument, which can be eitheralways
orwhile_arm
.always
to match the same behavior from mavlink-router, which is only configurable via conf-file, as described here. For this reason, this patch introduces a major behavior change.path
is a folder that doesn't exist, it will try to create the entire path.while_arm
, it will start a new file every time the vehicle changes fromdisarmed
toarmed
, following the same file name format asmavlink-router
. On the other way around (when the vehicle changed fromdisarmed
toarmed
), it closes the file.while_arm
, the system_id and component_id from which it monitors the heartbeats can be configured from endpoint arguments, falling back to the same behavior as mavlink-router: it gets the system ID from the first heartbeat sent by an autopilot (component id 1).Closes #54.