Commit Graph

41 Commits

Author SHA1 Message Date
Dean Lee
b2bcacf590 ui: singleton networkAccessManager (#22994) 2021-11-29 14:49:53 +01:00
Dean Lee
3fd0264960 refactor httprequest: emit single signals (#23039)
* refactor httprequest

* Trigger Build
2021-11-29 11:19:08 +01:00
Cameron Clough
140c7f430c api: send User-Agent on network requests (#22965)
* api: set User-Agent on network requests

The format of the User-Agent header matches the format in `common/api/__init__.py`.

Closes #22954.

* Update selfdrive/ui/qt/util.cc

* fix parentheses

* refactor into function

Co-authored-by: Willem Melching <willem.melching@gmail.com>
2021-11-18 15:53:21 +01:00
Dean Lee
3f4cc9a246 Qt/CommaApi: cache private key (#22715)
* cache private key

* space

* no need to check mtime

* call_once

* simplify
2021-10-27 21:12:00 -07:00
Willem Melching
a31c6ce3f9 tools: make auth optional for public routes (#22386)
* tools: make auth optional for public routes

* handle 403

* show warning from c++ replay
2021-09-30 20:13:46 +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
Dean Lee
073b96e5d1 qt/util: new function getDongleId (#21810)
* new function getDongleId

* return std::optional
2021-08-02 11:21:51 +02:00
Willem Melching
34bb5b935f nav: Send DELETE to clear next destination on server (#21746) 2021-07-28 11:02:32 +02:00
Dean Lee
c24227c3ab HttpRequest: don't send request in ctor (#21665) 2021-07-25 15:36:04 -07:00
Adeeb Shihadeh
6039f1e7ac setup qt resources (#21617)
* setup qt resources

* networking

* input

* fix that

* nicer scrolling

* big eye

* fix flashing

* why is it linking against map stuff

Co-authored-by: Comma Device <device@comma.ai>
2021-07-15 21:30:23 -07:00
Adeeb Shihadeh
ddd1342fc5 setup improvements (#21505)
* getting started

* downloading

* some more

* nice checkmark

* nice triangle

* fixup style

* wait for internet

* more responsive

* waiting for internet
2021-07-15 16:47:18 -07:00
Dean Lee
9ebfc2ba8d HttpRequest: move http cache to RequestRepeater (#21228)
* move cache from HttpRequest to RequestRepeater

* apply review
2021-06-18 23:47:23 -07:00
Dean Lee
85f134da6a CommaApi: class to namespace (#21329) 2021-06-18 15:01:56 -07:00
Dean Lee
de56de78c8 qt/api.cc: refactor create_jwt (#21281)
* refactor

* cleanup includes
2021-06-15 22:35:23 -07:00
Dean Lee
e4e669bb0f add space after function name and if statement (#21225) 2021-06-11 10:17:52 +02:00
Dean Lee
7222d0f20d Cleanup selfdrive/ includes (#20822)
* cleanup include path

* continue

* format includes

* fix testraw.cc

* remove include path from SConstruct

* regroup

* rebase master

* almost done

* apply review

* rename FileReader.xx to filereader.xx

* rename Unlogger.x->unlogger.x

* rename FrameReader.xx -> framereader.xx

* apply reviews

* ui.h

* continue

* fix framebuffer.cc build error:mv util.h up

* full path to msm_media_info

* fix qcom2 camerad

Co-authored-by: Comma Device <device@comma.ai>
2021-05-08 22:15:17 -07:00
Willem Melching
ab319d4f54 Replace ifdef with hw abstraction layer (#20843)
* Replace ifdefs with hardware abstraction layer (#20801)

* add type to class hadwareXXX

* replace ifdefs with hardware layer

* continue

* continue

* new function get_driver_view_transform

* full path to hw.h

* fix build error setup.cc

* apply review

* fix typo

* fix deprecated error:replace deprecated fromPath with new

* fix build error

* Fixes after ifdef clenaup (#20842)

* inheritance doesnt work with static

* fix debayer

* small cleanup

* Update selfdrive/camerad/cameras/camera_common.cc

* Update selfdrive/ui/qt/offroad/settings.cc

* Update selfdrive/common/modeldata.h

* flip conditions

* fix comment

Co-authored-by: Dean Lee <deanlee3@gmail.com>
2021-05-06 14:39:05 +02:00
Willem Melching
3a95d3ccaa Revert "Replace ifdefs with hardware abstraction layer (#20801)"
This reverts commit 757d2923d2.
2021-05-06 12:29:30 +02:00
Willem Melching
d34647bbf7 Revert "Fixes after ifdef clenaup (#20842)"
This reverts commit fd7c2b4adf.
2021-05-06 12:29:19 +02:00
Willem Melching
fd7c2b4adf Fixes after ifdef clenaup (#20842) 2021-05-06 11:58:35 +02:00
Dean Lee
757d2923d2 Replace ifdefs with hardware abstraction layer (#20801)
* add type to class hadwareXXX

* replace ifdefs with hardware layer

* continue

* continue

* new function get_driver_view_transform

* full path to hw.h

* fix build error setup.cc

* apply review

* fix typo

* fix deprecated error:replace deprecated fromPath with new

* fix build error
2021-05-06 11:41:46 +02:00
Dean Lee
81491dc57f c++ cleanup: standardize file extensions to .cc and .h (#20800)
* c++ cleanup: standardize file extensions to .cc and .h

* cleanup files_common
2021-05-03 11:53:11 +02:00
Comma Device
23faedd25e configure SSL globally on NEOS 2021-05-02 16:29:02 -07:00
Dean Lee
4781598e12 Qt: use new signal slot syntax (#20783)
* new signal slot syntax

continue

* continue
2021-05-01 14:12:35 -07:00
Dean Lee
f01c3c649b CommaApi: passing arguments by reference (#20786)
* passing arguments by reference

* remove unused networkAccessManager

* ref
2021-05-01 14:11:35 -07:00
Dean Lee
ad57cd3759 HttpRequest: passing references in signals (#20782) 2021-04-30 23:58:12 -07:00
iejMac
a337097b5e CommaApi: use auth.py for request authentication when on PC (#20755)
* CommaApi: use auth.py for request authentication when on PC

* whitespace

* only when replay

* nicer way to do this

* tabs

* use bool

* tabs

* tabs

* prefer this to just be state

* initialize with stdString

* tabs

* include order

* fix order + ifdef fix

* whitespace'
2021-04-26 17:25:22 -07:00
iejMac
a8e231f8b1 print error when HttpRequest fails 2021-04-26 10:16:57 -07:00
iejMac
19d962cdf3 qt replay (#20602)
* initial commit, works

* remove nui

* working again

* visionipc

* cleanup

* cleanup

* moving VisionIpcServer to Unlogger class

* works

* tab cleanup

* headless mode

* headless mode works

* working headless mode

* gitignore update

* small unlogger refactor

* refactor param in UIState

* works, very slow, hacks

* cleanup

* works

* cleanup

* cleanup

* unused

* works for whole route

* nicer

* a little nicer

* different threshold

* maintains 1 segment window

* works with public api

* comments

* networkTimer works

* cleanup

* unified HttpRequest

* tabs

* tabs

* comments'

* gitignore

* gitignore

* only on PC

* same line else

* no changes in home.cc

* scons

* update scons

* works

* revert mainc.c

* revert home

* else

* just api + problem with api send

* works

* include cleanup

* general json fail

* whitespace

* remove active

* adding request repeater

* removing comments

* tabs

* update comment

* cereal

* fix

* trailing new lines

* grammar

* if whitespace

* indentation

* Update selfdrive/ui/SConscript

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

* Update selfdrive/ui/qt/request_repeater.cc

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

* works

* sort by dir

* no blockSignal

* replay is now QOBject

* cant take const char

* rename inner it

* get width and height from frame readeR

* resolve TODO

* seek in next pr

* spaces

* ui stuff

* fix CI

* remove comments

* no repalce

* trim segment fix

* remove seek from stream

* no cache key

* final changes'

* fix

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2021-04-24 00:59:09 -07:00
Dean Lee
d14aba4580 remove memory leak in create_jwt() (#20547) 2021-04-05 10:05:04 -07:00
Willem Melching
7bc0b27ae5 RequestRepeater remove memory leak through payloads argument 2021-03-31 10:56:42 +02:00
Dean Lee
98e55996f6 Params: python-like interface (#20506)
* rebase master

* delete outdated test_params.c

* putBool & more robust getBool

* putBool(SshEnabled)
2021-03-30 12:54:59 +02:00
Willem Melching
d43d625610 Cache prime/points widget (#20497)
* cache prime status on homescreen

* use stacked widget

* add caching and clear on 404
2021-03-26 14:53:12 +01:00
Dean Lee
80ae6a7e1b Qt: cache home screen state (#20395)
* cache drive stats

* don't parse response if it's the same as previous

* remove blank line

* cleanup

* update stats in place

* validate json

* add DriveStats to params.pyx

* cleanup

* cleanup

* remove //#include

* simplify

* add cache to RequestRepeater

* rename CachedDriveStats to ApiCacheDriveStats

* rename ApiCacheDriveStats to ApiCache_DriveStats

Co-authored-by: Willem Melching <willem.melching@gmail.com>
2021-03-26 13:29:30 +01:00
Adeeb Shihadeh
7f56991b41 Qt touchups (#20465)
* reduce minimum size

* clean that up

* consistent

* feels pretty good

* cleanup

* less laggy toggle

* openpilot

Co-authored-by: Comma Device <device@comma.ai>
2021-03-24 21:18:12 -07:00
Dean Lee
dd603a89f6 UI: Move the variables need to be updated by socket to UIScene (#19783)
* move variables into UIScene

* rebase master

* rebase master

* rebase master

* rebase master

* rebase master

* rebase master

* fix build error

* cleanup

Co-authored-by: Willem Melching <willem.melching@gmail.com>
2021-03-03 17:40:50 +01:00
Comma Device
f96e8f2f17 fix typo 2021-03-02 20:59:46 -08:00
Adeeb Shihadeh
60a9443b61 fix SSL errors in Qt UI on NEOS (#20225)
Co-authored-by: Comma Device <device@comma.ai>
2021-03-02 20:46:46 -08:00
Adeeb Shihadeh
ec8b21c261 qt fixups (#20171)
* no outline

* disable on qcom for now

* fix qt 5.12.8

* cleanup drive stats

* widgets cleanup

* ssl test

* revert that

* disable by default

Co-authored-by: Comma Device <device@comma.ai>
2021-02-28 18:10:50 -08:00
grekiki
2eb81aa1d3 Qt parents3 (#19870)
Not just parents, we also made the UI look nicer.
2021-01-22 13:51:26 +01:00
grekiki
10bd761cd6 Qt offroad: pairing (#19675)
* kind of works now

* QR code is now on screen

* testing is needed

* works, waiting for server update

* reduce diff

* refactoring part1

* refactor part2

* refactor part3

* works on PC

* fix build, annoying bug though...

* git is annoying

* more classes, still crashes after a while

* better style

* clearer qr code

* less code and test new ssh key

* no more AA

* rename and collect garbage

* no pairing widget without the internet connection

* No network connection

* more logs

* refactor the network calls

* no more leaking

* works

* cleanup

* spaces

* works on device

* fix merge

* don't run if screen is off

* always initialized

* stats updating, not running without scrren

* formatting

* nicer QR code

* ensure the registration

* no qr code if no IMEI or no HWSerial

* all works

* refactor

* better networking

* all functionality seems to work

* small cleanup

* get serial once

* Small cleanup

* No internet text

* Don't crash if private key not found

* no network should say so

* new qr code every 30 minutes

* 20FPS sidebar

* more responsive networking and QR

* more logs

* no log spam

* fix merge

* no running onroad

Co-authored-by: Comma Device <device@comma.ai>
Co-authored-by: Willem Melching <willem.melching@gmail.com>
2021-01-18 12:07:55 +01:00