Skip to content
Permalink
Browse files

openpilot v0.6.3 release

  • Loading branch information...
Vehicle Researcher
Vehicle Researcher committed Aug 13, 2019
1 parent 6a61788 commit d5f9caa82d80cdcc7f1b7748f2cf3ccbf94f82a3
Showing with 1,901 additions and 797 deletions.
  1. +2 −2 Dockerfile.openpilot
  2. +5 −1 README.md
  3. +11 −0 RELEASES.md
  4. BIN apk/ai.comma.plus.offroad.apk
  5. +19 −0 common/api/__init__.py
  6. +12 −2 installer/updater/Makefile
  7. +4 −4 installer/updater/update.json
  8. BIN installer/updater/updater
  9. +73 −40 installer/updater/updater.cc
  10. BIN models/driving_model.dlc
  11. BIN models/monitoring_model.dlc
  12. +3 −1 run_docker_tests.sh
  13. BIN selfdrive/assets/Roboto-Bold.ttf
  14. BIN selfdrive/assets/{ → fonts}/courbd.ttf
  15. BIN selfdrive/assets/{OpenSans-Bold.ttf → fonts/opensans_bold.ttf}
  16. BIN selfdrive/assets/{OpenSans-Regular.ttf → fonts/opensans_regular.ttf}
  17. BIN selfdrive/assets/{OpenSans-SemiBold.ttf → fonts/opensans_semibold.ttf}
  18. BIN selfdrive/assets/sounds/disengaged.wav
  19. BIN selfdrive/assets/sounds/engaged.wav
  20. BIN selfdrive/assets/sounds/error.wav
  21. BIN selfdrive/assets/sounds/warning_1.wav
  22. BIN selfdrive/assets/sounds/warning_2.wav
  23. +6 −3 selfdrive/athena/athenad.py
  24. +3 −5 selfdrive/can/tests/test_packer_honda.py
  25. +4 −8 selfdrive/can/tests/test_packer_toyota.py
  26. +2 −17 selfdrive/car/chrysler/carcontroller.py
  27. +0 −10 selfdrive/car/chrysler/chryslercan.py
  28. +0 −1 selfdrive/car/chrysler/chryslercan_test.py
  29. +1 −2 selfdrive/car/chrysler/interface.py
  30. +1 −1 selfdrive/car/chrysler/values.py
  31. +1 −19 selfdrive/car/gm/carcontroller.py
  32. +0 −4 selfdrive/car/gm/gmcan.py
  33. +2 −5 selfdrive/car/gm/interface.py
  34. +0 −21 selfdrive/car/gm/values.py
  35. +4 −10 selfdrive/car/honda/carcontroller.py
  36. +5 −0 selfdrive/car/honda/carstate.py
  37. +7 −4 selfdrive/car/honda/hondacan.py
  38. +6 −8 selfdrive/car/honda/interface.py
  39. +0 −26 selfdrive/car/honda/values.py
  40. +1 −1 selfdrive/car/hyundai/interface.py
  41. +2 −3 selfdrive/car/hyundai/values.py
  42. +7 −16 selfdrive/car/toyota/carcontroller.py
  43. +28 −5 selfdrive/car/toyota/interface.py
  44. +3 −3 selfdrive/car/toyota/toyotacan.py
  45. +1 −1 selfdrive/common/version.h
  46. +23 −10 selfdrive/controls/controlsd.py
  47. +5 −4 selfdrive/controls/lib/alertmanager.py
  48. +26 −12 selfdrive/controls/lib/alerts.py
  49. +69 −40 selfdrive/controls/lib/driver_monitor.py
  50. +74 −0 selfdrive/controls/lib/lane_planner.py
  51. +0 −27 selfdrive/controls/lib/latcontrol_helpers.py
  52. +1 −1 selfdrive/controls/lib/latcontrol_indi.py
  53. +72 −0 selfdrive/controls/lib/latcontrol_lqr.py
  54. +1 −1 selfdrive/controls/lib/latcontrol_pid.py
  55. +11 −24 selfdrive/controls/lib/lateral_mpc/generator.cpp
  56. +7 −8 selfdrive/controls/lib/lateral_mpc/lateral_mpc.c
  57. +11 −11 selfdrive/controls/lib/lateral_mpc/lib_mpc_export/acado_common.h
  58. +0 −1 selfdrive/controls/lib/lateral_mpc/lib_mpc_export/acado_integrator.c
  59. +159 −186 selfdrive/controls/lib/lateral_mpc/lib_mpc_export/acado_solver.c
  60. +2 −2 selfdrive/controls/lib/lateral_mpc/libmpc_py.py
  61. +0 −66 selfdrive/controls/lib/model_parser.py
  62. +23 −24 selfdrive/controls/lib/pathplanner.py
  63. +24 −24 selfdrive/controls/lib/planner.py
  64. +15 −15 selfdrive/controls/lib/radar_helpers.py
  65. +10 −1 selfdrive/controls/radard.py
  66. +14 −6 selfdrive/controls/tests/test_lateral_mpc.py
  67. +4 −6 selfdrive/locationd/calibrationd.py
  68. +16 −3 selfdrive/locationd/locationd_yawrate.cc
  69. +5 −4 selfdrive/locationd/paramsd.cc
  70. +11 −10 selfdrive/loggerd/uploader.py
  71. +4 −1 selfdrive/manager.py
  72. +4 −0 selfdrive/registration.py
  73. +22 −0 selfdrive/test/openpilotci_upload.py
  74. +23 −6 selfdrive/test/plant/plant.py
  75. +494 −0 selfdrive/test/test_car_models_openpilot.py
  76. 0 selfdrive/test/tests/__init__.py
  77. +2 −0 selfdrive/test/tests/process_replay/.gitignore
  78. +15 −0 selfdrive/test/tests/process_replay/README.md
  79. 0 selfdrive/test/tests/process_replay/__init__.py
  80. +45 −0 selfdrive/test/tests/process_replay/compare_logs.py
  81. +185 −0 selfdrive/test/tests/process_replay/process_replay.py
  82. +1 −0 selfdrive/test/tests/process_replay/ref_commit
  83. +118 −0 selfdrive/test/tests/process_replay/test_processes.py
  84. +42 −0 selfdrive/test/tests/process_replay/update_refs.py
  85. +1 −1 selfdrive/ui/slplay.c
  86. BIN selfdrive/ui/spinner/spinner
  87. +1 −1 selfdrive/ui/spinner/spinner.c
  88. +53 −35 selfdrive/ui/ui.c
  89. +2 −3 selfdrive/visiond/build_from_src.mk
  90. +36 −29 selfdrive/visiond/models/driving.cc
  91. +0 −1 selfdrive/visiond/models/driving.h
  92. +2 −0 selfdrive/visiond/models/monitoring.cc
  93. +3 −1 selfdrive/visiond/models/monitoring.h
  94. +3 −2 selfdrive/visiond/runners/run.h
  95. +49 −8 selfdrive/visiond/visiond.cc
