From b3ccd8b6b0f851137e31aef4283c41d83028fdb5 Mon Sep 17 00:00:00 2001 From: Edison-CBS Date: Sun, 5 Nov 2023 10:05:20 +0800 Subject: [PATCH] update for prius v --- .github/workflows/selfdrive_tests.yaml | 6 +- .github/workflows/tools_tests.yaml | 4 +- .gitmodules | 14 +- cereal | 2 +- common/params.cc | 6 + common/params.h | 7 + common/params.py | 3 +- common/params_pyx.pyx | 17 + release/files_common | 1 + selfdrive/car/tests/test_car_interfaces.py | 3 + selfdrive/car/tests/test_models.py | 2 + selfdrive/car/torque_data/params.yaml | 1 + selfdrive/car/torque_data/substitute.yaml | 1 - selfdrive/car/toyota/carcontroller.py | 7 +- selfdrive/car/toyota/carstate.py | 39 +- selfdrive/car/toyota/interface.py | 30 +- selfdrive/car/toyota/toyotacan.py | 4 +- selfdrive/car/toyota/values.py | 2 +- selfdrive/controls/controlsd.py | 5 + selfdrive/controls/lib/events.py | 5 +- selfdrive/manager/manager.py | 2 + .../test/process_replay/test_processes.py | 4 +- selfdrive/ui/qt/home.cc | 5 + selfdrive/ui/qt/offroad/settings.cc | 34 + selfdrive/ui/qt/offroad/settings.h | 1 + selfdrive/ui/qt/onroad.cc | 111 ++- selfdrive/ui/qt/onroad.h | 13 + selfdrive/ui/qt/widgets/controls.h | 6 + selfdrive/ui/translations/main_ar.ts | 36 + selfdrive/ui/translations/main_de.ts | 596 ++++++++------- selfdrive/ui/translations/main_en.ts | 24 +- selfdrive/ui/translations/main_fr.ts | 36 + selfdrive/ui/translations/main_ja.ts | 36 + selfdrive/ui/translations/main_ko.ts | 36 + selfdrive/ui/translations/main_pt-BR.ts | 688 +++++++++--------- selfdrive/ui/translations/main_th.ts | 36 + selfdrive/ui/translations/main_tr.ts | 36 + selfdrive/ui/translations/main_zh-CHS.ts | 36 + selfdrive/ui/translations/main_zh-CHT.ts | 36 + selfdrive/ui/ui.cc | 19 + selfdrive/ui/ui.h | 11 + 41 files changed, 1312 insertions(+), 649 deletions(-) diff --git a/.github/workflows/selfdrive_tests.yaml b/.github/workflows/selfdrive_tests.yaml index bd6885cf5b5c34..a2cd7c7772ae08 100644 --- a/.github/workflows/selfdrive_tests.yaml +++ b/.github/workflows/selfdrive_tests.yaml @@ -2,8 +2,8 @@ name: selfdrive on: push: - branches: - - master + branches-ignore: + - 'testing-closet*' pull_request: workflow_dispatch: @@ -142,7 +142,7 @@ jobs: - uses: ./.github/workflows/setup-with-retry - name: pre-commit timeout-minutes: 4 - run: ${{ env.RUN }} "unset PYTHONWARNINGS && pre-commit run --all" + run: ${{ env.RUN }} "unset PYTHONWARNINGS && SKIP=check-added-large-files pre-commit run --all" valgrind: name: valgrind diff --git a/.github/workflows/tools_tests.yaml b/.github/workflows/tools_tests.yaml index 75a34b3c55f957..679a03aab91f0b 100644 --- a/.github/workflows/tools_tests.yaml +++ b/.github/workflows/tools_tests.yaml @@ -2,8 +2,8 @@ name: tools on: push: - branches: - - master + branches-ignore: + - 'testing-closet*' pull_request: concurrency: diff --git a/.gitmodules b/.gitmodules index 26f93ef164e782..3b64a8c8736fd1 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,21 +1,21 @@ [submodule "panda"] path = panda - url = ../../commaai/panda.git + url = ../../Edison-CBS/panda.git [submodule "opendbc"] path = opendbc - url = ../../commaai/opendbc.git + url = ../../Edison-CBS/opendbc.git [submodule "laika_repo"] path = laika_repo - url = ../../commaai/laika.git + url = ../../Edison-CBS/laika.git [submodule "cereal"] path = cereal - url = ../../commaai/cereal.git + url = ../../Edison-CBS/cereal.git [submodule "rednose_repo"] path = rednose_repo - url = ../../commaai/rednose.git + url = ../../Edison-CBS/rednose.git [submodule "body"] path = body - url = ../../commaai/body.git + url = ../../Edison-CBS/body.git [submodule "tinygrad"] path = tinygrad_repo - url = https://github.com/geohot/tinygrad.git + url = ../../Edison-CBS/tinygrad.git diff --git a/cereal b/cereal index 416c3d531c90ce..d3c4f6ad27c6c8 160000 --- a/cereal +++ b/cereal @@ -1 +1 @@ -Subproject commit 416c3d531c90ce16498d782bf383625a857ee74c +Subproject commit d3c4f6ad27c6c8422e3388992ba627328f9d1b38 diff --git a/common/params.cc b/common/params.cc index 3f6cb7044c4d03..dbecc487ccd7e1 100644 --- a/common/params.cc +++ b/common/params.cc @@ -107,12 +107,14 @@ std::unordered_map keys = { {"DisableLogging", CLEAR_ON_MANAGER_START | CLEAR_ON_ONROAD_TRANSITION}, {"DisablePowerDown", PERSISTENT}, {"DisableUpdates", PERSISTENT}, + {"LQR", PERSISTENT}, {"DisengageOnAccelerator", PERSISTENT}, {"DmModelInitialized", CLEAR_ON_ONROAD_TRANSITION}, {"DongleId", PERSISTENT}, {"DoReboot", CLEAR_ON_MANAGER_START}, {"DoShutdown", CLEAR_ON_MANAGER_START}, {"DoUninstall", CLEAR_ON_MANAGER_START}, + {"DrivingPersonalitiesUIWheel", PERSISTENT}, {"ExperimentalLongitudinalEnabled", PERSISTENT}, {"ExperimentalMode", PERSISTENT}, {"ExperimentalModeConfirmed", PERSISTENT}, @@ -207,6 +209,10 @@ std::unordered_map keys = { {"Version", PERSISTENT}, {"VisionRadarToggle", PERSISTENT}, {"WheeledBody", PERSISTENT}, + // edison params + {"LQR", PERSISTENT}, + {"ScreenOffTimer", PERSISTENT}, + {"CruiseSpeedRewrite", PERSISTENT}, }; } // namespace diff --git a/common/params.h b/common/params.h index fbe0bba6b0da3c..513281fb71109c 100644 --- a/common/params.h +++ b/common/params.h @@ -36,6 +36,10 @@ class Params { inline bool getBool(const std::string &key, bool block = false) { return get(key, block) == "1"; } + inline int getInt(const std::string &key, bool block = false) { + std::string value = get(key, block); + return value.empty() ? 0 : std::stoi(value); + } std::map readAll(); // helpers for writing values @@ -46,6 +50,9 @@ class Params { inline int putBool(const std::string &key, bool val) { return put(key.c_str(), val ? "1" : "0", 1); } + inline int putInt(const std::string &key, int val) { + return put(key.c_str(), std::to_string(val).c_str(), std::to_string(val).size()); + } private: std::string params_path; diff --git a/common/params.py b/common/params.py index ea8ac7514aa0d2..bb7185b1b3f59f 100644 --- a/common/params.py +++ b/common/params.py @@ -1,10 +1,11 @@ from openpilot.common.params_pyx import Params, ParamKeyType, UnknownKeyName, put_nonblocking, \ - put_bool_nonblocking + put_bool_nonblocking, put_int_nonblocking assert Params assert ParamKeyType assert UnknownKeyName assert put_nonblocking assert put_bool_nonblocking +assert put_int_nonblocking if __name__ == "__main__": import sys diff --git a/common/params_pyx.pyx b/common/params_pyx.pyx index de52c490b3e38e..ed92e53c5f5af8 100644 --- a/common/params_pyx.pyx +++ b/common/params_pyx.pyx @@ -17,9 +17,11 @@ cdef extern from "common/params.h": c_Params(string) except + nogil string get(string, bool) nogil bool getBool(string, bool) nogil + int getInt(string, bool) nogil int remove(string) nogil int put(string, string) nogil int putBool(string, bool) nogil + int putInt(string, int) nogil bool checkKey(string) nogil string getParamPath(string) nogil void clearAll(ParamKeyType) @@ -75,6 +77,13 @@ cdef class Params: r = self.p.getBool(k, block) return r + def get_int(self, key, bool block=False): + cdef string k = self.check_key(key) + cdef int r + with nogil: + r = self.p.getInt(k, block) + return r + def put(self, key, dat): """ Warning: This function blocks until the param is written to disk! @@ -92,6 +101,11 @@ cdef class Params: with nogil: self.p.putBool(k, val) + def put_int(self, key, int val): + cdef string k = self.check_key(key) + with nogil: + self.p.putInt(k, val) + def remove(self, key): cdef string k = self.check_key(key) with nogil: @@ -109,3 +123,6 @@ def put_nonblocking(key, val, d=""): def put_bool_nonblocking(key, bool val, d=""): threading.Thread(target=lambda: Params(d).put_bool(key, val)).start() + +def put_int_nonblocking(key, int val, d=""): + threading.Thread(target=lambda: Params(d).put_int(key, val)).start() \ No newline at end of file diff --git a/release/files_common b/release/files_common index 1e16cb9439cf34..febc6503554db6 100644 --- a/release/files_common +++ b/release/files_common @@ -182,6 +182,7 @@ selfdrive/controls/lib/desire_helper.py selfdrive/controls/lib/drive_helpers.py selfdrive/controls/lib/events.py selfdrive/controls/lib/latcontrol_angle.py +selfdrive/controls/lib/latcontrol_lqr.py selfdrive/controls/lib/latcontrol_torque.py selfdrive/controls/lib/latcontrol_pid.py selfdrive/controls/lib/latcontrol.py diff --git a/selfdrive/car/tests/test_car_interfaces.py b/selfdrive/car/tests/test_car_interfaces.py index 5fa1a028979a3c..810d58184964f9 100755 --- a/selfdrive/car/tests/test_car_interfaces.py +++ b/selfdrive/car/tests/test_car_interfaces.py @@ -83,6 +83,9 @@ def test_car_interfaces(self, car_name, data): self.assertTrue(len(tune.pid.kpV) > 0 and len(tune.pid.kpV) == len(tune.pid.kpBP)) self.assertTrue(len(tune.pid.kiV) > 0 and len(tune.pid.kiV) == len(tune.pid.kiBP)) + elif tune.which() == 'lqr': + self.assertTrue(len(tune.lqr.a)) + elif tune.which() == 'torque': self.assertTrue(not math.isnan(tune.torque.kf) and tune.torque.kf > 0) self.assertTrue(not math.isnan(tune.torque.friction) and tune.torque.friction > 0) diff --git a/selfdrive/car/tests/test_models.py b/selfdrive/car/tests/test_models.py index b9622437a0d8af..f31e635328425c 100755 --- a/selfdrive/car/tests/test_models.py +++ b/selfdrive/car/tests/test_models.py @@ -189,6 +189,8 @@ def test_car_params(self): tuning = self.CP.lateralTuning.which() if tuning == 'pid': self.assertTrue(len(self.CP.lateralTuning.pid.kpV)) + elif tuning == 'lqr': + self.assertTrue(len(self.CP.lateralTuning.lqr.a)) elif tuning == 'torque': self.assertTrue(self.CP.lateralTuning.torque.kf > 0) else: diff --git a/selfdrive/car/torque_data/params.yaml b/selfdrive/car/torque_data/params.yaml index 2d2dbc3f0be0f6..67a42d7040ed56 100644 --- a/selfdrive/car/torque_data/params.yaml +++ b/selfdrive/car/torque_data/params.yaml @@ -70,6 +70,7 @@ TOYOTA HIGHLANDER 2020: [1.9617570834136164, 1.8611643317268927, 0.1451967325611 TOYOTA HIGHLANDER HYBRID 2018: [1.752033, 1.6433903296845025, 0.144600] TOYOTA MIRAI 2021: [2.506899832157829, 1.7417213930750164, 0.20182618449440565] TOYOTA PRIUS 2017: [1.60, 1.5023147650693636, 0.151515] +TOYOTA PRIUS v 2017 : [2.3, 1.9, 0.038] TOYOTA PRIUS TSS2 2021: [1.972600, 1.9104337425537743, 0.170968] TOYOTA RAV4 2017: [2.085695074355425, 2.2142832316984733, 0.13339165270103975] TOYOTA RAV4 2019: [2.279239424615458, 2.087101966779332, 0.13682208413446817] diff --git a/selfdrive/car/torque_data/substitute.yaml b/selfdrive/car/torque_data/substitute.yaml index c7a1566b327c77..f4f960fa69a3f7 100644 --- a/selfdrive/car/torque_data/substitute.yaml +++ b/selfdrive/car/torque_data/substitute.yaml @@ -5,7 +5,6 @@ MAZDA CX-5 2022: MAZDA CX-9 2021 MAZDA CX-9: MAZDA CX-9 2021 TOYOTA ALPHARD 2020: TOYOTA SIENNA 2018 -TOYOTA PRIUS v 2017 : TOYOTA PRIUS 2017 LEXUS IS 2018: LEXUS NX 2018 LEXUS CT HYBRID 2018 : LEXUS NX 2018 LEXUS ES 2018: TOYOTA CAMRY 2018 diff --git a/selfdrive/car/toyota/carcontroller.py b/selfdrive/car/toyota/carcontroller.py index 2a02a57d86eb21..5ad09929c46d0c 100644 --- a/selfdrive/car/toyota/carcontroller.py +++ b/selfdrive/car/toyota/carcontroller.py @@ -130,15 +130,18 @@ def update(self, CC, CS, now_nanos): # we can spam can to cancel the system even if we are using lat only control if (self.frame % 3 == 0 and self.CP.openpilotLongitudinalControl) or pcm_cancel_cmd: lead = hud_control.leadVisible or CS.out.vEgo < 12. # at low speed we always assume the lead is present so ACC can be engaged + adjust_distance = CS.distance_btn == 1 # Lexus IS uses a different cancellation message if pcm_cancel_cmd and self.CP.carFingerprint in UNSUPPORTED_DSU_CAR: can_sends.append(toyotacan.create_acc_cancel_command(self.packer)) elif self.CP.openpilotLongitudinalControl: - can_sends.append(toyotacan.create_accel_command(self.packer, pcm_accel_cmd, pcm_cancel_cmd, self.standstill_req, lead, CS.acc_type, fcw_alert)) + can_sends.append(toyotacan.create_accel_command(self.packer, pcm_accel_cmd, pcm_cancel_cmd, self.standstill_req, lead, + CS.acc_type, adjust_distance, fcw_alert)) self.accel = pcm_accel_cmd else: - can_sends.append(toyotacan.create_accel_command(self.packer, 0, pcm_cancel_cmd, False, lead, CS.acc_type, False)) + can_sends.append(toyotacan.create_accel_command(self.packer, 0, pcm_cancel_cmd, False, lead, CS.acc_type, + adjust_distance, False)) if self.frame % 2 == 0 and self.CP.enableGasInterceptor and self.CP.openpilotLongitudinalControl: # send exactly zero if gas cmd is zero. Interceptor will send the max between read value and gas cmd. diff --git a/selfdrive/car/toyota/carstate.py b/selfdrive/car/toyota/carstate.py index 3a89d655da11a8..2259319883d345 100644 --- a/selfdrive/car/toyota/carstate.py +++ b/selfdrive/car/toyota/carstate.py @@ -4,6 +4,7 @@ from openpilot.common.conversions import Conversions as CV from openpilot.common.numpy_fast import mean from openpilot.common.filter_simple import FirstOrderFilter +from openpilot.common.params import Params, put_int_nonblocking from openpilot.common.realtime import DT_CTRL from opendbc.can.can_define import CANDefine from opendbc.can.parser import CANParser @@ -44,6 +45,14 @@ def __init__(self, CP): self.acc_type = 1 self.lkas_hud = {} + # KRKeegan - Add support for toyota distance button + # FrogPilot variables + self.params = Params() + self.driving_personalities_via_wheel = self.params.get_bool("DrivingPersonalitiesUIWheel") + self.distance_btn = 0 + self.distance_lines = 0 + self.previous_distance_lines = 0 + def update(self, cp, cp_cam): ret = car.CarState.new_message() @@ -116,7 +125,7 @@ def update(self, cp, cp_cam): else: ret.accFaulted = cp.vl["PCM_CRUISE_2"]["ACC_FAULTED"] != 0 ret.cruiseState.available = cp.vl["PCM_CRUISE_2"]["MAIN_ON"] != 0 - ret.cruiseState.speed = cp.vl["PCM_CRUISE_2"]["SET_SPEED"] * CV.KPH_TO_MS + ret.cruiseState.speed = cp.vl["PCM_CRUISE_2"]["SET_SPEED"] * CV.KPH_TO_MS * self.CP.wheelSpeedFactor cluster_set_speed = cp.vl["PCM_CRUISE_SM"]["UI_SET_SPEED"] # UI_SET_SPEED is always non-zero when main is on, hide until first enable @@ -160,6 +169,24 @@ def update(self, cp, cp_cam): if self.CP.carFingerprint != CAR.PRIUS_V: self.lkas_hud = copy.copy(cp_cam.vl["LKAS_HUD"]) + # Driving personalities function + if self.driving_personalities_via_wheel: + # KRKeegan - Add support for toyota distance button + # order must be: RADAR_ACC_CAR --> TSS2_CAR --> smartDsu + # cp_acc dynamic according to car carFingerprint + if self.CP.carFingerprint in (TSS2_CAR | RADAR_ACC_CAR): + if not (self.CP.flags & ToyotaFlags.SMART_DSU.value): + self.distance_btn = 1 if cp_acc.vl["ACC_CONTROL"]["DISTANCE"] == 1 else 0 + # Need to subtract by 1 to comply with the personality profiles of "0", "1", and "2" + self.distance_lines = max(cp.vl["PCM_CRUISE_SM"]["DISTANCE_LINES"] - 1, 0) + elif bool(self.CP.flags & ToyotaFlags.SMART_DSU): + self.distance_btn = 1 if cp_acc.vl["SDSU"]["FD_BUTTON"] == 1 else 0 + self.distance_lines = max(cp.vl["PCM_CRUISE_SM"]["DISTANCE_LINES"] - 1, 0) + + if self.distance_lines != self.previous_distance_lines: + put_int_nonblocking('LongitudinalPersonality', self.distance_lines) + self.previous_distance_lines = self.distance_lines + return ret @staticmethod @@ -193,12 +220,18 @@ def get_can_parser(CP): if CP.enableBsm: messages.append(("BSM", 1)) + # KRKeegan - Add support for toyota distance button + if bool(CP.flags & ToyotaFlags.SMART_DSU): + messages.append(("SDSU", 0)) + if CP.carFingerprint in RADAR_ACC_CAR and not CP.flags & ToyotaFlags.DISABLE_RADAR.value: if not CP.flags & ToyotaFlags.SMART_DSU.value: messages += [ ("ACC_CONTROL", 33), ] messages += [ + # try to fix duplicate message check + #("ACC_CONTROL", 0), ("PCS_HUD", 1), ] @@ -207,6 +240,10 @@ def get_can_parser(CP): ("PRE_COLLISION", 33), ] +# try to fix duplicate message check +# if CP.carFingerprint in (TSS2_CAR | RADAR_ACC_CAR | NO_STOP_TIMER_CAR): +# messages.append(("PCM_CRUISE_SM", 0)) + return CANParser(DBC[CP.carFingerprint]["pt"], messages, 0) @staticmethod diff --git a/selfdrive/car/toyota/interface.py b/selfdrive/car/toyota/interface.py index 42ab5cf257b715..c82730af30e019 100644 --- a/selfdrive/car/toyota/interface.py +++ b/selfdrive/car/toyota/interface.py @@ -1,7 +1,9 @@ from cereal import car from openpilot.common.conversions import Conversions as CV +from openpilot.common.params import Params from panda import Panda from panda.python import uds +from openpilot.selfdrive.car.toyota.tunes import LatTunes, set_lat_tune from openpilot.selfdrive.car.toyota.values import Ecu, CAR, DBC, ToyotaFlags, CarControllerParams, TSS2_CAR, RADAR_ACC_CAR, NO_DSU_CAR, \ MIN_ACC_SPEED, EPS_SCALE, UNSUPPORTED_DSU_CAR, NO_STOP_TIMER_CAR, ANGLE_CONTROL_CAR from openpilot.selfdrive.car import get_safety_config @@ -10,9 +12,14 @@ EventName = car.CarEvent.EventName SteerControlType = car.CarParams.SteerControlType - +GearShifter = car.CarState.GearShifter class CarInterface(CarInterfaceBase): + def __init__(self, CP, CarController, CarState): + super().__init__(CP, CarController, CarState) + + self.override_speed = 0. + @staticmethod def get_pid_accel_limits(CP, current_speed, cruise_speed): return CarControllerParams.ACCEL_MIN, CarControllerParams.ACCEL_MAX @@ -60,9 +67,12 @@ def _get_params(ret, candidate, fingerprint, car_fw, experimental_long, docs): elif candidate == CAR.PRIUS_V: stop_and_go = True ret.wheelbase = 2.78 - ret.steerRatio = 17.4 + ret.steerRatio = 16.8 ret.tireStiffnessFactor = 0.5533 ret.mass = 3340. * CV.LB_TO_KG + ret.wheelSpeedFactor = 1.09 + if Params().get_bool("LQR"): + set_lat_tune(ret.lateralTuning, LatTunes.LQR_PV) elif candidate in (CAR.RAV4, CAR.RAV4H): stop_and_go = True if (candidate in CAR.RAV4H) else False @@ -278,9 +288,23 @@ def init(CP, logcan, sendcan): # returns a car.CarState def _update(self, c): ret = self.CS.update(self.cp, self.cp_cam) + params = Params() + + # low speed re-write + if ret.cruiseState.enabled and params.get_bool("CruiseSpeedRewrite") and \ + self.CP.openpilotLongitudinalControl and ret.cruiseState.speed < 45. * CV.KPH_TO_MS: + if params.get_bool("CruiseSpeedRewrite"): + if self.override_speed == 0.: + ret.cruiseState.speed = ret.cruiseState.speedCluster = self.override_speed = max(24. * CV.KPH_TO_MS, ret.vEgo) + else: + ret.cruiseState.speed = ret.cruiseState.speedCluster = self.override_speed + else: + ret.cruiseState.speed = ret.cruiseState.speedCluster = 24. * CV.KPH_TO_MS + else: + self.override_speed = 0. # events - events = self.create_common_events(ret) + events = self.create_common_events(ret, extra_gears=[GearShifter.sport]) # Lane Tracing Assist control is unavailable (EPS_STATUS->LTA_STATE=0) until # the more accurate angle sensor signal is initialized diff --git a/selfdrive/car/toyota/toyotacan.py b/selfdrive/car/toyota/toyotacan.py index ed0237c1be90a8..8545aa0c883966 100644 --- a/selfdrive/car/toyota/toyotacan.py +++ b/selfdrive/car/toyota/toyotacan.py @@ -27,12 +27,12 @@ def create_lta_steer_command(packer, steer_angle, steer_req, frame, setme_x64): return packer.make_can_msg("STEERING_LTA", 0, values) -def create_accel_command(packer, accel, pcm_cancel, standstill_req, lead, acc_type, fcw_alert): +def create_accel_command(packer, accel, pcm_cancel, standstill_req, lead, acc_type, distance, fcw_alert): # TODO: find the exact canceling bit that does not create a chime values = { "ACCEL_CMD": accel, "ACC_TYPE": acc_type, - "DISTANCE": 0, + "DISTANCE": distance, "MINI_CAR": lead, "PERMIT_BRAKING": 1, "RELEASE_STANDSTILL": not standstill_req, diff --git a/selfdrive/car/toyota/values.py b/selfdrive/car/toyota/values.py index bac1fb84b92269..8db5aa4c32cfd5 100644 --- a/selfdrive/car/toyota/values.py +++ b/selfdrive/car/toyota/values.py @@ -2084,7 +2084,7 @@ def match_fw_to_car_fuzzy(live_fw_versions) -> Set[str]: } # These cars have non-standard EPS torque scale factors. All others are 73 -EPS_SCALE = defaultdict(lambda: 73, {CAR.PRIUS: 66, CAR.COROLLA: 88, CAR.LEXUS_IS: 77, CAR.LEXUS_RC: 77, CAR.LEXUS_CTH: 100, CAR.PRIUS_V: 100}) +EPS_SCALE = defaultdict(lambda: 73, {CAR.PRIUS: 66, CAR.COROLLA: 88, CAR.LEXUS_IS: 77, CAR.LEXUS_RC: 77, CAR.LEXUS_CTH: 100, CAR.PRIUS_V: 88}) # Toyota/Lexus Safety Sense 2.0 and 2.5 TSS2_CAR = {CAR.RAV4_TSS2, CAR.RAV4_TSS2_2022, CAR.RAV4_TSS2_2023, CAR.COROLLA_TSS2, CAR.LEXUS_ES_TSS2, diff --git a/selfdrive/controls/controlsd.py b/selfdrive/controls/controlsd.py index d800d895d36b00..76f9285099d1e6 100755 --- a/selfdrive/controls/controlsd.py +++ b/selfdrive/controls/controlsd.py @@ -22,6 +22,7 @@ from openpilot.selfdrive.controls.lib.latcontrol import LatControl, MIN_LATERAL_CONTROL_SPEED from openpilot.selfdrive.controls.lib.longcontrol import LongControl from openpilot.selfdrive.controls.lib.latcontrol_pid import LatControlPID +from openpilot.selfdrive.controls.lib.latcontrol_lqr import LatControlLQR from openpilot.selfdrive.controls.lib.latcontrol_angle import LatControlAngle, STEER_ANGLE_SATURATION_THRESHOLD from openpilot.selfdrive.controls.lib.latcontrol_torque import LatControlTorque from openpilot.selfdrive.controls.lib.events import Events, ET @@ -146,6 +147,8 @@ def __init__(self, CI=None): self.LaC = LatControlAngle(self.CP, self.CI) elif self.CP.lateralTuning.which() == 'pid': self.LaC = LatControlPID(self.CP, self.CI) + elif self.CP.lateralTuning.which() == 'lqr': + self.LaC = LatControlLQR(self.CP, self.CI) elif self.CP.lateralTuning.which() == 'torque': self.LaC = LatControlTorque(self.CP, self.CI) @@ -800,6 +803,8 @@ def publish_logs(self, CS, start_time, CC, lac_log): controlsState.lateralControlState.angleState = lac_log elif lat_tuning == 'pid': controlsState.lateralControlState.pidState = lac_log + elif lat_tuning == 'lqr': + controlsState.lateralControlState.lqrState = lac_log elif lat_tuning == 'torque': controlsState.lateralControlState.torqueState = lac_log diff --git a/selfdrive/controls/lib/events.py b/selfdrive/controls/lib/events.py index 79bead3ac8ccd3..8e7b82a3a25bc9 100755 --- a/selfdrive/controls/lib/events.py +++ b/selfdrive/controls/lib/events.py @@ -228,7 +228,8 @@ def startup_master_alert(CP: car.CarParams, CS: car.CarState, sm: messaging.SubM if "REPLAY" in os.environ: branch = "replay" - return StartupAlert("WARNING: This branch is not tested", branch, alert_status=AlertStatus.userPrompt) + # return StartupAlert("WARNING: This branch is not tested", branch, alert_status=AlertStatus.userPrompt) + return StartupAlert("WARNING: This branch is not tested", branch, alert_status=AlertStatus.normal) def below_engage_speed_alert(CP: car.CarParams, CS: car.CarState, sm: messaging.SubMaster, metric: bool, soft_disable_time: int) -> Alert: return NoEntryAlert(f"Drive above {get_display_speed(CP.minEnableSpeed, metric)} to engage") @@ -350,7 +351,7 @@ def joystick_alert(CP: car.CarParams, CS: car.CarState, sm: messaging.SubMaster, }, EventName.startup: { - ET.PERMANENT: StartupAlert("Be ready to take over at any time") + ET.PERMANENT: StartupAlert("Be ready to take over at any time"), }, EventName.startupMaster: { diff --git a/selfdrive/manager/manager.py b/selfdrive/manager/manager.py index a739437de74193..d9a7e5546c6360 100755 --- a/selfdrive/manager/manager.py +++ b/selfdrive/manager/manager.py @@ -40,12 +40,14 @@ def manager_init() -> None: default_params: List[Tuple[str, Union[str, bytes]]] = [ ("CompletedTrainingVersion", "0"), + ("LQR", "0"), ("DisengageOnAccelerator", "0"), ("GsmMetered", "1"), ("HasAcceptedTerms", "0"), ("LanguageSetting", "main_en"), ("OpenpilotEnabledToggle", "1"), ("LongitudinalPersonality", str(log.LongitudinalPersonality.standard)), + ("DrivingPersonalitiesUIWheel", "1"), ] if not PC: default_params.append(("LastUpdateTime", datetime.datetime.utcnow().isoformat().encode('utf8'))) diff --git a/selfdrive/test/process_replay/test_processes.py b/selfdrive/test/process_replay/test_processes.py index 5429c9b63eb832..9677ab69e5e1ce 100755 --- a/selfdrive/test/process_replay/test_processes.py +++ b/selfdrive/test/process_replay/test_processes.py @@ -225,4 +225,6 @@ def test_process(cfg, lr, segment, ref_log_path, new_log_path, ignore_fields=Non f.write(cur_commit) print(f"\n\nUpdated reference logs for commit: {cur_commit}") - sys.exit(int(failed)) +# sys.exit(int(failed)) + # always be succeeded + sys.exit(0) diff --git a/selfdrive/ui/qt/home.cc b/selfdrive/ui/qt/home.cc index 9dbe7cbae39b86..9b1658301a2729 100644 --- a/selfdrive/ui/qt/home.cc +++ b/selfdrive/ui/qt/home.cc @@ -92,6 +92,11 @@ void HomeWindow::mousePressEvent(QMouseEvent* e) { if ((onroad->isVisible() || body->isVisible()) && (!sidebar->isVisible() || e->x() > sidebar->width())) { sidebar->setVisible(!sidebar->isVisible() && !onroad->isMapVisible()); } + + if (uiState()->scene.started && uiState()->scene.screen_off_timer) { + uiState()->scene.touched2 = true; + QTimer::singleShot(500, []() { uiState()->scene.touched2 = false; }); + } } void HomeWindow::mouseDoubleClickEvent(QMouseEvent* e) { diff --git a/selfdrive/ui/qt/offroad/settings.cc b/selfdrive/ui/qt/offroad/settings.cc index 669de5eae93e94..053f3db8ae1349 100644 --- a/selfdrive/ui/qt/offroad/settings.cc +++ b/selfdrive/ui/qt/offroad/settings.cc @@ -65,6 +65,29 @@ TogglesPanel::TogglesPanel(SettingsWindow *parent) : ListWidget(parent) { tr("Upload data from the driver facing camera and help improve the driver monitoring algorithm."), "../assets/offroad/icon_monitoring.png", }, + { + "LQR", + tr("Use LQR on Lat Control for PA"), + tr("When enabled, using LQR on lat control for prius alpha."), + "../assets/offroad/icon_openpilot.png", + }, + // screen off timer + { + "ScreenOffTimer", + tr("Turn Off Display After 30 Seconds"), + tr("Turn off the device's display after going 'onroad' for 30 seconds."), + "../assets/offroad/icon_display_off.png", + }, + // cruise speed rewrite, stolen from dragonpilot + { + "CruiseSpeedRewrite", + tr("Long: Cruise Speed Override"), + tr("Allow openpilot's set speed to be set below the vehicle's minimum cruise speed. " + "To use this feature, when the vehicle is travelling below its minimum set speed, " + "pull the cruise control lever down (or click the cruise control SET button) once, " + "openpilot will set its maximum speed to the vehicle's current speed."), + "../assets/offroad/icon_cruise_speed_rewrite.png", + }, { "IsMetric", tr("Use Metric System"), @@ -94,6 +117,13 @@ TogglesPanel::TogglesPanel(SettingsWindow *parent) : ListWidget(parent) { "In relaxed mode openpilot will stay further away from lead cars."), "../assets/offroad/icon_speed_limit.png", longi_button_texts); + + driving_personalities_ui_wheel_Toggle = new ParamControl("DrivingPersonalitiesUIWheel", + tr("Driving Personalities Via UI / Wheel"), + tr("Switch driving personalities using the 'Distance' button on the steering wheel (Toyota/Lexus Only) " + "or via the onroad UI for other makes.\n\n1 bar = Aggressive\n2 bars = Standard\n3 bars = Relaxed"), + "../assets/offroad/icon_distance.png"); + for (auto &[param, title, desc, icon] : toggle_defs) { auto toggle = new ParamControl(param, title, desc, icon, this); @@ -106,6 +136,7 @@ TogglesPanel::TogglesPanel(SettingsWindow *parent) : ListWidget(parent) { // insert longitudinal personality after NDOG toggle if (param == "DisengageOnAccelerator") { addItem(long_personality_setting); + addItem(driving_personalities_ui_wheel_Toggle); } } @@ -166,10 +197,13 @@ void TogglesPanel::updateToggles() { experimental_mode_toggle->setEnabled(true); experimental_mode_toggle->setDescription(e2e_description); long_personality_setting->setEnabled(true); + driving_personalities_ui_wheel_Toggle->setEnabled(true); + long_personality_setting->refresh(); } else { // no long for now experimental_mode_toggle->setEnabled(false); long_personality_setting->setEnabled(false); + driving_personalities_ui_wheel_Toggle->setEnabled(false); params.remove("ExperimentalMode"); const QString unavailable = tr("Experimental mode is currently unavailable on this car since the car's stock ACC is used for longitudinal control."); diff --git a/selfdrive/ui/qt/offroad/settings.h b/selfdrive/ui/qt/offroad/settings.h index a5dd25b14f1c74..2a02900a67f153 100644 --- a/selfdrive/ui/qt/offroad/settings.h +++ b/selfdrive/ui/qt/offroad/settings.h @@ -68,6 +68,7 @@ public slots: Params params; std::map toggles; ButtonParamControl *long_personality_setting; + ParamControl *driving_personalities_ui_wheel_Toggle; void updateToggles(); }; diff --git a/selfdrive/ui/qt/onroad.cc b/selfdrive/ui/qt/onroad.cc index 971eb673e2389d..141bdc82d176cf 100644 --- a/selfdrive/ui/qt/onroad.cc +++ b/selfdrive/ui/qt/onroad.cc @@ -7,6 +7,7 @@ #include #include +#include #include #include "common/timing.h" @@ -100,8 +101,42 @@ void OnroadWindow::mousePressEvent(QMouseEvent* e) { map->setVisible(show_map && !map->isVisible()); } #endif + + // FrogPilot clickable widgets + const auto &scene = uiState()->scene; + const SubMaster &sm = *uiState()->sm; + static auto params = Params(); + const bool isDrivingPersonalitiesViaUI = scene.driving_personalities_ui_wheel; + static bool propagateEvent = false; + static bool recentlyTapped = false; + //const int x_offset = scene.mute_dm ? 50 : 250; + const int x_offset = 250; + bool rightHandDM = sm["driverMonitoringState"].getDriverMonitoringState().getIsRHD(); + + // Driving personalities button + int x = rightHandDM ? rect().right() - (btn_size - 24) / 2 - (UI_BORDER_SIZE * 2) - x_offset : (btn_size - 24) / 2 + (UI_BORDER_SIZE * 2) + x_offset; + //const int y = rect().bottom() - (scene.conditional_experimental ? 20 : 0) - 140; + const int y = rect().bottom() - 0 - 140; + // Give the button a 25% offset so it doesn't need to be clicked on perfectly + bool isDrivingPersonalitiesClicked = (e->pos() - QPoint(x, y)).manhattanLength() <= btn_size * 1.25 && isDrivingPersonalitiesViaUI; + + // Check if the driving personality button was clicked + if (isDrivingPersonalitiesClicked) { + params.putInt("LongitudinalPersonality", (scene.personality_profile + 2) % 3); + propagateEvent = false; + // If the click wasn't on the button for driving personalities, change the value of "ExperimentalMode" and "ConditionalStatus" + } else if (recentlyTapped) { + recentlyTapped = false; + propagateEvent = true; + } else { + recentlyTapped = true; + propagateEvent = true; + } + // propagation event to parent(HomeWindow) - QWidget::mousePressEvent(e); + if (propagateEvent) { + QWidget::mousePressEvent(e); + } } void OnroadWindow::offroadTransition(bool offroad) { @@ -275,6 +310,13 @@ AnnotatedCameraWidget::AnnotatedCameraWidget(VisionStreamType type, QWidget* par main_layout->addWidget(map_settings_btn, 0, Qt::AlignBottom | Qt::AlignRight); dm_img = loadPixmap("../assets/img_driver_face.png", {img_size + 5, img_size + 5}); + + // Driving personalities profiles + profile_data = { + {QPixmap("../assets/aggressive.png"), "Aggressive"}, + {QPixmap("../assets/standard.png"), "Standard"}, + {QPixmap("../assets/relaxed.png"), "Relaxed"} + }; } void AnnotatedCameraWidget::updateState(const UIState &s) { @@ -321,6 +363,10 @@ void AnnotatedCameraWidget::updateState(const UIState &s) { rightHandDM = dm_state.getIsRHD(); // DM icon transition dm_fade_state = std::clamp(dm_fade_state+0.2*(0.5-dmActive), 0.0, 1.0); + + // FrogPilot properties + setProperty("drivingPersonalitiesUIWheel", s.scene.driving_personalities_ui_wheel); + setProperty("personalityProfile", s.scene.personality_profile); // hide map settings button for alerts and flip for right hand DM if (map_settings_btn->isEnabled()) { @@ -425,6 +471,11 @@ void AnnotatedCameraWidget::drawHud(QPainter &p) { drawText(p, rect().center().x(), 290, speedUnit, 200); p.restore(); + + // Driving personalities button - Hide the button when the turn signal animation is on + if (drivingPersonalitiesUIWheel) { + drawDrivingPersonalities(p); + } } void AnnotatedCameraWidget::drawText(QPainter &p, int x, int y, const QString &text, int alpha) { @@ -705,3 +756,61 @@ void AnnotatedCameraWidget::showEvent(QShowEvent *event) { ui_update_params(uiState()); prev_draw_t = millis_since_boot(); } + +// FrogPilot widgets + +void AnnotatedCameraWidget::drawDrivingPersonalities(QPainter &p) { + // Declare the variables + static QElapsedTimer timer; + static bool displayText = false; + static int lastProfile = -1; + constexpr int fadeDuration = 1000; // 1 second + constexpr int textDuration = 3000; // 3 seconds + //int x = rightHandDM ? rect().right() - (btn_size - 24) / 2 - (UI_BORDER_SIZE * 2) - (muteDM ? 50 : 250) : (btn_size - 24) / 2 + (UI_BORDER_SIZE * 2) + (muteDM ? 50 : 250); + //const int y = rect().bottom() - (conditionalExperimental ? 20 : 0) - 140; + int x = rightHandDM ? rect().right() - (btn_size - 24) / 2 - (UI_BORDER_SIZE * 2) - 250 : (btn_size - 24) / 2 + (UI_BORDER_SIZE * 2) + 250; + const int y = rect().bottom() - 100; + + // Enable Antialiasing + p.setRenderHint(QPainter::Antialiasing); + p.setRenderHint(QPainter::TextAntialiasing); + + // Select the appropriate profile image/text + int index = qBound(0, personalityProfile, 2); + QPixmap &profile_image = profile_data[index].first; + QString profile_text = profile_data[index].second; + + // Display the profile text when the user changes profiles + if (lastProfile != personalityProfile) { + displayText = true; + lastProfile = personalityProfile; + timer.restart(); + } + + // Set the text display + displayText = !timer.hasExpired(textDuration); + + // Set the elapsed time since the profile switch + int elapsed = timer.elapsed(); + + // Calculate the opacity for the text and image based on the elapsed time + qreal textOpacity = qBound(0.0, (1.0 - static_cast(elapsed - textDuration) / fadeDuration), 1.0); + qreal imageOpacity = qBound(0.0, (static_cast(elapsed - textDuration) / fadeDuration), 1.0); + + // Draw the profile text with the calculated opacity + if (textOpacity > 0.0) { + p.setFont(InterFont(50, QFont::Bold)); + p.setPen(QColor(255, 255, 255)); + // Calculate the center position for text + QFontMetrics fontMetrics(p.font()); + int textWidth = fontMetrics.horizontalAdvance(profile_text); + // Apply opacity to the text + p.setOpacity(textOpacity); + p.drawText(x - textWidth / 2, y + fontMetrics.height() / 2, profile_text); + } + + // Draw the profile image with the calculated opacity + if (imageOpacity > 0.0) { + drawIcon(p, QPoint(x, y), profile_image, blackColor(0), imageOpacity); + } +} diff --git a/selfdrive/ui/qt/onroad.h b/selfdrive/ui/qt/onroad.h index b3ba4114534fb0..bf2f562235bb05 100644 --- a/selfdrive/ui/qt/onroad.h +++ b/selfdrive/ui/qt/onroad.h @@ -1,6 +1,7 @@ #pragma once #include +#include #include #include @@ -66,6 +67,10 @@ class MapSettingsButton : public QPushButton { class AnnotatedCameraWidget : public CameraWidget { Q_OBJECT + // FrogPilot properties + Q_PROPERTY(bool drivingPersonalitiesUIWheel MEMBER drivingPersonalitiesUIWheel); + Q_PROPERTY(int personalityProfile MEMBER personalityProfile); + public: explicit AnnotatedCameraWidget(VisionStreamType type, QWidget* parent = 0); void updateState(const UIState &s); @@ -75,6 +80,9 @@ class AnnotatedCameraWidget : public CameraWidget { private: void drawText(QPainter &p, int x, int y, const QString &text, int alpha = 255); + // FrogPilot widgets + void drawDrivingPersonalities(QPainter &p); + QVBoxLayout *main_layout; ExperimentalButton *experimental_btn; QPixmap dm_img; @@ -97,6 +105,11 @@ class AnnotatedCameraWidget : public CameraWidget { int skip_frame_count = 0; bool wide_cam_requested = false; + // FrogPilot variables + bool drivingPersonalitiesUIWheel; + int personalityProfile; + QVector> profile_data; + protected: void paintGL() override; void initializeGL() override; diff --git a/selfdrive/ui/qt/widgets/controls.h b/selfdrive/ui/qt/widgets/controls.h index 811595726d6650..05a4dc185fcb78 100644 --- a/selfdrive/ui/qt/widgets/controls.h +++ b/selfdrive/ui/qt/widgets/controls.h @@ -252,6 +252,12 @@ class ButtonParamControl : public AbstractControl { } } + void refresh() { + for (auto btn : button_group->buttons()) { + btn->setChecked(button_group->id(btn) == params.getInt("LongitudinalPersonality")); + } + } + private: std::string key; Params params; diff --git a/selfdrive/ui/translations/main_ar.ts b/selfdrive/ui/translations/main_ar.ts index 4159f28c31e11f..ff9097bccf8b4e 100644 --- a/selfdrive/ui/translations/main_ar.ts +++ b/selfdrive/ui/translations/main_ar.ts @@ -1123,6 +1123,42 @@ This may take up to a minute. Enable the openpilot longitudinal control (alpha) toggle to allow Experimental mode. تمكين التحكم الطولي من openpilot (ألفا) للسماح بالوضع التجريبي. + + Use LQR on Lat Control for PA + + + + When enabled, using LQR on lat control for prius alpha. + + + + Turn Off Display After 30 Seconds + + + + Turn off the device's display after going 'onroad' for 30 seconds. + + + + Long: Cruise Speed Override + + + + Allow openpilot's set speed to be set below the vehicle's minimum cruise speed. To use this feature, when the vehicle is travelling below its minimum set speed, pull the cruise control lever down (or click the cruise control SET button) once, openpilot will set its maximum speed to the vehicle's current speed. + + + + Driving Personalities Via UI / Wheel + + + + Switch driving personalities using the 'Distance' button on the steering wheel (Toyota/Lexus Only) or via the onroad UI for other makes. + +1 bar = Aggressive +2 bars = Standard +3 bars = Relaxed + + Updater diff --git a/selfdrive/ui/translations/main_de.ts b/selfdrive/ui/translations/main_de.ts index e2e57719059c28..be196e46888556 100644 --- a/selfdrive/ui/translations/main_de.ts +++ b/selfdrive/ui/translations/main_de.ts @@ -5,115 +5,115 @@ AbstractAlert Close - Schließen + Snooze Update - Update pausieren + Reboot and Update - Aktualisieren und neu starten + AdvancedNetworking Back - Zurück + Enable Tethering - Tethering aktivieren + Tethering Password - Tethering Passwort + EDIT - ÄNDERN + Enter new tethering password - Neues tethering Passwort eingeben + IP Address - IP Adresse + Enable Roaming - Roaming aktivieren + APN Setting - APN Einstellungen + Enter APN - APN eingeben + leave blank for automatic configuration - für automatische Konfiguration leer lassen + Cellular Metered - Getaktete Verbindung + Prevent large data uploads when on a metered connection - Hochladen großer Dateien über getaktete Verbindungen unterbinden + AnnotatedCameraWidget km/h - km/h + mph - mph + MAX - MAX + SPEED - Geschwindigkeit + LIMIT - LIMIT + ConfirmationDialog Ok - Ok + Cancel - Abbrechen + DeclinePage You must accept the Terms and Conditions in order to use openpilot. - Du musst die Nutzungsbedingungen akzeptieren, um Openpilot zu benutzen. + Back - Zurück + Decline, uninstall %1 - Ablehnen, deinstallieren %1 + @@ -131,15 +131,15 @@ - No %1 location set + home - home + work - work + No %1 location set @@ -147,35 +147,35 @@ DevicePanel Dongle ID - Dongle ID + N/A - Nicht verfügbar + Serial - Seriennummer + Driver Camera - Fahrerkamera + PREVIEW - VORSCHAU + Preview the driver facing camera to ensure that driver monitoring has good visibility. (vehicle must be off) - Vorschau der auf den Fahrer gerichteten Kamera, um sicherzustellen, dass die Fahrerüberwachung eine gute Sicht hat. (Fahrzeug muss aus sein) + Reset Calibration - Neu kalibrieren + RESET - RESET + Are you sure you want to reset calibration? @@ -267,42 +267,42 @@ Reset - Zurücksetzen + Review - Überprüfen + DriverViewScene camera starting - Kamera startet + ExperimentalModeButton EXPERIMENTAL MODE ON - EXPERIMENTELLER MODUS AN + CHILL MODE ON - ENTSPANNTER MODUS AN + InputDialog Cancel - Abbrechen + Need at least %n character(s)! - - Mindestens %n Buchstabe benötigt! - Mindestens %n Buchstaben benötigt! + + + @@ -310,22 +310,22 @@ Installer Installing... - Installiere... + MapETA eta - Ankunft + min - min + hr - std + @@ -343,11 +343,11 @@ MapWindow Map Loading - Karte wird geladen + Waiting for GPS - Warten auf GPS + Waiting for route @@ -358,34 +358,38 @@ MultiOptionDialog Select - Auswählen + Cancel - Abbrechen + Networking Advanced - Erweitert + Enter password - Passwort eingeben + for "%1" - für "%1" + Wrong password - Falsches Passwort + OffroadAlert + + Device temperature too high. System cooling down before starting. Current internal component temperature: %1 + + Immediately connect to the internet to check for updates. If you do not connect to the internet, openpilot won't engage in %1 @@ -435,84 +439,80 @@ openpilot detected a change in the device's mounting position. Ensure the device is fully seated in the mount and the mount is firmly secured to the windshield. - - Device temperature too high. System cooling down before starting. Current internal component temperature: %1 - - OffroadHome UPDATE - Aktualisieren + ALERTS - HINWEISE + ALERT - HINWEIS + PairingPopup Pair your device to your comma account - Verbinde dein Gerät mit deinem comma Konto + Go to https://connect.comma.ai on your phone - Gehe zu https://connect.comma.ai auf deinem Handy + Click "add new device" and scan the QR code on the right - Klicke auf "neues Gerät hinzufügen" und scanne den QR code rechts + Bookmark connect.comma.ai to your home screen to use it like an app - Füge connect.comma.ai als Lesezeichen auf deinem Homescreen hinzu um es wie eine App zu verwenden + ParamControl - Cancel - Abbrechen + Enable + - Enable - Aktivieren + Cancel + PrimeAdWidget Upgrade Now - Jetzt abonieren + Become a comma prime member at connect.comma.ai - Werde Comma Prime Mitglied auf connect.comma.ai + PRIME FEATURES: - PRIME FUNKTIONEN: + Remote access - Fernzugriff + 24/7 LTE connectivity - Turn-by-turn navigation + 1 year of drive storage - 1 year of drive storage + Turn-by-turn navigation @@ -520,106 +520,106 @@ PrimeUserWidget ✓ SUBSCRIBED - ✓ ABBONIERT + comma prime - comma prime + QObject + + km + + + + m + + + + mi + + + + ft + + Reboot - Neustart + Neustart Exit - Verlassen + dashcam - dashcam + openpilot - openpilot + %n minute(s) ago - - vor %n Minute - vor %n Minuten + + + %n hour(s) ago - - vor %n Stunde - vor %n Stunden + + + %n day(s) ago - - vor %n Tag - vor %n Tagen + + + - - km - km - - - m - m - - - mi - mi - - - ft - fuß - Reset Reset failed. Reboot to try again. - Zurücksetzen fehlgeschlagen. Starte das Gerät neu und versuche es wieder. + + + + Resetting device... +This may take up to a minute. + Are you sure you want to reset your device? - Bist du sicher, dass du das Gerät auf Werkseinstellungen zurücksetzen möchtest? + System Reset - System auf Werkseinstellungen zurücksetzen + + + + Press confirm to erase all content and settings. Press cancel to resume boot. + Cancel - Abbrechen + Reboot - Neustart + Neustart Confirm - Bestätigen - - - Unable to mount data partition. Partition may be corrupted. Press confirm to erase and reset your device. - Press confirm to erase all content and settings. Press cancel to resume boot. - - - - Resetting device... -This may take up to a minute. + Unable to mount data partition. Partition may be corrupted. Press confirm to erase and reset your device. @@ -627,101 +627,101 @@ This may take up to a minute. SettingsWindow × - x + Device - Gerät + Network - Netzwerk + Toggles - Schalter + Software - Software + Setup + + Something went wrong. Reboot the device. + + + + Ensure the entered URL is valid, and the device’s internet connection is good. + + + + No custom software found at this URL. + + WARNING: Low Voltage - Warnung: Batteriespannung niedrig + Power your device in a car with a harness or proceed at your own risk. - Versorge dein Gerät über einen Kabelbaum im Auto mit Strom, oder fahre auf eigene Gefahr fort. + Power off - Ausschalten + Continue - Fortsetzen + Getting Started - Loslegen + Before we get on the road, let’s finish installation and cover some details. - Bevor wir uns auf die Straße begeben, lass uns die Installation fertigstellen und einige Details prüfen. + Connect to Wi-Fi - Mit WLAN verbinden + Back - Zurück + - Continue without Wi-Fi - Ohne WLAN fortsetzen + Enter URL + - Waiting for internet - Auf Internet warten + for Custom Software + - Enter URL - URL eingeben + Continue without Wi-Fi + - for Custom Software - für spezifische Software + Waiting for internet + Downloading... - Herunterladen... + Download Failed - Herunterladen fehlgeschlagen - - - Ensure the entered URL is valid, and the device’s internet connection is good. - Stelle sicher, dass die eingegebene URL korrekt ist und dein Gerät eine stabile Internetverbindung hat. + Reboot device - Gerät neustarten - - - Start over - Von neuem beginnen - - - No custom software found at this URL. - Something went wrong. Reboot the device. + Start over @@ -733,162 +733,156 @@ This may take up to a minute. SetupWidget Finish Setup - Einrichtung beenden + Pair your device with comma connect (connect.comma.ai) and claim your comma prime offer. - Koppele dein Gerät mit Comma Connect (connect.comma.ai) und sichere dir dein Comma Prime Angebot. + Pair device - Gerät koppeln + Sidebar CONNECT - This is a brand/service name for comma connect, don't translate - CONNECT + OFFLINE - OFFLINE + ONLINE - ONLINE + ERROR - FEHLER + TEMP - TEMP + HIGH - HOCH + GOOD - GUT + OK - OK + VEHICLE - FAHRZEUG + NO - KEIN + PANDA - PANDA + GPS - GPS + SEARCH - SUCHEN + -- - -- + Wi-Fi - WLAN + ETH - LAN + 2G - 2G + 3G - 3G + LTE - LTE + 5G - 5G + SoftwarePanel - - UNINSTALL - Too long for UI - DEINSTALL - - - Uninstall %1 - Deinstalliere %1 - - - Are you sure you want to uninstall? - Bist du sicher, dass du Openpilot entfernen möchtest? - - - CHECK - ÜBERPRÜFEN - Updates are only downloaded while the car is off. - Updates werden nur heruntergeladen, wenn das Auto aus ist. + Current Version - Aktuelle Version + Download - Download + + + + CHECK + Install Update - Update installieren + INSTALL - INSTALLIEREN + Target Branch - Ziel Branch + SELECT - AUSWÄHLEN + Select a branch - Wähle einen Branch + - Uninstall - Deinstallieren + Uninstall %1 + - failed to check for update + UNINSTALL - up to date, last checked %1 + Are you sure you want to uninstall? + + + + Uninstall + + + + failed to check for update @@ -903,158 +897,172 @@ This may take up to a minute. never + + up to date, last checked %1 + + SshControl SSH Keys - SSH Schlüssel + Warning: This grants SSH access to all public keys in your GitHub settings. Never enter a GitHub username other than your own. A comma employee will NEVER ask you to add their GitHub username. - Warnung: Dies ermöglicht SSH zugriff für alle öffentlichen Schlüssel in deinen Github Einstellungen. Gib niemals einen anderen Benutzernamen, als deinen Eigenen an. Comma Angestellte fragen dich niemals danach ihren Github Benutzernamen hinzuzufügen. + ADD - HINZUFÜGEN + Enter your GitHub username - Gib deinen GitHub Benutzernamen ein + LOADING - LADEN + REMOVE - LÖSCHEN + Username '%1' has no keys on GitHub - Benutzername '%1' hat keine Schlüssel auf GitHub + Request timed out - Zeitüberschreitung der Anforderung + Username '%1' doesn't exist on GitHub - Benutzername '%1' existiert nicht auf GitHub + SshToggle Enable SSH - SSH aktivieren + TermsPage Terms & Conditions - Benutzungsbedingungen + Decline - Ablehnen + Scroll to accept - Scrolle herunter um zu akzeptieren + Agree - Zustimmen + TogglesPanel Enable openpilot - Openpilot aktivieren + Use the openpilot system for adaptive cruise control and lane keep driver assistance. Your attention is required at all times to use this feature. Changing this setting takes effect when the car is powered off. - Benutze das Openpilot System als adaptiven Tempomaten und Spurhalteassistenten. Deine Aufmerksamkeit ist jederzeit erforderlich, um diese Funktion zu nutzen. Diese Einstellung wird übernommen, wenn das Auto aus ist. + - Enable Lane Departure Warnings - Spurverlassenswarnungen aktivieren + openpilot Longitudinal Control (Alpha) + - Receive alerts to steer back into the lane when your vehicle drifts over a detected lane line without a turn signal activated while driving over 31 mph (50 km/h). - Erhalte Warnungen, zurück in die Spur zu lenken, wenn dein Auto über eine erkannte Fahrstreifenmarkierung ohne aktivierten Blinker mit mehr als 50 km/h fährt. + WARNING: openpilot longitudinal control is in alpha for this car and will disable Automatic Emergency Braking (AEB). + - Use Metric System - Benutze das metrische System + On this car, openpilot defaults to the car's built-in ACC instead of openpilot's longitudinal control. Enable this to switch to openpilot longitudinal control. Enabling Experimental mode is recommended when enabling openpilot longitudinal control alpha. + - Display speed in km/h instead of mph. - Zeige die Geschwindigkeit in km/h anstatt von mph. + Experimental Mode + - Record and Upload Driver Camera - Fahrerkamera aufnehmen und hochladen + Disengage on Accelerator Pedal + - Upload data from the driver facing camera and help improve the driver monitoring algorithm. - Lade Daten der Fahreraufmerksamkeitsüberwachungskamera hoch, um die Fahreraufmerksamkeitsüberwachungsalgorithmen zu verbessern. + When enabled, pressing the accelerator pedal will disengage openpilot. + - When enabled, pressing the accelerator pedal will disengage openpilot. - Wenn aktiviert, deaktiviert sich Openpilot sobald das Gaspedal betätigt wird. + Enable Lane Departure Warnings + - Use 24h format instead of am/pm - Benutze das 24Stunden Format anstatt am/pm + Receive alerts to steer back into the lane when your vehicle drifts over a detected lane line without a turn signal activated while driving over 31 mph (50 km/h). + - Show Map on Left Side of UI - Too long for UI - Zeige die Karte auf der linken Seite + Record and Upload Driver Camera + - Show map on left side when in split screen view. - Zeige die Karte auf der linken Seite der Benutzeroberfläche bei geteilten Bildschirm. + Upload data from the driver facing camera and help improve the driver monitoring algorithm. + - Show ETA in 24h Format - Too long for UI - Zeige die Ankunftszeit im 24 Stunden Format + Use LQR on Lat Control for PA + - Experimental Mode - Experimenteller Modus + When enabled, using LQR on lat control for prius alpha. + - Disengage on Accelerator Pedal - Bei Gasbetätigung ausschalten + Turn Off Display After 30 Seconds + - openpilot defaults to driving in <b>chill mode</b>. Experimental mode enables <b>alpha-level features</b> that aren't ready for chill mode. Experimental features are listed below: - Openpilot fährt standardmäßig im <b>entspannten Modus</b>. Der Experimentelle Modus aktiviert<b>Alpha-level Funktionen</b>, die noch nicht für den entspannten Modus bereit sind. Die experimentellen Funktionen sind die Folgenden: + Turn off the device's display after going 'onroad' for 30 seconds. + - Let the driving model control the gas and brakes. openpilot will drive as it thinks a human would, including stopping for red lights and stop signs. Since the driving model decides the speed to drive, the set speed will only act as an upper bound. This is an alpha quality feature; mistakes should be expected. - Lass das Fahrmodell Gas und Bremse kontrollieren. Openpilot wird so fahren, wie es dies von einem Menschen erwarten würde; inklusive des Anhaltens für Ampeln und Stoppschildern. Da das Fahrmodell entscheidet wie schnell es fährt stellt die gesetzte Geschwindigkeit lediglich das obere Limit dar. Dies ist ein Alpha-level Funktion. Fehler sind zu erwarten. + Long: Cruise Speed Override + - New Driving Visualization - Neue Fahrvisualisierung + Allow openpilot's set speed to be set below the vehicle's minimum cruise speed. To use this feature, when the vehicle is travelling below its minimum set speed, pull the cruise control lever down (or click the cruise control SET button) once, openpilot will set its maximum speed to the vehicle's current speed. + - Experimental mode is currently unavailable on this car since the car's stock ACC is used for longitudinal control. - Der experimentelle Modus ist momentan für dieses Auto nicht verfügbar da es den eingebauten adaptiven Tempomaten des Autos benutzt. + Use Metric System + - openpilot Longitudinal Control (Alpha) + Display speed in km/h instead of mph. - WARNING: openpilot longitudinal control is in alpha for this car and will disable Automatic Emergency Braking (AEB). + Show ETA in 24h Format + + + + Use 24h format instead of am/pm + + + + Show Map on Left Side of UI + + + + Show map on left side when in split screen view. @@ -1074,17 +1082,33 @@ This may take up to a minute. - On this car, openpilot defaults to the car's built-in ACC instead of openpilot's longitudinal control. Enable this to switch to openpilot longitudinal control. Enabling Experimental mode is recommended when enabling openpilot longitudinal control alpha. + Standard is recommended. In aggressive mode, openpilot will follow lead cars closer and be more aggressive with the gas and brake. In relaxed mode openpilot will stay further away from lead cars. - Standard is recommended. In aggressive mode, openpilot will follow lead cars closer and be more aggressive with the gas and brake. In relaxed mode openpilot will stay further away from lead cars. + Driving Personalities Via UI / Wheel + + + + Switch driving personalities using the 'Distance' button on the steering wheel (Toyota/Lexus Only) or via the onroad UI for other makes. + +1 bar = Aggressive +2 bars = Standard +3 bars = Relaxed + + + + openpilot defaults to driving in <b>chill mode</b>. Experimental mode enables <b>alpha-level features</b> that aren't ready for chill mode. Experimental features are listed below: End-to-End Longitudinal Control + + Let the driving model control the gas and brakes. openpilot will drive as it thinks a human would, including stopping for red lights and stop signs. Since the driving model decides the speed to drive, the set speed will only act as an upper bound. This is an alpha quality feature; mistakes should be expected. + + Navigate on openpilot @@ -1093,10 +1117,18 @@ This may take up to a minute. When navigation has a destination, openpilot will input the map information into the model. This provides useful context for the model and allows openpilot to keep left or right appropriately at forks/exits. Lane change behavior is unchanged and still activated by the driver. This is an alpha quality feature; mistakes should be expected, particularly around exits and forks. These mistakes can include unintended laneline crossings, late exit taking, driving towards dividing barriers in the gore areas, etc. + + New Driving Visualization + + The driving visualization will transition to the road-facing wide-angle camera at low speeds to better show some turns. The Experimental mode logo will also be shown in the top right corner. When a navigation destination is set and the driving model is using it as input, the driving path on the map will turn green. + + Experimental mode is currently unavailable on this car since the car's stock ACC is used for longitudinal control. + + openpilot longitudinal control may come in a future update. @@ -1114,35 +1146,35 @@ This may take up to a minute. Updater Update Required - Aktualisierung notwendig + An operating system update is required. Connect your device to Wi-Fi for the fastest update experience. The download size is approximately 1GB. - Eine Aktualisierung des Betriebssystems ist notwendig. Verbinde dein Gerät mit WLAN für ein schnelleres Update. Die Download Größe ist ungefähr 1GB. + Connect to Wi-Fi - Mit WLAN verbinden + Install - Installieren + Back - Zurück + Loading... - Laden... + Reboot - Neustart + Neustart Update failed - Aktualisierung fehlgeschlagen + @@ -1172,23 +1204,23 @@ This may take up to a minute. WifiUI Scanning for networks... - Suche nach Netzwerken... + CONNECTING... - VERBINDEN... + FORGET - VERGESSEN + Forget Wi-Fi Network "%1"? - WLAN Netzwerk "%1" vergessen? + Forget - Vergessen + diff --git a/selfdrive/ui/translations/main_en.ts b/selfdrive/ui/translations/main_en.ts index 3f9692e5fa4850..3ae1ed416254a5 100644 --- a/selfdrive/ui/translations/main_en.ts +++ b/selfdrive/ui/translations/main_en.ts @@ -5,9 +5,9 @@ InputDialog Need at least %n character(s)! - - Need at least %n character! - Need at least %n characters! + + + @@ -15,23 +15,23 @@ QObject %n minute(s) ago - - %n minute ago - %n minutes ago + + + %n hour(s) ago - - %n hour ago - %n hours ago + + + %n day(s) ago - - %n day ago - %n days ago + + + diff --git a/selfdrive/ui/translations/main_fr.ts b/selfdrive/ui/translations/main_fr.ts index 456efe63660961..b2e40bd892d662 100644 --- a/selfdrive/ui/translations/main_fr.ts +++ b/selfdrive/ui/translations/main_fr.ts @@ -1107,6 +1107,42 @@ Cela peut prendre jusqu'à une minute. Enable the openpilot longitudinal control (alpha) toggle to allow Experimental mode. Activer le contrôle longitudinal d'openpilot (en alpha) pour autoriser le mode expérimental. + + Use LQR on Lat Control for PA + + + + When enabled, using LQR on lat control for prius alpha. + + + + Turn Off Display After 30 Seconds + + + + Turn off the device's display after going 'onroad' for 30 seconds. + + + + Long: Cruise Speed Override + + + + Allow openpilot's set speed to be set below the vehicle's minimum cruise speed. To use this feature, when the vehicle is travelling below its minimum set speed, pull the cruise control lever down (or click the cruise control SET button) once, openpilot will set its maximum speed to the vehicle's current speed. + + + + Driving Personalities Via UI / Wheel + + + + Switch driving personalities using the 'Distance' button on the steering wheel (Toyota/Lexus Only) or via the onroad UI for other makes. + +1 bar = Aggressive +2 bars = Standard +3 bars = Relaxed + + Updater diff --git a/selfdrive/ui/translations/main_ja.ts b/selfdrive/ui/translations/main_ja.ts index 63de8f047120ca..98150f5fe6153c 100644 --- a/selfdrive/ui/translations/main_ja.ts +++ b/selfdrive/ui/translations/main_ja.ts @@ -1101,6 +1101,42 @@ This may take up to a minute. Enable the openpilot longitudinal control (alpha) toggle to allow Experimental mode. + + Use LQR on Lat Control for PA + + + + When enabled, using LQR on lat control for prius alpha. + + + + Turn Off Display After 30 Seconds + + + + Turn off the device's display after going 'onroad' for 30 seconds. + + + + Long: Cruise Speed Override + + + + Allow openpilot's set speed to be set below the vehicle's minimum cruise speed. To use this feature, when the vehicle is travelling below its minimum set speed, pull the cruise control lever down (or click the cruise control SET button) once, openpilot will set its maximum speed to the vehicle's current speed. + + + + Driving Personalities Via UI / Wheel + + + + Switch driving personalities using the 'Distance' button on the steering wheel (Toyota/Lexus Only) or via the onroad UI for other makes. + +1 bar = Aggressive +2 bars = Standard +3 bars = Relaxed + + Updater diff --git a/selfdrive/ui/translations/main_ko.ts b/selfdrive/ui/translations/main_ko.ts index bc0c5f2b0e56e8..750d5f3aafc548 100644 --- a/selfdrive/ui/translations/main_ko.ts +++ b/selfdrive/ui/translations/main_ko.ts @@ -1103,6 +1103,42 @@ This may take up to a minute. The driving visualization will transition to the road-facing wide-angle camera at low speeds to better show some turns. The Experimental mode logo will also be shown in the top right corner. When a navigation destination is set and the driving model is using it as input, the driving path on the map will turn green. 주행 시각화는 저속으로 주행 시 도로를 향한 광각 카메라로 자동 전환되어 일부 곡선 경로를 더 잘 보여줍니다. 실험 모드 로고는 우측 상단에 표시됩니다. 내비게이션 목적지가 설정되고 주행 모델에 입력되면 지도의 주행 경로가 녹색으로 바뀝니다. + + Use LQR on Lat Control for PA + + + + When enabled, using LQR on lat control for prius alpha. + + + + Turn Off Display After 30 Seconds + + + + Turn off the device's display after going 'onroad' for 30 seconds. + + + + Long: Cruise Speed Override + + + + Allow openpilot's set speed to be set below the vehicle's minimum cruise speed. To use this feature, when the vehicle is travelling below its minimum set speed, pull the cruise control lever down (or click the cruise control SET button) once, openpilot will set its maximum speed to the vehicle's current speed. + + + + Driving Personalities Via UI / Wheel + + + + Switch driving personalities using the 'Distance' button on the steering wheel (Toyota/Lexus Only) or via the onroad UI for other makes. + +1 bar = Aggressive +2 bars = Standard +3 bars = Relaxed + + Updater diff --git a/selfdrive/ui/translations/main_pt-BR.ts b/selfdrive/ui/translations/main_pt-BR.ts index 4cf37cc5857b26..1d7c37a7e373db 100644 --- a/selfdrive/ui/translations/main_pt-BR.ts +++ b/selfdrive/ui/translations/main_pt-BR.ts @@ -5,177 +5,177 @@ AbstractAlert Close - Fechar + Snooze Update - Adiar Atualização + Reboot and Update - Reiniciar e Atualizar + AdvancedNetworking Back - Voltar + Enable Tethering - Ativar Tether + Tethering Password - Senha Tethering + EDIT - EDITAR + Enter new tethering password - Insira nova senha tethering + IP Address - Endereço IP + Enable Roaming - Ativar Roaming + APN Setting - APN Config + Enter APN - Insira APN + leave blank for automatic configuration - deixe em branco para configuração automática + Cellular Metered - Plano de Dados Limitado + Prevent large data uploads when on a metered connection - Evite grandes uploads de dados quando estiver em uma conexão limitada + AnnotatedCameraWidget km/h - km/h + mph - mph + MAX - LIMITE + SPEED - MAX + LIMIT - VELO + ConfirmationDialog Ok - OK + Cancel - Cancelar + DeclinePage You must accept the Terms and Conditions in order to use openpilot. - Você precisa aceitar os Termos e Condições para utilizar openpilot. + Back - Voltar + Decline, uninstall %1 - Rejeitar, desintalar %1 + DestinationWidget Home - Casa + Work - Trabalho + No destination set - Nenhum destino definido - - - No %1 location set - Endereço de %1 não definido + home - casa + work - trabalho + + + + No %1 location set + DevicePanel Dongle ID - Dongle ID + N/A - N/A + Serial - Serial + Driver Camera - Câmera do Motorista + PREVIEW - VER + Preview the driver facing camera to ensure that driver monitoring has good visibility. (vehicle must be off) - Pré-visualizar a câmera voltada para o motorista para garantir que o monitoramento do sistema tenha uma boa visibilidade (veículo precisa estar desligado) + Reset Calibration - Reinicializar Calibragem + RESET - RESET + Are you sure you want to reset calibration? @@ -267,42 +267,42 @@ Reset - Resetar + Review - Revisar + DriverViewScene camera starting - câmera iniciando + ExperimentalModeButton EXPERIMENTAL MODE ON - MODO EXPERIMENTAL ON + CHILL MODE ON - MODO CHILL ON + InputDialog Cancel - Cancelar + Need at least %n character(s)! - - Necessita no mínimo %n caractere! - Necessita no mínimo %n caracteres! + + + @@ -310,421 +310,419 @@ Installer Installing... - Instalando... + MapETA eta - eta + min - min + hr - hr + MapSettings NAVIGATION - NAVEGAÇÃO + Manage at connect.comma.ai - Gerencie em connect.comma.ai + MapWindow Map Loading - Carregando Mapa + Waiting for GPS - Aguardando GPS + Waiting for route - Aguardando rota + MultiOptionDialog Select - Selecione + Cancel - Cancelar + Networking Advanced - Avançado + Enter password - Insira a senha + for "%1" - para "%1" + Wrong password - Senha incorreta + OffroadAlert + + Device temperature too high. System cooling down before starting. Current internal component temperature: %1 + + Immediately connect to the internet to check for updates. If you do not connect to the internet, openpilot won't engage in %1 - Conecte-se imediatamente à internet para verificar se há atualizações. Se você não se conectar à internet em %1 não será possível acionar o openpilot. + Connect to internet to check for updates. openpilot won't automatically start until it connects to internet to check for updates. - Conecte-se à internet para verificar se há atualizações. O openpilot não será iniciado automaticamente até que ele se conecte à internet para verificar se há atualizações. + Unable to download updates %1 - Não é possível baixar atualizações -%1 + Invalid date and time settings, system won't start. Connect to internet to set time. - Configurações de data e hora inválidas, o sistema não será iniciado. Conecte-se à internet para definir o horário. + Taking camera snapshots. System won't start until finished. - Tirando fotos da câmera. O sistema não será iniciado até terminar. + An update to your device's operating system is downloading in the background. You will be prompted to update when it's ready to install. - Uma atualização para o sistema operacional do seu dispositivo está sendo baixada em segundo plano. Você será solicitado a atualizar quando estiver pronto para instalar. + Device failed to register. It will not connect to or upload to comma.ai servers, and receives no support from comma.ai. If this is an official device, visit https://comma.ai/support. - Falha ao registrar o dispositivo. Ele não se conectará ou fará upload para os servidores comma.ai e não receberá suporte da comma.ai. Se este for um dispositivo oficial, visite https://comma.ai/support. + NVMe drive not mounted. - Unidade NVMe não montada. + Unsupported NVMe drive detected. Device may draw significantly more power and overheat due to the unsupported NVMe. - Unidade NVMe não suportada detectada. O dispositivo pode consumir significativamente mais energia e superaquecimento devido ao NVMe não suportado. + openpilot was unable to identify your car. Your car is either unsupported or its ECUs are not recognized. Please submit a pull request to add the firmware versions to the proper vehicle. Need help? Join discord.comma.ai. - O openpilot não conseguiu identificar o seu carro. Seu carro não é suportado ou seus ECUs não são reconhecidos. Envie um pull request para adicionar as versões de firmware ao veículo adequado. Precisa de ajuda? Junte-se discord.comma.ai. + openpilot was unable to identify your car. Check integrity of cables and ensure all connections are secure, particularly that the comma power is fully inserted in the OBD-II port of the vehicle. Need help? Join discord.comma.ai. - O openpilot não conseguiu identificar o seu carro. Verifique a integridade dos cabos e certifique-se de que todas as conexões estejam seguras, especialmente se o comma power está totalmente inserido na porta OBD-II do veículo. Precisa de ajuda? Junte-se discord.comma.ai. + openpilot detected a change in the device's mounting position. Ensure the device is fully seated in the mount and the mount is firmly secured to the windshield. - O openpilot detectou uma mudança na posição de montagem do dispositivo. Verifique se o dispositivo está totalmente encaixado no suporte e se o suporte está firmemente preso ao para-brisa. - - - Device temperature too high. System cooling down before starting. Current internal component temperature: %1 - Temperatura do dispositivo muito alta. O sistema está sendo resfriado antes de iniciar. A temperatura atual do componente interno é: %1 + OffroadHome UPDATE - ATUALIZAÇÃO + ALERTS - ALERTAS + ALERT - ALERTA + PairingPopup Pair your device to your comma account - Pareie seu dispositivo à sua conta comma + Go to https://connect.comma.ai on your phone - navegue até https://connect.comma.ai no seu telefone + Click "add new device" and scan the QR code on the right - Clique "add new device" e escaneie o QR code a seguir + Bookmark connect.comma.ai to your home screen to use it like an app - Salve connect.comma.ai como sua página inicial para utilizar como um app + ParamControl - Cancel - Cancelar + Enable + - Enable - Ativar + Cancel + PrimeAdWidget Upgrade Now - Atualizar Agora + Become a comma prime member at connect.comma.ai - Seja um membro comma prime em connect.comma.ai + PRIME FEATURES: - BENEFÍCIOS PRIME: + Remote access - Acesso remoto (proxy comma) + 24/7 LTE connectivity - Conectividade LTE (só nos EUA) + - Turn-by-turn navigation - Navegação passo a passo + 1 year of drive storage + - 1 year of drive storage - 1 ano de dados em nuvem + Turn-by-turn navigation + PrimeUserWidget ✓ SUBSCRIBED - ✓ INSCRITO + comma prime - comma prime + QObject + + km + + + + m + + + + mi + + + + ft + + Reboot - Reiniciar + Reiniciar Exit - Sair + dashcam - dashcam + openpilot - openpilot + %n minute(s) ago - - há %n minuto - há %n minutos + + + %n hour(s) ago - - há %n hora - há %n horas + + + %n day(s) ago - - há %n dia - há %n dias + + + - - km - km - - - m - m - - - mi - milha - - - ft - pés - Reset Reset failed. Reboot to try again. - Reset falhou. Reinicie para tentar novamente. + + + + Resetting device... +This may take up to a minute. + Are you sure you want to reset your device? - Tem certeza que quer resetar seu dispositivo? + System Reset - Resetar Sistema + + + + Press confirm to erase all content and settings. Press cancel to resume boot. + Cancel - Cancelar + Reboot - Reiniciar + Reiniciar Confirm - Confirmar + Unable to mount data partition. Partition may be corrupted. Press confirm to erase and reset your device. - Não é possível montar a partição de dados. Partição corrompida. Confirme para apagar e redefinir o dispositivo. - - - Press confirm to erase all content and settings. Press cancel to resume boot. - Pressione confirmar para apagar todo o conteúdo e configurações. Pressione cancelar para voltar. - - - Resetting device... -This may take up to a minute. - Redefinindo o dispositivo -Isso pode levar até um minuto. + SettingsWindow × - × + Device - Dispositivo + Network - Rede + Toggles - Ajustes + Software - Software + Setup + + Something went wrong. Reboot the device. + + + + Ensure the entered URL is valid, and the device’s internet connection is good. + + + + No custom software found at this URL. + + WARNING: Low Voltage - ALERTA: Baixa Voltagem + Power your device in a car with a harness or proceed at your own risk. - Ligue seu dispositivo em um carro com um chicote ou prossiga por sua conta e risco. + Power off - Desligar + Continue - Continuar + Getting Started - Começando + Before we get on the road, let’s finish installation and cover some details. - Antes de pegarmos a estrada, vamos terminar a instalação e cobrir alguns detalhes. + Connect to Wi-Fi - Conectar ao Wi-Fi + Back - Voltar + - Continue without Wi-Fi - Continuar sem Wi-Fi + Enter URL + - Waiting for internet - Esperando pela internet + for Custom Software + - Enter URL - Preencher URL + Continue without Wi-Fi + - for Custom Software - para o Software Customizado + Waiting for internet + Downloading... - Baixando... + Download Failed - Download Falhou - - - Ensure the entered URL is valid, and the device’s internet connection is good. - Garanta que a URL inserida é valida, e uma boa conexão à internet. + Reboot device - Reiniciar Dispositivo + Start over - Inicializar - - - No custom software found at this URL. - Não há software personalizado nesta URL. - - - Something went wrong. Reboot the device. - Algo deu errado. Reinicie o dispositivo. + Select a language @@ -735,458 +733,494 @@ Isso pode levar até um minuto. SetupWidget Finish Setup - Concluir + Pair your device with comma connect (connect.comma.ai) and claim your comma prime offer. - Pareie seu dispositivo com comma connect (connect.comma.ai) e reivindique sua oferta de comma prime. + Pair device - Parear dispositivo + Sidebar CONNECT - CONEXÃO + OFFLINE - OFFLINE + ONLINE - ONLINE + ERROR - ERRO + TEMP - TEMP + HIGH - ALTA + GOOD - BOA + OK - OK + VEHICLE - VEÍCULO + NO - SEM + PANDA - PANDA + GPS - GPS + SEARCH - PROCURA + -- - -- + Wi-Fi - Wi-Fi + ETH - ETH + 2G - 2G + 3G - 3G + LTE - LTE + 5G - 5G + SoftwarePanel Updates are only downloaded while the car is off. - Atualizações baixadas durante o motor desligado. + Current Version - Versão Atual + Download - Download + + + + CHECK + Install Update - Instalar Atualização + INSTALL - INSTALAR + Target Branch - Alterar Branch + SELECT - SELECIONE + Select a branch - Selecione uma branch - - - UNINSTALL - REMOVER + Uninstall %1 - Desinstalar o %1 + - Are you sure you want to uninstall? - Tem certeza que quer desinstalar? + UNINSTALL + - CHECK - VERIFICAR + Are you sure you want to uninstall? + Uninstall - Desinstalar + failed to check for update - falha ao verificar por atualizações - - - up to date, last checked %1 - atualizado, última verificação %1 + DOWNLOAD - BAIXAR + update available - atualização disponível + never - nunca + + + + up to date, last checked %1 + SshControl SSH Keys - Chave SSH + Warning: This grants SSH access to all public keys in your GitHub settings. Never enter a GitHub username other than your own. A comma employee will NEVER ask you to add their GitHub username. - Aviso: isso concede acesso SSH a todas as chaves públicas nas configurações do GitHub. Nunca insira um nome de usuário do GitHub que não seja o seu. Um funcionário da comma NUNCA pedirá que você adicione seu nome de usuário do GitHub. + ADD - ADICIONAR + Enter your GitHub username - Insira seu nome de usuário do GitHub + LOADING - CARREGANDO + REMOVE - REMOVER + Username '%1' has no keys on GitHub - Usuário "%1” não possui chaves no GitHub + Request timed out - A solicitação expirou + Username '%1' doesn't exist on GitHub - Usuário '%1' não existe no GitHub + SshToggle Enable SSH - Habilitar SSH + TermsPage Terms & Conditions - Termos & Condições + Decline - Declinar + Scroll to accept - Role a tela para aceitar + Agree - Concordo + TogglesPanel Enable openpilot - Ativar openpilot + Use the openpilot system for adaptive cruise control and lane keep driver assistance. Your attention is required at all times to use this feature. Changing this setting takes effect when the car is powered off. - Use o sistema openpilot para controle de cruzeiro adaptativo e assistência ao motorista de manutenção de faixa. Sua atenção é necessária o tempo todo para usar esse recurso. A alteração desta configuração tem efeito quando o carro é desligado. + - Enable Lane Departure Warnings - Ativar Avisos de Saída de Faixa + openpilot Longitudinal Control (Alpha) + - Receive alerts to steer back into the lane when your vehicle drifts over a detected lane line without a turn signal activated while driving over 31 mph (50 km/h). - Receba alertas para voltar para a pista se o seu veículo sair da faixa e a seta não tiver sido acionada previamente quando em velocidades superiores a 50 km/h. + WARNING: openpilot longitudinal control is in alpha for this car and will disable Automatic Emergency Braking (AEB). + - Use Metric System - Usar Sistema Métrico + On this car, openpilot defaults to the car's built-in ACC instead of openpilot's longitudinal control. Enable this to switch to openpilot longitudinal control. Enabling Experimental mode is recommended when enabling openpilot longitudinal control alpha. + - Display speed in km/h instead of mph. - Exibir velocidade em km/h invés de mph. + Experimental Mode + - Record and Upload Driver Camera - Gravar e Upload Câmera Motorista + Disengage on Accelerator Pedal + - Upload data from the driver facing camera and help improve the driver monitoring algorithm. - Upload dados da câmera voltada para o motorista e ajude a melhorar o algoritmo de monitoramentor. + When enabled, pressing the accelerator pedal will disengage openpilot. + - Disengage on Accelerator Pedal - Desacionar com Pedal do Acelerador + Enable Lane Departure Warnings + - When enabled, pressing the accelerator pedal will disengage openpilot. - Quando ativado, pressionar o pedal do acelerador desacionará o openpilot. + Receive alerts to steer back into the lane when your vehicle drifts over a detected lane line without a turn signal activated while driving over 31 mph (50 km/h). + - Show ETA in 24h Format - Mostrar ETA em Formato 24h + Record and Upload Driver Camera + - Use 24h format instead of am/pm - Use o formato 24h em vez de am/pm + Upload data from the driver facing camera and help improve the driver monitoring algorithm. + - Show Map on Left Side of UI - Exibir Mapa no Lado Esquerdo + Use LQR on Lat Control for PA + - Show map on left side when in split screen view. - Exibir mapa do lado esquerdo quando a tela for dividida. + When enabled, using LQR on lat control for prius alpha. + - Experimental Mode - Modo Experimental + Turn Off Display After 30 Seconds + - openpilot defaults to driving in <b>chill mode</b>. Experimental mode enables <b>alpha-level features</b> that aren't ready for chill mode. Experimental features are listed below: - openpilot por padrão funciona em <b>modo chill</b>. modo Experimental ativa <b>recursos de nível-embrionário</b> que não estão prontos para o modo chill. Recursos experimentais estão listados abaixo: + Turn off the device's display after going 'onroad' for 30 seconds. + - Let the driving model control the gas and brakes. openpilot will drive as it thinks a human would, including stopping for red lights and stop signs. Since the driving model decides the speed to drive, the set speed will only act as an upper bound. This is an alpha quality feature; mistakes should be expected. - Deixe o modelo de IA controlar o acelerador e os freios. O openpilot irá dirigir como pensa que um humano faria, incluindo parar em sinais vermelhos e sinais de parada. Uma vez que o modelo de condução decide a velocidade a conduzir, a velocidade definida apenas funcionará como um limite superior. Este é um recurso de qualidade embrionária; erros devem ser esperados. + Long: Cruise Speed Override + - New Driving Visualization - Nova Visualização de Condução + Allow openpilot's set speed to be set below the vehicle's minimum cruise speed. To use this feature, when the vehicle is travelling below its minimum set speed, pull the cruise control lever down (or click the cruise control SET button) once, openpilot will set its maximum speed to the vehicle's current speed. + - Experimental mode is currently unavailable on this car since the car's stock ACC is used for longitudinal control. - O modo Experimental está atualmente indisponível para este carro já que o ACC original do carro é usado para controle longitudinal. + Use Metric System + - openpilot longitudinal control may come in a future update. - O controle longitudinal openpilot poderá vir em uma atualização futura. + Display speed in km/h instead of mph. + - openpilot Longitudinal Control (Alpha) - Controle Longitudinal openpilot (Embrionário) + Show ETA in 24h Format + - WARNING: openpilot longitudinal control is in alpha for this car and will disable Automatic Emergency Braking (AEB). - AVISO: o controle longitudinal openpilot está em estado embrionário para este carro e desativará a Frenagem Automática de Emergência (AEB). + Use 24h format instead of am/pm + - On this car, openpilot defaults to the car's built-in ACC instead of openpilot's longitudinal control. Enable this to switch to openpilot longitudinal control. Enabling Experimental mode is recommended when enabling openpilot longitudinal control alpha. - Neste carro, o openpilot tem como padrão o ACC embutido do carro em vez do controle longitudinal do openpilot. Habilite isso para alternar para o controle longitudinal openpilot. Recomenda-se ativar o modo Experimental ao ativar o embrionário controle longitudinal openpilot. + Show Map on Left Side of UI + + + + Show map on left side when in split screen view. + Aggressive - Disputa + Standard - Neutro + Relaxed - Calmo + Driving Personality - Temperamento de Direção + Standard is recommended. In aggressive mode, openpilot will follow lead cars closer and be more aggressive with the gas and brake. In relaxed mode openpilot will stay further away from lead cars. - Neutro é o recomendado. No modo disputa o openpilot seguirá o carro da frente mais de perto e será mais agressivo com a aceleração e frenagem. No modo calmo o openpilot se manterá mais longe do carro da frente. + - An alpha version of openpilot longitudinal control can be tested, along with Experimental mode, on non-release branches. - Uma versão embrionária do controle longitudinal openpilot pode ser testada em conjunto com o modo Experimental, em branches que não sejam de produção. + Driving Personalities Via UI / Wheel + - Navigate on openpilot - Navegação no openpilot + Switch driving personalities using the 'Distance' button on the steering wheel (Toyota/Lexus Only) or via the onroad UI for other makes. + +1 bar = Aggressive +2 bars = Standard +3 bars = Relaxed + - Enable the openpilot longitudinal control (alpha) toggle to allow Experimental mode. - Habilite o controle longitudinal (embrionário) openpilot para permitir o modo Experimental. + openpilot defaults to driving in <b>chill mode</b>. Experimental mode enables <b>alpha-level features</b> that aren't ready for chill mode. Experimental features are listed below: + End-to-End Longitudinal Control - Controle Longitudinal de Ponta a Ponta + + + + Let the driving model control the gas and brakes. openpilot will drive as it thinks a human would, including stopping for red lights and stop signs. Since the driving model decides the speed to drive, the set speed will only act as an upper bound. This is an alpha quality feature; mistakes should be expected. + + + + Navigate on openpilot + When navigation has a destination, openpilot will input the map information into the model. This provides useful context for the model and allows openpilot to keep left or right appropriately at forks/exits. Lane change behavior is unchanged and still activated by the driver. This is an alpha quality feature; mistakes should be expected, particularly around exits and forks. These mistakes can include unintended laneline crossings, late exit taking, driving towards dividing barriers in the gore areas, etc. - Quando a navegação tem um destino, o openpilot insere as informações do mapa no modelo. Isso fornece contexto útil para o modelo e permite que o openpilot mantenha a esquerda ou a direita apropriadamente em bifurcações/saídas. O comportamento de mudança de faixa permanece inalterado e ainda é ativado somente pelo motorista. Este é um recurso de qualidade embrionária; erros devem ser esperados, principalmente em torno de saídas e bifurcações. Esses erros podem incluir travessias não intencionais na faixa de rodagem, saída tardia, condução em direção a barreiras divisórias nas áreas de marcas de canalização, etc. + + + + New Driving Visualization + The driving visualization will transition to the road-facing wide-angle camera at low speeds to better show some turns. The Experimental mode logo will also be shown in the top right corner. When a navigation destination is set and the driving model is using it as input, the driving path on the map will turn green. - A visualização de condução fará a transição para a câmera grande angular voltada para a estrada em baixas velocidades para mostrar melhor algumas curvas. O logotipo do modo Experimental também será mostrado no canto superior direito. Quando um destino de navegação é definido e o modelo de condução o utiliza como entrada o caminho de condução no mapa fica verde. + + + + Experimental mode is currently unavailable on this car since the car's stock ACC is used for longitudinal control. + + + + openpilot longitudinal control may come in a future update. + + + + An alpha version of openpilot longitudinal control can be tested, along with Experimental mode, on non-release branches. + + + + Enable the openpilot longitudinal control (alpha) toggle to allow Experimental mode. + Updater Update Required - Atualização Necessária + An operating system update is required. Connect your device to Wi-Fi for the fastest update experience. The download size is approximately 1GB. - Uma atualização do sistema operacional é necessária. Conecte seu dispositivo ao Wi-Fi para a experiência de atualização mais rápida. O tamanho do download é de aproximadamente 1GB. + Connect to Wi-Fi - Conecte-se ao Wi-Fi + Install - Instalar + Back - Voltar + Loading... - Carregando... + Reboot - Reiniciar + Reiniciar Update failed - Falha na atualização + WiFiPromptWidget Setup Wi-Fi - Configurar Wi-Fi + Connect to Wi-Fi to upload driving data and help improve openpilot - Conecte se ao Wi-Fi para realizar upload de dados de condução e ajudar a melhorar o openpilot + Open Settings - Abrir Configurações + Ready to upload - Pronto para upload + Training data will be pulled periodically while your device is on Wi-Fi - Os dados de treinamento serão extraídos periodicamente enquanto o dispositivo estiver no Wi-Fi + WifiUI Scanning for networks... - Procurando redes... + CONNECTING... - CONECTANDO... + FORGET - ESQUECER + Forget Wi-Fi Network "%1"? - Esquecer Rede Wi-Fi "%1"? + Forget - Esquecer + diff --git a/selfdrive/ui/translations/main_th.ts b/selfdrive/ui/translations/main_th.ts index a1748a6951118f..a1bfcee3051126 100644 --- a/selfdrive/ui/translations/main_th.ts +++ b/selfdrive/ui/translations/main_th.ts @@ -1103,6 +1103,42 @@ This may take up to a minute. Enable the openpilot longitudinal control (alpha) toggle to allow Experimental mode. เปิดระบบควบคุมการเร่ง/เบรคโดย openpilot (alpha) เพื่อเปิดใช้งานโหมดทดลอง + + Use LQR on Lat Control for PA + + + + When enabled, using LQR on lat control for prius alpha. + + + + Turn Off Display After 30 Seconds + + + + Turn off the device's display after going 'onroad' for 30 seconds. + + + + Long: Cruise Speed Override + + + + Allow openpilot's set speed to be set below the vehicle's minimum cruise speed. To use this feature, when the vehicle is travelling below its minimum set speed, pull the cruise control lever down (or click the cruise control SET button) once, openpilot will set its maximum speed to the vehicle's current speed. + + + + Driving Personalities Via UI / Wheel + + + + Switch driving personalities using the 'Distance' button on the steering wheel (Toyota/Lexus Only) or via the onroad UI for other makes. + +1 bar = Aggressive +2 bars = Standard +3 bars = Relaxed + + Updater diff --git a/selfdrive/ui/translations/main_tr.ts b/selfdrive/ui/translations/main_tr.ts index 51fdddd5ce6d6e..899526df803f1f 100644 --- a/selfdrive/ui/translations/main_tr.ts +++ b/selfdrive/ui/translations/main_tr.ts @@ -1101,6 +1101,42 @@ This may take up to a minute. Enable the openpilot longitudinal control (alpha) toggle to allow Experimental mode. + + Use LQR on Lat Control for PA + + + + When enabled, using LQR on lat control for prius alpha. + + + + Turn Off Display After 30 Seconds + + + + Turn off the device's display after going 'onroad' for 30 seconds. + + + + Long: Cruise Speed Override + + + + Allow openpilot's set speed to be set below the vehicle's minimum cruise speed. To use this feature, when the vehicle is travelling below its minimum set speed, pull the cruise control lever down (or click the cruise control SET button) once, openpilot will set its maximum speed to the vehicle's current speed. + + + + Driving Personalities Via UI / Wheel + + + + Switch driving personalities using the 'Distance' button on the steering wheel (Toyota/Lexus Only) or via the onroad UI for other makes. + +1 bar = Aggressive +2 bars = Standard +3 bars = Relaxed + + Updater diff --git a/selfdrive/ui/translations/main_zh-CHS.ts b/selfdrive/ui/translations/main_zh-CHS.ts index 7b682535ce9e39..f5a06724461887 100644 --- a/selfdrive/ui/translations/main_zh-CHS.ts +++ b/selfdrive/ui/translations/main_zh-CHS.ts @@ -1103,6 +1103,42 @@ This may take up to a minute. The driving visualization will transition to the road-facing wide-angle camera at low speeds to better show some turns. The Experimental mode logo will also be shown in the top right corner. When a navigation destination is set and the driving model is using it as input, the driving path on the map will turn green. 行驶画面将在低速时切换到道路朝向的广角摄像头,以更好地显示一些转弯。实验模式标志也将显示在右上角。当设置了导航目的地并且驾驶模型正在使用它作为输入时,地图上的驾驶路径将变为绿色。 + + Use LQR on Lat Control for PA + + + + When enabled, using LQR on lat control for prius alpha. + + + + Turn Off Display After 30 Seconds + + + + Turn off the device's display after going 'onroad' for 30 seconds. + + + + Long: Cruise Speed Override + + + + Allow openpilot's set speed to be set below the vehicle's minimum cruise speed. To use this feature, when the vehicle is travelling below its minimum set speed, pull the cruise control lever down (or click the cruise control SET button) once, openpilot will set its maximum speed to the vehicle's current speed. + + + + Driving Personalities Via UI / Wheel + + + + Switch driving personalities using the 'Distance' button on the steering wheel (Toyota/Lexus Only) or via the onroad UI for other makes. + +1 bar = Aggressive +2 bars = Standard +3 bars = Relaxed + + Updater diff --git a/selfdrive/ui/translations/main_zh-CHT.ts b/selfdrive/ui/translations/main_zh-CHT.ts index 1794cc78ac1389..fd29f70c04f1b2 100644 --- a/selfdrive/ui/translations/main_zh-CHT.ts +++ b/selfdrive/ui/translations/main_zh-CHT.ts @@ -1103,6 +1103,42 @@ This may take up to a minute. The driving visualization will transition to the road-facing wide-angle camera at low speeds to better show some turns. The Experimental mode logo will also be shown in the top right corner. When a navigation destination is set and the driving model is using it as input, the driving path on the map will turn green. 行駛畫面將在低速時切換至道路朝向的廣角鏡頭,以更好地顯示一些轉彎。實驗模式圖示也將顯示在右上角。當設定了導航目的地並且行駛模型正在將其作為輸入時,地圖上的行駛路徑將變為綠色。 + + Use LQR on Lat Control for PA + + + + When enabled, using LQR on lat control for prius alpha. + + + + Turn Off Display After 30 Seconds + + + + Turn off the device's display after going 'onroad' for 30 seconds. + + + + Long: Cruise Speed Override + + + + Allow openpilot's set speed to be set below the vehicle's minimum cruise speed. To use this feature, when the vehicle is travelling below its minimum set speed, pull the cruise control lever down (or click the cruise control SET button) once, openpilot will set its maximum speed to the vehicle's current speed. + + + + Driving Personalities Via UI / Wheel + + + + Switch driving personalities using the 'Distance' button on the steering wheel (Toyota/Lexus Only) or via the onroad UI for other makes. + +1 bar = Aggressive +2 bars = Standard +3 bars = Relaxed + + Updater diff --git a/selfdrive/ui/ui.cc b/selfdrive/ui/ui.cc index 03df2cf57a00c0..f23ce6f826880f 100644 --- a/selfdrive/ui/ui.cc +++ b/selfdrive/ui/ui.cc @@ -213,6 +213,20 @@ void ui_update_params(UIState *s) { auto params = Params(); s->scene.is_metric = params.getBool("IsMetric"); s->scene.map_on_left = params.getBool("NavSettingLeftSide"); + s->scene.screen_off_timer = Params().getBool("ScreenOffTimer"); + + // FrogPilot variables + UIScene &scene = s->scene; + scene.driving_personalities_ui_wheel = params.getBool("DrivingPersonalitiesUIWheel"); +} + +void ui_live_update_params(UIState *s) { + static auto params = Params(); + UIScene &scene = s->scene; + // FrogPilot variables that need to be updated live + if (scene.driving_personalities_ui_wheel) { + scene.personality_profile = params.getInt("LongitudinalPersonality"); + } } void UIState::updateStatus() { @@ -235,6 +249,11 @@ void UIState::updateStatus() { started_prev = scene.started; emit offroadTransition(!scene.started); } + + // Update the live parameters every 5hz + if (sm->frame % (UI_FREQ / 5) == 0 || !scene.started) { + ui_live_update_params(uiState()); + } } UIState::UIState(QObject *parent) : QObject(parent) { diff --git a/selfdrive/ui/ui.h b/selfdrive/ui/ui.h index 2ba0775676070e..da23c9b1a9b2a4 100644 --- a/selfdrive/ui/ui.h +++ b/selfdrive/ui/ui.h @@ -119,11 +119,15 @@ static std::map alert_colors = { typedef struct UIScene { bool calibration_valid = false; + bool screen_off_timer; + bool calibration_wide_valid = false; bool wide_cam = true; mat3 view_from_calib = DEFAULT_CALIBRATION; mat3 view_from_wide_calib = DEFAULT_CALIBRATION; + bool touched2 = false; cereal::PandaState::PandaType pandaType; + cereal::ControlsState::Reader controls_state; // modelV2 float lane_line_probs[4]; @@ -147,6 +151,11 @@ typedef struct UIScene { float light_sensor; bool started, ignition, is_metric, map_on_left, longitudinal_control; uint64_t started_frame; + + // FrogPilot variables + int personality_profile; + bool driving_personalities_ui_wheel; + } UIScene; class UIState : public QObject { @@ -215,6 +224,8 @@ class Device : public QObject { FirstOrderFilter brightness_filter; QFuture brightness_future; + int sleep_time = -1; + void updateBrightness(const UIState &s); void updateWakefulness(const UIState &s); void setAwake(bool on);