/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
//
// receiver.h
//

#ifndef RECEIVER_H_
#define RECEIVER_H_


namespace Receiver
{
	/**
	 * Setup the Arduino as required.
	 */
	void setup();
	
	/**
	 * Attempt to read channels.  The call is non-blocking and reutrns true if a
	 * full frame of NUM_CHANNELS has been read.  When this is the case, and not
	 * otherwise, the channel_values array will contain NUM_CHANNELS number of
	 * channel values in the range 0 to MAX_CHANNEL_VALUE.  At other times the
	 * array is used to store values read so far and should not be relied upon.
	 * 
	 * @param channel_values array to store channel values in
	 * @returns true if a frame has been read
	 */
	bool read_channels( int channel_values[] );
}


#endif //RECEIVER_H_