@@ -39,9 +39,9 @@ RUN cd /tmp && pipenv install --deploy --system

ENV PYTHONPATH /tmp/openpilot:$PYTHONPATH

RUN git clone --branch v0.6 https://github.com/commaai/openpilot-tools.git /tmp/openpilot/tools
RUN git clone --branch v0.6.2 https://github.com/commaai/openpilot-tools.git /tmp/openpilot/tools
RUN pip install -r /tmp/openpilot/tools/requirements.txt
RUN pip install fastcluster==1.1.20 scipy==0.19.1
RUN pip install fastcluster==1.1.20 scipy==0.19.1 dictdiffer==0.8.0 azure-batch==4.1.3 azure-common==1.1.16 azure-nspkg==3.0.0 azure-storage-blob==1.3.1 azure-storage-common==1.3.0 azure-storage-nspkg==3.0.0

COPY ./.pylintrc /tmp/openpilot/.pylintrc
COPY ./common /tmp/openpilot/common
@@ -72,6 +72,7 @@ Supported Cars
| GMC<sup>3</sup> | Acadia Denali 2018 | Adaptive Cruise | Yes | Yes | 0mph | 7mph | Custom<sup>7</sup>|
| Holden<sup>3</sup> | Astra 2017 | Adaptive Cruise | Yes | Yes | 0mph | 7mph | Custom<sup>7</sup>|
| Honda | Accord 2018-19 | All | Yes | Stock | 0mph | 3mph | Bosch |
| Honda | Accord Hybrid 2018-19 | All | Yes | Stock | 0mph | 3mph | Bosch |
| Honda | Civic Sedan/Coupe 2016-18| Honda Sensing | Yes | Yes | 0mph | 12mph | Nidec |
| Honda | Civic Sedan/Coupe 2019 | Honda Sensing | Yes | Stock | 0mph | 2mph | Bosch |
| Honda | Civic Hatchback 2017-19 | Honda Sensing | Yes | Stock | 0mph | 12mph | Bosch |
@@ -98,18 +99,21 @@ Supported Cars
| Toyota | Avalon 2016 | TSS-P | Yes | Yes<sup>2</sup>| 20mph<sup>1</sup>| 0mph | Toyota |
| Toyota | Avalon 2017-18 | All | Yes | Yes<sup>2</sup>| 20mph<sup>1</sup>| 0mph | Toyota |
| Toyota | Camry 2018-19 | All | Yes | Stock | 0mph<sup>5</sup> | 0mph | Toyota |
| Toyota | Camry Hybrid 2018-19 | All | Yes | Stock | 0mph<sup>5</sup> | 0mph | Toyota |
| Toyota | C-HR 2017-19 | All | Yes | Stock | 0mph | 0mph | Toyota |
| Toyota | C-HR Hybrid 2017-19 | All | Yes | Stock | 0mph | 0mph | Toyota |
| Toyota | Corolla 2017-19 | All | Yes | Yes<sup>2</sup>| 20mph<sup>1</sup>| 0mph | Toyota |
| Toyota | Corolla 2020 | All | Yes | Yes | 0mph | 0mph | Toyota |
| Toyota | Corolla Hatchback 2019 | All | Yes | Yes | 0mph | 0mph | Toyota |
| Toyota | Highlander 2017-19 | All | Yes | Yes<sup>2</sup>| 0mph | 0mph | Toyota |
| Toyota | Highlander Hybrid 2018 | All | Yes | Yes<sup>2</sup>| 0mph | 0mph | Toyota |
| Toyota | Highlander Hybrid 2017-19| All | Yes | Yes<sup>2</sup>| 0mph | 0mph | Toyota |
| Toyota | Prius 2016 | TSS-P | Yes | Yes<sup>2</sup>| 0mph | 0mph | Toyota |
| Toyota | Prius 2017-19 | All | Yes | Yes<sup>2</sup>| 0mph | 0mph | Toyota |
| Toyota | Prius Prime 2017-19 | All | Yes | Yes<sup>2</sup>| 0mph | 0mph | Toyota |
| Toyota | Rav4 2016 | TSS-P | Yes | Yes<sup>2</sup>| 20mph<sup>1</sup>| 0mph | Toyota |
| Toyota | Rav4 2017-18 | All | Yes | Yes<sup>2</sup>| 20mph<sup>1</sup>| 0mph | Toyota |
| Toyota | Rav4 2019 | All | Yes | Yes | 0mph | 0mph | Toyota |
| Toyota | Rav4 Hybrid 2016 | TSS-P | Yes | Yes<sup>2</sup>| 0mph | 0mph | Toyota |
| Toyota | Rav4 Hybrid 2017-18 | All | Yes | Yes<sup>2</sup>| 0mph | 0mph | Toyota |
| Toyota | Sienna 2018 | All | Yes | Yes<sup>2</sup>| 0mph | 0mph | Toyota |

