Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: USBDevice mbed-rtos mbed
Fork of JoyStick by
AnalogFilterInterface.h@5:a0bb17c379ce, 2016-06-22 (annotated)
- Committer:
- rvt
- Date:
- Wed Jun 22 12:50:16 2016 +0000
- Revision:
- 5:a0bb17c379ce
- Parent:
- 1:5b2ab44eb31f
Latest
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| rvt | 0:33bc88c4ab31 | 1 | #ifndef ANALOGFILTERINTERFACE_H |
| rvt | 0:33bc88c4ab31 | 2 | #define ANALOGFILTERINTERFACE_H |
| rvt | 0:33bc88c4ab31 | 3 | |
| rvt | 1:5b2ab44eb31f | 4 | /** |
| rvt | 1:5b2ab44eb31f | 5 | Analog filter Interface |
| rvt | 1:5b2ab44eb31f | 6 | This is the base class if you want to create your own filters and beable to chain them within analog inputs. |
| rvt | 1:5b2ab44eb31f | 7 | */ |
| rvt | 0:33bc88c4ab31 | 8 | class AnalogFilterInterface |
| rvt | 0:33bc88c4ab31 | 9 | { |
| rvt | 0:33bc88c4ab31 | 10 | private: |
| rvt | 0:33bc88c4ab31 | 11 | AnalogFilterInterface *_chain; |
| rvt | 0:33bc88c4ab31 | 12 | long _data; |
| rvt | 0:33bc88c4ab31 | 13 | public: |
| rvt | 0:33bc88c4ab31 | 14 | AnalogFilterInterface(AnalogFilterInterface *chain); |
| rvt | 0:33bc88c4ab31 | 15 | AnalogFilterInterface(); |
| rvt | 1:5b2ab44eb31f | 16 | |
| rvt | 1:5b2ab44eb31f | 17 | // Set a datapoint |
| rvt | 0:33bc88c4ab31 | 18 | virtual void setData(long data); |
| rvt | 1:5b2ab44eb31f | 19 | |
| rvt | 1:5b2ab44eb31f | 20 | // Get the filtered datapoint |
| rvt | 5:a0bb17c379ce | 21 | virtual long getData() const; |
| rvt | 1:5b2ab44eb31f | 22 | |
| rvt | 1:5b2ab44eb31f | 23 | // Get the chained filter |
| rvt | 0:33bc88c4ab31 | 24 | virtual AnalogFilterInterface * getChain(){return _chain;}; |
| rvt | 0:33bc88c4ab31 | 25 | }; |
| rvt | 0:33bc88c4ab31 | 26 | |
| rvt | 0:33bc88c4ab31 | 27 | #endif |
| rvt | 0:33bc88c4ab31 | 28 | |
| rvt | 0:33bc88c4ab31 | 29 | |
| rvt | 0:33bc88c4ab31 | 30 |
