@@ -31,6 +31,10 @@ class Navigation : public Service {
3131 struct LocationResponse {
3232 geo_point location;
3333 double compass_heading;
34+
35+ bool operator ==(const LocationResponse& rhs) const {
36+ return compass_heading == rhs.compass_heading && location == rhs.location ;
37+ }
3438 };
3539
3640 struct Properties {
@@ -45,6 +49,11 @@ class Navigation : public Service {
4549 struct Path {
4650 std::string destination_waypoint_id;
4751 std::vector<geo_point> geopoints;
52+
53+ bool operator ==(const Path& rhs) const {
54+ return destination_waypoint_id == rhs.destination_waypoint_id &&
55+ geopoints == rhs.geopoints ;
56+ }
4857 };
4958
5059 API api () const override ;
@@ -53,10 +62,8 @@ class Navigation : public Service {
5362 virtual void set_mode (const Mode mode, const ProtoStruct& extra) = 0;
5463 virtual LocationResponse get_location (const ProtoStruct& extra) = 0;
5564 virtual std::unique_ptr<std::vector<Waypoint>> get_waypoints (const ProtoStruct& extra) = 0;
56- virtual void add_waypoint (const geo_point& location,
57- const ProtoStruct& extra) = 0;
58- virtual void remove_waypoint (const std::string id,
59- const ProtoStruct& extra) = 0;
65+ virtual void add_waypoint (const geo_point& location, const ProtoStruct& extra) = 0;
66+ virtual void remove_waypoint (const std::string id, const ProtoStruct& extra) = 0;
6067 virtual std::unique_ptr<std::vector<geo_geometry>> get_obstacles (const ProtoStruct& extra) = 0;
6168 virtual std::unique_ptr<std::vector<Path>> get_paths (const ProtoStruct& extra) = 0;
6269 virtual Properties get_properties () = 0;
0 commit comments