]> rtime.felk.cvut.cz Git - eurobot/public.git/blobdiff - src/robofsm/movehelper.h
robofsm: MoveHelper - make some parameters const
[eurobot/public.git] / src / robofsm / movehelper.h
index 7695309f56da5124a7ec796bee0ceba12ce3cdf8..14ba5a6f913a2f61066680353494a271b74029e9 100644 (file)
@@ -52,12 +52,11 @@ class MoveHelper
 {
        struct Trajectory *t;   
        final_heading fh;
-       move_target_heading mh;
        move_target_heading trans_heading(move_target_heading h);
 public:
        /* Low-level trajectory handling */
-       MoveHelper& trajectory_new(TrajectoryConstraints *tc, bool backward = false);
-       MoveHelper& trajectory_new_backward(TrajectoryConstraints *tc) {
+       MoveHelper& trajectory_new(const TrajectoryConstraints *tc, bool backward = false);
+       MoveHelper& trajectory_new_backward(const TrajectoryConstraints *tc) {
                return trajectory_new(tc, true);
        }
        MoveHelper& add_point_notrans(double x_m, double y_m);
@@ -69,15 +68,15 @@ public:
                add_final_point_notrans(trans_x(x), trans_y(y), trans_heading(heading));
        }
        void send_speed(double left, double right);
-       void goto_notrans(double x, double y, move_target_heading heading, TrajectoryConstraints *tc, bool planning = true);
-       void goto_trans(double x, double y, move_target_heading heading, TrajectoryConstraints *tc) {
+       void goto_notrans(double x, double y, move_target_heading heading, const TrajectoryConstraints *tc, bool planning = true);
+       void goto_trans(double x, double y, move_target_heading heading, const TrajectoryConstraints *tc) {
                goto_notrans(trans_x(x), trans_y(y), trans_heading(heading), tc, true);
        }
-       void moveto_trans(double x, double y, move_target_heading heading, TrajectoryConstraints *tc) {
+       void moveto_trans(double x, double y, move_target_heading heading, const TrajectoryConstraints *tc) {
                goto_notrans(trans_x(x), trans_y(y), trans_heading(heading), tc, false);
        }
-       void move_by(double distance, move_target_heading heading, TrajectoryConstraints *tc);
-       void move_by_trans(double distance, move_target_heading heading, TrajectoryConstraints *tc) {
+       void move_by(double distance, move_target_heading heading, const TrajectoryConstraints *tc);
+       void move_by_trans(double distance, move_target_heading heading, const TrajectoryConstraints *tc) {
                move_by(distance, trans_heading(heading), tc);
        }
        bool get_arrive_from_point(double target_x_m, double target_y_m, move_target_heading heading, double &point_x_m, double &point_y_m);