lte toggle (#20683)

pull/20684/head
Adeeb Shihadeh 2021-04-14 21:19:06 -07:00 committed by GitHub
parent 9adaff5379
commit 2eac604993
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 1 deletions

View File

@ -25,6 +25,7 @@ keys = {
b"CarParamsCache": [TxType.CLEAR_ON_MANAGER_START, TxType.CLEAR_ON_PANDA_DISCONNECT],
b"CarVin": [TxType.CLEAR_ON_MANAGER_START, TxType.CLEAR_ON_PANDA_DISCONNECT],
b"CommunityFeaturesToggle": [TxType.PERSISTENT],
b"EnableLteOnroad": [TxType.PERSISTENT],
b"EndToEndToggle": [TxType.PERSISTENT],
b"CompletedTrainingVersion": [TxType.PERSISTENT],
b"DisablePowerDown": [TxType.PERSISTENT],

View File

@ -349,7 +349,7 @@ def thermald_thread():
if should_start != should_start_prev or (count == 0):
params.put_bool("IsOffroad", not should_start)
HARDWARE.set_power_save(not should_start)
if TICI:
if TICI and not params.get_bool("EnableLteOnroad"):
fxn = "stop" if should_start else "start"
os.system(f"sudo systemctl {fxn} --no-block lte")

View File

@ -72,6 +72,12 @@ TogglesPanel::TogglesPanel(QWidget *parent) : QWidget(parent) {
"Use wide angle camera for driving and ui. Only takes effect after reboot.",
"../assets/offroad/icon_openpilot.png",
this));
toggles.append(new ParamControl("EnableLteOnroad",
"Enable LTE while onroad",
"",
"../assets/offroad/icon_network.png",
this));
#endif
bool record_lock = Params().getBool("RecordFrontLock");