yotaro morizumi
/
zoomy_customLibrary
my new gear...
nap.hpp@0:1456b6f84c75, 2022-02-25 (annotated)
- Committer:
- yootee
- Date:
- Fri Feb 25 05:20:11 2022 +0000
- Revision:
- 0:1456b6f84c75
my_custom
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 | 0:1456b6f84c75 | 14 | float now_time; |
yootee | 0:1456b6f84c75 | 15 | float prev_time; |
yootee | 0:1456b6f84c75 | 16 | }; |