![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
Colour sensors calibrated
Dependencies: mbed-rtos mbed Servo QEI
Fork of ICRSEurobot13 by
Others/EmergencyStop/EmergencyStop.h@3:717de74f6ebd, 2013-04-01 (annotated)
- Committer:
- twighk
- Date:
- Mon Apr 01 15:33:48 2013 +0000
- Revision:
- 3:717de74f6ebd
- Parent:
- 2:45da48fab346
Colour sensor, red SnR too Low
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
twighk | 2:45da48fab346 | 1 | |
twighk | 2:45da48fab346 | 2 | // Eurobot13 EmergencyStop.h |
twighk | 2:45da48fab346 | 3 | |
twighk | 2:45da48fab346 | 4 | #include "mbed.h" |
twighk | 2:45da48fab346 | 5 | #include "Actuators/Actuator.h" |
twighk | 2:45da48fab346 | 6 | |
twighk | 2:45da48fab346 | 7 | class EmergencyStop : public InterruptIn{ |
twighk | 2:45da48fab346 | 8 | private: |
twighk | 2:45da48fab346 | 9 | public: |
twighk | 3:717de74f6ebd | 10 | EmergencyStop ( PinName interuptPin |
twighk | 2:45da48fab346 | 11 | , void (*risefunction)(void) = Actuator::haltandCatchFire |
twighk | 2:45da48fab346 | 12 | , void (*fallfunction)(void) = Actuator::haltandCatchFire |
twighk | 2:45da48fab346 | 13 | ) |
twighk | 3:717de74f6ebd | 14 | : InterruptIn(interuptPin) |
twighk | 2:45da48fab346 | 15 | { |
twighk | 2:45da48fab346 | 16 | if (risefunction != NULL){ |
twighk | 2:45da48fab346 | 17 | rise(risefunction); |
twighk | 2:45da48fab346 | 18 | } |
twighk | 2:45da48fab346 | 19 | |
twighk | 2:45da48fab346 | 20 | if (fallfunction != NULL){ |
twighk | 2:45da48fab346 | 21 | fall(fallfunction); |
twighk | 2:45da48fab346 | 22 | } |
twighk | 2:45da48fab346 | 23 | } |
twighk | 2:45da48fab346 | 24 | }; |