Project

General

Profile

Revision 1193

robot can send data to station

View differences:

trunk/code/projects/diagnostic_station/robot/main.c
3 3
#include <xbee.h>
4 4

  
5 5
#include "../common/comm_station_robot.h"
6
#include "../../../lib/include/libdragonfly/encoders.h"
6 7

  
7 8
static void message_set_orbs (int length, uint8_t *data)
8 9
{
......
52 53
	}
53 54
}
54 55

  
56
static void message_send_encoders (int length, uint8_t *data){
57
	int left = encoder_read(LEFT);
58
	int right = encoder_read(RIGHT);
59
	
60
}
61

  
55 62
void station_robot_receive(char type, int source, unsigned char* packet, int length)
56 63
{
57 64
	switch (type)
......
61 68
		case station_robot_set_bom:         message_set_bom         (length, packet); break;
62 69
		case station_robot_set_motors_off:  message_set_motors_off  (length, packet); break;
63 70
		case station_robot_set_motors_time: message_set_motors_time (length, packet); break;
71
		case station_robot_read_encoders:	message_Send_econders	(length, packet); break;
64 72
	}
65 73
}
66 74

  

Also available in: Unified diff