temporarily change home-only

pull/21750/head
ShaneSmiskol 4 years ago
parent b56c4bda27
commit b0e9c1a76a
  1. 1
      launch_chffrplus.sh
  2. 1
      selfdrive/common/params.cc
  3. 5
      selfdrive/ui/qt/offroad/networking.cc
  4. 1
      selfdrive/ui/qt/offroad/networking.h
  5. 14
      selfdrive/ui/qt/offroad/wifiManager.cc
  6. 1
      selfdrive/ui/qt/offroad/wifiManager.h

@ -100,7 +100,6 @@ function tici_init {
sudo su -c 'echo "performance" > /sys/class/devfreq/soc:qcom,memlat-cpu0/governor'
sudo su -c 'echo "performance" > /sys/class/devfreq/soc:qcom,memlat-cpu4/governor'
nmcli connection modify --temporary lte gsm.auto-config yes
# set success flag for current boot slot
sudo abctl --set_success

@ -174,6 +174,7 @@ std::unordered_map<std::string, uint32_t> keys = {
{"GitRemote", PERSISTENT},
{"GithubSshKeys", PERSISTENT},
{"GithubUsername", PERSISTENT},
{"GsmRoaming", PERSISTENT},
{"HardwareSerial", PERSISTENT},
{"HasAcceptedTerms", PERSISTENT},
{"IsDriverViewEnabled", CLEAR_ON_MANAGER_START},

@ -154,8 +154,11 @@ AdvancedNetworking::AdvancedNetworking(QWidget* parent, WifiManager* wifi): QWid
main_layout->addWidget(horizontal_line(), 0);
// Roaming toggle
ToggleControl *roamingToggle = new ToggleControl("Enable Roaming", "", "", wifi->isRoamingEnabled());
const bool roamingEnabled = params.getBool("GsmRoaming");
wifi->setRoamingEnabled(roamingEnabled);
ToggleControl *roamingToggle = new ToggleControl("Enable Roaming", "", "", roamingEnabled);
QObject::connect(roamingToggle, &SshToggle::toggleFlipped, [=](bool state) {
params.putBool("GsmRoaming", state);
wifi->setRoamingEnabled(state);
});
main_layout->addWidget(roamingToggle);

@ -38,6 +38,7 @@ public:
private:
LabelControl* ipLabel;
WifiManager* wifi = nullptr;
Params params;
signals:
void backPress();

@ -431,23 +431,11 @@ void WifiManager::setRoamingEnabled(bool roaming) {
Connection settings = QDBusReply<Connection>(nm.call("GetSettings")).value();
if (settings.value("gsm").value("home-only").toBool() == roaming) {
settings["gsm"]["home-only"] = !roaming;
nm.call("Update", QVariant::fromValue(settings));
nm.call("UpdateUnsaved", QVariant::fromValue(settings)); // resets on reboot
}
}
}
bool WifiManager::isRoamingEnabled() {
const QDBusObjectPath &path = getConnectionPath("lte");
if (!path.path().isEmpty()) {
QDBusInterface nm(NM_DBUS_SERVICE, path.path(), NM_DBUS_INTERFACE_SETTINGS_CONNECTION, bus);
nm.setTimeout(DBUS_TIMEOUT);
const Connection &settings = QDBusReply<Connection>(nm.call("GetSettings")).value();
return !settings.value("gsm").value("home-only").toBool();
}
return false;
}
// Functions for tethering
void WifiManager::addTetheringConnection() {
Connection connection;

@ -50,7 +50,6 @@ public:
void activateWifiConnection(const QString &ssid);
NetworkType currentNetworkType();
void setRoamingEnabled(bool roaming);
bool isRoamingEnabled();
void connect(const Network &ssid);
void connect(const Network &ssid, const QString &password);

Loading…
Cancel
Save