Generates reference based on analog input
Dependents: locomotion_pid_action_refactor_EMG
refGen.h@5:7186da6f562f, 2017-10-22 (annotated)
- Committer:
- tvlogman
- Date:
- Sun Oct 22 08:06:37 2017 +0000
- Revision:
- 5:7186da6f562f
- Parent:
- 4:38af2aa14a3f
- Child:
- 6:a8a82cee2705
Discarded the filtering again - it's probably more clear to do that outside the function.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
tvlogman | 0:5c67195a412d | 1 | #ifndef REFGEN_H |
tvlogman | 0:5c67195a412d | 2 | #define REFGEN_H |
tvlogman | 0:5c67195a412d | 3 | |
tvlogman | 0:5c67195a412d | 4 | #include "mbed.h" |
tvlogman | 0:5c67195a412d | 5 | |
tvlogman | 2:35c05e7698f5 | 6 | |
tvlogman | 0:5c67195a412d | 7 | class refGen { |
tvlogman | 0:5c67195a412d | 8 | public: |
tvlogman | 3:43d9f8db93b7 | 9 | refGen(PinName, float); // Constructor sets up the pin to read the reference from |
tvlogman | 4:38af2aa14a3f | 10 | float getReference(); // Gets reference position on specified pin |
tvlogman | 2:35c05e7698f5 | 11 | float maxAngle; |
tvlogman | 2:35c05e7698f5 | 12 | bool r_direction; |
tvlogman | 0:5c67195a412d | 13 | |
tvlogman | 0:5c67195a412d | 14 | private: |
tvlogman | 0:5c67195a412d | 15 | AnalogIn refPin; |
tvlogman | 0:5c67195a412d | 16 | }; |
tvlogman | 0:5c67195a412d | 17 | #endif |