Rev 1864 | Rev 1964 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1612 | dongfang | 1 | #ifndef _RC_H |
2 | #define _RC_H |
||
3 | |||
4 | #include <inttypes.h> |
||
1960 | - | 5 | #include "configuration.h" |
1612 | dongfang | 6 | |
1775 | - | 7 | // Number of cycles a command must be repeated before commit. |
8 | #define COMMAND_TIMER 200 |
||
9 | |||
1821 | - | 10 | extern void RC_Init(void); |
1612 | dongfang | 11 | // the RC-Signal. todo: Not export any more. |
12 | extern volatile int16_t PPM_in[MAX_CHANNELS]; |
||
1775 | - | 13 | // extern volatile int16_t PPM_diff[MAX_CHANNELS]; // the differentiated RC-Signal. Should that be exported?? |
1821 | - | 14 | extern volatile uint8_t NewPpmData; // 0 indicates a new recieved PPM Frame |
15 | extern volatile int16_t RC_Quality; // rc signal quality indicator (0 to 200) |
||
1612 | dongfang | 16 | |
17 | // defines for lookup staticParams.ChannelAssignment |
||
18 | #define CH_PITCH 0 |
||
19 | #define CH_ROLL 1 |
||
20 | #define CH_THROTTLE 2 |
||
21 | #define CH_YAW 3 |
||
22 | #define CH_POTS 4 |
||
1775 | - | 23 | #define POT_OFFSET 115 |
1612 | dongfang | 24 | |
25 | /* |
||
1821 | - | 26 | int16_t RC_getPitch (void); |
27 | int16_t RC_getYaw (void); |
||
28 | int16_t RC_getRoll (void); |
||
29 | uint16_t RC_getThrottle (void); |
||
30 | uint8_t RC_hasNewRCData (void); |
||
31 | */ |
||
1612 | dongfang | 32 | |
1821 | - | 33 | void RC_update(void); |
34 | int16_t* RC_getPRTY(void); |
||
35 | uint8_t RC_getArgument(void); |
||
36 | uint8_t RC_getCommand(void); |
||
37 | int16_t RC_getVariable(uint8_t varNum); |
||
38 | void RC_calibrate(void); |
||
39 | uint8_t RC_getSignalQuality(void); |
||
40 | uint8_t RC_getLooping(uint8_t looping); |
||
41 | uint8_t RC_testCompassCalState(void); |
||
1612 | dongfang | 42 | #endif //_RC_H |