can't push chnages :(
Dependencies: PinDetect TextLCD mbed
Fork of FBRDash by
inc/LEDS.h@1:b3907b8d9f65, 2012-06-25 (annotated)
- Committer:
- intrinseca
- Date:
- Mon Jun 25 21:01:02 2012 +0000
- Revision:
- 1:b3907b8d9f65
- Child:
- 2:825f572902c6
Prototype before adding full CAN comms
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
intrinseca | 1:b3907b8d9f65 | 1 | #ifndef FBRDASH_LEDS_H |
intrinseca | 1:b3907b8d9f65 | 2 | #define FBRDASH_LEDS_H |
intrinseca | 1:b3907b8d9f65 | 3 | |
intrinseca | 1:b3907b8d9f65 | 4 | #include "mbed.h" |
intrinseca | 1:b3907b8d9f65 | 5 | |
intrinseca | 1:b3907b8d9f65 | 6 | class LEDS |
intrinseca | 1:b3907b8d9f65 | 7 | { |
intrinseca | 1:b3907b8d9f65 | 8 | public: |
intrinseca | 1:b3907b8d9f65 | 9 | LEDS(PwmOut _pins[]); |
intrinseca | 1:b3907b8d9f65 | 10 | void refresh(float rpm); |
intrinseca | 1:b3907b8d9f65 | 11 | |
intrinseca | 1:b3907b8d9f65 | 12 | static const int NUM_LEDS = 6; |
intrinseca | 1:b3907b8d9f65 | 13 | |
intrinseca | 1:b3907b8d9f65 | 14 | private: |
intrinseca | 1:b3907b8d9f65 | 15 | PwmOut* pins; |
intrinseca | 1:b3907b8d9f65 | 16 | |
intrinseca | 1:b3907b8d9f65 | 17 | static const int LIMIT = 18000.0; |
intrinseca | 1:b3907b8d9f65 | 18 | static const int RESOLUTION = LIMIT / NUM_LEDS; |
intrinseca | 1:b3907b8d9f65 | 19 | |
intrinseca | 1:b3907b8d9f65 | 20 | }; |
intrinseca | 1:b3907b8d9f65 | 21 | |
intrinseca | 1:b3907b8d9f65 | 22 | #endif |