ui/map: slight turn lane types (#29446)

* add slight turns

* bump cereal

* revert

* hmm, i like this better

* whops

* fix

* bump
old-commit-hash: 6d2922b8e6f6ef29b6d17ea7a1c3d16b40e2236f
This commit is contained in:
Shane Smiskol
2023-08-17 20:51:52 -07:00
committed by GitHub
parent 5530871c0e
commit 593322dfa9
5 changed files with 15 additions and 2 deletions
+1 -1
Submodule cereal updated: 2077dd1a1b...1ee48e0110
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:5ce2ea01f9ed172048c86b93e0ebfa8f468473de49be92ad200fb54d688434cb
size 3696
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:6c1a3d5ee5f493093848b0b5f09e3572bf3cb8a6f79907fcb1b1bd4d690bc634
size 3743
+6 -1
View File
@@ -8,6 +8,9 @@ from common.conversions import Conversions
from common.numpy_fast import clip
from common.params import Params
DIRECTIONS = ('left', 'right', 'straight')
MODIFIABLE_DIRECTIONS = ('left', 'right')
EARTH_MEAN_RADIUS = 6371007.2
SPEED_CONVERSIONS = {
'km/h': Conversions.KPH_TO_MS,
@@ -119,8 +122,10 @@ def coordinate_from_param(param: str, params: Optional[Params] = None) -> Option
def string_to_direction(direction: str) -> str:
for d in ['left', 'right', 'straight']:
for d in DIRECTIONS:
if d in direction:
if 'slight' in direction and d in MODIFIABLE_DIRECTIONS:
return 'slight' + d.capitalize()
return d
return 'none'
+2
View File
@@ -11,6 +11,8 @@ static std::map<cereal::NavInstruction::Direction, QString> DIRECTIONS = {
{cereal::NavInstruction::Direction::LEFT, "left"},
{cereal::NavInstruction::Direction::RIGHT, "right"},
{cereal::NavInstruction::Direction::STRAIGHT, "straight"},
{cereal::NavInstruction::Direction::SLIGHT_LEFT, "slight_left"},
{cereal::NavInstruction::Direction::SLIGHT_RIGHT, "slight_right"},
};
class MapInstructions : public QWidget {