diff --git a/Paypall.png b/Paypall.png new file mode 100644 index 00000000..0f7d8b02 Binary files /dev/null and b/Paypall.png differ diff --git a/README.md b/README.md index 4bf84ab8..9a1d4315 100755 --- a/README.md +++ b/README.md @@ -13,17 +13,33 @@ Example: If my corolla is not hybrid i need do a ssh and: ``` echo 'export FINGERPRINT="TOYOTA COROLLA TSS2 2019"' >> launch_env.sh ``` -The first engine start is expected to show a cruise fault error, just ignore it and wait 30 seconds with the engine off and only then start again. This error should happen only in the first match and then no longer repeat itself. +If your TSS2 corolla is hybrid equal to mine you can proceed a format factory (turning off your c2 and turning on by holding down the volume increase button) and then instead of putting ```https://openpilot.comma.ai``` in the custom fork installation url use ``` installer.comma.ai/alexandresato/master``` -Se quiser agradecer pode me fazer um PIX de qualquer valor para 11 98546-1498 -If you want to thank please join the process of sponsoring Shane Smiskol on his github +Now if you already know how to perform a ssh (if you do not know how to learn at: https://github.com/commaai/openpilot/wiki/SSH) run this command: +``` +cd /data/openpilot; scons --clean; cd ..; rm -rf openpilot; git clone --recurse-submodules https://github.com/alexandresato/openpilot-mine.git openpilot; reboot; sudo reboot +``` -If your TSS2 corolla is hybrid equal to mine you can proceed a format factory (turning off your c2 and turning on by holding down the volume increase button) and then instead of putting ```https://openpilot.comma.ai``` in the custom fork installation url use ``` installer.comma.ai/alexandresato/master``` +💰 Donate 💰 +--- + +If you find any of the features useful, feel free to donate to support for future feature development. + +Thank you for your continuous love and support! Enjoy 🥰 + +**PayPal:** + + +PayPal this + +

+ +**PayPal QR Code:** + +![Paypall.png.png](Paypall.png) -Now if you already know how to perform a ssh (if you do not know how to learn at: https://github.com/commaai/openpilot/wiki/SSH) run this command: -```cd /data/openpilot; scons --clean; cd ..; rm -rf openpilot; git clone --recurse-submodules https://github.com/alexandresato/openpilot; reboot``` this fork is based in: diff --git a/SA_RELEASES.md b/SA_RELEASES.md index 9ca5fbd9..855949f3 100644 --- a/SA_RELEASES.md +++ b/SA_RELEASES.md @@ -1,4 +1,7 @@ -Sato SnG TSS2 Update 1 - 2021-12-16 (0.8.9) +Sato SnG TSS2 Update 2 - 2022-08-06 (0.8.9) +=== + * no more chime and reset setSpeed when braking at standStill + === * Hide the broken e2e_long button. * Nice Tesla Sounds. diff --git a/cereal/car.capnp b/cereal/car.capnp index d45eba9c..15df4edd 100644 --- a/cereal/car.capnp +++ b/cereal/car.capnp @@ -197,6 +197,8 @@ struct CarState { leftBlindspot @33 :Bool; # Is there something blocking the left lane change rightBlindspot @34 :Bool; # Is there something blocking the right lane change + headlightON @38 :Bool; # Low Beam ON + struct WheelSpeeds { # optional wheel speeds fl @0 :Float32; diff --git a/installer/updater/update.json b/installer/updater/update.json index 2ab5fb4d..2a5f3d79 100644 --- a/installer/updater/update.json +++ b/installer/updater/update.json @@ -1,5 +1,5 @@ { - "ota_url": "https://commadist.azureedge.net/neosupdate/ota-signed-50da8800caa5cbc224acbaa21f3a83d21802a31d89cccfc62a898903a8eb19e7.zip", + "ota_url": "https://commadist.azureedge.net/neosupdate/ota-signed-e5aa34ebb27977779db4e82439cca8f807e9c9ee2c84c217c926a2d08dd2959f.zip", "ota_hash": "e5aa34ebb27977779db4e82439cca8f807e9c9ee2c84c217c926a2d08dd2959f", "recovery_url": "https://commadist.azureedge.net/neosupdate/recovery-cf752ceb7931aa427ccec384fd21d9425c6053f25161814dab31ec75e4d296b0.img", "recovery_len": 15222060, diff --git a/launch_env.sh b/launch_env.sh index c1f33238..29815ea8 100755 --- a/launch_env.sh +++ b/launch_env.sh @@ -19,4 +19,5 @@ if [ -z "$PASSIVE" ]; then fi export STAGING_ROOT="/data/safe_staging" +export SKIP_FW_QUERY=1 export FINGERPRINT="TOYOTA COROLLA HYBRID TSS2 2019" diff --git a/selfdrive/car/toyota/carstate.py b/selfdrive/car/toyota/carstate.py index 01dcdce1..f1e46d08 100644 --- a/selfdrive/car/toyota/carstate.py +++ b/selfdrive/car/toyota/carstate.py @@ -96,6 +96,7 @@ def update(self, cp, cp_cam): # we could use the override bit from dbc, but it's triggered at too high torque values ret.steeringPressed = abs(ret.steeringTorque) > STEER_THRESHOLD ret.steerWarning = cp.vl["EPS_STATUS"]["LKA_STATE"] not in [1, 5] + ret.headlightON = cp.vl["LIGHT_STALK"]['LOW_BEAM'] == 1 if self.CP.carFingerprint == CAR.LEXUS_IS: ret.cruiseState.available = cp.vl["DSU_CRUISE"]["MAIN_ON"] != 0 @@ -129,7 +130,7 @@ def update(self, cp, cp_cam): # send your own ACC_CONTROL msg on startup with ACC_TYPE set to 1 if (self.CP.carFingerprint not in TSS2_CAR and self.CP.carFingerprint != CAR.LEXUS_IS) or \ (self.CP.carFingerprint in TSS2_CAR and self.acc_type == 1): - self.low_speed_lockout = cp.vl["PCM_CRUISE_2"]["LOW_SPEED_LOCKOUT"] == 2 + self.low_speed_lockout = False self.pcm_acc_status = cp.vl["PCM_CRUISE"]["CRUISE_STATE"] if self.CP.carFingerprint in NO_STOP_TIMER_CAR or self.CP.enableGasInterceptor: @@ -185,6 +186,7 @@ def get_can_parser(CP): ("LKA_STATE", "EPS_STATUS", 0), ("AUTO_HIGH_BEAM", "LIGHT_STALK", 0), ("BRAKE_LIGHTS_ACC", "ESP_CONTROL", 0), + ("LOW_BEAM", "LIGHT_STALK", 0), ] checks = [ diff --git a/selfdrive/car/toyota/interface.py b/selfdrive/car/toyota/interface.py index 3d8629fd..1f3353a5 100755 --- a/selfdrive/car/toyota/interface.py +++ b/selfdrive/car/toyota/interface.py @@ -237,7 +237,7 @@ def get_params(candidate, fingerprint=gen_empty_fingerprint(), car_fw=[]): # py ret.lateralTuning.indi.timeConstantV = [1, 3, 4.5] ret.lateralTuning.indi.actuatorEffectivenessBP = [18, 22, 26] ret.lateralTuning.indi.actuatorEffectivenessV = [9, 12, 15] - ret.steerActuatorDelay = 0.42 - 0.2 + ret.steerActuatorDelay = 0.42 - 0.1534 else: ret.lateralTuning.pid.kpV, ret.lateralTuning.pid.kiV = [[0.6], [0.1]] ret.lateralTuning.pid.kf = 0.00007818594 diff --git a/selfdrive/car/toyota/toyotacan.py b/selfdrive/car/toyota/toyotacan.py index fc93f32b..93eadeac 100644 --- a/selfdrive/car/toyota/toyotacan.py +++ b/selfdrive/car/toyota/toyotacan.py @@ -78,7 +78,7 @@ def create_ui_command(packer, steer, chime, left_line, right_line, left_lane_dep "SET_ME_X01": 1, "SET_ME_X01_2": 1, "REPEATED_BEEPS": 0, - "TWO_BEEPS": chime, - "LDA_ALERT": steer, + "TWO_BEEPS": 0, + "LDA_ALERT": steer or chime, } return packer.make_can_msg("LKAS_HUD", 0, values) diff --git a/selfdrive/car/toyota/values.py b/selfdrive/car/toyota/values.py index cc3d1e96..912aa5f1 100644 --- a/selfdrive/car/toyota/values.py +++ b/selfdrive/car/toyota/values.py @@ -17,7 +17,7 @@ class CarControllerParams: STEER_MAX = 1500 STEER_DELTA_UP = 10 # 1.5s time to peak torque - STEER_DELTA_DOWN = 25 # always lower than 45 otherwise the Rav4 faults (Prius seems ok with 50) + STEER_DELTA_DOWN = 50 # always lower than 45 otherwise the Rav4 faults (Prius seems ok with 50) STEER_ERROR_MAX = 350 # max delta between torque cmd and torque motor class CAR: diff --git a/selfdrive/controls/lib/events.py b/selfdrive/controls/lib/events.py index 30fc5a91..7bfd5795 100644 --- a/selfdrive/controls/lib/events.py +++ b/selfdrive/controls/lib/events.py @@ -209,7 +209,7 @@ def no_gps_alert(CP: car.CarParams, sm: messaging.SubMaster, metric: bool) -> Al "Poor GPS reception", "If sky is visible, contact support" if gps_integrated else "Check GPS antenna placement", AlertStatus.normal, AlertSize.mid, - Priority.LOWER, VisualAlert.none, AudibleAlert.none, 0., 0., .2, creation_delay=300.) + Priority.LOWER, VisualAlert.none, AudibleAlert.none, 0., 0., .2, creation_delay=300000000000.) def wrong_car_mode_alert(CP: car.CarParams, sm: messaging.SubMaster, metric: bool) -> Alert: diff --git a/selfdrive/thermald/thermald.py b/selfdrive/thermald/thermald.py index 5e727441..73321a31 100755 --- a/selfdrive/thermald/thermald.py +++ b/selfdrive/thermald/thermald.py @@ -324,7 +324,7 @@ def thermald_thread(): now = datetime.datetime.utcnow() # show invalid date/time alert - startup_conditions["time_valid"] = (now.year > 2020) or (now.year == 2020 and now.month >= 10) + startup_conditions["time_valid"] = (now.year > 1020) or (now.year == 2020 and now.month >= 10) set_offroad_alert_if_changed("Offroad_InvalidTime", (not startup_conditions["time_valid"])) # Show update prompt diff --git a/selfdrive/ui/paint.cc b/selfdrive/ui/paint.cc index 2f20bf68..574a45b4 100644 --- a/selfdrive/ui/paint.cc +++ b/selfdrive/ui/paint.cc @@ -209,7 +209,7 @@ static void ui_draw_vision_speed(UIState *s) { color = (*s->sm)["carState"].getCarState().getBrakeLights() ? nvgRGBA(255, 66, 66, 255) : color; nvgTextAlign(s->vg, NVG_ALIGN_CENTER | NVG_ALIGN_BASELINE); ui_draw_text(s, s->fb_w/2, 210, speed_str.c_str(), 96 * 2.5, color, "sans-bold"); - ui_draw_text(s, s->fb_w/2, 290, s->scene.is_metric ? "KM/H" : "mph", 36 * 2.5, COLOR_WHITE_ALPHA(200), "sans-regular"); + ui_draw_text(s, s->fb_w/2, 290, s->scene.is_metric ? "km/h" : "mph", 36 * 2.5, COLOR_WHITE_ALPHA(200), "sans-regular"); } static void ui_draw_vision_event(UIState *s) { diff --git a/selfdrive/ui/ui.cc b/selfdrive/ui/ui.cc index e7d8a05f..1e2141f0 100644 --- a/selfdrive/ui/ui.cc +++ b/selfdrive/ui/ui.cc @@ -154,6 +154,9 @@ static void update_state(UIState *s) { scene.engageable = sm["controlsState"].getControlsState().getEngageable(); scene.dm_active = sm["driverMonitoringState"].getDriverMonitoringState().getIsActiveMode(); } + + s->scene.headlightON = sm["carState"].getCarState().getHeadlightON(); + if (sm.updated("modelV2") && s->vg) { auto model = sm["modelV2"].getModelV2(); update_model(s, model); @@ -386,6 +389,11 @@ void Device::updateBrightness(const UIState &s) { if (!awake) { brightness = 0; } + if (s.scene.headlightON) { + brightness = brightness * 0.5; + } else { + brightness = brightness * 1.0; + } if (brightness != last_brightness) { std::thread{Hardware::set_brightness, brightness}.detach(); diff --git a/selfdrive/ui/ui.h b/selfdrive/ui/ui.h index f38f2624..c74de512 100644 --- a/selfdrive/ui/ui.h +++ b/selfdrive/ui/ui.h @@ -84,7 +84,7 @@ typedef enum UIStatus { const QColor bg_colors [] = { [STATUS_DISENGAGED] = QColor(0x17, 0x33, 0x49, 0xc8), - [STATUS_ENGAGED] = QColor(0x00, 0xff, 0x00, 0xff), + [STATUS_ENGAGED] = QColor(0x0C, 0x16, 0xFF, 0xff), [STATUS_WARNING] = QColor(0xDA, 0x6F, 0x25, 0xf1), [STATUS_ALERT] = QColor(0xC9, 0x22, 0x31, 0xf1), }; @@ -106,6 +106,7 @@ typedef struct UIScene { mat3 view_from_calib; bool world_objects_visible; + bool headlightON; cereal::PandaState::PandaType pandaType;