Skip to content

Commit

Permalink
updates for agnos 0.6
Browse files Browse the repository at this point in the history
  • Loading branch information
adeebshihadeh committed Feb 18, 2021
1 parent d4feecd commit 2aa229b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 10 deletions.
1 change: 1 addition & 0 deletions common/params_pyx.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ keys = {
b"ReleaseNotes": [TxType.PERSISTENT],
b"ShouldDoUpdate": [TxType.CLEAR_ON_MANAGER_START],
b"SubscriberInfo": [TxType.PERSISTENT],
b"SshEnabled": [TxType.PERSISTENT],
b"TermsVersion": [TxType.PERSISTENT],
b"Timezone": [TxType.PERSISTENT],
b"TrainingVersion": [TxType.PERSISTENT],
Expand Down
7 changes: 3 additions & 4 deletions selfdrive/ui/qt/offroad/networking.cc
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include <QRandomGenerator>
#include <QtConcurrent>

#include "common/params.h"
#include "networking.hpp"
#include "util.h"

Expand Down Expand Up @@ -280,14 +281,12 @@ void AdvancedNetworking::toggleTethering(int enable) {
}

void enableSSH(Toggle* toggle_switch_SSH){
system("sudo systemctl enable ssh");
system("sudo systemctl start ssh");
Params().write_db_value("SshEnabled", "1");
toggle_switch_SSH->setEnabled(true);
}

void disableSSH(Toggle* toggle_switch_SSH){
system("sudo systemctl stop ssh");
system("sudo systemctl disable ssh");
Params().write_db_value("SshEnabled", "0");
toggle_switch_SSH->setEnabled(true);
}

Expand Down
10 changes: 4 additions & 6 deletions selfdrive/ui/qt/setup/installer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,16 @@ int fresh_clone() {
int err;

// Cleanup
err = std::system("rm -rf /tmp/openpilot /data/openpilot");
err = std::system("rm -rf /data/tmppilot /data/openpilot");
if (err) return 1;

// Clone
err = std::system("git clone " GIT_URL " -b " BRANCH " --depth=1 /tmp/openpilot");
err = std::system("git clone " GIT_URL " -b " BRANCH " --depth=1 --recurse-submodules /data/tmppilot");
if (err) return 1;
err = std::system("cd /tmp/openpilot && git submodule update --init");
if (err) return 1;
err = std::system("cd /tmp/openpilot && git remote set-url origin --push " GIT_SSH_URL);
err = std::system("cd /data/tmppilot && git remote set-url origin --push " GIT_SSH_URL);
if (err) return 1;

err = std::system("mv /tmp/openpilot /data");
err = std::system("mv /data/tmppilot /data/openpilot");
if (err) return 1;

#ifdef SSH_KEYS
Expand Down

0 comments on commit 2aa229b

Please sign in to comment.