Skip to content

Commit 11afa4c

Browse files
committed
⚠️ Remove Test Branch Warning; Disable Updates; Remove Prime Ad
Disabling of not tested branch warning should only affect users with ssh access to repo (me) and only the main Rav4-TSS2 branch. Disabled in a way that hopefully doesn't harm comma's metrics.
1 parent c8a5e91 commit 11afa4c

File tree

4 files changed

+20
-30
lines changed

4 files changed

+20
-30
lines changed

selfdrive/car/car_helpers.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import os
22
from common.params import Params
33
from common.basedir import BASEDIR
4-
from selfdrive.version import is_comma_remote, is_tested_branch
4+
from selfdrive.version import is_comma_remote, is_tested_branch, is_krk_remote, is_krk_branch
55
from selfdrive.car.fingerprints import eliminate_incompatible_cars, all_legacy_fingerprint_cars
66
from selfdrive.car.vin import get_vin, VIN_UNKNOWN
77
from selfdrive.car.fw_versions import get_fw_versions, match_fw_to_car
@@ -14,7 +14,7 @@
1414

1515

1616
def get_startup_event(car_recognized, controller_available, fw_seen):
17-
if is_comma_remote() and is_tested_branch():
17+
if (is_comma_remote() and is_tested_branch()) or (is_krk_remote() and is_krk_branch()):
1818
event = EventName.startup
1919
else:
2020
event = EventName.startupMaster

selfdrive/ui/qt/widgets/prime.cc

+1-25
Original file line numberDiff line numberDiff line change
@@ -181,31 +181,7 @@ PrimeAdWidget::PrimeAdWidget(QWidget* parent) : QFrame(parent) {
181181
main_layout->setContentsMargins(80, 90, 80, 60);
182182
main_layout->setSpacing(0);
183183

184-
QLabel *upgrade = new QLabel("Upgrade Now");
185-
upgrade->setStyleSheet("font-size: 75px; font-weight: bold;");
186-
main_layout->addWidget(upgrade, 0, Qt::AlignTop);
187-
main_layout->addSpacing(50);
188-
189-
QLabel *description = new QLabel("Become a comma prime member at connect.comma.ai");
190-
description->setStyleSheet("font-size: 60px; font-weight: light; color: white;");
191-
description->setWordWrap(true);
192-
main_layout->addWidget(description, 0, Qt::AlignTop);
193-
194-
main_layout->addStretch();
195-
196-
QLabel *features = new QLabel("PRIME FEATURES:");
197-
features->setStyleSheet("font-size: 41px; font-weight: bold; color: #E5E5E5;");
198-
main_layout->addWidget(features, 0, Qt::AlignBottom);
199-
main_layout->addSpacing(30);
200-
201-
QVector<QString> bullets = {"Remote access", "14 days of storage", "Developer perks"};
202-
for (auto &b: bullets) {
203-
const QString check = "<b><font color='#465BEA'>✓</font></b> ";
204-
QLabel *l = new QLabel(check + b);
205-
l->setAlignment(Qt::AlignLeft);
206-
l->setStyleSheet("font-size: 50px; margin-bottom: 15px;");
207-
main_layout->addWidget(l, 0, Qt::AlignBottom);
208-
}
184+
// KRKeegan Remove Prime Ad
209185

210186
setStyleSheet(R"(
211187
PrimeAdWidget {

selfdrive/updated.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@
5252
OVERLAY_MERGED = os.path.join(STAGING_ROOT, "merged")
5353
FINALIZED = os.path.join(STAGING_ROOT, "finalized")
5454

55-
DAYS_NO_CONNECTIVITY_MAX = 14 # do not allow to engage after this many days
56-
DAYS_NO_CONNECTIVITY_PROMPT = 10 # send an offroad prompt after this many days
55+
DAYS_NO_CONNECTIVITY_MAX = 36500 # do not allow to engage after this many days // KRKeegan disable connect warning
56+
DAYS_NO_CONNECTIVITY_PROMPT = 36500 # send an offroad prompt after this many days // KRKeegan disable connect warning
5757

5858
class WaitTimeHelper:
5959
def __init__(self, proc):
@@ -373,7 +373,7 @@ def fetch_update(wait_helper: WaitTimeHelper) -> bool:
373373
def main() -> None:
374374
params = Params()
375375

376-
if params.get_bool("DisableUpdates"):
376+
if params.get_bool("DisableUpdates") or True: # KRKeegan disable updates
377377
cloudlog.warning("updates are disabled by the DisableUpdates param")
378378
exit(0)
379379

selfdrive/version.py

+14
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
from selfdrive.swaglog import cloudlog
99

1010
TESTED_BRANCHES = ['devel', 'release2-staging', 'release3-staging', 'dashcam-staging', 'release2', 'release3', 'dashcam']
11+
KRK_BRANCHES = ['Rav4-TSS2']
1112

1213
training_version: bytes = b"0.2.0"
1314
terms_version: bytes = b"2"
@@ -93,6 +94,19 @@ def is_tested_branch() -> bool:
9394
return get_short_branch() in TESTED_BRANCHES
9495

9596

97+
@cache
98+
def is_krk_remote() -> bool:
99+
origin = get_origin()
100+
if origin is None:
101+
return False
102+
return origin.startswith('git@github.com:krkeegan')
103+
104+
105+
@cache
106+
def is_krk_branch() -> bool:
107+
return get_short_branch() in KRK_BRANCHES
108+
109+
96110
@cache
97111
def is_dirty() -> bool:
98112
origin = get_origin()

0 commit comments

Comments
 (0)