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@25:169672dbab91, 2016-06-13 (annotated)
- Committer:
- joran
- Date:
- Mon Jun 13 13:49:40 2016 +0000
- Revision:
- 25:169672dbab91
- Parent:
- 10:fd4670ec0806
- Child:
- 27:4f73f754fdc9
proximity to ml
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 | |
| joran | 25:169672dbab91 | 17 | float getDistance(); |
| joran | 25:169672dbab91 | 18 | |
| sbouber1 | 10:fd4670ec0806 | 19 | virtual std::string get_name(); |
| sbouber1 | 10:fd4670ec0806 | 20 | |
| sbouber1 | 10:fd4670ec0806 | 21 | private: |
| sbouber1 | 10:fd4670ec0806 | 22 | float distance; |
| joran | 25:169672dbab91 | 23 | float volumel |
| joran | 5:44ce56378b65 | 24 | }; |
| joran | 5:44ce56378b65 | 25 | |
| joran | 5:44ce56378b65 | 26 | |
| joran | 5:44ce56378b65 | 27 | #endif |