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: mbed DRV88255 TextLCD Ping mbed-rtos
ProximityController.h@24:eeef4009640d, 2016-06-13 (annotated)
- Committer:
- joran
- Date:
- Mon Jun 13 13:41:25 2016 +0000
- Revision:
- 24:eeef4009640d
- Parent:
- 10:fd4670ec0806
Proximity controller calculates ml now, for a small flask.
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| joran | 5:44ce56378b65 | 1 | #ifndef __PROXIMITYCONTROLLER_H__ |
| joran | 5:44ce56378b65 | 2 | #define __PROXIMITYCONTROLLER_H__ |
| joran | 5:44ce56378b65 | 3 | |
| joran | 5:44ce56378b65 | 4 | #include "stdio.h" |
| joran | 5:44ce56378b65 | 5 | #include "Ping.h" |
| joran | 5:44ce56378b65 | 6 | #include "mbed.h" |
| sbouber1 | 10:fd4670ec0806 | 7 | #include "SensorController.h" |
| joran | 5:44ce56378b65 | 8 | |
| sbouber1 | 10:fd4670ec0806 | 9 | class ProximityController : public SensorController { |
| joran | 5:44ce56378b65 | 10 | public: |
| sbouber1 | 10:fd4670ec0806 | 11 | ProximityController(bool threaded, int interval_ms) : SensorController(threaded, interval_ms) {printf("Initiate Proximity Controller\r\n");} |
| sbouber1 | 10:fd4670ec0806 | 12 | |
| sbouber1 | 10:fd4670ec0806 | 13 | virtual void update(); |
| joran | 5:44ce56378b65 | 14 | |
| sbouber1 | 10:fd4670ec0806 | 15 | virtual float getValue(); |
| sbouber1 | 10:fd4670ec0806 | 16 | |
| sbouber1 | 10:fd4670ec0806 | 17 | virtual std::string get_name(); |
| joran | 24:eeef4009640d | 18 | float getDistance(); |
| sbouber1 | 10:fd4670ec0806 | 19 | |
| sbouber1 | 10:fd4670ec0806 | 20 | private: |
| sbouber1 | 10:fd4670ec0806 | 21 | float distance; |
| joran | 24:eeef4009640d | 22 | float volume; |
| joran | 5:44ce56378b65 | 23 | |
| joran | 5:44ce56378b65 | 24 | }; |
| joran | 5:44ce56378b65 | 25 | |
| joran | 5:44ce56378b65 | 26 | |
| joran | 5:44ce56378b65 | 27 | #endif |