Project

General

Profile

Revision 1251

View differences:

test_motors.c
2 2
#include "global.h"
3 3

  
4 4
#include "comm_robot.h"
5
#include "hardware_encoders.h"
5
#include "hardware_dynamo.h"
6 6

  
7 7

  
8 8
// ******************
......
58 58

  
59 59
		data_pwm[i]=pwm;
60 60

  
61
		// Reset the encoders, wait some time, then read the encoders.
62
		// Nothing else should go between encoders_reset and encoders_read.
61
		// Reset the dynamos, wait some time, then read the dynamos.
62
		// Nothing else should go between dynamos_reset and dynamos_read.
63 63
		// Note that we are currently using busy waiting which will be totally wrong if there are any interrupts.
64
		encoders_reset ();
64
		dynamos_reset ();
65 65
		delay_ms (500);
66
		encoders_read (&(data_velocity_l[i]), &(data_velocity_r[i]));
66
		dynamos_read (&(data_velocity_l[i]), &(data_velocity_r[i]));
67 67
		
68
		// Velocity readings are encoder ticks per second.
68
		// Velocity readings are dynamo ticks per second.
69 69
		data_velocity_l[i]*=2;
70 70
		data_velocity_r[i]*=2;
71 71
	

Also available in: Unified diff