Skip to content

Commit

Permalink
Tx/Rx power values should be rounded up to 3 decimal places (#432)
Browse files Browse the repository at this point in the history
Signed-off-by: Mihir Patel <[email protected]>
  • Loading branch information
mihirpat1 authored and mssonicbld committed Feb 1, 2024
1 parent 83a8c7a commit 7c2ad66
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sonic_platform_base/sonic_xcvr/api/xcvr_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def mw_to_dbm(mW):
return float("-inf")
elif mW < 0:
return float("NaN")
return 10. * log10(mW)
return round(10. * log10(mW), 3)

def get_model(self):
"""
Expand Down

0 comments on commit 7c2ad66

Please sign in to comment.