@@ -86,7 +86,7 @@ def init(config=Config.FLIGHT):
8686 plot .Plot ('time' , ['heading' , 'attitude' ,'bank' ], "q-Angles" , width = 4 , show_x_label = False ),
8787 plot .Plot ('time' , 'gps_lat' , width = 1 , show_x_label = False ),
8888 plot .Plot ('time' , 'gps_lon' , width = 1 , show_x_label = False ),
89- plot .Plot ('gps_e' , 'gps_n' ,"xy from launch (m)" , width = 1 , show_x_label = True ),
89+ # plot.Plot('gps_e', 'gps_n',"xy from launch (m)", width=1, show_x_label=True),
9090 vector_Plot ('time' , 'euler_angle' , width = 4 , show_x_label = False ),
9191 vector_Plot ('time' , 'gyro' , width = 4 , show_x_label = False ),
9292 vector_Plot ('time' , 'acceleration' , width = 4 , show_x_label = False )]
@@ -101,8 +101,8 @@ def init(config=Config.FLIGHT):
101101 "Telemetry monitor - Flight" if config == Config .FLIGHT else
102102 "Telemetry monitor" ,
103103 show_send_value = False ,
104- serial_console_height = 5 ,
105- plots_size = (11.5 ,10 ),
104+ serial_console_height = 1 ,
105+ plots_size = (10 ,10 ),
106106 plots_background = '#69615e' ,
107107 controls_background = '#69615e' ,
108108 default_baud = 57600 )
@@ -127,13 +127,30 @@ def start_abort_handler():
127127 def check_stop (time , status ):
128128 nonlocal running
129129 if status == 'STAND_BY' : #was 'STAND_BY'
130+ #status.config(bg='#0fe9f5')
130131 app .stop ()
131132 running = False
132133 if config == Config .DEMO :
133134 countdown .config (text = " T-00:10:00" )
134135 else :
135136 countdown .config (text = " T-01:00:00" )
136137 start_abort_button .config (text = "Start" , bg = 'lime green' )
138+ elif status == 'TERMINAL_COUNT' :
139+ status .config (bg = '#e6d925' )
140+ elif status == 'POWERED_ASCENT' :
141+ status .config (bg = '#e04122' )
142+
143+ elif status == 'UNPOWERED_ASCENT' :
144+ status .config (bg = '#bd857b' )
145+ elif status == 'FREEFALL' :
146+ status .config (bg = '#760e99' )
147+ elif status == 'DROGUE_DESCENT' :
148+ status .config (bg = '#8b65ba' )
149+ elif status == 'MAIN_DESCENT' :
150+ status .config (bg = '#402aa1' )
151+
152+ elif status == 'LANDED' :
153+ status .config (bg = '#4395d9' )
137154 else :
138155 start_abort_button .config (text = "Abort" , bg = 'red' )
139156
@@ -152,13 +169,13 @@ def state_name(name):
152169 return lower_name .replace ("_" , " " )
153170
154171 # Add custom gui controls
155- Label (app , text = "\n Controls" , bg = '#69615e' ).pack ()
172+ Label (app , text = "\n Controls" , bg = '#69615e' ).pack (side = TOP )
156173
157174 # Sensor controls
158175 #Label(app, text="\nSensor Controls").pack()
159176 controlsFrame = Frame (app , bg = '#69615e' )
160- controlsFrame .pack () #expand=1
161- sensorStatus = Label (controlsFrame , text = "All sensors functional" , fg = 'green' , font = ("Helvetica" , 17 ), bg = '#c9c1be' )
177+ controlsFrame .pack (side = TOP ) #expand=1
178+ sensorStatus = Label (controlsFrame , text = "All sensors functional" , fg = 'green' , font = ("Helvetica" , 12 ), bg = '#c9c1be' ) #light grey c9c1be
162179 sensorStatus .grid (row = 0 ,column = 0 ,columnspan = 4 )
163180 #Button(controlsFrame, text="Zero force", command=lambda: app.sendValue("zero_force")).pack(side=LEFT)
164181 #Button(controlsFrame, text="Zero pressure", command=lambda: app.sendValue("zero_pressure")).pack(side=LEFT)
@@ -174,37 +191,37 @@ def state_name(name):
174191 u1 .grid (row = 1 ,column = 2 ,columnspan = 2 )
175192 #u1.focus_set() #not sure if this is needed
176193 #def sendVar():
177- b1 = Button (controlsFrame , text = "set launch alt (m)" , width = 20 , command = lambda : app .sendValue ("Launch_ALT" ,float (u1 .get ())))
194+ b1 = Button (controlsFrame , text = "set launch alt (m)" ,font = ( "Helvetica" , 7 ), width = 20 , command = lambda : app .sendValue ("Launch_ALT" ,float (u1 .get ())))
178195 b1 .grid (row = 1 ,column = 0 ,padx = 5 ,columnspan = 2 )
179196
180197 u2 = Entry (controlsFrame )
181198 u2 .grid (row = 2 ,column = 2 ,columnspan = 2 )
182- b2 = Button (controlsFrame , text = "set BMP calib. factor (HPA)" , width = 20 , command = lambda : app .sendValue ("BMP_cf" ,u2 .get ()))
199+ b2 = Button (controlsFrame , text = "set BMP calib. factor (HPA)" , width = 20 ,font = ( "Helvetica" , 7 ) , command = lambda : app .sendValue ("BMP_cf" ,u2 .get ()))
183200 b2 .grid (row = 2 ,column = 0 ,padx = 5 ,columnspan = 2 )
184201
185202 u3 = Entry (controlsFrame )
186203 u3 .grid (row = 3 ,column = 2 ,columnspan = 2 )
187- b3 = Button (controlsFrame , text = "set ATST (m)" , width = 20 , command = lambda : app .sendValue ("ATST" ,u3 .get ()))
204+ b3 = Button (controlsFrame , text = "set ATST (m)" , width = 20 ,font = ( "Helvetica" , 7 ), command = lambda : app .sendValue ("ATST" ,u3 .get ()))
188205 b3 .grid (row = 3 ,column = 0 ,padx = 5 ,columnspan = 2 )
189206
190207 u4 = Entry (controlsFrame ,width = 8 )
191208 u4 .grid (row = 4 ,column = 1 )
192- b4 = Button (controlsFrame , text = "set launch lat" , width = 10 , command = lambda : app .sendValue ("launch_lat" ,u4 .get ()))
209+ b4 = Button (controlsFrame , text = "set launch lat" , width = 10 , font = ( "Helvetica" , 7 ), command = lambda : app .sendValue ("launch_lat" ,u4 .get ()))
193210 b4 .grid (row = 4 ,column = 0 ,padx = 1 )
194211
195212 u5 = Entry (controlsFrame ,width = 8 )
196213 u5 .grid (row = 4 ,column = 3 )
197- b5 = Button (controlsFrame , text = "set launch lon" , width = 10 , command = lambda : app .sendValue ("launch_lon" ,u5 .get ()))
214+ b5 = Button (controlsFrame , text = "set launch lon" , font = ( "Helvetica" , 7 ), width = 10 , command = lambda : app .sendValue ("launch_lon" ,u5 .get ()))
198215 b5 .grid (row = 4 ,column = 2 ,padx = 1 )
199216
200217 u6 = Entry (controlsFrame ,width = 8 )
201218 u6 .grid (row = 5 ,column = 1 )
202- b6 = Button (controlsFrame , text = "set land lat" , width = 10 , command = lambda : app .sendValue ("land_lat" ,u6 .get ()))
219+ b6 = Button (controlsFrame , text = "set land lat" , width = 10 , font = ( "Helvetica" , 7 ), command = lambda : app .sendValue ("land_lat" ,u6 .get ()))
203220 b6 .grid (row = 5 ,column = 0 ,padx = 1 )
204221
205222 u7 = Entry (controlsFrame ,width = 8 )
206223 u7 .grid (row = 5 ,column = 3 )
207- b7 = Button (controlsFrame , text = "set land lon" , width = 10 , command = lambda : app .sendValue ("land_lon" ,u7 .get ()))
224+ b7 = Button (controlsFrame , text = "set land lon" , width = 10 , font = ( "Helvetica" , 7 ), command = lambda : app .sendValue ("land_lon" ,u7 .get ()))
208225 b7 .grid (row = 5 ,column = 2 ,padx = 1 )
209226
210227
@@ -219,12 +236,12 @@ def state_name(name):
219236 #Label(app, text="\nThrottle Controls").pack()
220237 throttleFrame = Frame (app , bg = '#69615e' ) #bg or background works
221238 throttleFrame .pack ()
222- Label (throttleFrame , text = "Drouge " , font = ("Helvetica" , 15 ), bg = '#69615e' ).grid (row = 0 , column = 1 )
223- Label (throttleFrame , text = "Main" , font = ("Helvetica" , 15 ), bg = '#69615e' ).grid (row = 0 , column = 2 , padx = 15 )
224- Label (throttleFrame , text = "1" , font = ("Helvetica" , 15 ), bg = '#69615e' ).grid (row = 1 , column = 0 , sticky = W , padx = 5 )
225- Label (throttleFrame , text = "2" , font = ("Helvetica" , 15 ), bg = '#69615e' ).grid (row = 2 , column = 0 , sticky = W , padx = 5 )
226- Label (throttleFrame , text = "Cam" , font = ("Helvetica" , 15 ), bg = '#69615e' ).grid (row = 3 , column = 0 , sticky = W , padx = 5 )
227- Button (throttleFrame , text = "Reset board" , command = lambda : app .sendValue ("reset" )).grid (row = 3 , column = 2 , sticky = W , padx = 5 )
239+ Label (throttleFrame , text = "Drogue " , font = ("Helvetica" , 10 ), bg = '#69615e' ).grid (row = 0 , column = 1 , sticky = W )
240+ Label (throttleFrame , text = "Main" , font = ("Helvetica" , 10 ), bg = '#69615e' ).grid (row = 0 , column = 2 , padx = 15 , sticky = W )
241+ Label (throttleFrame , text = "1" , font = ("Helvetica" , 10 ), bg = '#69615e' ).grid (row = 1 , column = 0 , sticky = W , padx = 5 )
242+ Label (throttleFrame , text = "2" , font = ("Helvetica" , 10 ), bg = '#69615e' ).grid (row = 2 , column = 0 , sticky = W , padx = 5 )
243+ Label (throttleFrame , text = "Cam" , font = ("Helvetica" , 10 ), bg = '#69615e' ).grid (row = 3 , column = 0 , sticky = W , padx = 5 )
244+ Button (throttleFrame , text = "Reset board" , font = ( "Helvetica" , 8 ), command = lambda : app .sendValue ("reset" )).grid (row = 3 , column = 2 , sticky = W , padx = 5 )
228245
229246
230247 valves = ['P1' , 'P2' , 'P3' , 'P4' , 'P5' ] #indexing starts at 0
@@ -239,14 +256,14 @@ def state_name(name):
239256 # Run controls
240257 #Label(app, text="\nRun Controls").pack()
241258 runFrame = Frame (app , bg = '#69615e' )
242- runFrame .pack ()
243- start_abort_button = Button (runFrame , text = "Start" , command = start_abort_handler , bg = "lime green" , height = 3 , width = 10 )
259+ runFrame .pack (side = TOP )
260+ start_abort_button = Button (runFrame , text = "Start" , command = start_abort_handler , bg = "lime green" , height = 2 , width = 8 )
244261 start_abort_button .pack (side = LEFT )
245- countdown = Label (runFrame , text = " T-01:00:00" , fg = "red" , font = ("Helvetica" , 20 , "bold" ), bg = '#b9b1ae' )
246- countdown .pack ()
262+ countdown = Label (runFrame , text = " T-01:00:00" , width = 10 , fg = "red" , font = ("Helvetica" , 16 , "bold" ), bg = '#c9c1be' ) #b9b1ae
263+ countdown .pack (side = TOP )
247264
248- status = Label (runFrame , text = " Stand by" , width = 15 , font = ("Helvetica" , 17 ), bg = '#b9b1ae ' )
249- status .pack ()
265+ status = Label (runFrame , text = " Stand by" , width = 16 , font = ("Helvetica" , 10 ), bg = '#c9c1be ' )
266+ status .pack (side = TOP )
250267
251268 # Listeners
252269 app .dispatcher .add_listener ('status' , lambda time , val : status .config (text = " " + state_name (val )))
0 commit comments