diff --git a/servoControl.cpp b/servoControl.cpp index bb8e122..56589bc 100644 --- a/servoControl.cpp +++ b/servoControl.cpp @@ -45,7 +45,7 @@ void servoControl::attach(gpio_num_t pin, unsigned int minuS, unsigned int maxuS _ledcChannel = ledcChannel; _timerResolution = LEDC_TIMER_16_BIT; - ledc_timer_config_t timer_conf; + ledc_timer_config_t timer_conf{}; timer_conf.duty_resolution = _timerResolution; timer_conf.freq_hz = _freqHz; timer_conf.speed_mode = LEDC_HIGH_SPEED_MODE; @@ -53,7 +53,7 @@ void servoControl::attach(gpio_num_t pin, unsigned int minuS, unsigned int maxuS timer_conf.clk_cfg = LEDC_AUTO_CLK; ledc_timer_config(&timer_conf); - ledc_channel_config_t ledc_conf; + ledc_channel_config_t ledc_conf{}; ledc_conf.channel = _ledcChannel; ledc_conf.duty = 0; ledc_conf.gpio_num = (int)pin;