Compare commits
No commits in common. "feat/motor_warmup_mothed_1" and "master" have entirely different histories.
feat/motor
...
master
10
1st.cpp
10
1st.cpp
|
@ -18,19 +18,9 @@ public:
|
||||||
class Motor : public Device {
|
class Motor : public Device {
|
||||||
public:
|
public:
|
||||||
void turnOn() override {
|
void turnOn() override {
|
||||||
if(needsWarmup()) {
|
|
||||||
warmup(); // 預熱馬達
|
|
||||||
}
|
|
||||||
// 啟動馬達
|
// 啟動馬達
|
||||||
}
|
}
|
||||||
void turnOff() override {
|
void turnOff() override {
|
||||||
// 關閉馬達
|
// 關閉馬達
|
||||||
}
|
}
|
||||||
private:
|
|
||||||
bool needsWarmup() {
|
|
||||||
// 判斷馬達是否需要預熱
|
|
||||||
}
|
|
||||||
void warmup() {
|
|
||||||
// 預熱馬達
|
|
||||||
}
|
|
||||||
};
|
};
|
Loading…
Reference in New Issue