Add multiple multisplines to Spline UI
Many of our autonomouses require us to stop in the middle. We have been
using separate multisplines to tell the robot to stop and then drive
backwards. If the Spline UI knows that these multiple multisplines
exist, we can ensure that each multispline starts where the last one ends.
You can press m to add a new multispline. This is a pretty big change
for the spline UI, and it touches pretty much every part.
Currently the multisplines are entirely separate from eachother,
but the next change adds constraints.
Signed-off-by: Nathan Leong <100028864@mvla.net>
Change-Id: Ic5eb0887d9fa6cde16a7f6b5e877a79078014614
diff --git a/frc971/control_loops/python/graph.py b/frc971/control_loops/python/graph.py
index f21b2ea..5e6fcb5 100644
--- a/frc971/control_loops/python/graph.py
+++ b/frc971/control_loops/python/graph.py
@@ -5,7 +5,7 @@
import queue
import threading
import copy
-from points import Points
+from multispline import Multispline
from libspline import Spline, DistanceSpline, Trajectory
from matplotlib.backends.backend_gtk3agg import (FigureCanvasGTK3Agg as
@@ -89,6 +89,10 @@
Can be superseded by newer points if an old one isn't finished processing.
"""
+
+ # TODO: Draw all multisplines
+ points = points[0]
+
if not points.getLibsplines(): return
new_copy = copy.deepcopy(points)