Project

General

Profile

Revision 990

library motor code

when Andrew's memory code is uncommented, uncomment the code in this file

View differences:

branches/simulator/projects/simulator/libsim/motors.c
1 1
#include "motor.h"
2 2
#include "util.h"
3
//#include <robot_shared.h>
3 4

  
5
//extern RobotShared* shared_state;
6

  
4 7
void motors_init(void)
5 8
{
6
	UNIMPLEMENTED
9
  /* not needed in simulator */
7 10
}
8 11

  
9 12
void motor1_set(int direction, int speed)
10 13
{
11
	UNIMPLEMENTED
14
  /*if (direction == FORWARD)
15
    shared_state->motor1 = speed;
16
  else if (direction == BACKWARD)
17
    shared_state->motor1 = -1*speed;*/
12 18
}
13 19

  
14 20
void motor2_set(int direction, int speed)
15 21
{
16
	UNIMPLEMENTED
22
	/*if (direction == FORWARD)
23
    shared_state->motor2 = speed;
24
  else if (direction == BACKWARD)
25
    shared_state->motor2 = -1*speed;*/
17 26
}
18 27

  
19 28
void motors_off(void)
20 29
{
21
	UNIMPLEMENTED
30
  /* not needed in simulator */
22 31
}
23 32

  

Also available in: Unified diff