Miscellaneous Library, read Encoder etc.
RCin.h@1:c680da75a614, 2019-03-06 (annotated)
- Committer:
- altb
- Date:
- Wed Mar 06 14:19:10 2019 +0000
- Revision:
- 1:c680da75a614
- Parent:
- 0:3312872854c4
dropped Signal
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
altb | 0:3312872854c4 | 1 | #include "LinearCharacteristics.h" |
altb | 0:3312872854c4 | 2 | #include "mbed.h" |
altb | 0:3312872854c4 | 3 | #include "define_constants.h" |
altb | 0:3312872854c4 | 4 | |
altb | 0:3312872854c4 | 5 | class RCin { |
altb | 0:3312872854c4 | 6 | public: |
altb | 0:3312872854c4 | 7 | |
altb | 0:3312872854c4 | 8 | RCin(PinName pin); |
altb | 0:3312872854c4 | 9 | void fall_edge(void); |
altb | 0:3312872854c4 | 10 | void rise_edge(void); |
altb | 0:3312872854c4 | 11 | uint8_t get_flightmode(void); |
altb | 0:3312872854c4 | 12 | bool flightmode_changed; |
altb | 0:3312872854c4 | 13 | |
altb | 0:3312872854c4 | 14 | float PM1[15]; |
altb | 0:3312872854c4 | 15 | LinearCharacteristics CH1_2_PM1; |
altb | 0:3312872854c4 | 16 | LinearCharacteristics CH2_2_PM1; |
altb | 0:3312872854c4 | 17 | LinearCharacteristics CH3_2_PM1; |
altb | 0:3312872854c4 | 18 | LinearCharacteristics CH4_2_PM1; |
altb | 0:3312872854c4 | 19 | |
altb | 0:3312872854c4 | 20 | void map_Channels(void); |
altb | 0:3312872854c4 | 21 | uint16_t pwms[255]; |
altb | 0:3312872854c4 | 22 | uint16_t test_pwms[200][12]; |
altb | 0:3312872854c4 | 23 | uint16_t cou; |
altb | 0:3312872854c4 | 24 | bool isAlive; |
altb | 0:3312872854c4 | 25 | |
altb | 0:3312872854c4 | 26 | private: |
altb | 0:3312872854c4 | 27 | PinName pin; |
altb | 0:3312872854c4 | 28 | InterruptIn pwm1; |
altb | 0:3312872854c4 | 29 | Timer local_ti; |
altb | 0:3312872854c4 | 30 | uint8_t chnr; |
altb | 0:3312872854c4 | 31 | uint8_t old_flightmode; |
altb | 0:3312872854c4 | 32 | void map_pwm_2_PM1(void); |
altb | 0:3312872854c4 | 33 | uint8_t current_flightmode; |
altb | 0:3312872854c4 | 34 | }; |