/elec/quadcopter

To get this branch, use:
bzr branch http://bzr.ed.am/elec/quadcopter
16 by Tim Marston
added (unfinished) rc-interface module to src; added arduino.mk
1
//
2
// receiver.h
3
//
4
5
#ifndef RECEIVER_H_
6
#define RECEIVER_H_
7
8
9
namespace Receiver
10
{
11
	/**
12
	 * Setup the Arduino as required.
13
	 */
14
	void setup();
15
	
16
	/**
17
	 * Attempt to read channels.  The call is non-blocking and reutrns true if a
18 by Tim Marston
completed (hopefully) the RC interface software
18
	 * full frame of NUM_CHANNELS has been read.  When this is the case, and not
19
	 * otherwise, the channel_values array will contain NUM_CHANNELS number of
20
	 * channel values in the range 0 to MAX_CHANNEL_VALUE.  At other times the
21
	 * array is used to store values read so far and should not be relied upon.
22
	 * 
23
	 * @param channel_values array to store channel values in
16 by Tim Marston
added (unfinished) rc-interface module to src; added arduino.mk
24
	 * @returns true if a frame has been read
25
	 */
18 by Tim Marston
completed (hopefully) the RC interface software
26
	bool read_channels( int channel_values[] );
16 by Tim Marston
added (unfinished) rc-interface module to src; added arduino.mk
27
}
28
29
30
#endif //RECEIVER_H_