@@ -1,3 +1,14 @@
Version 0.6.3 (2019-08-12)
========================
* Alert sounds from EON: requires NEOS update
* Improve driver monitoring: eye tracking and improved awareness logic
* Improve path prediction with new driving model
* Improve lane positioning with wide lanes and exits
* Improve lateral control on RAV4
* Slow down for turns using model
* Open sourced regression test to verify outputs against reference logs
* Open sourced regression test to sanity check all car models

Version 0.6.2 (2019-07-29)
========================
* New driving model!
BIN +53.3 KB (100%) apk/ai.comma.plus.offroad.apk
Binary file not shown.
@@ -1,7 +1,26 @@
import jwt
import requests
from datetime import datetime, timedelta

from selfdrive.version import version

class Api(object):
def __init__(self, dongle_id, private_key):
self.dongle_id = dongle_id
self.private_key = private_key

def get(self, *args, **kwargs):
return self.request('GET', *args, **kwargs)

def post(self, *args, **kwargs):
return self.request('POST', *args, **kwargs)

def request(self, method, endpoint, timeout=None, access_token=None, **params):
return api_get(endpoint, method=method, timeout=timeout, access_token=access_token, **params)

def get_token(self):
return jwt.encode({'identity': self.dongle_id, 'exp': datetime.utcnow() + timedelta(hours=1)}, self.private_key, algorithm='RS256')

