Commit 1a6507fb authored by Nicholas Gar Hei Chan's avatar Nicholas Gar Hei Chan
Browse files

Changed parameters to account for RPi processing speed

parent 7eeec907
......@@ -72,7 +72,7 @@ class Line():
prev_x = self.x[-1]
prev_y = self.y[-1]
segment_length = np.sqrt((x-prev_x)**2+(y-prev_y)**2)
num_points = int(np.floor(segment_length/0.1))
num_points = int(np.floor(segment_length/1))
if num_points < 2:
self.x.append(x)
self.y.append(y)
......@@ -170,7 +170,7 @@ class Layer():
f.write(('<svg xmlns="http://www.w3.org/2000/svg"'
' xmlns:xlink="http://www.w3.org/1999/xlink"'
' viewBox="0 0 250 40" height="{}mm" width="{}mm">\n').format(max_height, max_width))
for line in self.lines:
for line in self.lines[::10]:
points = '\t<polyline points="'
coords = [f"{x},{y} " for x,y in zip(line.x, line.y)]
points = points + "".join(coords) + ('"\n\tstyle="fill:none;stroke:black;stroke-width:0.4;'
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment