We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fa055bb commit 9eda831Copy full SHA for 9eda831
1 file changed
src/fluepdot/fluepdot.py
@@ -91,15 +91,18 @@ def post_frame_raw(self, frame: str) -> Response:
91
92
93
def post_frame(self, frame: List[List[bool]]) -> Response:
94
- data: List[List[str]] = [[" "] * width for _ in range(height)]
95
- for x, l in frame:
96
- for y, b in l:
+ data: List[List[str]] = [[" "] * self.width for _ in range(self.height)]
+ for x, l in enumerate(frame):
+ for y, b in enumerate(l):
97
if b:
98
try:
99
- data[x, y] = "X"
+ data[x][y] = "X"
100
except IndexError as e:
101
print(e)
102
- return self._post(frameURL, post=data)
+ outStr = ""
103
+ for line in data:
104
+ outStr = outStr + "".join(line) + "\n"
105
+ return self._post(frameURL, post=outStr)
106
107
108
def set_pixel(x: int = 0, y: int = 0) -> Response:
0 commit comments