def api_get(endpoint, method='GET', timeout=None, access_token=None, **params):
backend = "https://api.commadotai.com/"

@@ -31,7 +31,9 @@ FRAMEBUFFER_LIBS = -lutils -lgui -lEGL
.PHONY: all
all: updater

OBJS = courbd.ttf.o \
OBJS = opensans_regular.ttf.o \
opensans_semibold.ttf.o \
opensans_bold.ttf.o \
../../selfdrive/common/touch.o \
../../selfdrive/common/framebuffer.o \
$(PHONELIBS)/json11/json11.o \
@@ -50,7 +52,15 @@ updater: updater.o $(OBJS)
-lcutils -lm -llog
strip updater

courbd.ttf.o: ../../selfdrive/assets/courbd.ttf
opensans_regular.ttf.o: ../../selfdrive/assets/fonts/opensans_regular.ttf
@echo "[ bin2o ] $@"
cd '$(dir $<)' && ld -r -b binary '$(notdir $<)' -o '$(abspath $@)'

opensans_bold.ttf.o: ../../selfdrive/assets/fonts/opensans_bold.ttf
@echo "[ bin2o ] $@"
cd '$(dir $<)' && ld -r -b binary '$(notdir $<)' -o '$(abspath $@)'

opensans_semibold.ttf.o: ../../selfdrive/assets/fonts/opensans_semibold.ttf
@echo "[ bin2o ] $@"
cd '$(dir $<)' && ld -r -b binary '$(notdir $<)' -o '$(abspath $@)'

@@ -1,7 +1,7 @@
{
"ota_url": "https://commadist.azureedge.net/neosupdate/ota-signed-c992abb59cbaf6588f51055db52db619061107851773fc8480acb8bb5d77a28f.zip",
"ota_hash": "c992abb59cbaf6588f51055db52db619061107851773fc8480acb8bb5d77a28f",
"recovery_url": "https://commadist.azureedge.net/neosupdate/recovery-af099a84cfd7b91266090779238ac358278948dcde2dcfa0fbca6e8397366f0a.img",
"ota_url": "https://commadist.azureedge.net/neosupdate/ota-signed-4db25072191d24e204a816d73ac9e8c727822a26ed3baf01ecae18167fa2eb11.zip",
"ota_hash": "4db25072191d24e204a816d73ac9e8c727822a26ed3baf01ecae18167fa2eb11",
"recovery_url": "https://commadist.azureedge.net/neosupdate/recovery-31ef14206d3102edf18fb7417ef32ba2d9f37dd2f4443e234c374a70d1bf4662.img",
"recovery_len": 15136044,
"recovery_hash": "af099a84cfd7b91266090779238ac358278948dcde2dcfa0fbca6e8397366f0a"
"recovery_hash": "31ef14206d3102edf18fb7417ef32ba2d9f37dd2f4443e234c374a70d1bf4662"
}
BIN -36.3 KB (99%) installer/updater/updater
Binary file not shown.
@@ -43,8 +43,12 @@ const char *manifest_url = MANIFEST_URL_EON;

