Colour sensors calibrated
Dependencies: mbed-rtos mbed Servo QEI
Fork of ICRSEurobot13 by
Diff: Actuators/Actuator.h
- Revision:
- 2:45da48fab346
- Child:
- 4:1be0f6c6ceae
diff -r 8119211eae14 -r 45da48fab346 Actuators/Actuator.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Actuators/Actuator.h Fri Mar 29 20:09:21 2013 +0000 @@ -0,0 +1,41 @@ +#ifndef __Actuator_h__ +#define __Actuator_h__ +// Eurobot13 Actuator.h + +#include "mbed.h" + +class Actuator { + private: + static Actuator *Head; + Actuator *next; + + public: + Actuator(){ + next = NULL; + if (Head == NULL){ + Head = this; + } else { + Actuator* nxt = Head; + for(;nxt->next != NULL; nxt = nxt->next); + nxt->next = this; + } + } + + virtual void halt (void) = 0; + + static void haltandCatchFire(void){ + //halt + for(Actuator* nxt = Head; nxt != NULL; nxt = nxt->next){ + nxt->halt(); + } + DigitalOut myled(LED1); + myled = 1; + + //catchFire + while(true); + } + + +}; + +#endif \ No newline at end of file