-
Notifications
You must be signed in to change notification settings - Fork 0
shifter.h
Lukáš Dršman edited this page May 14, 2022
·
1 revision
Contains functions for shifting.
The struct type for shifter is defined as
typedef struct Shifter
{
motor smotor, dmotor;
}
shifter;
consisting of a shifter motor (smotor
) and a driver motor (dmotor
).
The constructor for shifter
is defined as
shifter shifterNew(char sport, char dport);
where sport
is the port to which the shifter motor is connected and where dport
is the port to which the driver motor is connected.
If a setup, where the shifter motor is connected to port B and the driver motor to port C, is used, then the corresponding shifter
would be constructed using
shifter foo;
foo = shifterNew('B', 'C');
void shifterShift(shifter s, int id);
- shifts to a module at angle
id * SHIFTER_OFFSET
- for a shifter with an offset of 90°, the possible values for
id
are0
,1
,2
and3
- Parameters:
-
shifter s
- shifter object -
int id
- module locator
-