mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-07-02 12:02:09 +08:00
raylib: add confirmation dialog (#36252)
* conf * update case * fix * fix * rm * back * alread setup * avail
This commit is contained in:
@@ -12,10 +12,12 @@ import pywinctl
|
||||
from cereal import log
|
||||
from cereal import messaging
|
||||
from cereal.messaging import PubMaster
|
||||
from openpilot.common.basedir import BASEDIR
|
||||
from openpilot.common.params import Params
|
||||
from openpilot.common.prefix import OpenpilotPrefix
|
||||
from openpilot.selfdrive.test.helpers import with_processes
|
||||
from openpilot.selfdrive.selfdrived.alertmanager import set_offroad_alert
|
||||
from openpilot.system.updated.updated import parse_release_notes
|
||||
|
||||
TEST_DIR = pathlib.Path(__file__).parent
|
||||
TEST_OUTPUT_DIR = TEST_DIR / "raylib_report"
|
||||
@@ -34,6 +36,10 @@ def setup_settings_device(click, pm: PubMaster):
|
||||
click(100, 100)
|
||||
|
||||
|
||||
def close_settings(click, pm: PubMaster):
|
||||
click(240, 216)
|
||||
|
||||
|
||||
def setup_settings_network(click, pm: PubMaster):
|
||||
setup_settings_device(click, pm)
|
||||
click(278, 450)
|
||||
@@ -75,7 +81,22 @@ def setup_offroad_alert(click, pm: PubMaster):
|
||||
set_offroad_alert(alert, True)
|
||||
|
||||
setup_settings_device(click, pm)
|
||||
click(240, 216)
|
||||
close_settings(click, pm)
|
||||
|
||||
|
||||
def setup_confirmation_dialog(click, pm: PubMaster):
|
||||
setup_settings_device(click, pm)
|
||||
click(1985, 791) # reset calibration
|
||||
|
||||
|
||||
def setup_update_available(click, pm: PubMaster):
|
||||
params = Params()
|
||||
params.put_bool("UpdateAvailable", True)
|
||||
params.put("UpdaterNewReleaseNotes", parse_release_notes(BASEDIR))
|
||||
description = "0.10.1 / html-release-notes-2 / 7864838 / Oct 03"
|
||||
params.put("UpdaterCurrentDescription", description)
|
||||
setup_settings_device(click, pm)
|
||||
close_settings(click, pm)
|
||||
|
||||
|
||||
CASES = {
|
||||
@@ -89,6 +110,8 @@ CASES = {
|
||||
"keyboard": setup_keyboard,
|
||||
"pair_device": setup_pair_device,
|
||||
"offroad_alert": setup_offroad_alert,
|
||||
"update_available": setup_update_available,
|
||||
"confirmation_dialog": setup_confirmation_dialog,
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user