![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
This is the code we showed at Uncraftivism
Blinker.h@2:01115080f6da, 2009-12-14 (annotated)
- Committer:
- jarkman
- Date:
- Mon Dec 14 08:28:21 2009 +0000
- Revision:
- 2:01115080f6da
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
jarkman | 2:01115080f6da | 1 | #pragma once |
jarkman | 2:01115080f6da | 2 | |
jarkman | 2:01115080f6da | 3 | #include "ServoMinder.h" |
jarkman | 2:01115080f6da | 4 | class Blinker |
jarkman | 2:01115080f6da | 5 | { |
jarkman | 2:01115080f6da | 6 | public: |
jarkman | 2:01115080f6da | 7 | Blinker( ServoMinder *servoMinder ); |
jarkman | 2:01115080f6da | 8 | |
jarkman | 2:01115080f6da | 9 | void blink(); |
jarkman | 2:01115080f6da | 10 | void close(); |
jarkman | 2:01115080f6da | 11 | void open(); |
jarkman | 2:01115080f6da | 12 | void setSleepiness( float sleepiness ); |
jarkman | 2:01115080f6da | 13 | void setBoredom( float boredom ); |
jarkman | 2:01115080f6da | 14 | |
jarkman | 2:01115080f6da | 15 | private: |
jarkman | 2:01115080f6da | 16 | |
jarkman | 2:01115080f6da | 17 | |
jarkman | 2:01115080f6da | 18 | ServoMinder *m_servoMinder; |
jarkman | 2:01115080f6da | 19 | |
jarkman | 2:01115080f6da | 20 | float m_boredom; |
jarkman | 2:01115080f6da | 21 | float m_sleepiness; |
jarkman | 2:01115080f6da | 22 | float m_tickTime; |
jarkman | 2:01115080f6da | 23 | Ticker m_ticker; |
jarkman | 2:01115080f6da | 24 | float m_nextMove; |
jarkman | 2:01115080f6da | 25 | |
jarkman | 2:01115080f6da | 26 | float m_blinkTimer; |
jarkman | 2:01115080f6da | 27 | |
jarkman | 2:01115080f6da | 28 | float speedForSleepiness(); |
jarkman | 2:01115080f6da | 29 | float openPosForSleepiness(); |
jarkman | 2:01115080f6da | 30 | |
jarkman | 2:01115080f6da | 31 | void tick(); |
jarkman | 2:01115080f6da | 32 | |
jarkman | 2:01115080f6da | 33 | }; |