Subversion Repositories FlightCtrl

Rev

Rev 2039 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
1612 dongfang 1
// Or does this simply belong in uart0.h??
2
#ifndef _EXTERNALCONTROL_H
3
#define _EXTERNALCONTROL_H
4
 
5
#include<inttypes.h>
6
 
7
typedef struct {
1821 - 8
        uint8_t digital[2];
9
        uint8_t remoteButtons;
10
        int8_t pitch;
11
        int8_t roll;
12
        int8_t yaw;
13
        uint8_t throttle;
14
        int8_t height;
15
        uint8_t free; // Let's use that for commands now.
16
        uint8_t frame;
17
        uint8_t config; // Let's use that for arguemnts.
18
}__attribute__((packed)) ExternalControl_t;
1612 dongfang 19
 
20
extern ExternalControl_t externalControl;
21
extern uint8_t externalControlActive;
22
 
2048 - 23
void EC_periodicTaskAndPRTY(int16_t* PRTY);
1821 - 24
uint8_t EC_getArgument(void);
25
uint8_t EC_getCommand(void);
26
int16_t EC_getVariable(uint8_t varNum);
27
void EC_calibrate(void);
28
uint8_t EC_getSignalQuality(void);
29
void EC_setNeutral(void);
1612 dongfang 30
 
31
#endif