Skip to content

Commit

Permalink
Tx/Rx power values should be rounded up to 3 decimal places (sonic-ne…
Browse files Browse the repository at this point in the history
…t#432)

Signed-off-by: Mihir Patel <patelmi@microsoft.com>
  • Loading branch information
mihirpat1 authored and mssonicbld committed Feb 1, 2024
1 parent 83a8c7a commit 2d7b8d3
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 2d7b8d3

Please sign in to comment.