Skip to content
Snippets Groups Projects
Commit 38756d5c authored by René Paris's avatar René Paris
Browse files

Response to code review


- Bundle `RouteStrategy` together with `Waypoints` into new structure
  `RouteWaypoint`
- Using `std::vector<RouteWaypoint>` in `FollorRouteControlStrategy` for
  enhanced waypoints, allowing to specify a `RouteStrategy` for every
  single waypoint.

Signed-off-by: René Paris's avatarRene Paris <rene.paris@in-tech.com>

**FIXUP THIS COMMIT BEFORE MERGE**
parent 1dd8daa6
No related branches found
No related tags found
1 merge request!52fix(FollowRouteControlStrategy): Add RouteStrategy
/*******************************************************************************
* Copyright (c) 2021, Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
* Copyright (c) 2021-2022 Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
*
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
......@@ -58,6 +58,14 @@ enum class RouteStrategy
kShortest
};
/// @brief Groups a Waypoint with a RouteStrategy
/// for the \ref FollowRouteControlStrategy
struct RouteWaypoint
{
mantle_api::Vec3<units::length::meter_t> waypoint{};
RouteStrategy route_strategy{RouteStrategy::kUndefined};
};
struct ControlStrategy
{
virtual ~ControlStrategy() = default;
......@@ -153,8 +161,7 @@ struct FollowRouteControlStrategy : public ControlStrategy
type = ControlStrategyType::kFollowRoute;
}
std::vector<mantle_api::Vec3<units::length::meter_t>> waypoints;
RouteStrategy route_strategy{RouteStrategy::kUndefined};
std::vector<RouteWaypoint> route_waypoints;
};
enum class Dimension
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment