Project

General

Profile

Statistics
| Revision:

root / branches / simulator / projects / simulator / libsim / motors.c @ 990

History | View | Annotate | Download (589 Bytes)

1 942 bcoltin
#include "motor.h"
2
#include "util.h"
3 990 dsschult
//#include <robot_shared.h>
4 906 bcoltin
5 990 dsschult
//extern RobotShared* shared_state;
6
7 906 bcoltin
void motors_init(void)
8
{
9 990 dsschult
  /* not needed in simulator */
10 906 bcoltin
}
11
12
void motor1_set(int direction, int speed)
13
{
14 990 dsschult
  /*if (direction == FORWARD)
15
    shared_state->motor1 = speed;
16
  else if (direction == BACKWARD)
17
    shared_state->motor1 = -1*speed;*/
18 906 bcoltin
}
19
20
void motor2_set(int direction, int speed)
21
{
22 990 dsschult
        /*if (direction == FORWARD)
23
    shared_state->motor2 = speed;
24
  else if (direction == BACKWARD)
25
    shared_state->motor2 = -1*speed;*/
26 906 bcoltin
}
27
28
void motors_off(void)
29
{
30 990 dsschult
  /* not needed in simulator */
31 906 bcoltin
}