This commit is contained in:
Guillermo Ruffino
2020-05-24 23:27:28 -03:00
parent a62b6548d2
commit 1bec1faf6d
42 changed files with 151 additions and 176 deletions
+4 -2
View File
@@ -65,8 +65,9 @@ template<typename... Ts> class ServoWriteAction : public Action<Ts...> {
ServoWriteAction(Servo *servo) : servo_(servo) {}
TEMPLATABLE_VALUE(float, value)
void play(Ts... x) override { this->servo_->write(this->value_.value(x...)); }
protected:
void play_(Ts... x) override { this->servo_->write(this->value_.value(x...)); }
Servo *servo_;
};
@@ -74,8 +75,9 @@ template<typename... Ts> class ServoDetachAction : public Action<Ts...> {
public:
ServoDetachAction(Servo *servo) : servo_(servo) {}
void play(Ts... x) override { this->servo_->detach(); }
protected:
void play_(Ts... x) override { this->servo_->detach(); }
Servo *servo_;
};