Rev 2124 | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1910 | - | 1 | #ifndef _RC_H |
2 | #define _RC_H |
||
3 | |||
4 | #include <inttypes.h> |
||
2099 | - | 5 | #include "configuration.h" |
1910 | - | 6 | |
7 | extern void RC_Init(void); |
||
8 | // the RC-Signal. todo: Not export any more. |
||
9 | extern volatile int16_t PPM_in[MAX_CHANNELS]; |
||
10 | // extern volatile int16_t PPM_diff[MAX_CHANNELS]; // the differentiated RC-Signal. Should that be exported?? |
||
11 | extern volatile uint8_t NewPpmData; // 0 indicates a new recieved PPM Frame |
||
2099 | - | 12 | extern volatile uint8_t RCQuality; // rc signal quality indicator (0 to 200) |
1910 | - | 13 | |
14 | // defines for lookup staticParams.ChannelAssignment |
||
15 | #define CH_ELEVATOR 0 |
||
2099 | - | 16 | #define CH_AILERONS 1 |
17 | #define CH_THROTTLE 2 |
||
18 | #define CH_RUDDER 3 |
||
2102 | - | 19 | #define CH_MODESWITCH 4 |
1910 | - | 20 | #define CH_POTS 4 |
21 | |||
2124 | - | 22 | // Number of cycles a command must be repeated before commit. |
23 | #define COMMAND_TIMER 200 |
||
24 | #define COMMAND_CHANNEL_HORIZONTAL CH_AILERONS |
||
25 | |||
2099 | - | 26 | // void RC_periodicTask(void); |
2103 | - | 27 | void RC_periodicTaskAndPRYT(int16_t* PRYT); |
1910 | - | 28 | uint8_t RC_getArgument(void); |
29 | uint8_t RC_getCommand(void); |
||
30 | int16_t RC_getVariable(uint8_t varNum); |
||
31 | void RC_calibrate(void); |
||
32 | uint8_t RC_getSignalQuality(void); |
||
2119 | - | 33 | int16_t RC_getZeroThrottle(void); |
2122 | - | 34 | void RC_setZeroTrim(void); |
35 | |||
1910 | - | 36 | #endif //_RC_H |