#define UPDATE_DIR "/data/neoupdate"

extern const uint8_t bin_courbd[] asm("_binary_courbd_ttf_start");
extern const uint8_t bin_courbd_end[] asm("_binary_courbd_ttf_end");
extern const uint8_t bin_opensans_regular[] asm("_binary_opensans_regular_ttf_start");
extern const uint8_t bin_opensans_regular_end[] asm("_binary_opensans_regular_ttf_end");
extern const uint8_t bin_opensans_semibold[] asm("_binary_opensans_semibold_ttf_start");
extern const uint8_t bin_opensans_semibold_end[] asm("_binary_opensans_semibold_ttf_end");
extern const uint8_t bin_opensans_bold[] asm("_binary_opensans_bold_ttf_start");
extern const uint8_t bin_opensans_bold_end[] asm("_binary_opensans_bold_ttf_end");

namespace {

@@ -148,7 +152,9 @@ struct Updater {

FramebufferState *fb = NULL;
NVGcontext *vg = NULL;
int font;
int font_regular;
int font_semibold;
int font_bold;

std::thread update_thread_handle;

@@ -182,14 +188,21 @@ struct Updater {

vg = nvgCreateGLES3(NVG_ANTIALIAS | NVG_STENCIL_STROKES | NVG_DEBUG);
assert(vg);
font = nvgCreateFontMem(vg, "courbd", (unsigned char*)bin_courbd, (bin_courbd_end - bin_courbd), 0);
assert(font >= 0);

b_w = 600;
font_regular = nvgCreateFontMem(vg, "opensans_regular", (unsigned char*)bin_opensans_regular, (bin_opensans_regular_end - bin_opensans_regular), 0);
assert(font_regular >= 0);

font_semibold = nvgCreateFontMem(vg, "opensans_semibold", (unsigned char*)bin_opensans_semibold, (bin_opensans_semibold_end - bin_opensans_semibold), 0);
assert(font_semibold >= 0);

font_bold = nvgCreateFontMem(vg, "opensans_bold", (unsigned char*)bin_opensans_bold, (bin_opensans_bold_end - bin_opensans_bold), 0);
assert(font_bold >= 0);

b_w = 640;
balt_x = 200;
b_x = fb_w-b_w-200;
b_y = 700;
b_h = 250;
b_y = 720;
b_h = 220;

state = CONFIRMATION;

@@ -286,14 +299,14 @@ struct Updater {
std::string stage_download(std::string url, std::string hash, std::string name) {
std::string out_fn = UPDATE_DIR "/" + util::base_name(url);

set_progress("downloading " + name + "...");
set_progress("Downloading " + name + "...");
bool r = download_file(url, out_fn);
if (!r) {
set_error("failed to download " + name);
return "";
}

set_progress("verifying " + name + "...");
set_progress("Verifying " + name + "...");
std::string fn_hash = sha256_file(out_fn);
printf("got %s hash: %s\n", name.c_str(), hash.c_str());
if (fn_hash != hash) {
@@ -323,7 +336,7 @@ struct Updater {

const int EON = (access("/EON", F_OK) != -1);

set_progress("finding latest version...");
set_progress("Finding latest version...");
std::string manifest_s;
if (EON) {
manifest_s = download_string(curl, manifest_url);
@@ -364,10 +377,10 @@ struct Updater {

std::string recovery_fn;
if (recovery_url.empty() || recovery_hash.empty() || recovery_len == 0) {
set_progress("skipping recovery flash...");
set_progress("Skipping recovery flash...");
} else {
// only download the recovery if it differs from what's flashed
set_progress("checking recovery...");
set_progress("Checking recovery...");
std::string existing_recovery_hash = sha256_file(RECOVERY_DEV, recovery_len);
printf("existing recovery hash: %s\n", existing_recovery_hash.c_str());

@@ -393,7 +406,7 @@ struct Updater {

if (!recovery_fn.empty()) {
// flash recovery
set_progress("flashing recovery...");
set_progress("Flashing recovery...");

FILE *flash_file = fopen(recovery_fn.c_str(), "rb");
if (!flash_file) {
@@ -427,7 +440,7 @@ struct Updater {
fclose(recovery_dev);
fclose(flash_file);

set_progress("verifying flash...");
set_progress("Verifying flash...");
std::string new_recovery_hash = sha256_file(RECOVERY_DEV, recovery_len);
printf("new recovery hash: %s\n", new_recovery_hash.c_str());

@@ -447,7 +460,7 @@ struct Updater {
fprintf(cmd_file, "--update_package=%s\n", ota_fn.c_str());
fclose(cmd_file);

set_progress("rebooting");
set_progress("Rebooting");

// remove the continue.sh so we come back into the setup.
// maybe we should go directly into the installer, but what if we don't come back with internet? :/
@@ -462,25 +475,32 @@ struct Updater {
// set_error("failed to reboot into recovery");
}

void draw_ack_screen(const char *message, const char *button, const char *altbutton) {
nvgFontSize(vg, 96.0f);
void draw_ack_screen(const char *title, const char *message, const char *button, const char *altbutton) {
nvgFillColor(vg, nvgRGBA(255,255,255,255));
nvgTextAlign(vg, NVG_ALIGN_LEFT | NVG_ALIGN_BASELINE);
nvgTextBox(vg, 50, 100, fb_w-100, message, NULL);
nvgTextAlign(vg, NVG_ALIGN_CENTER | NVG_ALIGN_BASELINE);

nvgFontFace(vg, "opensans_bold");
nvgFontSize(vg, 120.0f);
nvgTextBox(vg, 110, 220, fb_w-240, title, NULL);

nvgFontFace(vg, "opensans_regular");
nvgFontSize(vg, 86.0f);
nvgTextBox(vg, 130, 380, fb_w-260, message, NULL);

// draw button
if (button) {
nvgBeginPath(vg);
nvgFillColor(vg, nvgRGBA(0, 0, 0, 255));
nvgFillColor(vg, nvgRGBA(8, 8, 8, 255));
nvgRoundedRect(vg, b_x, b_y, b_w, b_h, 20);
nvgFill(vg);

nvgFillColor(vg, nvgRGBA(255, 255, 255, 255));
nvgFontFace(vg, "opensans_semibold");
nvgTextAlign(vg, NVG_ALIGN_CENTER | NVG_ALIGN_MIDDLE);
nvgText(vg, b_x+b_w/2, b_y+b_h/2, button, NULL);

nvgBeginPath(vg);
nvgStrokeColor(vg, nvgRGBA(255, 255, 255, 255));
nvgStrokeColor(vg, nvgRGBA(255, 255, 255, 50));
nvgStrokeWidth(vg, 5);
nvgRoundedRect(vg, b_x, b_y, b_w, b_h, 20);
nvgStroke(vg);
@@ -489,16 +509,17 @@ struct Updater {
// draw button
if (altbutton) {
nvgBeginPath(vg);
nvgFillColor(vg, nvgRGBA(0, 0, 0, 255));
nvgFillColor(vg, nvgRGBA(8, 8, 8, 255));
nvgRoundedRect(vg, balt_x, b_y, b_w, b_h, 20);
nvgFill(vg);

nvgFillColor(vg, nvgRGBA(255, 255, 255, 255));
nvgFontFace(vg, "opensans_semibold");
nvgTextAlign(vg, NVG_ALIGN_CENTER | NVG_ALIGN_MIDDLE);
nvgText(vg, balt_x+b_w/2, b_y+b_h/2, altbutton, NULL);

nvgBeginPath(vg);
nvgStrokeColor(vg, nvgRGBA(255, 255, 255, 255));
nvgStrokeColor(vg, nvgRGBA(255, 255, 255, 50));
nvgStrokeWidth(vg, 5);
nvgRoundedRect(vg, balt_x, b_y, b_w, b_h, 20);
nvgStroke(vg);
@@ -510,23 +531,27 @@ struct Updater {
nvgFontSize(vg, 64.0f);
nvgFillColor(vg, nvgRGBA(255,255,255,255));
nvgTextAlign(vg, NVG_ALIGN_CENTER | NVG_ALIGN_BASELINE);
nvgTextBox(vg, 0, 700, fb_w, progress_text.c_str(), NULL);
nvgFontFace(vg, "opensans_bold");
nvgFontSize(vg, 86.0f);
nvgTextBox(vg, 0, 380, fb_w, progress_text.c_str(), NULL);

// draw progress bar
{
int progress_width = 800;
int progress_width = 1000;
int progress_x = fb_w/2-progress_width/2;
int progress_y = 768;
int progress_height = 15;
int progress_y = 520;
int progress_height = 50;

int powerprompt_y = 512;
nvgText(vg, fb_w/2, powerprompt_y, "Ensure EON is connected to power", NULL);
int powerprompt_y = 312;
nvgFontFace(vg, "opensans_regular");
nvgFontSize(vg, 64.0f);
nvgText(vg, fb_w/2, 740, "Ensure EON is connected to power.", NULL);

NVGpaint paint = nvgBoxGradient(
vg, progress_x + 1, progress_y + 1,
progress_width - 2, progress_height, 3, 4, nvgRGB(0, 32, 0), nvgRGB(0, 92, 0));
progress_width - 2, progress_height, 3, 4, nvgRGB(27, 27, 27), nvgRGB(27, 27, 27));
nvgBeginPath(vg);
nvgRoundedRect(vg, progress_x, progress_y, progress_width, progress_height, 3);
nvgRoundedRect(vg, progress_x, progress_y, progress_width, progress_height, 12);
nvgFillPaint(vg, paint);
nvgFill(vg);

@@ -536,12 +561,12 @@ struct Updater {
paint = nvgBoxGradient(
vg, progress_x, progress_y,
bar_pos+1.5f, progress_height-1, 3, 4,
nvgRGB(220, 100, 0), nvgRGB(128, 100, 0));
nvgRGB(245, 245, 245), nvgRGB(105, 105, 105));

nvgBeginPath(vg);
nvgRoundedRect(
vg, progress_x+1, progress_y+1,
bar_pos, progress_height-2, 3);
bar_pos, progress_height-2, 12);
nvgFillPaint(vg, paint);
nvgFill(vg);
}
@@ -554,16 +579,16 @@ struct Updater {

switch (state) {
case CONFIRMATION:
draw_ack_screen("An upgrade to NEOS is required.\n\n"
"Your device will now be reset and upgraded. You may want to connect to wifi as download is around 1 GB\nData on device shouldn't be lost.",
"continue",
"wifi");
draw_ack_screen("An update to NEOS is required.",
"Your device will now be reset and upgraded. You may want to connect to wifi as download is around 1 GB. Existing data on device should not be lost.",
"Continue",
"Connect to WiFi");
break;
case RUNNING:
draw_progress_screen();
break;
case ERROR:
draw_ack_screen(("ERROR: " + error_text + "\n\nYou will need to retry").c_str(), NULL, "exit");
draw_ack_screen("There was an error.", ("ERROR: " + error_text + "\n\nYou will need to retry").c_str(), NULL, "exit");
break;
}

@@ -604,9 +629,17 @@ struct Updater {
while (!do_exit) {
ui_update();

glClearColor(0.19, 0.09, 0.2, 1.0);
glClearColor(0.08, 0.08, 0.08, 1.0);
glClear(GL_STENCIL_BUFFER_BIT | GL_COLOR_BUFFER_BIT);

// background
nvgBeginPath(vg);
NVGpaint bg = nvgLinearGradient(vg, fb_w, 0, fb_w, fb_h,
nvgRGBA(0, 0, 0, 0), nvgRGBA(0, 0, 0, 255));
nvgFillPaint(vg, bg);
nvgRect(vg, 0, 0, fb_w, fb_h);
nvgFill(vg);

glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);

BIN -315 KB (98%) models/driving_model.dlc
Binary file not shown.
BIN +56.1 KB (110%) models/monitoring_model.dlc
Binary file not shown.

0 comments on commit d5f9caa

Please sign in to comment.
You can’t perform that action at this time.