/elec/quadcopter

To get this branch, use:
bzr branch http://bzr.ed.am/elec/quadcopter
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
//
// comms.h
//

#ifndef COMMS_H_
#define COMMS_H_


namespace Comms
{
	/**
	 * Setup the Arduino as required.
	 */
	void setup();

	/**
	 * Write channel values.
	 *
	 * @param channel_values array of NUM_CHANNELS values
	 */
	void write_channels( int channels[] );

	/**
	 * Read channel values.  Call often.  If a complete frame is read,
	 * channel_values will contain the data.
	 *
	 * @param channel_values array of NUM_MOTORS values
	 * @returns true if a whole frame was read
	 */
	bool read_channels( int channels[] );
}


#endif //COMMS_H_