new training guide (#20495)

* new training guide

* fix end

* new step1

* better images

* update images
pull/20503/head
Adeeb Shihadeh 4 years ago committed by GitHub
parent 85d0d521bd
commit fd15a21c5a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      selfdrive/assets/training/step0.jpg
  2. BIN
      selfdrive/assets/training/step0.png
  3. 3
      selfdrive/assets/training/step1.jpg
  4. BIN
      selfdrive/assets/training/step1.png
  5. 3
      selfdrive/assets/training/step10.jpg
  6. BIN
      selfdrive/assets/training/step10.png
  7. 3
      selfdrive/assets/training/step11.jpg
  8. BIN
      selfdrive/assets/training/step11.png
  9. 3
      selfdrive/assets/training/step12.jpg
  10. BIN
      selfdrive/assets/training/step12.png
  11. 3
      selfdrive/assets/training/step13.jpg
  12. BIN
      selfdrive/assets/training/step13.png
  13. 3
      selfdrive/assets/training/step14.jpg
  14. BIN
      selfdrive/assets/training/step14.png
  15. BIN
      selfdrive/assets/training/step15.png
  16. BIN
      selfdrive/assets/training/step16.png
  17. BIN
      selfdrive/assets/training/step17.png
  18. 3
      selfdrive/assets/training/step2.jpg
  19. BIN
      selfdrive/assets/training/step2.png
  20. 3
      selfdrive/assets/training/step3.jpg
  21. BIN
      selfdrive/assets/training/step3.png
  22. 3
      selfdrive/assets/training/step4.jpg
  23. BIN
      selfdrive/assets/training/step4.png
  24. 3
      selfdrive/assets/training/step5.jpg
  25. BIN
      selfdrive/assets/training/step5.png
  26. 3
      selfdrive/assets/training/step6.jpg
  27. BIN
      selfdrive/assets/training/step6.png
  28. 3
      selfdrive/assets/training/step7.jpg
  29. BIN
      selfdrive/assets/training/step7.png
  30. 3
      selfdrive/assets/training/step8.jpg
  31. BIN
      selfdrive/assets/training/step8.png
  32. 3
      selfdrive/assets/training/step9.jpg
  33. BIN
      selfdrive/assets/training/step9.png
  34. 16
      selfdrive/ui/qt/offroad/onboarding.cc
  35. 22
      selfdrive/ui/qt/offroad/onboarding.hpp

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:8c6c04843346495360f87d7378f6b92d1284f26876e4c61772391c4239eabb9a
size 187644

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 MiB

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:e7ad4506e6e81e7b374676767be0037b1d27a5a6ba7e2354a639fe72510621c7
size 251834

Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:25b8ed39ca149b5083c61765951cef34ebbd94ed70d6111250f1f21f89c92170
size 263592

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:01932662ce154ae0456aa5adf42e604df3342dad03651c7dfe596a982bc10de2
size 220853

Binary file not shown.

After

Width:  |  Height:  |  Size: 743 KiB

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:de067b0da7f676428a82d445a29d386f135081c53fd6203437bc7abeef941301
size 297138

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:3a89702a4b25a5dd8431689cb06125780c30642613ac11d88dd245e1e8924cd7
size 376601

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:c9f2b6fa133b102f2008a60dda0b344826ecfa57127ba43c7551d14c1b213d3b
size 234676

Binary file not shown.

After

Width:  |  Height:  |  Size: 708 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 MiB

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:bd1b7ea05bdadba70f1aa12af9e044224ff751a9feb7336b0868dda99876c4ae
size 199105

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:4ef49a4dde1309ca0e44de41ded5bf70a5e3dbf0cd503c50f03769c93c07e998
size 259261

Binary file not shown.

After

Width:  |  Height:  |  Size: 556 KiB

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:10cc7c1a0515dcef8ae840d8d18cdfb6b60cbede409d25cfc8375c190763d7bc
size 269618

Binary file not shown.

After

Width:  |  Height:  |  Size: 524 KiB

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:58d340534194a7ba03466ce0f1eefaf2431d50ad6651702cb438b22d87b276bd
size 178004

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:0d67cbc355c1f22e0ce20ff952a02df9b238774ebaf3076acfcc0f10944779aa
size 257768

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 MiB

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:21de74ca3ca3723c8d9e8e8671f07fede2a444c4ad1aeeb53dd91d25175a0d70
size 294373

Binary file not shown.

After

Width:  |  Height:  |  Size: 718 KiB

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:441de6705aba7218327cb49866bf00927d2d8b6b724e91c9006b20a88f32c71a
size 216384

Binary file not shown.

After

Width:  |  Height:  |  Size: 645 KiB

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:8a7bfa7d4f48753409dd125d6a48b6b2d7e42a62b4b6fb1f2a7f5f11b212665a
size 200923

Binary file not shown.

After

Width:  |  Height:  |  Size: 688 KiB

@ -12,30 +12,28 @@
void TrainingGuide::mouseReleaseEvent(QMouseEvent *e) {
int leftOffset = (geometry().width()-1620)/2;
int mousex = e->x()-leftOffset;
int mousey = e->y();
//qDebug() << e->x() << ", " << e->y();
// Check for restart
if (currentIndex == (boundingBox.size() - 1) && 1050 <= mousex && mousex <= 1500 &&
773 <= mousey && mousey <= 954) {
if (currentIndex == (boundingBox.size() - 1) && 200 <= e->x() && e->x() <= 920 &&
760 <= e->y() && e->y() <= 960) {
currentIndex = 0;
} else if (boundingBox[currentIndex][0] <= mousex && mousex <= boundingBox[currentIndex][1] &&
boundingBox[currentIndex][2] <= mousey && mousey <= boundingBox[currentIndex][3]) {
} else if (boundingBox[currentIndex][0] <= e->x() && e->x() <= boundingBox[currentIndex][1] &&
boundingBox[currentIndex][2] <= e->y() && e->y() <= boundingBox[currentIndex][3]) {
currentIndex += 1;
}
if (currentIndex >= boundingBox.size()) {
emit completedTraining();
} else {
image.load("../assets/training/step" + QString::number(currentIndex) + ".jpg");
image.load("../assets/training/step" + QString::number(currentIndex) + ".png");
update();
}
}
void TrainingGuide::showEvent(QShowEvent *event) {
currentIndex = 0;
image.load("../assets/training/step0.jpg");
image.load("../assets/training/step0.png");
}
void TrainingGuide::paintEvent(QPaintEvent *event) {

@ -26,8 +26,26 @@ private:
// Bounding boxes for the a given training guide step
// (minx, maxx, miny, maxy)
QVector<QVector<int>> boundingBox {{250, 930, 750, 900}, {280, 1280, 650, 950}, {330, 1130, 590, 900}, {910, 1580, 500, 1000}, {1180, 1300, 630, 720}, {290, 1050, 590, 960},
{1090, 1240, 550, 660}, {1050, 1580, 250, 900}, {320, 1130, 670, 1020}, {1010, 1580, 410, 750}, {1040, 1500, 230, 1030}, {300, 1190, 590, 920}, {1050, 1310, 170, 870}, {950, 1530, 460, 770}, {190, 970, 750, 970}};
QVector<QVector<int>> boundingBox {
{650, 1375, 700, 900},
{1600, 1920, 0, 1080},
{1600, 1920, 0, 1080},
{1240, 1750, 480, 1080},
{1570, 1780, 620, 750},
{1600, 1920, 0, 1080},
{1630, 1740, 620, 780},
{1200, 1920, 0, 1080},
{1455, 1850, 400, 660},
{1460, 1800, 195, 520},
{1600, 1920, 0, 1080},
{1350, 1920, 65, 1080},
{1600, 1920, 0, 1080},
{1570, 1900, 130, 1000},
{1350, 1770, 500, 700},
{1600, 1920, 0, 1080},
{1600, 1920, 0, 1080},
{1000, 1800, 760, 954},
};
signals:
void completedTraining();

Loading…
Cancel
Save