Spline Gui Commit
The Spline Gui Functionality:
Voltage and Acceleration Graph
Exportation to Json files
Ability to click and drag points
Added Usage Document
Moved many pieces around into seperate classes
Removed useless Functionality
Change-Id: I8fd819d4259b0b9b90c68f91ac73e01b3718a510
diff --git a/frc971/control_loops/python/basic_window.py b/frc971/control_loops/python/basic_window.py
old mode 100644
new mode 100755
index 78324a3..827fe64
--- a/frc971/control_loops/python/basic_window.py
+++ b/frc971/control_loops/python/basic_window.py
@@ -1,3 +1,4 @@
+#!/usr/bin/python3
import gi
gi.require_version('Gtk', '3.0')
from gi.repository import Gtk
@@ -5,10 +6,10 @@
from gi.repository import Gdk
from gi.repository import GdkX11
import cairo
+from constants import *
identity = cairo.Matrix()
-
# Override the matrix of a cairo context.
class OverrideMatrix(object):
def __init__(self, cr, matrix):
@@ -34,7 +35,6 @@
def quit_main_loop(*args):
mainloop.quit()
-
def RunApp():
try:
mainloop.run()
@@ -49,11 +49,10 @@
# Draw in response to an expose-event
def __init__(self):
super(BaseWindow, self).__init__()
- #self.window.connect("destroy", quit_main_loop)
- self.set_size_request(640, 600)
+ self.set_size_request(2*SCREEN_SIZE, SCREEN_SIZE)
self.center = (0, 0)
- self.shape = (640, 400)
+ self.shape = (2*SCREEN_SIZE, SCREEN_SIZE)
self.needs_redraw = False
def get_current_scale(self):
@@ -81,3 +80,4 @@
# Handle the expose-event by drawing
def handle_draw(self, cr):
pass
+