Browse Source

bearing_to_pixel(): use count instead of hardcoded 16

Brennen Bearnes 9 months ago
parent
commit
1fcc2878ab
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      glitterpos_util.py

+ 1
- 1
glitterpos_util.py View File

@@ -48,7 +48,7 @@ def compass_bearing(pointA, pointB):
48 48
 def bearing_to_pixel(bearing, count=16):
49 49
     # Subtract from count since the neopixel ring runs counterclockwise:
50 50
     pixel = count - int(round((bearing / 360) * count))
51
-    if pixel == 16:
51
+    if pixel == count:
52 52
       return 0
53 53
     return pixel
54 54
 

Loading…
Cancel
Save