Update servo pause function in PwmPin.cpp
This commit is contained in:
parent
22c7d32186
commit
8c67b28f6d
|
|
@ -264,6 +264,17 @@ void ServoPin::set(double degrees){
|
|||
ledc_channel_config(channel);
|
||||
}
|
||||
|
||||
///////////////////
|
||||
|
||||
void ServoPin::pause(boolean pauseState){
|
||||
|
||||
if(!channel)
|
||||
return;
|
||||
|
||||
channel->duty=pauseState?(1<<timer->duty_resolution):0;
|
||||
ledc_channel_config(channel);
|
||||
}
|
||||
|
||||
////////////////////////////
|
||||
|
||||
ledc_channel_config_t *LedC::channelList[LEDC_CHANNEL_MAX][LEDC_SPEED_MODE_MAX]={};
|
||||
|
|
|
|||
Loading…
Reference in New Issue