![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
my new gear...
control_theory/nap.hpp@6:e7f2335456c8, 2022-04-09 (annotated)
- Committer:
- yootee
- Date:
- Sat Apr 09 03:20:19 2022 +0000
- Revision:
- 6:e7f2335456c8
- Parent:
- 3:a9b4b2565a23
highwaystar
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
yootee | 0:1456b6f84c75 | 1 | #pragma once |
yootee | 0:1456b6f84c75 | 2 | #include <mbed.h> |
yootee | 0:1456b6f84c75 | 3 | |
yootee | 0:1456b6f84c75 | 4 | class NAP |
yootee | 0:1456b6f84c75 | 5 | { |
yootee | 0:1456b6f84c75 | 6 | public: |
yootee | 0:1456b6f84c75 | 7 | NAP(float nap_time); |
yootee | 0:1456b6f84c75 | 8 | void take_a_nap(); |
yootee | 0:1456b6f84c75 | 9 | void setNaptime(float nap_time); |
yootee | 0:1456b6f84c75 | 10 | void restart(); |
yootee | 0:1456b6f84c75 | 11 | Timer nap; |
yootee | 0:1456b6f84c75 | 12 | private: |
yootee | 0:1456b6f84c75 | 13 | float nap_time_; |
yootee | 6:e7f2335456c8 | 14 | int now_time; |
yootee | 6:e7f2335456c8 | 15 | int prev_time; |
yootee | 0:1456b6f84c75 | 16 | }; |