Skip to content

Commit

Permalink
NOO without Prime
Browse files Browse the repository at this point in the history
*fix missing params

*fix undeleted fropilot files

*update translations

*fix

*fix use shadowing variable Python builtin

*fix codespell failed with NOO ==> NO

*fix use mutable data structures for argument defaults
  • Loading branch information
FrogAi authored and Edison-CBS committed Sep 3, 2023
1 parent c967fe8 commit 15fa978
Show file tree
Hide file tree
Showing 36 changed files with 927 additions and 4 deletions.
46 changes: 46 additions & 0 deletions Brewfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
tap "homebrew/bundle"
brew "xz"
brew "bzip2"
brew "openssl@1.1"
brew "openssl@3"
brew "readline"
brew "python@3.9"
brew "capnp"
brew "fluid-synth"
brew "qt@5"
brew "pyqt@5"
brew "python@3.11"
brew "carla"
brew "catch2"
brew "cmake"
brew "coreutils"
brew "cppcheck"
brew "libssh2"
brew "openldap"
brew "rtmpdump"
brew "curl"
brew "eigen"
brew "harfbuzz"
brew "libass"
brew "tesseract"
brew "zeromq"
brew "ffmpeg"
brew "gcc@12"
brew "gh"
brew "git"
brew "git-lfs"
brew "glfw"
brew "gnupg"
brew "gobject-introspection"
brew "llvm"
brew "openssl@3.0"
brew "pipenv"
brew "protobuf"
brew "protobuf-c"
brew "pyenv"
brew "pyenv-virtualenv"
brew "python@3.10"
brew "rsync"
brew "swig"
brew "zlib"
cask "gcc-arm-embedded"
9 changes: 9 additions & 0 deletions common/i18n.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
locale_dir = "/data/openpilot/selfdrive/assets/locales"
# supported_language = ["en-US", "zh-TW", "zh-CN", "ja-JP", "ko-KR"]
supported_languages = {
"main_en": "en-US",
"main_zh-CHT": "zh-TW",
"main_zh-CHS": "zh-CN",
"main_ko": "ko-KR",
"main_ja": "ja-JP",
}
5 changes: 5 additions & 0 deletions common/params.cc
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ std::unordered_map<std::string, uint32_t> keys = {
{"DoShutdown", CLEAR_ON_MANAGER_START},
{"DoUninstall", CLEAR_ON_MANAGER_START},
{"DrivingPersonalitiesUIWheel", PERSISTENT},
{"EnableGmap", PERSISTENT},
{"ExperimentalLongitudinalEnabled", PERSISTENT},
{"ExperimentalMode", PERSISTENT},
{"ExperimentalModeConfirmed", PERSISTENT},
Expand All @@ -125,6 +126,7 @@ std::unordered_map<std::string, uint32_t> keys = {
{"GithubSshKeys", PERSISTENT},
{"GithubUsername", PERSISTENT},
{"GitRemote", PERSISTENT},
{"GmapKey", PERSISTENT },
{"GsmApn", PERSISTENT},
{"GsmMetered", PERSISTENT},
{"GsmRoaming", PERSISTENT},
Expand Down Expand Up @@ -158,8 +160,11 @@ std::unordered_map<std::string, uint32_t> keys = {
{"LiveTorqueCarParams", PERSISTENT},
{"LiveTorqueParameters", PERSISTENT | DONT_LOG},
{"LongitudinalPersonality", PERSISTENT},
{"MapboxPublicKey", PERSISTENT},
{"MapboxSecretKey", PERSISTENT},
{"NavDestination", CLEAR_ON_MANAGER_START | CLEAR_ON_OFFROAD_TRANSITION},
{"NavDestinationWaypoints", CLEAR_ON_MANAGER_START | CLEAR_ON_OFFROAD_TRANSITION},
{"NavEnable", PERSISTENT},
{"NavPastDestinations", PERSISTENT},
{"NavSettingLeftSide", PERSISTENT},
{"NavSettingTime24h", PERSISTENT},
Expand Down
Binary file added selfdrive/assets/images/both_keys_set.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added selfdrive/assets/images/no_keys_set.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added selfdrive/assets/images/offline.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added selfdrive/assets/images/public_key_set.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added selfdrive/assets/images/setup_completed.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions selfdrive/manager/process_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
from openpilot.system.hardware import PC, TICI
from openpilot.selfdrive.manager.process import PythonProcess, NativeProcess, DaemonProcess

# FrogPilot variables
params = Params()
not_prime = params.get_int("PrimeType") == 0

WEBCAM = os.getenv("USE_WEBCAM") is not None

def driverview(started: bool, params: Params, CP: car.CarParams) -> bool:
Expand Down Expand Up @@ -87,6 +91,9 @@ def only_offroad(started, params, CP: car.CarParams) -> bool:
# debug procs
NativeProcess("bridge", "cereal/messaging", ["./bridge"], notcar),
PythonProcess("webjoystick", "tools.bodyteleop.web", notcar),

# FrogPilot procs
PythonProcess("otisserv", "selfdrive.navd.otisserv", always_run, enabled=not_prime),
]

managed_processes = {p.name: p for p in procs}
7 changes: 6 additions & 1 deletion selfdrive/navd/navd.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,12 @@ def __init__(self, sm, pm):

self.reroute_counter = 0

if "MAPBOX_TOKEN" in os.environ:
if self.params.get_int("PrimeType") == 0:
self.mapbox_token = self.params.get("MapboxPublicKey", encoding='utf8')
self.mapbox_host = "https://api.mapbox.com"
elif "MAPBOX_TOKEN" in os.environ:
self.params.put("MapboxPublicKey", "")
self.params.put("MapboxSecretKey", "")
self.mapbox_token = os.environ["MAPBOX_TOKEN"]
self.mapbox_host = "https://api.mapbox.com"
else:
Expand Down
Loading

0 comments on commit 15fa978

Please sign in to comment.