Skip to content

Commit 0c01219

Browse files
committed
fix off by one
1 parent d8ef425 commit 0c01219

File tree

1 file changed

+2
-2
lines changed
  • CircuitPython_Knob_Sketcher/feather_sketcher

1 file changed

+2
-2
lines changed

CircuitPython_Knob_Sketcher/feather_sketcher/code.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,9 @@ def read_knobs(reads, delay):
9999
xx = int(map_range(avg_x, 0, 65535, 0, SKETCH_WIDTH - 1))
100100
yy = int(map_range(avg_y, 0, 65535, 0, SKETCH_HEIGHT - 1))
101101
if REVERSE_X:
102-
xx = SKETCH_WIDTH - xx
102+
xx = SKETCH_WIDTH - xx - 1
103103
if REVERSE_Y:
104-
yy = SKETCH_HEIGHT - yy
104+
yy = SKETCH_HEIGHT - yy - 1
105105
return xx, yy
106106

107107
#-------

0 commit comments

Comments
 (0)