Project

General

Profile

Revision f325b893

IDf325b8937314ea7e1f7768e4b335be7fce269683

Added by Alex Zirbel over 3 years ago

Added conversions abs_to_rel and rel_to_abs.

Also, added warnings after these conversions in the case that a requested speed has to be cropped.

Tested against a temporary behavior which set the speeds (now removed since it's very easy to write such a test behavior).

View differences:

scout/libscout/src/MotorControl.h
101 101
    private:
102 102
        /** Error if which sets a motor to both forward and backward */
103 103
        void check_which_ok(int which);
104
        int trim_speed(std::string which_str, int speed);
104 105

  
105 106
        float rel_to_abs(float rel_speed, int units);
106 107
        float abs_to_rel(float abs_speed, int units);

Also available in: Unified diff