Project

General

Profile

Revision 2814387f

ID2814387f48599dab8a99852093cc51629a14fb89

Added by Alex Zirbel over 12 years ago

Updated motors code.

Changed the definitions for the set_motors message, which forced a few
implementation changes as well.

Changed "libscout_node" to "node" and "n" to "node" in other packages.

View differences:

scout/libscout/src/libmotors.h
62 62
#define MOTOR_RIGHT_REV MOTOR_FR_REV | MOTOR_BR_REV
63 63
#define MOTOR_LEFT_SPIN MOTOR_LEFT_REV | MOTOR_RIGHT
64 64
#define MOTOR_RIGHT_SPIN MOTOR_LEFT | MOTOR_RIGHT_REV
65

  
65 66
#define MOTOR_PERCENT 'p'
66 67
#define MOTOR_MMS 'm'
67 68
#define MOTOR_CMS 'c'
68 69
#define MOTOR_ABSOLUTE 'a'
70
#define MOTOR_DEFAULT_UNIT MOTOR_PERCENT
69 71

  
70 72
void libmotors_init();
71
int motors_set(int speed, int which);
72
int motors_query(int which);
73
int motors_set(int which, float speed, char units=MOTOR_DEFAULT_UNIT);
74
int motors_set_sides(float speed_l, float speed_r,
75
                     char units=MOTOR_DEFAULT_UNIT);
76
int motors_set_each(int which,
77
                    float speed_fl, float speed_fr,
78
                    float speed_bl, float speed_br,
79
                    char units=MOTOR_DEFAULT_UNIT);
80
void check_which_ok(int which);
81
float motors_query(int which);
73 82

  
74 83
#endif
75 84

  

Also available in: Unified diff