fix. roadlimitspeed
fix.. navInstruction speedLimit
This commit is contained in:
parent
d770b4f578
commit
3687f7a012
@ -847,6 +847,7 @@ class CarrotServ:
|
||||
self.params_memory = Params("/dev/shm/params")
|
||||
|
||||
self.nRoadLimitSpeed = 30
|
||||
self.nRoadLimitSpeed_counter = 0
|
||||
|
||||
self.active_carrot = 0 ## 1: CarrotMan Active, 2: sdi active , 3: speed decel active, 4: section active, 5: bump active, 6: speed limit active
|
||||
self.active_count = 0
|
||||
@ -1746,7 +1747,13 @@ class CarrotServ:
|
||||
nRoadLimitSpeed = 30
|
||||
else:
|
||||
nRoadLimitSpeed = 30
|
||||
self.nRoadLimitSpeed = nRoadLimitSpeed
|
||||
#self.nRoadLimitSpeed = nRoadLimitSpeed
|
||||
if self.nRoadLimitSpeed != nRoadLimitSpeed:
|
||||
self.nRoadLimitSpeed_counter += 1
|
||||
if self.nRoadLimitSpeed_counter > 5:
|
||||
self.nRoadLimitSpeed = nRoadLimitSpeed
|
||||
else:
|
||||
self.nRoadLimitSpeed_counter = 0
|
||||
|
||||
### SDI
|
||||
self.nSdiType = int(json.get("nSdiType", -1))
|
||||
|
@ -298,6 +298,8 @@ class RouteEngine:
|
||||
|
||||
if ('maxspeed' in closest.annotations) and self.localizer_valid:
|
||||
msg.navInstruction.speedLimit = closest.annotations['maxspeed']
|
||||
print(closest.annotations)
|
||||
|
||||
|
||||
# Speed limit sign type
|
||||
if 'speedLimitSign' in step:
|
||||
|
@ -1155,7 +1155,7 @@ public:
|
||||
const auto nav_inst = sm["navInstruction"].getNavInstruction();
|
||||
xTurnInfo = 0;
|
||||
xDistToTurn = nav_inst.getManeuverDistance();
|
||||
nRoadLimitSpeed = nav_inst.getSpeedLimit();
|
||||
nRoadLimitSpeed = nav_inst.getSpeedLimit() * 3.6;
|
||||
QString maneuverType = QString::fromStdString(nav_inst.getManeuverType());
|
||||
QString manuverModifier = QString::fromStdString(nav_inst.getManeuverModifier());
|
||||
if (maneuverType == "turn") {
|
||||
|
Loading…
x
Reference in New Issue
Block a user