-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathPPMInput.h
More file actions
54 lines (44 loc) · 985 Bytes
/
PPMInput.h
File metadata and controls
54 lines (44 loc) · 985 Bytes
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#pragma once
#include "falconcommon.h"
#define SWITCH_LOW 1250
#define SWITCH_MID 1650
/*
Channel 6: Up distance
Channel 7: Left/Right distance
*/
class PPMInput
{
public:
void init(void);
void ppmInt(void);
uint8_t updateModeSwitch(void);
volatile uint8_t m_val;
volatile unsigned long m_timeNow;
volatile unsigned long m_timeOld;
volatile unsigned int m_ppmIdx;
volatile unsigned int m_pulseLength;
//Switches
uint16_t m_prevModeSwitch;
uint16_t m_inputPPM[RC_CHANNEL_NUM];
uint16_t* m_pModeSwitch;
uint8_t* m_pOpeMode;
/*
uint8_t m_ppmROLL;
uint8_t m_ppmPITCH;
uint8_t m_ppmTHROTTLE;
uint8_t m_ppmMODE;
*/
//8 channels currently
uint16_t m_bPPMthrough;
uint16_t* m_pPPMOut;
uint16_t m_PWMLimLow[RC_CHANNEL_NUM];
uint16_t m_PWMLimHigh[RC_CHANNEL_NUM];
/*TODO
uint16_t m_cAvoidThrLowLim;
uint16_t m_cAvoidThrHighLim;
uint16_t m_cAvoidRollLowLim;
uint16_t m_cAvoidRollHighLim;
uint16_t m_cAvoidPitchLowLim;
uint16_t m_cAvoidPitchHighLim;
*/
};