Skip to content

Commit

Permalink
⚠️ Remove Test Branch Warning; Disable Updates; Remove Prime Ad
Browse files Browse the repository at this point in the history
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.

Need to run the following on any new release to regenerate
translation tests:
./selfdrive/ui/update_translations.py --release
  • Loading branch information
krkeegan committed Jun 17, 2024
1 parent 54c5cec commit 46bfd41
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 11 deletions.
2 changes: 1 addition & 1 deletion selfdrive/car/car_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

def get_startup_event(car_recognized, controller_available, fw_seen):
build_metadata = get_build_metadata()
if build_metadata.openpilot.comma_remote and build_metadata.tested_channel:
if (build_metadata.openpilot.comma_remote and build_metadata.tested_channel) or (build_metadata.openpilot.krk_remote and build_metadata.krk_channel):
event = EventName.startup
else:
event = EventName.startupMaster
Expand Down
15 changes: 8 additions & 7 deletions selfdrive/ui/qt/widgets/prime.cc
Original file line number Diff line number Diff line change
Expand Up @@ -138,30 +138,31 @@ PrimeAdWidget::PrimeAdWidget(QWidget* parent) : QFrame(parent) {
main_layout->setContentsMargins(80, 90, 80, 60);
main_layout->setSpacing(0);

// KRKeegan Remove Prime Ad
QLabel *upgrade = new QLabel(tr("Upgrade Now"));
upgrade->setStyleSheet("font-size: 75px; font-weight: bold;");
main_layout->addWidget(upgrade, 0, Qt::AlignTop);
main_layout->addSpacing(50);
//main_layout->addWidget(upgrade, 0, Qt::AlignTop);
//main_layout->addSpacing(50);

QLabel *description = new QLabel(tr("Become a comma prime member at connect.comma.ai"));
description->setStyleSheet("font-size: 56px; font-weight: light; color: white;");
description->setWordWrap(true);
main_layout->addWidget(description, 0, Qt::AlignTop);
//main_layout->addWidget(description, 0, Qt::AlignTop);

main_layout->addStretch();
//main_layout->addStretch();

QLabel *features = new QLabel(tr("PRIME FEATURES:"));
features->setStyleSheet("font-size: 41px; font-weight: bold; color: #E5E5E5;");
main_layout->addWidget(features, 0, Qt::AlignBottom);
main_layout->addSpacing(30);
//main_layout->addWidget(features, 0, Qt::AlignBottom);
//main_layout->addSpacing(30);

QVector<QString> bullets = {tr("Remote access"), tr("24/7 LTE connectivity"), tr("1 year of drive storage"), tr("Turn-by-turn navigation")};
for (auto &b : bullets) {
const QString check = "<b><font color='#465BEA'>✓</font></b> ";
QLabel *l = new QLabel(check + b);
l->setAlignment(Qt::AlignLeft);
l->setStyleSheet("font-size: 50px; margin-bottom: 15px;");
main_layout->addWidget(l, 0, Qt::AlignBottom);
//main_layout->addWidget(l, 0, Qt::AlignBottom);
}

setStyleSheet(R"(
Expand Down
8 changes: 5 additions & 3 deletions system/updated/updated.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@

OVERLAY_INIT = Path(os.path.join(BASEDIR, ".overlay_init"))

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

class UserRequest:
NONE = 0
Expand Down Expand Up @@ -409,7 +409,9 @@ def fetch_update(self) -> None:
def main() -> None:
params = Params()

if params.get_bool("DisableUpdates"):
disable = True

if params.get_bool("DisableUpdates") or disable: # KRKeegan disable updates
cloudlog.warning("updates are disabled by the DisableUpdates param")
exit(0)

Expand Down
9 changes: 9 additions & 0 deletions system/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

RELEASE_BRANCHES = ['release3-staging', 'release3', 'nightly']
TESTED_BRANCHES = RELEASE_BRANCHES + ['devel', 'devel-staging']
KRK_BRANCHES = ['Rav4-TSS2']

BUILD_METADATA_FILENAME = "build.json"

Expand Down Expand Up @@ -80,6 +81,10 @@ def comma_remote(self) -> bool:
# touch this to get rid of the orange startup alert. there's better ways to do that
return self.git_normalized_origin == "github.com/commaai/openpilot"

@property
def krk_remote(self) -> bool:
return self.git_normalized_origin == "github.com/krkeegan/openpilot"

@property
def git_normalized_origin(self) -> str:
return self.git_origin \
Expand All @@ -98,6 +103,10 @@ class BuildMetadata:
def tested_channel(self) -> bool:
return self.channel in TESTED_BRANCHES

@property
def krk_channel(self) -> bool:
return self.channel in KRK_BRANCHES

@property
def release_channel(self) -> bool:
return self.channel in RELEASE_BRANCHES
Expand Down

0 comments on commit 46bfd41

Please sign in to comment.