added overloaded SetDuty method
This commit is contained in:
parent
5247e12ae4
commit
e8ea32f577
@ -58,6 +58,10 @@ class PwmOutput {
|
|||||||
ledcWrite(channel_, value);
|
ledcWrite(channel_, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void setDuty(const uint8_t duty) {
|
||||||
|
setDuty(static_cast<float>(duty) / 255.0f);
|
||||||
|
}
|
||||||
|
|
||||||
bool isEnabled() const {
|
bool isEnabled() const {
|
||||||
return enabled_;
|
return enabled_;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user