Revision 1305 trunk/code/projects/diagnostic_station/station/test_motors.c

View differences:

test_motors.c
39 39
// ** Internal functions **
40 40
// ************************
41 41

  
42
#define velocity_steady_delay 400
42
	// One way to do it
43
//	#define vel_inc 10
44
//	#define vel_steps 12
45
//	#define vel_min 140
46
//	#define vel_max 250
47
//	#define velocity_steady_delay 400
43 48

  
49
	// More steps at smaller intervals. We don't need so much delay here.
50
	#define vel_inc 2
51
	#define vel_steps 56
52
	#define vel_min 140
53
	#define vel_max 250
54
	#define velocity_steady_delay 50
55
	
56

  
44 57
static void test_motors_direction_acceleration (uint8_t direction1, uint8_t direction2, uint8_t pwm_start, uint8_t num_steps, int8_t pwm_step, char *acceleration_string)
45 58
{
46 59
	// Allocate space for the data on the stack
......
89 102
	// vel_min is also reached twice, once at the beginning of accelerating and once at the end of decelerating, and
90 103
	// this one is important.
91 104
	
92
	#define vel_inc 10
93
	#define vel_steps 12
94
	#define vel_min 140
95
	#define vel_max 250
96
	
97 105
	test_motors_direction_acceleration (direction1, direction2, vel_min, vel_steps, vel_inc, "increasing");
98 106
	test_motors_direction_acceleration (direction1, direction2, vel_max, vel_steps, -vel_inc, "decreasing");
99 107
}

Also available in: Unified diff