Browse Source

fix interfering channels

main
Hendrik Langer 7 years ago
parent
commit
67b2842f1b
  1. 4
      software/platformio.ini
  2. 2
      software/src/led.cpp
  3. 2
      software/src/pusher.cpp

4
software/platformio.ini

@ -22,8 +22,8 @@ lib_deps =
; AsyncTCP ; AsyncTCP
FS FS
; FastLED ; FastLED
; https://github.com/samguyer/FastLED.git https://github.com/samguyer/FastLED.git
https://github.com/h3ndrik/FastLED.git ; https://github.com/h3ndrik/FastLED.git
; AsyncMqttClient ; AsyncMqttClient
https://github.com/marvinroger/async-mqtt-client.git https://github.com/marvinroger/async-mqtt-client.git
ArduinoJson ArduinoJson

2
software/src/led.cpp

@ -80,7 +80,7 @@ void Led::setup(void) {
xTaskCreate( xTaskCreate(
&cTaskWrapper, /* Task function. */ &cTaskWrapper, /* Task function. */
"ledAnimationTask", /* String with name of task. */ "ledAnimationTask", /* String with name of task. */
2048, /* Stack size in words. */ 1024, /* Stack size in words. */
this, /* Parameter passed as input of the task */ this, /* Parameter passed as input of the task */
tskIDLE_PRIORITY+3, /* Priority of the task. */ tskIDLE_PRIORITY+3, /* Priority of the task. */
&ledTaskHandle); /* Task handle. */ &ledTaskHandle); /* Task handle. */

2
software/src/pusher.cpp

@ -13,7 +13,7 @@ Pusher::Pusher(void) {
} }
void Pusher::setup(void) { void Pusher::setup(void) {
int channel = LEDC_TIMER_0; int channel = 13; // LEDC_CHANNEL_3 // beware: some channels interfere with the rmt peripheral used by FastLED
ledcSetup(channel, 50, TIMER_WIDTH); ledcSetup(channel, 50, TIMER_WIDTH);
for(int pin : SERVO_PINS) { for(int pin : SERVO_PINS) {
if (xSemaphoreTake(xSemaphore, TIMEOUT) == pdTRUE) { if (xSemaphoreTake(xSemaphore, TIMEOUT) == pdTRUE) {

Loading…
Cancel
Save