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

Fix EDTv2 Logging #28833

Merged
merged 1 commit into from
Dec 11, 2024
Merged

Fix EDTv2 Logging #28833

merged 1 commit into from
Dec 11, 2024

Conversation

andyp1per
Copy link
Collaborator

No description provided.

@andyp1per andyp1per merged commit a52c375 into ArduPilot:master Dec 11, 2024
99 checks passed
@andyp1per andyp1per deleted the pr-esc-logging branch December 11, 2024 18:29
@mbuzdalov
Copy link
Contributor

Maybe I'm not understanding something, but what exactly was the bug?

If no telemetry arrives (e.g. at all), no new EDTv2 data arrives as well, so no log entries are written (as they are only written when there is new data), that was the idea. On the other hand, in a rate-limited environment one may enter the loop when (a) the previous telemetry data was processed but not written due to rate limiting, but (b) time passed and one can now write the packet. So doing the EDTv2 thing outside of the telemetry timing check was part of the design.

What am I missing?

@andyp1per
Copy link
Collaborator Author

@mbuzdalov it was outside the check for logging.

@mbuzdalov
Copy link
Contributor

@andyp1per are you sure? It used to be inside just the check for logging (https://github.com/andyp1per/ardupilot/blob/006aea67e54e640c8d3c519434b9e53389b976b6/libraries/AP_ESC_Telem/AP_ESC_Telem.cpp#L691), and now it is also inside the check for having recent telemetry (https://github.com/andyp1per/ardupilot/blob/006aea67e54e640c8d3c519434b9e53389b976b6/libraries/AP_ESC_Telem/AP_ESC_Telem.cpp#L692), which is somewhat redundant, because new EDT2 entries are only generated when there are updates.

So if logging is disabled altogether, the EDTv2 path was never entered even before this commit. I've double-checked this with the local branch which does not have this commit merged.

@andyp1per
Copy link
Collaborator Author

@mbuzdalov what is the problem you are seeing now?

@mbuzdalov
Copy link
Contributor

@andyp1per theoretically, it's the fact that updates may arrive slightly later to the logs in rate-limited environments. The delay is obviously at most the reciprocal of the rate limit frequency, so - not so much.

Methodically, I am a little bit worried that two core people converged on fixing a bug which is apparently not a bug.

I admit that currently the code looks more homogeneous, and the disadvantage it introduces is really really minor, so leaving it as is now is safe.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Pending
Development

Successfully merging this pull request may close these issues.

4 participants