Skip to content

Commit c5539bc

Browse files
committed
March 29th, 2025 Update
1 parent 1cf68eb commit c5539bc

40 files changed

+1350
-114
lines changed

.github/workflows/compile_frogpilot.yaml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,6 @@ jobs:
167167
rm -f poetry.lock
168168
rm -f pyproject.toml
169169
rm -f teleoprtc
170-
rm -f tinygrad
171170
rm -f Dockerfile.openpilot
172171
rm -f Dockerfile.openpilot_base
173172
rm -f Jenkinsfile
@@ -225,7 +224,7 @@ jobs:
225224
find third_party/ -name '*x86*' -exec rm -rf {} +
226225
find third_party/ -name '*Darwin*' -exec rm -rf {} +
227226
228-
find tools/ -mindepth 1 -maxdepth 1 ! \( -name '__init__.py' -o -name 'bodyteleop' -o -name 'lib' \) -exec rm -rf {} +
227+
find tools/ -mindepth 1 -maxdepth 1 ! \( -name '__init__.py' -o -name 'bodyteleop' -o -name 'lib' -o -name 'scripts' \) -exec rm -rf {} +
229228
230229
find . -name 'SConstruct' -delete
231230
find . -name 'SConscript' -delete
@@ -240,6 +239,18 @@ jobs:
240239
touch not_vetted
241240
fi
242241
242+
- name: Retrieve update_date from FrogPilot-Staging
243+
run: |
244+
if [ "${{ github.event.inputs.publish_staging }}" = "true" ]; then
245+
git fetch origin FrogPilot-Staging
246+
247+
if git ls-tree --name-only origin/FrogPilot-Staging .github/update_date | grep -q ".github/update_date"; then
248+
git show origin/FrogPilot-Staging:.github/update_date > .github/update_date
249+
else
250+
echo "No .github/update_date found in FrogPilot-Staging branch."
251+
fi
252+
fi
253+
243254
- name: Commit Build
244255
run: |
245256
cd $BUILD_DIR

.github/workflows/review_pull_request.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@ jobs:
1414
runs-on: ubuntu-latest
1515
steps:
1616
- name: Exit If PR Opened by FrogAi
17-
if: ${{ github.actor == "FrogAi" }}
17+
if: ${{ github.actor == 'FrogAi' }}
1818
run: |
1919
echo "PR opened or reopened by FrogAi. No action needed."
2020
exit 0
2121
2222
- name: Close PR for Invalid Target Branch
23-
if: ${{ github.base_ref != "MAKE-PRS-HERE" }}
23+
if: ${{ github.event.pull_request.base.ref != 'MAKE-PRS-HERE' }}
2424
run: |
2525
gh api repos/${{ github.repository }}/issues/${{ github.event.pull_request.number }}/comments \
2626
-f body="Please submit your pull request to the \"MAKE-PRS-HERE\" branch."
@@ -30,7 +30,7 @@ jobs:
3030
-f state="closed"
3131
3232
- name: Acknowledge PR for Valid Target Branch
33-
if: ${{ github.base_ref == "MAKE-PRS-HERE" }}
33+
if: ${{ github.event.pull_request.base.ref == 'MAKE-PRS-HERE' }}
3434
run: |
3535
gh api repos/${{ github.repository }}/issues/${{ github.event.pull_request.number }}/comments \
3636
-f body="Thank you for your PR! If you're not already in the FrogPilot Discord, [feel free to join](https://discord.FrogPilot.download) and let me know you've opened a PR!"

.github/workflows/schedule_update.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
uses: actions/checkout@v3
2424
with:
2525
ref: ${{ env.BRANCH }}
26-
fetch-depth: 2
26+
fetch-depth: 3
2727

2828
- name: Schedule Update for ${{ github.event.inputs.scheduled_date }}
2929
run: |

.github/workflows/update_release_branch.yaml

Lines changed: 21 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,12 @@ env:
1414
UPDATE_FILE: .github/update_date
1515

