28
28
29
29
import atexit
30
30
atexit .register (gpg .stop )
31
+ process = None
31
32
32
33
left_led = 0
33
34
right_led = 0
@@ -107,16 +108,16 @@ def __init__(self, parent):
107
108
self .Bind (wx .EVT_BUTTON , self .right_led_button_OnButtonClick , right_led_button )
108
109
109
110
led_sizer = wx .BoxSizer (wx .HORIZONTAL )
110
- led_sizer .Add (left_led_button , 0 , wx .ALIGN_CENTER )
111
+ led_sizer .Add (left_led_button , 0 , wx .ALIGN_LEFT | wx . TOP , 9 )
111
112
led_sizer .AddSpacer (70 )
112
- led_sizer .Add (right_led_button , 0 , wx .ALIGN_CENTER )
113
+ led_sizer .Add (right_led_button , 0 , wx .ALIGN_RIGHT | wx . TOP , 9 )
113
114
114
115
eyes_sizer = wx .BoxSizer (wx .HORIZONTAL )
115
- left_eye_button = wx .Button (self , label = "Left eye " )
116
+ left_eye_button = wx .Button (self , label = "Left Eye " )
116
117
self .Bind (wx .EVT_BUTTON , self .left_eye_button_OnButtonClick , left_eye_button )
117
118
bmp = wx .Bitmap (ICON_PATH + "dex.png" ,type = wx .BITMAP_TYPE_PNG )
118
119
robotbitmap = wx .StaticBitmap (self , bitmap = bmp )
119
- right_eye_button = wx .Button (self , label = "Right eye " )
120
+ right_eye_button = wx .Button (self , label = "Right Eye " )
120
121
self .Bind (wx .EVT_BUTTON , self .right_eye_button_OnButtonClick , right_eye_button )
121
122
122
123
eyes_sizer .Add (right_eye_button , 0 , wx .ALIGN_CENTER )
@@ -220,7 +221,7 @@ def __init__(self, parent):
220
221
221
222
# Exit
222
223
exit_sizer = wx .BoxSizer (wx .HORIZONTAL )
223
- exit_button = wx .Button (self , label = "Cancel " )
224
+ exit_button = wx .Button (self , label = "Exit " )
224
225
exit_button .Bind (wx .EVT_BUTTON , self .onClose )
225
226
save_button = wx .Button (self , label = "Save and Exit" )
226
227
save_button .Bind (wx .EVT_BUTTON , self .onSave )
@@ -233,7 +234,7 @@ def __init__(self, parent):
233
234
234
235
235
236
# Fill remote control section
236
- control_sizer .Add (control_label , 0 , wx .ALIGN_LEFT )
237
+ control_sizer .Add (control_label , 0 , wx .ALIGN_CENTER | wx . BOTTOM , 10 )
237
238
control_sizer .Add (led_sizer , 0 , wx .ALIGN_CENTER )
238
239
control_sizer .Add (eyes_sizer , 0 , wx .ALIGN_CENTER )
239
240
control_sizer .Add (fwd_sizer , 0 , wx .ALIGN_CENTER | wx .TOP ,10 )
@@ -360,7 +361,6 @@ def drive_straight_2m_button_OnButtonClick(self, event):
360
361
def drive_straight_6feet_button_OnButtonClick (self , event ):
361
362
global process
362
363
363
- global process
364
364
try :
365
365
diam = float (self .wheel_diameter_input .GetValue ())
366
366
except :
@@ -436,7 +436,7 @@ def onSave(self, event):
436
436
class MainFrame (wx .Frame ):
437
437
def __init__ (self ):
438
438
wx .Log .SetVerbose (False )
439
- wx .Frame .__init__ (self , None , title = 'GoPiGo3 Control Panel' , size = (650 ,600 ))
439
+ wx .Frame .__init__ (self , None , title = 'GoPiGo3 Control Panel' , size = (660 ,600 ))
440
440
panel = MainPanel (self )
441
441
self .Center ()
442
442
0 commit comments