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: suppress unnecessary warnings in clock received validation #1935

Merged

Conversation

TakashiSato
Copy link
Contributor

This PR aims to fix clock received validation to suppress unnecessary warning logs.

Previously, the code was displaying warning logs when checking clock received status regardless of the validation timing. This could lead to excessive warning logs in normal operation scenarios.

Changes:

  • Add explicit condition to check !get_clock()->received() before displaying warning log
  • Keep the same warning message for when an actual clock sync issue occurs

This change helps reduce noise in logs by only reporting warnings when there's a genuine clock synchronization issue.

Copy link
Member

@saikishor saikishor left a comment

Choose a reason for hiding this comment

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

You are right about this condition. Thanks for fixing it

Copy link

codecov bot commented Dec 12, 2024

Codecov Report

Attention: Patch coverage is 0% with 3 lines in your changes missing coverage. Please review.

Project coverage is 87.72%. Comparing base (c37b9d9) to head (ba1c16b).
Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
controller_manager/src/controller_manager.cpp 0.00% 2 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1935      +/-   ##
==========================================
- Coverage   87.73%   87.72%   -0.01%     
==========================================
  Files         122      122              
  Lines       12978    12979       +1     
  Branches     1156     1158       +2     
==========================================
  Hits        11386    11386              
- Misses       1164     1165       +1     
  Partials      428      428              
Flag Coverage Δ
unittests 87.72% <0.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
controller_manager/src/controller_manager.cpp 76.31% <0.00%> (-0.06%) ⬇️

Copy link
Contributor

@christophfroehlich christophfroehlich left a comment

Choose a reason for hiding this comment

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

Thanks for the fix!

@christophfroehlich christophfroehlich merged commit d62be07 into ros-controls:master Dec 12, 2024
19 of 22 checks passed
@TakashiSato TakashiSato deleted the feature/fix_clock_check branch December 12, 2024 13:14
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.

3 participants