@@ -183,7 +183,7 @@ def on_continue():
183183 self ._title_header = TermsHeader ("improve driver monitoring" , gui_app .texture ("icons_mici/setup/green_dm.png" , 60 , 60 ))
184184
185185 self ._dm_label = UnifiedLabel ("Help improve driver monitoring by including your driving data in the training data set. " +
186- "Your preference can be changed at any time in Settings. Would you like to share your data?" , 42 ,
186+ "Your preference can be changed at any time in Settings.\n \n Would you like to share your data?" , 42 ,
187187 FontWeight .ROMAN )
188188
189189 def show_event (self ):
@@ -242,7 +242,7 @@ class TrainingGuideAttentionNotice2(SetupTermsPage):
242242 def __init__ (self , continue_callback ):
243243 super ().__init__ (continue_callback , continue_text = "continue" )
244244 self ._title_header = TermsHeader ("attention is required" , gui_app .texture ("icons_mici/setup/warning.png" , 60 , 60 ))
245- self ._warning_label = UnifiedLabel ("1. You must pay attention at all times.\n \n 2. You must be ready to take over at any time." +
245+ self ._warning_label = UnifiedLabel ("1. You must pay attention at all times.\n \n 2. You must be ready to take over at any time." +
246246 "\n \n 3. You are fully responsible for driving the car." , 42 ,
247247 FontWeight .ROMAN )
248248
@@ -265,13 +265,69 @@ def _render_content(self, scroll_offset):
265265 self ._warning_label .get_content_height (int (self ._rect .width - 32 )),
266266 ))
267267
268+ class TrainingGuideEngaging (SetupTermsPage ):
269+ def __init__ (self , continue_callback ):
270+ super ().__init__ (continue_callback , continue_text = "continue" )
271+ self ._title_header = TermsHeader ("engaging openpilot" , gui_app .texture ("icons_mici/offroad_alerts/green_wheel.png" , 60 , 60 ))
272+ self ._warning_label = UnifiedLabel ("You can engage openpilot using your car's cruise control inputs.\n \n " +
273+ "These are usually located on either the steering wheel or on a lever near the wheel." , 42 ,
274+ FontWeight .ROMAN )
275+
276+ @property
277+ def _content_height (self ):
278+ return self ._warning_label .rect .y + self ._warning_label .rect .height - self ._scroll_panel .get_offset ()
279+
280+ def _render_content (self , scroll_offset ):
281+ self ._title_header .render (rl .Rectangle (
282+ self ._rect .x + 16 ,
283+ self ._rect .y + 16 + scroll_offset ,
284+ self ._title_header .rect .width ,
285+ self ._title_header .rect .height ,
286+ ))
287+
288+ self ._warning_label .render (rl .Rectangle (
289+ self ._rect .x + 16 ,
290+ self ._title_header .rect .y + self ._title_header .rect .height + 16 ,
291+ self ._rect .width - 32 ,
292+ self ._warning_label .get_content_height (int (self ._rect .width - 32 )),
293+ ))
294+
295+
296+ class TrainingGuideEnd (SetupTermsPage ):
297+ def __init__ (self , continue_callback ):
298+ super ().__init__ (continue_callback , continue_text = "finish" )
299+ self ._title_header = TermsHeader ("training complete!" , gui_app .texture ("icons_mici/setup/green_info.png" , 60 , 60 ))
300+ self ._warning_label = UnifiedLabel ("You have completed the openpilot training.\n \n " +
301+ "This guide can be revisited at any time in Settings." , 42 ,
302+ FontWeight .ROMAN )
303+
304+ @property
305+ def _content_height (self ):
306+ return self ._warning_label .rect .y + self ._warning_label .rect .height - self ._scroll_panel .get_offset ()
307+
308+ def _render_content (self , scroll_offset ):
309+ self ._title_header .render (rl .Rectangle (
310+ self ._rect .x + 16 ,
311+ self ._rect .y + 16 + scroll_offset ,
312+ self ._title_header .rect .width ,
313+ self ._title_header .rect .height ,
314+ ))
315+
316+ self ._warning_label .render (rl .Rectangle (
317+ self ._rect .x + 16 ,
318+ self ._title_header .rect .y + self ._title_header .rect .height + 16 ,
319+ self ._rect .width - 32 ,
320+ self ._warning_label .get_content_height (int (self ._rect .width - 32 )),
321+ ))
322+
323+
268324
269325class TrainingGuideDisengaging (SetupTermsPage ):
270326 def __init__ (self , continue_callback ):
271327 super ().__init__ (continue_callback , continue_text = "continue" )
272328 self ._title_header = TermsHeader ("disengaging openpilot" , gui_app .texture ("icons_mici/setup/green_pedal.png" , 60 , 60 ))
273329 self ._warning_label = UnifiedLabel ("You can disengage openpilot by either pressing the brake pedal or " +
274- "the cancel button on your steering wheel ." , 42 ,
330+ "the cruise control cancel button ." , 42 ,
275331 FontWeight .ROMAN )
276332
277333 @property
@@ -352,7 +408,7 @@ class TrainingGuideSteeringArc(SetupTermsPage):
352408 TORQUE_BAR_HEIGHT = 100
353409
354410 def __init__ (self , continue_callback ):
355- super ().__init__ (continue_callback , continue_text = "finish " )
411+ super ().__init__ (continue_callback , continue_text = "continue " )
356412 self ._torque_bar = TorqueBar (demo = True )
357413 self ._start_time = 0.0
358414
@@ -433,9 +489,11 @@ def __init__(self, completed_callback=None):
433489 TrainingGuidePreDMTutorial (continue_callback = self ._advance_step ),
434490 TrainingGuideDMTutorial (continue_callback = self ._advance_step ),
435491 TrainingGuideRecordFront (continue_callback = self ._advance_step ),
492+ TrainingGuideEngaging (continue_callback = self ._advance_step ),
436493 TrainingGuideDisengaging (continue_callback = self ._advance_step ),
437494 TrainingGuideConfidenceBall (continue_callback = self ._advance_step ),
438495 TrainingGuideSteeringArc (continue_callback = self ._advance_step ),
496+ TrainingGuideEnd (continue_callback = self ._advance_step ),
439497 ]
440498
441499 def _advance_step (self ):
@@ -497,7 +555,7 @@ def __init__(self, on_accept=None, on_decline=None):
497555 super ().__init__ (on_accept , on_decline , "decline" )
498556
499557 info_txt = gui_app .texture ("icons_mici/setup/green_info.png" , 60 , 60 )
500- self ._title_header = TermsHeader ("scroll down to read & \n accept terms " , info_txt )
558+ self ._title_header = TermsHeader ("terms & conditions " , info_txt )
501559
502560 self ._terms_label = UnifiedLabel ("You must accept the Terms and Conditions to use openpilot. " +
503561 "Read the latest terms at https://comma.ai/terms before continuing." , 36 ,
0 commit comments