#include <kern/global.h>
Defines | |
| #define | motor_group_has(group, motor) ((group)&(1<<(motor))) |
| Check if a group contains a motor. | |
Typedefs | |
| typedef uint8_t | MotorGroup |
| MotorGroup. | |
Functions | |
| MotorGroup | motor_group_new (bool m0, bool m1, bool m2, bool m3, bool m4, bool m5) |
| void | motor_group_set_vel (MotorGroup group, int16_t vel) |
| void | motor_group_brake (MotorGroup group) |
| void motor_group_brake | ( | MotorGroup | group | ) |
Brake each motor in a group
| group | group specifying which motors to brake |
| MotorGroup motor_group_new | ( | bool | m0, | |
| bool | m1, | |||
| bool | m2, | |||
| bool | m3, | |||
| bool | m4, | |||
| bool | m5 | |||
| ) |
Create a new motor group and specify which motors are in the group. For example, a group with motors 1,2 and 3:
MotorGroup m123 = motor_group_new(0,1,1,1,0,0);
| void motor_group_set_vel | ( | MotorGroup | group, | |
| int16_t | vel | |||
| ) |
Set the velocity of each motor in the group
| group | group specifying which motors to set | |
| vel | motor velocity |