diff --git a/.github/workflows/mirror_to_gitlab.yaml b/.github/workflows/mirror_to_gitlab.yaml
index e605458ad9..38c95bac20 100644
--- a/.github/workflows/mirror_to_gitlab.yaml
+++ b/.github/workflows/mirror_to_gitlab.yaml
@@ -29,7 +29,7 @@ jobs:
git config --global user.email 'action@github.com'
- name: Set up SSH
- uses: webfactory/ssh-agent@v0.5.3
+ uses: webfactory/ssh-agent@v0.9.0
with:
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
@@ -37,19 +37,10 @@ jobs:
run: |
ssh-keyscan -H gitlab.com >> ~/.ssh/known_hosts
+ # Note: If you have issues with "push rejected missing LFS" or something make sure you disabled LFS on the GITLAB repo if you intend to use a different LFS repo other than the target repo.
- name: Sync and commit changes
id: sync-and-commit
run: |
- git lfs pull
-
# Add GitLab remote
git remote add gitlab git@gitlab.com:sunnypilot/sunnyhaibin/sunnypilot-github-mirror.git
-
- # Fetch from GitLab and check if the branch exists
- if git fetch gitlab ${{ github.ref }}; then
- # Merge changes from GitLab if the branch exists
- git merge gitlab/${{ github.ref_name }} --allow-unrelated-histories --strategy-option=theirs
- else
- echo "Branch does not exist on GitLab, skipping merge."
- fi
- git push -u gitlab ${{ github.ref }} # If you have issues with "push rejected missing LFS" or something. Make sure you disabled LFS on the GITLAB repo if you intend to use a different LFS repo other than the target repo
\ No newline at end of file
+ git push -u --force gitlab ${{ github.ref }}
diff --git a/.gitmodules b/.gitmodules
index ef12570b66..a61bed1e2f 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -3,10 +3,10 @@
url = https://github.com/sunnyhaibin/panda.git
[submodule "opendbc"]
path = opendbc_repo
- url = https://github.com/sunnyhaibin/opendbc.git
+ url = https://github.com/sunnypilot/opendbc.git
[submodule "msgq"]
path = msgq_repo
- url = https://github.com/commaai/msgq.git
+ url = https://github.com/sunnypilot/msgq.git
[submodule "rednose_repo"]
path = rednose_repo
url = https://github.com/commaai/rednose.git
diff --git a/HOW-TOS.md b/HOW-TOS.md
new file mode 100644
index 0000000000..a66786c200
--- /dev/null
+++ b/HOW-TOS.md
@@ -0,0 +1,77 @@
+# How Tos
+This page is a repository of useful how-tos as a supplement for additional information.
+
+Table of Contents
+=======================
+
+* [Radar Tracks](#Radar-Tracks)
+ * [Enable Radar Tracks](#-Enable-Radar-Tracks)
+* [Enable Mapbox Navigation](#-Enable-Mapbox-Navigation)
+
+---
+
+📡 Radar Tracks
+
+Radar tracks can now be enabled manually on applicable cars through SSH thanks to [@greghogan](https://github.com/greghogan) and [@pd0wm](https://github.com/pd0wm).
+
+Some Hyundai radars can be reconfigured to output (debug) radar points on bus 1.
+Reconfiguration is done over UDS by reading/writing to 0x0142 using the Read/Write Data By Identifier
+endpoints (0x22 & 0x2E). This script checks your radar firmware version against a list of known
+firmware versions. If you want to try on a new radar, make sure to note the default config value
+in case it is different from the other radars and you need to revert the changes.
+After changing the config the car should not show any faults when openpilot is not running.
+These config changes are persistent across car reboots. You need to run this script again
+to go back to the default values.
+
+**USE AT YOUR OWN RISK!** Stock system safety features, like AEB and FCW, might be affected by these changes.
+
+**How radar points can be used along with vision:**
+* Current OP long policy is identify with vision first, if vision sees a vehicle match it to a radar point. If vision sees nothing you get a false negative and no lead car detection. (Source: [Hubblesphere#7894 from comma.ai community Discord](https://discord.com/channels/469524606043160576/872899198738104330/872913890793635872))
+
+### 🚨 Enable Radar Tracks
+
+***(EXPERIMENTAL, as of January 1st, 2022)***
+
+***(Only applicable to some Hyundai, Kia, and Genesis cars, as of January 1st, 2022)***
+
+*(Base on version 0.8.12 [`devel`](https://github.com/commaai/openpilot/tree/devel))*
+
+**USE AT YOUR OWN RISK!** Stock system safety features, like AEB and FCW, might be affected by these changes.
+
+1. Ensure the car is at the `OFF` ignition position.
+2. Connect your compatible comma device (EON, C2, C3) to the car. comma device power should be ON.
+3. Use a laptop or applicable device to connect to your comma device via SSH. (Tips: Instructions to SSH in [HERE](https://github.com/commaai/openpilot/wiki/SSH))
+4. In the SSH terminal after successfully connected to your comma device, execute the following commands:
+ 1. `pkill -f openpilot`
+ 2. `python /data/openpilot/selfdrive/debug/hyundai_enable_radar_points.py`
+ 3. Follow the instructions in the script:
+ * `Power on the vehicle keeping the engine off (press start button twice) then type OK to continue`.
+ * If successful, the following message should appear: `[DONE]. Restart your vehicle and ensure there are no faults`.
+ * If the script did not run successfully, reach out to the community in [Sunnyhaibin's Openpilot Discord Server](https://discord.gg/wRW3meAgtx) or `#hyundai-kia-genesis channel` on [commaai community Discord Server](https://discord.comma.ai) for assistance.
+ 4. Reboot your comma device:
+ 1. C3: `sudo reboot`
+ 2. C2 or EON: `reboot`
+5. Once your comma device is rebooted, start your car with engine on (with or without comma device connected). Ensure that there are no faults from the car. If there are faults, reach out to the community in [Sunnyhaibin's Openpilot Discord Server](https://discord.gg/wRW3meAgtx) or `#hyundai-kia-genesis channel` on [commaai community Discord Server](https://discord.comma.ai) for assistance.
+6. Go for a quick drive and drive behind a lead car with varied follow distance. Then, come back and allow the drive to upload its `rlogs` in [comma Connect](https://connect.comma.ai).
+7. With all `rlogs` uploaded, open the drive in Cabana from [comma Connect](https://connect.comma.ai). Load DBC -> `hyundai_kia_mando_front_radar.dbc`, then search `RADAR_TRACK_50x` (`x` could be anything), open any of them, and look at `LONG_DIST`.
+8. If the radar tracks data is relevant with the lead car you drove behind, you are done! Your car now have radar tracks enabled.
+
+
+đź—ş Enable Mapbox Navigation
+
+1) Create a free mapbox account. Account will ask for a credit card for verification. You will not be charged for the free tier.
+2) On the Dashboard, you will see a section called Access Tokens. Click `Create a Token`. Name it whatever you like. Set the scopes to allow everything for both Public and Secret. Copy both of these keys. **YOU WON'T BE ABLE TO ACCESS THE SECRET KEY AFTER THIS WINDOW.**
+3) Once rebooted, connect your C3 to a network with internet access and find the C3’s IP address.
+4) In a browser, navigate to that IP with **port 8082** (i.e 192.168.1.69:8082). You should be greeted with the Comma logo and a public key input field.
+5) Paste your Public token (pk.xx), click enter, paste your Secret key (sk.xx), click enter. You can now search for places. This page will be available at your devices’s IP address/port 8082 to search for destinations.
+6) To set Home and Work addresses, search for a place, select Home/Work from the dropdown and click Navigate. For non-Home/Work destinations, select Recent Places.
*At this time, it is not possible to search directly on the C3.*
+
+**TIPS:**
+- If your C3 is showing a black screen that says “Map Loading”, performing a reboot via the UI should fix it.
+- If your phone can create a Hotspot, you are able to connect the C3 to your phone hotspot and use your phone browser to search for places.
+- In the Navigation panel on the C3, you can select Home, Work, and from a list of Recent Places you have navigated to without needing a browser (assuming the C3 is connected to the internet.)
+
+**IMPORTANT NOTE:** Your C3 will require an active internet connection to download map data, generate driving directions, and ETA. Once map data and directions are downloaded, it *is* possible to use it offline, however nothing will update (such as new driving direction after a missed turn, updated ETA, map data further into your drive etc.)
+
+***NAVIGATION NOTE:** At this time, mapbox does not support alphanumeric addresses (i.e W123N1234 Main St). There is currently no known workaround for this.*
+
diff --git a/msgq_repo b/msgq_repo
index f769b2babb..e6c0716e41 160000
--- a/msgq_repo
+++ b/msgq_repo
@@ -1 +1 @@
-Subproject commit f769b2babb2caa637aa4c76db2aa260ff8af722b
+Subproject commit e6c0716e413927f7ea3df6088282e4f4eadfbe78
diff --git a/opendbc_repo b/opendbc_repo
index 1f23b33705..d3cdde5f19 160000
--- a/opendbc_repo
+++ b/opendbc_repo
@@ -1 +1 @@
-Subproject commit 1f23b3370589dd0d2752d1932620556f83e82525
+Subproject commit d3cdde5f19d87a2853874b3fa1c5c5e277d9d7f8
diff --git a/panda b/panda
index f8cf7a0f33..55018eafc2 160000
--- a/panda
+++ b/panda
@@ -1 +1 @@
-Subproject commit f8cf7a0f3315da9de6effd3662b91976109b9226
+Subproject commit 55018eafc258f949cbe7bb381fa14ca2805926b9
diff --git a/release/ci/sync-lfs.sh b/release/ci/sync-lfs.sh
old mode 100644
new mode 100755
index a328724351..778d310051
--- a/release/ci/sync-lfs.sh
+++ b/release/ci/sync-lfs.sh
@@ -4,4 +4,4 @@ mv .lfsconfig-comma .lfsconfig
git lfs fetch --all; git lfs pull
mv .lfsconfig .lfsconfig-comma
mv .lfsconfig.bak .lfsconfig
-git lfs fetch --all; git lfs push origin main
+git lfs fetch --all; git lfs push --all origin
diff --git a/selfdrive/car/chrysler/carcontroller.py b/selfdrive/car/chrysler/carcontroller.py
index 09068cec8a..8a805cd2a1 100644
--- a/selfdrive/car/chrysler/carcontroller.py
+++ b/selfdrive/car/chrysler/carcontroller.py
@@ -269,8 +269,8 @@ class CarController(CarControllerBase):
return min(target_speed_kph, curve_speed)
def get_button_control(self, CS, final_speed, v_cruise_kph_prev):
- self.init_speed = round(min(final_speed, v_cruise_kph_prev) * (CV.KPH_TO_MPH if not self.is_metric else 1))
- self.v_set_dis = round(CS.out.cruiseState.speed * (CV.MS_TO_MPH if not self.is_metric else CV.MS_TO_KPH))
+ self.init_speed = round(min(final_speed, v_cruise_kph_prev) * (CV.KPH_TO_MPH if not CS.params_list.is_metric else 1))
+ self.v_set_dis = round(CS.out.cruiseState.speed * (CV.MS_TO_MPH if not CS.params_list.is_metric else CV.MS_TO_KPH))
cruise_button = self.get_button_type(self.button_type)
return cruise_button
diff --git a/selfdrive/car/volkswagen/carcontroller.py b/selfdrive/car/volkswagen/carcontroller.py
index c3459f7676..28c48283a7 100644
--- a/selfdrive/car/volkswagen/carcontroller.py
+++ b/selfdrive/car/volkswagen/carcontroller.py
@@ -294,8 +294,8 @@ class CarController(CarControllerBase):
return min(target_speed_kph, curve_speed)
def get_button_control(self, CS, final_speed, v_cruise_kph_prev):
- self.init_speed = round(min(final_speed, v_cruise_kph_prev) * (CV.KPH_TO_MPH if not self.is_metric else 1))
- self.v_set_dis = round(CS.out.cruiseState.speed * (CV.MS_TO_MPH if not self.is_metric else CV.MS_TO_KPH))
+ self.init_speed = round(min(final_speed, v_cruise_kph_prev) * (CV.KPH_TO_MPH if not CS.params_list.is_metric else 1))
+ self.v_set_dis = round(CS.out.cruiseState.speed * (CV.MS_TO_MPH if not CS.params_list.is_metric else CV.MS_TO_KPH))
cruise_button = self.get_button_type(self.button_type)
return cruise_button
diff --git a/selfdrive/controls/radard.py b/selfdrive/controls/radard.py
index 97b3c33957..0c8c9ff179 100755
--- a/selfdrive/controls/radard.py
+++ b/selfdrive/controls/radard.py
@@ -10,8 +10,8 @@ from openpilot.common.numpy_fast import interp
from openpilot.common.params import Params
from openpilot.common.realtime import DT_CTRL, Ratekeeper, Priority, config_realtime_process
from openpilot.common.swaglog import cloudlog
-from openpilot.selfdrive.car.hyundai.values import HyundaiFlagsSP
from openpilot.common.simple_kalman import KF1D
+from openpilot.selfdrive.car.hyundai.values import HyundaiFlagsSP
from openpilot.selfdrive.pandad import can_capnp_to_list
diff --git a/selfdrive/ui/sunnypilot/qt/network/networking.cc b/selfdrive/ui/sunnypilot/qt/network/networking.cc
index bbe2cfb79c..0b26c2f8ba 100644
--- a/selfdrive/ui/sunnypilot/qt/network/networking.cc
+++ b/selfdrive/ui/sunnypilot/qt/network/networking.cc
@@ -107,6 +107,10 @@ NetworkingSP::NetworkingSP(QWidget* parent, bool show_advanced) : QFrame(parent)
#back_btn:pressed, #advanced_btn:pressed, #scan_btn:pressed {
background-color: #4a4a4a;
}
+ #scan_btn:disabled {
+ background-color: #121212;
+ color: #33FFFFFF;
+ }
)");
main_layout->setCurrentWidget(wifiScreen);
}
diff --git a/selfdrive/ui/sunnypilot/qt/onroad/annotated_camera.cc b/selfdrive/ui/sunnypilot/qt/onroad/annotated_camera.cc
index bebac31d90..4a281d413e 100644
--- a/selfdrive/ui/sunnypilot/qt/onroad/annotated_camera.cc
+++ b/selfdrive/ui/sunnypilot/qt/onroad/annotated_camera.cc
@@ -148,11 +148,13 @@ void AnnotatedCameraWidgetSP::updateState(const UIStateSP &s) {
const auto lateral_plan_sp = sm["lateralPlanSPDEPRECATED"].getLateralPlanSPDEPRECATED();
car_params = sm["carParams"].getCarParams();
+ is_metric = s.scene.is_metric;
+
// Handle older routes where vCruiseCluster is not set
float v_cruise = cs.getVCruiseCluster() == 0.0 ? cs.getVCruise() : cs.getVCruiseCluster();
setSpeed = cs_alive ? v_cruise : SET_SPEED_NA;
is_cruise_set = setSpeed > 0 && (int)setSpeed != SET_SPEED_NA;
- if (is_cruise_set && !s.scene.is_metric) {
+ if (is_cruise_set && !is_metric) {
setSpeed *= KM_TO_MILE;
}
@@ -161,7 +163,7 @@ void AnnotatedCameraWidgetSP::updateState(const UIStateSP &s) {
float v_ego = v_ego_cluster_seen ? car_state.getVEgoCluster() : car_state.getVEgo();
v_ego = s.scene.true_vego_ui ? car_state.getVEgo() : v_ego;
speed = cs_alive ? std::max(0.0, v_ego) : 0.0;
- speed *= s.scene.is_metric ? MS_TO_KPH : MS_TO_MPH;
+ speed *= is_metric ? MS_TO_KPH : MS_TO_MPH;
auto speed_limit_sign = nav_instruction.getSpeedLimitSign();
speedLimit = nav_alive ? nav_instruction.getSpeedLimit() : 0.0;
@@ -169,8 +171,7 @@ void AnnotatedCameraWidgetSP::updateState(const UIStateSP &s) {
has_us_speed_limit = (nav_alive && speed_limit_sign == cereal::NavInstruction::SpeedLimitSign::MUTCD);
has_eu_speed_limit = (nav_alive && speed_limit_sign == cereal::NavInstruction::SpeedLimitSign::VIENNA);
- is_metric = s.scene.is_metric;
- speedUnit = s.scene.is_metric ? tr("km/h") : tr("mph");
+ speedUnit = is_metric ? tr("km/h") : tr("mph");
hideBottomIcons = (cs.getAlertSize() != cereal::ControlsState::AlertSize::NONE);
status = s.status;
diff --git a/system/athena/athenad.py b/system/athena/athenad.py
index d07221bcb3..378098bf38 100755
--- a/system/athena/athenad.py
+++ b/system/athena/athenad.py
@@ -106,6 +106,7 @@ cancelled_uploads: set[str] = set()
cur_upload_items: dict[int, UploadItem | None] = {}
+# TODO-SP: adapt zst for sunnylink
def strip_zst_extension(fn: str) -> str:
if fn.endswith('.zst'):
return fn[:-4]