Skip to content
Snippets Groups Projects
Commit 224ac85c authored by fxk8y's avatar fxk8y :spider:
Browse files

Merge branch 'master' of git.services.c3pb.de:fxk8y/CyanLight

parents dc3ea787 6f15877d
No related branches found
No related tags found
No related merge requests found
......@@ -36,13 +36,12 @@ CyanLight::Controller::Controller(uint16_t baseChannel, uint8_t channelsConfigur
this->channels = new CyanLight::PWMChannel*[this->channelsConfigured];
this->timer_cfg.duty_resolution = (ledc_timer_bit_t)this->resolution;
this->timer_cfg.freq_hz = this->frequency;
this->timer_cfg.speed_mode = LEDC_HIGH_SPEED_MODE;
this->timer_cfg.timer_num = LEDC_TIMER_0;
// Required for newer esp-idf:
//ledc_timer.clk_cfg = LEDC_AUTO_CLK, // Auto select the source clock
this->timer_cfg.freq_hz = this->frequency;
this->timer_cfg.speed_mode = LEDC_HIGH_SPEED_MODE;
this->timer_cfg.timer_num = LEDC_TIMER_0;
this->ledc_timer.clk_cfg = LEDC_AUTO_CLK;
ledc_timer_config(&this->timer_cfg);
ledc_fade_func_install(0);
......
......@@ -26,6 +26,8 @@ CyanLight::PWMChannel::PWMChannel(uint8_t channel, uint8_t gpio) : channel{(ledc
ledc_channel.speed_mode = LEDC_HIGH_SPEED_MODE;
ledc_channel.hpoint = 0;
ledc_channel.timer_sel = LEDC_TIMER_0;
ledc_channel.intr_type = LEDC_INTR_DISABLE;
ledc_channel_config(&ledc_channel);
......
source diff could not be displayed: it is too large. Options to address this: view the blob.
......@@ -17,12 +17,12 @@ static bool timerConfigured = false;
static void configureTimer() {
if (!timerConfigured) {
ledc_timer_config_t ledc_timer;
ledc_timer.duty_resolution = LEDC_TIMER_10_BIT, // resolution of PWM duty
ledc_timer.freq_hz = 1000, // frequency of PWM signal; 2KHz is max for CN5711
ledc_timer.speed_mode = LEDC_HIGH_SPEED_MODE, // timer mode
ledc_timer.timer_num = LEDC_TIMER_0, // timer index
// Required for newer esp-idf:
//ledc_timer.clk_cfg = LEDC_AUTO_CLK, // Auto select the source clock
ledc_timer.duty_resolution = LEDC_TIMER_10_BIT; // resolution of PWM duty
ledc_timer.freq_hz = 1000; // frequency of PWM signal
ledc_timer.speed_mode = LEDC_HIGH_SPEED_MODE; // timer mode
ledc_timer.timer_num = LEDC_TIMER_0; // timer index
ledc_timer.clk_cfg = LEDC_AUTO_CLK; // Auto select the source clock
ledc_timer_config(&ledc_timer);
ledc_fade_func_install(0);
......@@ -55,6 +55,8 @@ FastDimmer::FastDimmer(uint8_t gpio) {
ledc_channel.speed_mode = LEDC_HIGH_SPEED_MODE;
ledc_channel.hpoint = 0;
ledc_channel.timer_sel = LEDC_TIMER_0;
ledc_channel.intr_type = LEDC_INTR_DISABLE;
ledc_channel_config(&ledc_channel);
......
......@@ -7,8 +7,8 @@ import random
from socket import *
fps = 4
pixels = 24
fps = 3
pixels = 50
port = 4213
randomizeBrightness = False
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment