-
Notifications
You must be signed in to change notification settings - Fork 10.3k
openpilot long control confirm screenshot #36331
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
openpilot long control confirm screenshot #36331
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Adds a screenshot test case for the openpilot longitudinal control alpha toggle and its confirmation dialog in the UI test suite.
- Adds car import for CarParams configuration
- Creates setup function to enable alpha longitudinal control toggle visibility
- Registers new test case for the confirmation dialog
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
def setup_settings_developer(click, pm: PubMaster): | ||
CP = car.CarParams() | ||
CP.alphaLongitudinalAvailable = True # show alpha long control toggle |
Copilot
AI
Oct 13, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The CarParams object creation and configuration should be extracted to avoid code duplication if this pattern is used elsewhere in tests. Consider creating a helper function like create_car_params_with_alpha_long()
.
def setup_settings_developer(click, pm: PubMaster): | |
CP = car.CarParams() | |
CP.alphaLongitudinalAvailable = True # show alpha long control toggle | |
def create_car_params_with_alpha_long(): | |
CP = car.CarParams() | |
CP.alphaLongitudinalAvailable = True # show alpha long control toggle | |
return CP | |
def setup_settings_developer(click, pm: PubMaster): | |
CP = create_car_params_with_alpha_long() |
Copilot uses AI. Check for mistakes.
|
||
def setup_openpilot_long_confirmation_dialog(click, pm: PubMaster): | ||
setup_settings_developer(click, pm) | ||
click(2000, 960) # toggle openpilot longitudinal control |
Copilot
AI
Oct 13, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The hardcoded coordinates (2000, 960) make the test brittle. Consider using more descriptive constants or a coordinate mapping system to improve maintainability.
Copilot uses AI. Check for mistakes.
Adds a screenshot test for the openpilot longitudinal control (alpha) toggle and confirmation dialog.