Commit Graph

87 Commits (7c8044d2dbb2ce74c0c622b468caec185e590d48)

Author SHA1 Message Date
Willem Melching 7c8044d2db
Add LastPowerDropDetected and create bootlog before clearing params (#23062)
* Add LastControlledShutdown and create bootlog before clearing params

* update param name

* sorting
2021-11-29 15:51:27 +01:00
Willem Melching 5069852573
navd: render map into VisionIPC (#22800)
* navd: render simple map

* render route

* offscreen rendering

* cleanup

* more cleanup

* render into visionIPC

* rename class

* split position update from route update

* stop broadcast if not active

* gate vipc server behind flag

* add python library

* faster

* no vipc from python

* put behind extras

* only send when loaded

* add glFlush just to be sure

* cleanup settings into helper function

* function ordering

* broadcast thumbnails

* put behind param

* adjust zoom level

* add route to python bindings

* revert that freq change

* add logging if map rendering is enabled

* use rlogs if available

* bump cereal
2021-11-26 14:38:02 +01:00
Adeeb Shihadeh 2a72e2a514
add offroad alerts for car unrecognized (#22934)
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
Co-authored-by: Chris McCammon <chrismccammon123@gmail.com>
2021-11-17 20:29:00 -08:00
Adeeb Shihadeh d8a5c415cd Revert "add offroad alerts for car unrecognized"
This reverts commit fb1e8ce086.
2021-11-16 13:31:10 -08:00
Adeeb Shihadeh fb1e8ce086 add offroad alerts for car unrecognized 2021-11-16 13:30:33 -08:00
Willem Melching 07ff724726
Move shutdown/reboot handling to manager (#22882)
* Move shutdown/reboot handling to manager

* more logging

* check enagaged

* Apply suggestions from code review

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2021-11-12 09:10:34 -08:00
Adeeb Shihadeh e528e2e3e2
allow update snoozing (#22876)
* allow update snoozing

* not immediately visible

* dismiss and close

* grey button
2021-11-11 15:32:25 -08:00
Willem Melching 6ace88a0f1
cache prime status in param (#22850) 2021-11-10 16:05:49 +01:00
Dean Lee 6de66f2832
params: remove obsolete keys (#22769) 2021-11-01 14:32:55 -07:00
Dean Lee 2773ff5ace
params: code cleanup (#22744)
* cleanup params

* apply review

* continue

* use c_str

* cleanup filelock

* don't check return code of close()

* remove call_once

* cleanup params_pyx

* cleanup comment
2021-11-01 11:22:34 +01:00
Robbe Derks 585c16cd2a
Multipanda support (#22402)
* squash all PR commits for easy rebase

* merged all panda rx can into one message

* fix buffers in can_send

* more cleanup and minor fixes

* fix even more stuff

* fix non-allocated send buffer

* make connecting more robust

* fix bus offset

* fix controls_mismatch?

* simplify mismatch check

* C++ style struct

* fix connect loop

* update ref

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2021-10-29 13:04:26 +02:00
Dean Lee 1f39d8cee6
util: add new function create_directories with unit tests (#21871)
* util::create_directories

* check bool ret

* don't assume mask

* rename with_umask to no_umask

* remove umask

* rebase master

* rebase master

* 0755
2021-10-29 12:27:35 +02:00
Adeeb Shihadeh f4c2398db4
add sdcard support (#22703)
* generalize

* factory reset
2021-10-26 19:34:08 -07:00
Willem Melching cca07c0c73
navigation: use mapbox proxy server (#22660)
* use mapbox proxy

* remove MapboxToken param

* do not log jwt

* remove import

* move to staging url

* put has_prime in ui state

* logic was flipped

* Update selfdrive/ui/qt/maps/map.h
2021-10-26 18:59:17 +02:00
Willem Melching d898841e87
Change APN from settings (#22440)
* Change APN from settings

* subtext

* one function

* bring connection down and up

* fix adapter type

* trim input

* fix scrolling in scanning state

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2021-10-07 23:47:23 -07:00
Willem Melching 8c01ae5716
Add DisableRadar_Allow param and settings toggle (#22329) 2021-09-23 17:19:47 -07:00
Willem Melching 6dabefb68d params.cc: sort offroad params 2021-09-23 16:47:00 -07:00
Willem Melching 36975a0071 sort params alphabetically 2021-09-23 16:46:02 -07:00
Adeeb Shihadeh e9e490a729
add booted onroad flag (#22318) 2021-09-22 22:25:08 -07:00
Adeeb Shihadeh ed70c5aaf5
updated: add persistent param for build date (#22237) 2021-09-14 20:24:41 -07:00
sshane 6fad0055b4
UI: roaming toggle (#21750)
* roaming toggle

* clean up

* only tici

* fix order

* move to wifiManager

* should be working

* clean up

clean up

* use map icon

* move to advanced settings

* clean up

* temporarily change home-only

* keep setting for now

* set both to defaults in case ui doesn't start

* knownConnections stores conn names

* Revert "knownConnections stores conn names"

This reverts commit 4466a029a3.

* save lteConnectionPath instead

* use the if statement

Co-authored-by: Comma Device <device@comma.ai>
2021-09-01 14:33:06 -07:00
Dean Lee 383ff35790
Params: faster atomic clearAll (#21973)
* faster clearAll

* use unlink

* fsync_dir if removed > 0

* remove macro ERR_NO_VALUE

* always fsync

* keep call to unlink

Co-authored-by: Willem Melching <willem.melching@gmail.com>
2021-08-30 19:47:47 -07:00
Dean Lee 6be8520a84
Params::put: fixed the wrong call to Params::remove instead of global ::remove (#21974)
* fix bug

* use unlink
2021-08-30 16:31:27 -07:00
Dean Lee 31230e5b60
retry ioctls while errno == EINTR (#22054) 2021-08-30 16:07:34 -07:00
Willem Melching dddab597bc
Less open file permissions (#21922)
* Less open file permissions

* add test back

* remove params test for permissions

* remove umask

* bump cereal

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2021-08-28 18:25:05 -07:00
Dean Lee 3b752a307f
params: remove persistent params (#21975)
* cleanup constructors

* remove persistent_param

* remove test_persist_params_put_and_get
2021-08-20 16:57:45 -07:00
Willem Melching 2abd288567
Write panda heartbeat lost in param (#21957) 2021-08-18 12:48:01 +02:00
Dean Lee 39870b195d
params.cc: remove unnecessary static keyword (#21940) 2021-08-16 16:07:06 +02:00
Dean Lee fefc70b4ca
hw.h: move Hardware-related paths to namespace Path (#21826)
* refactor getenv and path

* apply review
2021-08-04 13:29:03 +02:00
George Hotz 8354cfc53c
loggerd: implement DONT_LOG flag (#21832)
* implement DONT_LOG flag

* better typing
2021-08-02 20:16:38 -07:00
Dean Lee 11ffbc6936
util/read_files_in_dir: return map by value (#21815) 2021-08-02 10:59:54 +02:00
Adeeb Shihadeh 7b94cf0ca7
athena: detect no prime (#21718)
* detect no prime

* show in sidebar

* revert timeout

* clear ping param

* fix typo

Co-authored-by: Comma Device <device@comma.ai>
2021-07-26 13:50:58 -07:00
Adeeb Shihadeh 4e6c268b17
remove wide toggle (#21669) 2021-07-21 00:58:42 -07:00
Adeeb Shihadeh 4a1aec27ef
segment regen (#21148)
* start seg regen

* send vipc

* fix up some paths

* set fp

* fix no entries

* engages

* seperate camera procs

* send real frames

* regen test routes

* nice argparser

* fix valgrind test

* move that

* fix that
2021-06-28 21:44:40 -07:00
Adeeb Shihadeh a420c7ad50
remove lte toggle (#21392)
* remove lte toggle

* little more
2021-06-23 17:01:17 -07:00
Dean Lee 766f3281bb
fix FileLock: fd could be closed twice (#21362) 2021-06-22 14:05:48 -07:00
Willem Melching a8fac002ae
Honda Bosch longitudinal prerequisites (#21217)
* untested changes

* set compute_gb

* community feature for good measure

* add code for rolling backwards

* init needs CarParams

* stay in elm mode until carParams is written

* fix tester present bus number

* fix can errors

* fix enableCruise flag

* print when radar disable is done

* move retry logic to controlsd

* move lookup table into carcontroller params

* cleanup brake error values

* make init return

* that should be 1

* floats

* back to no failure handling

* try simplify knockout

* bump panda

* Move flags to panda

* add warnings

* Revert "try simplify knockout"

This reverts commit 4f496245791ea6bd041d4412b96035c6b434b91c.

* add note about LoC.long_control_state

* update ref
2021-06-22 16:28:11 +02:00
Willem Melching c21ea8b506
nav: home/work shortcuts (#21276)
* add home/work widgets

* remove todo

* set contents from response

* turn into buttons

* add navigate button

* fix includes

* close settings on nav press

* close sidebar when closing settings

* use live api endpoint

* larger fonts

* more text fits

* only place name

* remove static response

* properly clear
2021-06-22 13:25:22 +02:00
Willem Melching fcf9f00a2a
Only call ensure_params_path once (#21229)
* Only call ensore_params_path once

* only ensure default params path once
2021-06-14 16:12:27 -07:00
ShaneSmiskol ae77f693a2
Fixup joystick (#21129)
* some common changes

* rename to joystick

* add alert and update controlsd to work with joystick

* update joystickd

* Update Joystick readme

* assume we have inputs

* only send gb or steer when engaged_toggle is true

* Update instructions

* fix --ip

* Easier to understand at a glance

* much better

* -a

* receive events and send msg in same loop

* always import

* Update selfdrive/controls/lib/events.py

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>

* Update selfdrive/controls/lib/events.py

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>

* combine logic and clean up

* use argparse

* outdated, and use normal class

* rm

* bit of a refactor

* refactor part 2 / 3

* much better (3 / 3)

* Simplify

* bump cereal and update readme

* capitalize

* Update tools/joystick/joystickd.py

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>

* Update tools/joystick/joystickd.py

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>

* make joystick abstraction class clearer

* use interp, clearer without comments

* no need to use apply_deadzone

* more explicit

* define btns and axes once

* split function by use_keyboard again, but simpler

* we can use handle_button as a reset function

* need to flip sign

* remove

* invert axes map for kb, easier to read the button mapping

* apply changes from review

* new lateral log for debug mode

* bump

* add saturated

* static alert

* joystick_mode

* conditionally subscribe

* Update selfdrive/controls/controlsd.py

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>

* move params instantiation

* Spoof active and enabled

* Only allow car to engage

* no startup alert if joystick

* Update controlsd.py

* Should be orange not enabled, green enabled

* no more button states

* should work

* blue

* submaster conflates, so only send when we have an update

* final change

* remove msg

* clean up a bit

sort of clean up

clean up a bit

remove msg

* this was right

* Apply suggestions from code review

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>

* lowercase

* suggestions from code review

* forgot laptop

* bump to latest

* fixes

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
Co-authored-by: vanillagorillaa <31773928+vanillagorillaa@users.noreply.github.com>
2021-06-11 14:33:17 -07:00
Dean Lee e4e669bb0f
add space after function name and if statement (#21225) 2021-06-11 10:17:52 +02:00
Willem Melching 3c197953bc
nav: add page to settings (#21208)
* add navigation panel to settings

* am/pm display and dynamic width
2021-06-10 09:59:34 +02:00
Maxime Desroches 03df1b08bb
Convert C++ while loops from int to bool (#21214) 2021-06-09 21:09:21 -07:00
Dean Lee c53cb5d570
Use C++ header files instead of C header files. (#21192)
* use cstring instead of string.h

* use cstdio instead of stdio.h

* remove inttypes.h

* use cstdlib instead of stdlib.h

* use cstdint instead of stdint.h

* #include <cstddef>

* cstdlib

* use cmath

* remove stddef.h

* use cassert

* use csignal

* use ctime

* use cerror

* rebase master
2021-06-08 13:46:22 -07:00
Adeeb Shihadeh 96271f8bc3
log on startup if onroad flag set (#21150) 2021-06-04 22:04:26 -07:00
Willem Melching 14f09e4ee1
Various nav improvements (#21133)
* various nav improvements

* use traffic aware routing

* read last position from param

* allow compute without gps when no route

* cleanup

* properly hide route

* set pitch
2021-06-04 13:45:42 +02:00
Adeeb Shihadeh c76c30fa2d
disable uploading raw by default (#21128) 2021-06-03 15:24:30 -07:00
ShaneSmiskol 36beaf0d68
Add CLEAR_ON_IGNITION_OFF param type (#21121) 2021-06-03 15:21:53 -07:00
Adeeb Shihadeh 313741062e
offroad alert for missing nvme (#20931)
* offroad alert for missing nvme

* remove that

Co-authored-by: Comma Device <device@comma.ai>
2021-05-17 13:35:24 -07:00
Willem Melching 86aefbe766
Mapbox widget (#20751)
* squash mapbox stuff

* only hacks for pc

* no hack there

* only update when needed

* get destination from param

* no need for user agent

* add athena method

* change nav path color

* layout cleanups

* margin top

* add build scripts

* rename header file

* set pitch

* fix icon blinking

* keep both options

* draw on top to fix last blinking

* only recomput with gps

* fix include

* put map in onroadwidget

* update mapbox plugin to allow specifying directions url

* cycle through views

* dynamic resize

* only when present

* add map_helpers

* whitespace

* small fixes

* let scons decide

* update setup files

* implicit dependency

* fix alerts

* Update selfdrive/ui/SConscript

* move clearLayout to util.h

* only build when map.cc present

* move maps to own folder

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2021-05-17 14:57:07 +02:00