Skip to content

Commit

Permalink
adding parens
Browse files Browse the repository at this point in the history
  • Loading branch information
FoamyGuy committed Jan 7, 2025
1 parent eb3700a commit b2451e6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions adafruit_vl53l4cd.py
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ def timing_budget(self, val):
timing_budget_us <<= 12
tmp = macro_period_us * 16
ls_byte = int(((timing_budget_us + ((tmp >> 6) >> 1)) / (tmp >> 6)) - 1)
while ls_byte >> 8 & 0xFFFFFF > 0:
while ls_byte >> (8 & 0xFFFFFF) > 0:
ls_byte >>= 1
ms_byte += 1
ms_byte = (ms_byte << 8) + (ls_byte & 0xFF)
Expand All @@ -335,7 +335,7 @@ def timing_budget(self, val):
ms_byte = 0
tmp = macro_period_us * 12
ls_byte = int(((timing_budget_us + ((tmp >> 6) >> 1)) / (tmp >> 6)) - 1)
while ls_byte >> 8 & 0xFFFFFF > 0:
while ls_byte >> (8 & 0xFFFFFF) > 0:
ls_byte >>= 1
ms_byte += 1
ms_byte = (ms_byte << 8) + (ls_byte & 0xFF)
Expand Down

0 comments on commit b2451e6

Please sign in to comment.