1616
jobs:
17-
update-branch:
17+
check_update:
1818
runs-on: ubuntu-latest
19+
outputs:
20+
update_due: ${{ steps.check_update.outputs.update_due }}
21+
scheduled_date: ${{ steps.check_update.outputs.scheduled_date }}
1922
steps:
20-
- name: Configure Git Identity
21-
run: |
22-
git config --global user.name "${{ github.actor }}"
23-
git config --global user.email "${{ github.actor }}@users.noreply.github.com"
24-
2523
- name: Checkout ${{ env.BRANCH_STAGING }}
2624
uses: actions/checkout@v3
2725
with:
@@ -51,8 +49,23 @@ jobs:
5149
echo "update_due=true" >> "$GITHUB_OUTPUT"
5250
echo "scheduled_date=$SCHEDULED_DATE" >> "$GITHUB_OUTPUT"
5351
52+
update_branch:
53+
needs: check_update
54+
if: needs.check_update.outputs.update_due == "true"
55+
runs-on: ubuntu-latest
56+
steps:
57+
- name: Configure Git Identity
58+
run: |
59+
git config --global user.name "${{ github.actor }}"
60+
git config --global user.email "${{ github.actor }}@users.noreply.github.com"
61+
62+
- name: Checkout ${{ env.BRANCH_STAGING }}
63+
uses: actions/checkout@v3
64+
with:
65+
fetch-depth: 0
66+
ref: ${{ env.BRANCH_STAGING }}
67+
5468
- name: Update README Date and Remove (${{ env.UPDATE_FILE }})
55-
if: steps.check_update.outputs.update_due == "true"
5669
run: |
5770
DAY=$(TZ="${{ env.TZ }}" date +'%d' | sed 's/^0//')
5871
case "$DAY" in
@@ -73,7 +86,6 @@ jobs:
7386
git commit -m "Updated README date to ${NEW_DATE}"
7487
7588
- name: Squash Commits
76-
if: steps.check_update.outputs.update_due == "true"
7789
run: |
7890
COMMIT_MSG=$(git log -1 --pretty=%B HEAD~1)
7991
@@ -82,20 +94,17 @@ jobs:
8294
git commit -m "$COMMIT_MSG"
8395
8496
- name: Rewrite Commit Dates to Noon ${{ env.TZ }}
85-
if: steps.check_update.outputs.update_due == "true"
8697
run: |
87-
COMMIT_DATETIME="${{ steps.check_update.outputs.scheduled_date }} 12:00"
98+
COMMIT_DATETIME="${{ needs.check_update.outputs.scheduled_date }} 12:00"
8899
COMMIT_PHX=$(TZ="${{ env.TZ }}" date -d "$COMMIT_DATETIME" +"%Y-%m-%dT%H:%M:%S %z")
89100
90101
git filter-branch --env-filter "export GIT_AUTHOR_DATE='$COMMIT_PHX'; export GIT_COMMITTER_DATE='$COMMIT_PHX'" "${{ env.BRANCH_STAGING }}"
91102
92103
- name: Fetch ${{ env.BRANCH_PREVIOUS }} and ${{ env.BRANCH_FROGPILOT }}
93-
if: steps.check_update.outputs.update_due == "true"
94104
run: |
95105
git fetch origin ${{ env.BRANCH_PREVIOUS }} ${{ env.BRANCH_FROGPILOT }}
96106
97107
- name: Wait Until Noon ${{ env.TZ }} Before Continuing
98-
if: steps.check_update.outputs.update_due == "true"
99108
run: |
100109
NOW=$(TZ="${{ env.TZ }}" date +%s)
101110
TARGET=$(TZ="${{ env.TZ }}" date -d "12:00" +%s)
@@ -109,19 +118,16 @@ jobs:
109118
fi
110119
111120
- name: Push ${{ env.BRANCH_STAGING }}
112-
if: steps.check_update.outputs.update_due == "true"
113121
run: |
114122
git push origin "${{ env.BRANCH_STAGING }}" --force
115123
116124
- name: Reset ${{ env.BRANCH_PREVIOUS }} to Match ${{ env.BRANCH_FROGPILOT }}
117-
if: steps.check_update.outputs.update_due == "true"
118125
run: |
119126
git switch "${{ env.BRANCH_PREVIOUS }}"
120127
git reset --hard "origin/${{ env.BRANCH_FROGPILOT }}"
121128
git push origin "${{ env.BRANCH_PREVIOUS }}" --force
122129
123130
- name: Reset ${{ env.BRANCH_FROGPILOT }} to Match ${{ env.BRANCH_STAGING }}
124-
if: steps.check_update.outputs.update_due == "true"
125131
run: |
126132
git switch "${{ env.BRANCH_FROGPILOT }}"
127133
git reset --hard "origin/${{ env.BRANCH_STAGING }}"

selfdrive/car/hyundai/carstate.py

Lines changed: 27 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,31 @@
1616
STANDSTILL_THRESHOLD = 12 * 0.03125 * CV.KPH_TO_MS
1717

1818

19+
# Traffic signals for Speed Limit Controller - Credit goes to Multikyd!
20+
@staticmethod
21+
def calculate_speed_limit(CP, cp, cp_cam):
22+
if CP.carFingerprint in CANFD_CAR:
23+
if CP.flags & HyundaiFlags.CANFD_HDA2:
24+
speed_limit_bus = cp
25+
else:
26+
speed_limit_bus = cp_cam
27+
28+
speed_limit = speed_limit_bus.vl["CLUSTER_SPEED_LIMIT"]["SPEED_LIMIT_1"]
29+
else:
30+
if CP.flags & HyundaiFlags.LKAS12:
31+
speed_limit = cp_cam.vl["LKAS12"]["CF_Lkas_TsrSpeed_Display_Clu"]
32+
else:
33+
speed_limit = 0
34+
35+
if speed_limit in (0, 255) and CP.flags & HyundaiFlags.NAV_MSG:
36+
speed_limit = cp.vl["Navi_HU"]["SpeedLim_Nav_Clu"]
37+
38+
if speed_limit not in (0, 255):
39+
return speed_limit
40+
else:
41+
return 0
42+
43+
1944
class CarState(CarStateBase):
2045
def __init__(self, CP):
2146
super().__init__(CP)
@@ -58,22 +83,6 @@ def __init__(self, CP):
5883
self.active_mode = 0
5984
self.drive_mode_prev = 0
6085

