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

sdcardCheck: shorten hardfault log availability message #22261

Merged
merged 2 commits into from
Oct 25, 2023

Conversation

MaEtUgR
Copy link
Member

@MaEtUgR MaEtUgR commented Oct 25, 2023

Solved Problem

Fix expected behavior points 2. and 3. from #22259
image

Solution

Shorten the message
It seems to cause multiple issues to have a long message:

  • The full message doesn't show on the console because the buffer only has length of log_message.text which is 127.
  • The additional text shows even if the event that replaces this message already exists. I honestly didn't find the mechanism that breaks there.

Changelog Entry

Bugfix: Show hard fault log availability message correctly

Alternatives

Ideally, longer messages would be supported correctly or there would be a compile error preventing developers from using them. Note that it's not that easy because e.g. the colorized console output uses up > 50 bytes for all the WARN, coloring and module name from the 127-byte buffer.

Test coverage

  • Tested the change on a pixhawk 4 and the message ending doesn't show up unexpectedly anymore.

To make sure it's showing correctly in the output.
@MaEtUgR MaEtUgR added the bug label Oct 25, 2023
@MaEtUgR MaEtUgR requested a review from bkueng October 25, 2023 13:38
@MaEtUgR MaEtUgR self-assigned this Oct 25, 2023
Copy link
Member

@dagar dagar left a comment

Choose a reason for hiding this comment

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

Thanks @MaEtUgR, I was actually contemplating adding something to help catch these offenders because I find the QGC overflow handling so awful.

@dagar dagar merged commit 12b291b into main Oct 25, 2023
87 checks passed
@dagar dagar deleted the maetugr/hard-fault-message branch October 25, 2023 20:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants