remove dashcam branch (#31081)

* remove dashcam branch

* fix

* more cleanup

* remove param

* one more
This commit is contained in:
Adeeb Shihadeh 2024-01-19 14:05:03 -08:00 committed by GitHub
parent 18467c8383
commit 7cd9568423
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
35 changed files with 28 additions and 108 deletions

4
Jenkinsfile vendored
View File

@ -168,7 +168,7 @@ node {
env.GIT_COMMIT = checkout(scm).GIT_COMMIT env.GIT_COMMIT = checkout(scm).GIT_COMMIT
def excludeBranches = ['master-ci', 'devel', 'devel-staging', 'release3', 'release3-staging', def excludeBranches = ['master-ci', 'devel', 'devel-staging', 'release3', 'release3-staging',
'dashcam3', 'dashcam3-staging', 'testing-closet*', 'hotfix-*'] 'testing-closet*', 'hotfix-*']
def excludeRegex = excludeBranches.join('|').replaceAll('\\*', '.*') def excludeRegex = excludeBranches.join('|').replaceAll('\\*', '.*')
if (env.BRANCH_NAME != 'master') { if (env.BRANCH_NAME != 'master') {
@ -180,7 +180,7 @@ node {
try { try {
if (env.BRANCH_NAME == 'devel-staging') { if (env.BRANCH_NAME == 'devel-staging') {
deviceStage("build release3-staging", "tici-needs-can", [], [ deviceStage("build release3-staging", "tici-needs-can", [], [
["build release3-staging & dashcam3-staging", "RELEASE_BRANCH=release3-staging DASHCAM_BRANCH=dashcam3-staging $SOURCE_DIR/release/build_release.sh"], ["build release3-staging", "RELEASE_BRANCH=release3-staging $SOURCE_DIR/release/build_release.sh"],
]) ])
} }

View File

@ -182,7 +182,6 @@ std::unordered_map<std::string, uint32_t> keys = {
{"PandaHeartbeatLost", CLEAR_ON_MANAGER_START | CLEAR_ON_OFFROAD_TRANSITION}, {"PandaHeartbeatLost", CLEAR_ON_MANAGER_START | CLEAR_ON_OFFROAD_TRANSITION},
{"PandaSomResetTriggered", CLEAR_ON_MANAGER_START | CLEAR_ON_OFFROAD_TRANSITION}, {"PandaSomResetTriggered", CLEAR_ON_MANAGER_START | CLEAR_ON_OFFROAD_TRANSITION},
{"PandaSignatures", CLEAR_ON_MANAGER_START}, {"PandaSignatures", CLEAR_ON_MANAGER_START},
{"Passive", PERSISTENT},
{"PrimeType", PERSISTENT}, {"PrimeType", PERSISTENT},
{"RecordFront", PERSISTENT}, {"RecordFront", PERSISTENT},
{"RecordFrontLock", PERSISTENT}, // for the internal fleet {"RecordFrontLock", PERSISTENT}, // for the internal fleet

View File

@ -10,8 +10,4 @@ if [ -z "$AGNOS_VERSION" ]; then
export AGNOS_VERSION="9.1" export AGNOS_VERSION="9.1"
fi fi
if [ -z "$PASSIVE" ]; then
export PASSIVE="1"
fi
export STAGING_ROOT="/data/safe_staging" export STAGING_ROOT="/data/safe_staging"

View File

@ -1,5 +1,3 @@
#!/usr/bin/bash #!/usr/bin/bash
export PASSIVE="0"
exec ./launch_chffrplus.sh exec ./launch_chffrplus.sh

View File

@ -102,11 +102,4 @@ if [ ! -z "$RELEASE_BRANCH" ]; then
git push -f origin $RELEASE_BRANCH:$RELEASE_BRANCH git push -f origin $RELEASE_BRANCH:$RELEASE_BRANCH
fi fi
if [ ! -z "$DASHCAM_BRANCH" ]; then
# Create dashcam
git rm selfdrive/car/*/carcontroller.py
git commit -m "create dashcam release from release"
git push -f origin $RELEASE_BRANCH:$DASHCAM_BRANCH
fi
echo "[-] done T=$SECONDS" echo "[-] done T=$SECONDS"

View File

@ -6,7 +6,7 @@ RED="\033[0;31m"
GREEN="\033[0;32m" GREEN="\033[0;32m"
CLEAR="\033[0m" CLEAR="\033[0m"
BRANCHES="devel dashcam3 release3" BRANCHES="devel release3"
for b in $BRANCHES; do for b in $BRANCHES; do
if git diff --quiet origin/$b origin/$b-staging && [ "$(git rev-parse origin/$b)" = "$(git rev-parse origin/$b-staging)" ]; then if git diff --quiet origin/$b origin/$b-staging && [ "$(git rev-parse origin/$b)" = "$(git rev-parse origin/$b-staging)" ]; then
printf "%-10s $GREEN ok $CLEAR\n" "$b" printf "%-10s $GREEN ok $CLEAR\n" "$b"

View File

@ -26,7 +26,7 @@ cd $OUT
git tag -l | xargs git tag -d git tag -l | xargs git tag -d
# remove non-master branches # remove non-master branches
BRANCHES="release2 dashcam dashcam3 release3 devel master-ci nightly" BRANCHES="release2 release3 devel master-ci nightly"
for branch in $BRANCHES; do for branch in $BRANCHES; do
git branch -D $branch git branch -D $branch
git branch -D ${branch}-staging || true git branch -D ${branch}-staging || true

View File

@ -105,14 +105,13 @@ class Controls:
self.is_metric = self.params.get_bool("IsMetric") self.is_metric = self.params.get_bool("IsMetric")
self.is_ldw_enabled = self.params.get_bool("IsLdwEnabled") self.is_ldw_enabled = self.params.get_bool("IsLdwEnabled")
openpilot_enabled_toggle = self.params.get_bool("OpenpilotEnabledToggle") openpilot_enabled_toggle = self.params.get_bool("OpenpilotEnabledToggle")
passive = self.params.get_bool("Passive") or not openpilot_enabled_toggle
# detect sound card presence and ensure successful init # detect sound card presence and ensure successful init
sounds_available = HARDWARE.get_sound_card_online() sounds_available = HARDWARE.get_sound_card_online()
car_recognized = self.CP.carName != 'mock' car_recognized = self.CP.carName != 'mock'
controller_available = self.CI.CC is not None and not passive and not self.CP.dashcamOnly controller_available = self.CI.CC is not None and openpilot_enabled_toggle and not self.CP.dashcamOnly
self.CP.passive = not car_recognized or not controller_available or self.CP.dashcamOnly self.CP.passive = not car_recognized or not controller_available or self.CP.dashcamOnly
if self.CP.passive: if self.CP.passive:
safety_config = car.CarParams.SafetyConfig.new_message() safety_config = car.CarParams.SafetyConfig.new_message()

View File

@ -69,7 +69,6 @@ class TestStartup(unittest.TestCase):
pm = messaging.PubMaster(['can', 'pandaStates']) pm = messaging.PubMaster(['can', 'pandaStates'])
params = Params() params = Params()
params.put_bool("Passive", False)
params.put_bool("OpenpilotEnabledToggle", True) params.put_bool("OpenpilotEnabledToggle", True)
# Build capnn version of FW array # Build capnn version of FW array

View File

@ -58,13 +58,6 @@ def manager_init() -> None:
if params.get(k) is None: if params.get(k) is None:
params.put(k, v) params.put(k, v)
# is this dashcam?
if os.getenv("PASSIVE") is not None:
params.put_bool("Passive", bool(int(os.getenv("PASSIVE", "0"))))
if params.get("Passive") is None:
raise Exception("Passive must be set to continue")
# Create folders needed for msgq # Create folders needed for msgq
try: try:
os.mkdir("/dev/shm") os.mkdir("/dev/shm")

View File

@ -21,7 +21,6 @@ BLACKLIST_PROCS = ['manage_athenad', 'pandad', 'pigeond']
@pytest.mark.tici @pytest.mark.tici
class TestManager(unittest.TestCase): class TestManager(unittest.TestCase):
def setUp(self): def setUp(self):
os.environ['PASSIVE'] = '0'
HARDWARE.set_power_save(False) HARDWARE.set_power_save(False)
# ensure clean CarParams # ensure clean CarParams

View File

@ -12,7 +12,6 @@ from openpilot.tools.lib.logreader import LogIterable
def set_params_enabled(): def set_params_enabled():
os.environ['PASSIVE'] = "0"
os.environ['REPLAY'] = "1" os.environ['REPLAY'] = "1"
os.environ['FINGERPRINT'] = "TOYOTA COROLLA TSS2 2019" os.environ['FINGERPRINT'] = "TOYOTA COROLLA TSS2 2019"
os.environ['LOGPRINT'] = "debug" os.environ['LOGPRINT'] = "debug"
@ -21,7 +20,6 @@ def set_params_enabled():
params.put("HasAcceptedTerms", terms_version) params.put("HasAcceptedTerms", terms_version)
params.put("CompletedTrainingVersion", training_version) params.put("CompletedTrainingVersion", training_version)
params.put_bool("OpenpilotEnabledToggle", True) params.put_bool("OpenpilotEnabledToggle", True)
params.put_bool("Passive", False)
# valid calib # valid calib
msg = messaging.new_message('liveCalibration') msg = messaging.new_message('liveCalibration')

View File

@ -725,7 +725,6 @@ def _replay_multi_process(
def generate_params_config(lr=None, CP=None, fingerprint=None, custom_params=None) -> Dict[str, Any]: def generate_params_config(lr=None, CP=None, fingerprint=None, custom_params=None) -> Dict[str, Any]:
params_dict = { params_dict = {
"OpenpilotEnabledToggle": True, "OpenpilotEnabledToggle": True,
"Passive": False,
"DisengageOnAccelerator": True, "DisengageOnAccelerator": True,
"DisableLogging": False, "DisableLogging": False,
} }

View File

@ -297,8 +297,7 @@ def thermald_thread(end_event, hw_queue) -> None:
# with 2% left, we killall, otherwise the phone will take a long time to boot # with 2% left, we killall, otherwise the phone will take a long time to boot
startup_conditions["free_space"] = msg.deviceState.freeSpacePercent > 2 startup_conditions["free_space"] = msg.deviceState.freeSpacePercent > 2
startup_conditions["completed_training"] = params.get("CompletedTrainingVersion") == training_version or \ startup_conditions["completed_training"] = params.get("CompletedTrainingVersion") == training_version
params.get_bool("Passive")
startup_conditions["not_driver_view"] = not params.get_bool("IsDriverViewEnabled") startup_conditions["not_driver_view"] = not params.get_bool("IsDriverViewEnabled")
startup_conditions["not_taking_snapshot"] = not params.get_bool("IsTakingSnapshot") startup_conditions["not_taking_snapshot"] = not params.get_bool("IsTakingSnapshot")

View File

@ -101,23 +101,17 @@ if GetOption('extras') and arch != "Darwin":
senv['LINKFLAGS'].append('-Wl,-strip-debug') senv['LINKFLAGS'].append('-Wl,-strip-debug')
release = "release3" release = "release3"
dashcam = "dashcam3"
installers = [ installers = [
("openpilot", release), ("openpilot", release),
("openpilot_test", f"{release}-staging"), ("openpilot_test", f"{release}-staging"),
("openpilot_nightly", "nightly"), ("openpilot_nightly", "nightly"),
("openpilot_internal", "master"), ("openpilot_internal", "master"),
("dashcam", dashcam),
("dashcam_test", f"{dashcam}-staging"),
] ]
cont = {} cont = senv.Command(f"installer/continue_openpilot.o", f"installer/continue_openpilot.sh",
for brand in ("openpilot", "dashcam"): "ld -r -b binary -o $TARGET $SOURCE")
cont[brand] = senv.Command(f"installer/continue_{brand}.o", f"installer/continue_{brand}.sh",
"ld -r -b binary -o $TARGET $SOURCE")
for name, branch in installers: for name, branch in installers:
brand = "dashcam" if "dashcam" in branch else "openpilot" d = {'BRANCH': f"'\"{branch}\"'"}
d = {'BRANCH': f"'\"{branch}\"'", 'BRAND': f"'\"{brand}\"'"}
if "internal" in name: if "internal" in name:
d['INTERNAL'] = "1" d['INTERNAL'] = "1"
@ -126,7 +120,7 @@ if GetOption('extras') and arch != "Darwin":
r.raise_for_status() r.raise_for_status()
d['SSH_KEYS'] = f'\\"{r.text.strip()}\\"' d['SSH_KEYS'] = f'\\"{r.text.strip()}\\"'
obj = senv.Object(f"installer/installers/installer_{name}.o", ["installer/installer.cc"], CPPDEFINES=d) obj = senv.Object(f"installer/installers/installer_{name}.o", ["installer/installer.cc"], CPPDEFINES=d)
f = senv.Program(f"installer/installers/installer_{name}", [obj, cont[brand]], LIBS=qt_libs) f = senv.Program(f"installer/installers/installer_{name}", [obj, cont], LIBS=qt_libs)
# keep installers small # keep installers small
assert f[0].get_size() < 350*1e3 assert f[0].get_size() < 350*1e3

View File

@ -1,4 +0,0 @@
#!/usr/bin/bash
cd /data/openpilot
exec ./launch_chffrplus.sh

View File

@ -33,8 +33,8 @@ const QString CACHE_PATH = "/data/openpilot.cache";
#define INSTALL_PATH "/data/openpilot" #define INSTALL_PATH "/data/openpilot"
#define TMP_INSTALL_PATH "/data/tmppilot" #define TMP_INSTALL_PATH "/data/tmppilot"
extern const uint8_t str_continue[] asm("_binary_selfdrive_ui_installer_continue_" BRAND "_sh_start"); extern const uint8_t str_continue[] asm("_binary_selfdrive_ui_installer_continue_openpilot_sh_start");
extern const uint8_t str_continue_end[] asm("_binary_selfdrive_ui_installer_continue_" BRAND "_sh_end"); extern const uint8_t str_continue_end[] asm("_binary_selfdrive_ui_installer_continue_openpilot_sh_end");
bool time_valid() { bool time_valid() {
time_t rawtime; time_t rawtime;

View File

@ -183,7 +183,7 @@ void DeclinePage::showEvent(QShowEvent *event) {
void OnboardingWindow::updateActiveScreen() { void OnboardingWindow::updateActiveScreen() {
if (!accepted_terms) { if (!accepted_terms) {
setCurrentIndex(0); setCurrentIndex(0);
} else if (!training_done && !params.getBool("Passive")) { } else if (!training_done) {
setCurrentIndex(1); setCurrentIndex(1);
} else { } else {
emit onboardingDone(); emit onboardingDone();

View File

@ -215,15 +215,13 @@ DevicePanel::DevicePanel(SettingsWindow *parent) : ListWidget(parent) {
}); });
addItem(resetCalibBtn); addItem(resetCalibBtn);
if (!params.getBool("Passive")) { auto retrainingBtn = new ButtonControl(tr("Review Training Guide"), tr("REVIEW"), tr("Review the rules, features, and limitations of openpilot"));
auto retrainingBtn = new ButtonControl(tr("Review Training Guide"), tr("REVIEW"), tr("Review the rules, features, and limitations of openpilot")); connect(retrainingBtn, &ButtonControl::clicked, [=]() {
connect(retrainingBtn, &ButtonControl::clicked, [=]() { if (ConfirmationDialog::confirm(tr("Are you sure you want to review the training guide?"), tr("Review"), this)) {
if (ConfirmationDialog::confirm(tr("Are you sure you want to review the training guide?"), tr("Review"), this)) { emit reviewTrainingGuide();
emit reviewTrainingGuide(); }
} });
}); addItem(retrainingBtn);
addItem(retrainingBtn);
}
if (Hardware::TICI()) { if (Hardware::TICI()) {
auto regulatoryBtn = new ButtonControl(tr("Regulatory"), tr("VIEW"), ""); auto regulatoryBtn = new ButtonControl(tr("Regulatory"), tr("VIEW"), "");

View File

@ -20,7 +20,7 @@
#include "selfdrive/ui/qt/widgets/input.h" #include "selfdrive/ui/qt/widgets/input.h"
const std::string USER_AGENT = "AGNOSSetup-"; const std::string USER_AGENT = "AGNOSSetup-";
const QString DASHCAM_URL = "https://dashcam.comma.ai"; const QString TEST_URL = "https://openpilot.comma.ai";
bool is_elf(char *fname) { bool is_elf(char *fname) {
FILE *fp = fopen(fname, "rb"); FILE *fp = fopen(fname, "rb");
@ -229,11 +229,11 @@ QWidget * Setup::network_setup() {
} }
repaint(); repaint();
}); });
request->sendRequest(DASHCAM_URL); request->sendRequest(TEST_URL);
QTimer *timer = new QTimer(this); QTimer *timer = new QTimer(this);
QObject::connect(timer, &QTimer::timeout, [=]() { QObject::connect(timer, &QTimer::timeout, [=]() {
if (!request->active() && cont->isVisible()) { if (!request->active() && cont->isVisible()) {
request->sendRequest(DASHCAM_URL); request->sendRequest(TEST_URL);
} }
}); });
timer->start(1000); timer->start(1000);

View File

@ -25,7 +25,7 @@ QString getVersion() {
} }
QString getBrand() { QString getBrand() {
return Params().getBool("Passive") ? QObject::tr("dashcam") : QObject::tr("openpilot"); return QObject::tr("openpilot");
} }
QString getUserAgent() { QString getUserAgent() {

View File

@ -562,10 +562,6 @@
<source>Exit</source> <source>Exit</source>
<translation>إغلاق</translation> <translation>إغلاق</translation>
</message> </message>
<message>
<source>dashcam</source>
<translation>dashcam</translation>
</message>
<message> <message>
<source>openpilot</source> <source>openpilot</source>
<translation>openpilot</translation> <translation>openpilot</translation>

View File

@ -557,10 +557,6 @@
<source>Exit</source> <source>Exit</source>
<translation>Verlassen</translation> <translation>Verlassen</translation>
</message> </message>
<message>
<source>dashcam</source>
<translation>dashcam</translation>
</message>
<message> <message>
<source>openpilot</source> <source>openpilot</source>
<translation>openpilot</translation> <translation>openpilot</translation>

View File

@ -558,10 +558,6 @@
<source>Exit</source> <source>Exit</source>
<translation>Quitter</translation> <translation>Quitter</translation>
</message> </message>
<message>
<source>dashcam</source>
<translation>dashcam</translation>
</message>
<message> <message>
<source>openpilot</source> <source>openpilot</source>
<translation>openpilot</translation> <translation>openpilot</translation>

View File

@ -556,10 +556,6 @@
<source>Exit</source> <source>Exit</source>
<translation></translation> <translation></translation>
</message> </message>
<message>
<source>dashcam</source>
<translation></translation>
</message>
<message> <message>
<source>openpilot</source> <source>openpilot</source>
<translation>openpilot</translation> <translation>openpilot</translation>

View File

@ -557,10 +557,6 @@
<source>Exit</source> <source>Exit</source>
<translation></translation> <translation></translation>
</message> </message>
<message>
<source>dashcam</source>
<translation></translation>
</message>
<message> <message>
<source>openpilot</source> <source>openpilot</source>
<translation>openpilot</translation> <translation>openpilot</translation>

View File

@ -558,10 +558,6 @@
<source>Exit</source> <source>Exit</source>
<translation>Sair</translation> <translation>Sair</translation>
</message> </message>
<message>
<source>dashcam</source>
<translation>dashcam</translation>
</message>
<message> <message>
<source>openpilot</source> <source>openpilot</source>
<translation>openpilot</translation> <translation>openpilot</translation>

View File

@ -557,10 +557,6 @@
<source>Exit</source> <source>Exit</source>
<translation></translation> <translation></translation>
</message> </message>
<message>
<source>dashcam</source>
<translation></translation>
</message>
<message> <message>
<source>openpilot</source> <source>openpilot</source>
<translation>openpilot</translation> <translation>openpilot</translation>

View File

@ -556,10 +556,6 @@
<source>Exit</source> <source>Exit</source>
<translation>Çık</translation> <translation>Çık</translation>
</message> </message>
<message>
<source>dashcam</source>
<translation>araç yol kamerası</translation>
</message>
<message> <message>
<source>openpilot</source> <source>openpilot</source>
<translation>openpilot</translation> <translation>openpilot</translation>

View File

@ -557,10 +557,6 @@
<source>Exit</source> <source>Exit</source>
<translation>退</translation> <translation>退</translation>
</message> </message>
<message>
<source>dashcam</source>
<translation></translation>
</message>
<message> <message>
<source>openpilot</source> <source>openpilot</source>
<translation>openpilot</translation> <translation>openpilot</translation>

View File

@ -557,10 +557,6 @@
<source>Exit</source> <source>Exit</source>
<translation></translation> <translation></translation>
</message> </message>
<message>
<source>dashcam</source>
<translation></translation>
</message>
<message> <message>
<source>openpilot</source> <source>openpilot</source>
<translation>openpilot</translation> <translation>openpilot</translation>

View File

@ -342,7 +342,7 @@ class Updater:
def check_for_update(self) -> None: def check_for_update(self) -> None:
cloudlog.info("checking for updates") cloudlog.info("checking for updates")
excluded_branches = ('release2', 'release2-staging', 'dashcam', 'dashcam-staging') excluded_branches = ('release2', 'release2-staging')
try: try:
run(["git", "ls-remote", "origin", "HEAD"], OVERLAY_MERGED) run(["git", "ls-remote", "origin", "HEAD"], OVERLAY_MERGED)

View File

@ -43,7 +43,7 @@ kj::Array<capnp::word> logger_build_init_data() {
init.setGitCommit(params_map["GitCommit"]); init.setGitCommit(params_map["GitCommit"]);
init.setGitBranch(params_map["GitBranch"]); init.setGitBranch(params_map["GitBranch"]);
init.setGitRemote(params_map["GitRemote"]); init.setGitRemote(params_map["GitRemote"]);
init.setPassive(params.getBool("Passive")); init.setPassive(false);
init.setDongleId(params_map["DongleId"]); init.setDongleId(params_map["DongleId"]);
auto lparams = init.initParams().initEntries(params_map.size()); auto lparams = init.initParams().initEntries(params_map.size());

View File

@ -7,7 +7,7 @@ from functools import lru_cache
from openpilot.common.basedir import BASEDIR from openpilot.common.basedir import BASEDIR
from openpilot.common.swaglog import cloudlog from openpilot.common.swaglog import cloudlog
RELEASE_BRANCHES = ['release3-staging', 'dashcam3-staging', 'release3', 'dashcam3', 'nightly'] RELEASE_BRANCHES = ['release3-staging', 'release3', 'nightly']
TESTED_BRANCHES = RELEASE_BRANCHES + ['devel', 'devel-staging'] TESTED_BRANCHES = RELEASE_BRANCHES + ['devel', 'devel-staging']
training_version: bytes = b"0.2.0" training_version: bytes = b"0.2.0"

View File

@ -33,7 +33,7 @@ USE_WEBCAM=1 scons -j$(nproc)
## GO ## GO
``` ```
cd ~/openpilot/selfdrive/manager cd ~/openpilot/selfdrive/manager
PASSIVE=0 NOSENSOR=1 USE_WEBCAM=1 ./manager.py NOSENSOR=1 USE_WEBCAM=1 ./manager.py
``` ```
- Start the car, then the UI should show the road webcam's view - Start the car, then the UI should show the road webcam's view
- Adjust and secure the webcams (you can run tools/webcam/front_mount_helper.py to help mount the driver camera) - Adjust and secure the webcams (you can run tools/webcam/front_mount_helper.py to help mount the driver camera)