61-
# Traffic signals for Speed Limit Controller - Credit goes to Multikyd!
62-
def calculate_speed_limit(self, cp, cp_cam):
63-
if self.CP.carFingerprint in CANFD_CAR:
64-
if self.CP.flags & HyundaiFlags.CANFD_HDA2:
65-
speed_limit_bus = cp
66-
else:
67-
speed_limit_bus = cp_cam
68-
return speed_limit_bus.vl["CLUSTER_SPEED_LIMIT"]["SPEED_LIMIT_1"]
69-
else:
70-
speed_limit_cam = cp_cam.vl["LKAS12"]["CF_Lkas_TsrSpeed_Display_Clu"] if self.CP.flags & HyundaiFlags.LKAS12 else 0
71-
speed_limit_nav = cp.vl["Navi_HU"]["SpeedLim_Nav_Clu"] if self.CP.flags & HyundaiFlags.NAV_MSG else 0
72-
73-
if speed_limit_cam not in (0, 255):
74-
return speed_limit_cam
75-
return speed_limit_nav
76-
7786
def update(self, cp, cp_cam, frogpilot_toggles):
7887
if self.CP.carFingerprint in CANFD_CAR:
7988
return self.update_canfd(cp, cp_cam, frogpilot_toggles)
@@ -195,7 +204,7 @@ def update(self, cp, cp_cam, frogpilot_toggles):
195204
fp_ret.brakeLights = bool(cp.vl["TCS13"]["BrakeLight"])
196205

197206
if self.CP.flags & HyundaiFlags.LKAS12 or self.CP.flags & HyundaiFlags.NAV_MSG:
198-
fp_ret.dashboardSpeedLimit = self.calculate_speed_limit(cp, cp_cam) * speed_conv
207+
fp_ret.dashboardSpeedLimit = calculate_speed_limit(self.CP, cp, cp_cam) * speed_conv
199208

200209
self.prev_distance_button = self.distance_button
201210
self.distance_button = self.cruise_buttons[-1] == Buttons.GAP_DIST
@@ -295,7 +304,7 @@ def update_canfd(self, cp, cp_cam, frogpilot_toggles):
295304
fp_ret.brakeLights = bool(cp.vl["TCS"]["DriverBraking"])
296305

297306
if self.CP.flags & HyundaiFlags.NAV_MSG:
298-
fp_ret.dashboardSpeedLimit = self.calculate_speed_limit(cp, cp_cam) * speed_factor
307+
fp_ret.dashboardSpeedLimit = calculate_speed_limit(self.CP, cp, cp_cam) * speed_factor
299308

300309
self.prev_distance_button = self.distance_button
301310
self.distance_button = self.cruise_buttons[-1] == Buttons.GAP_DIST
Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,44 @@
11
{
22
"LaneLines": {
3-
"red": 23,
4-
"green": 134,
5-
"blue": 68,
6-
"alpha": 242
3+
"red": 40,
4+
"green": 185,
5+
"blue": 170,
6+
"alpha": 255
77
},
88
"LeadMarker": {
9-
"red": 23,
10-
"green": 134,
11-
"blue": 68,
12-
"alpha": 242
9+
"red": 40,
10+
"green": 185,
11+
"blue": 170,
12+
"alpha": 255
1313
},
1414
"Path": {
15-
"red": 23,
16-
"green": 134,
17-
"blue": 68,
18-
"alpha": 242
15+
"red": 40,
16+
"green": 185,
17+
"blue": 170,
18+
"alpha": 255
1919
},
2020
"PathEdge": {
21-
"red": 18,
22-
"green": 107,
23-
"blue": 54,
24-
"alpha": 242
21+
"red": 32,
22+
"green": 148,
23+
"blue": 136,
24+
"alpha": 255
2525
},
2626
"Sidebar1": {
27-
"red": 23,
28-
"green": 134,
29-
"blue": 68,
30-
"alpha": 242
27+
"red": 40,
28+
"green": 185,
29+
"blue": 170,
30+
"alpha": 255
3131
},
3232
"Sidebar2": {
33-
"red": 23,
34-
"green": 134,
35-
"blue": 68,
36-
"alpha": 242
33+
"red": 237,
34+
"green": 118,
35+
"blue": 50,
36+
"alpha": 255
3737
},
3838
"Sidebar3": {
39-
"red": 23,
40-
"green": 134,
41-
"blue": 68,
42-
"alpha": 242
39+
"red": 203,
40+
"green": 247,
41+
"blue": 18,
42+
"alpha": 255
4343
}
4444
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)