|
@@ -8,9 +8,18 @@ class Page_2(tk.Frame):
|
|
|
tk.Frame.__init__(self, parent)
|
|
|
label = tk.Label(self, text="Kräfte", font=LARGE_FONT)
|
|
|
label.pack(pady=10,padx=10)
|
|
|
- button1 = tk.Button(self, text="Page_0", command=lambda: controller.show_frame(Page_0))
|
|
|
- button1.pack()
|
|
|
- button2 = tk.Button(self, text="Page_1", command=lambda: controller.show_frame(Page_1))
|
|
|
- button2.pack()
|
|
|
+
|
|
|
+ # graphs
|
|
|
+ self.forcePlots = [Plot(20, 3), Plot(20, 3), Plot(20, 3)]
|
|
|
+ for plot in self.forcePlots:
|
|
|
+ canvas = FigureCanvasTkAgg(plot.fig, self)
|
|
|
+ canvas.draw()
|
|
|
+ canvas.get_tk_widget().pack(side=tk.LEFT, fill=tk.BOTH, expand=True)
|
|
|
+ canvas._tkcanvas.pack(side=tk.LEFT, fill=tk.BOTH, expand=True)
|
|
|
def update(self):
|
|
|
- pass
|
|
|
+ for i in range(3):
|
|
|
+ self.forcePlots.update([
|
|
|
+ controller.getLastValue(f"force_X_{i}"),
|
|
|
+ controller.getLastValue(f"force_Y_{i}"),
|
|
|
+ controller.getLastValue(f"force_Z_{i}"),
|
|
|
+ ])
|