added overloaded SetDuty method

This commit is contained in:
Ardi Loot 2022-11-28 21:18:06 +02:00
parent 5247e12ae4
commit e8ea32f577

View File

@ -58,6 +58,10 @@ class PwmOutput {
ledcWrite(channel_, value);
}
void setDuty(const uint8_t duty) {
setDuty(static_cast<float>(duty) / 255.0f);
}
bool isEnabled() const {
return enabled_;
}