-
Notifications
You must be signed in to change notification settings - Fork 93
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Channel not in init state (IEC-152) #362
Comments
@michaelboeding Can you check if you're calling |
I'm definitely calling these in separate tasks. Do I need to add a mutex to serialize access? I can do that tonight if so. |
yes, a mutex is needed. |
I got this implemented and it seems to be working. Thanks for the quick response! I'm going to go ahead and close this. If I see it again ill reopen |
Well maybe I spoke too soon. I'm still seeing this even with mutexs in place on the refresh and clear methods. W (144550) LED_OBJECT: RMT channel not in init state. Skipping refresh... |
And just as a reference heres my code to create a breath effect. Not sure but maybe this has something to do with it ? void LED::breath(uint16_t hue, uint8_t saturation) {
const uint8_t maxValue = 255; // Maximum brightness level
const uint8_t minValue = 0; // Minimum brightness level
const int period = 2000; // Breathing period in milliseconds (2 seconds)
const TickType_t stepDelay = pdMS_TO_TICKS(20); // Delay for each step
const int steps = period / 20; // Number of steps in one breathing cycle
for (int i = 0; i < steps; i++) {
// Check if the mode has changed during the breathing cycle
if (this->currentMode != LEDMode::CHARGING && this->currentMode != LEDMode::CHARGED && this->currentMode != LEDMode::UNPROVISIONED) {
// Exit the breathing effect if the mode has changed
//if we have the mutex then we can unlock it
return;
}
// Calculate the sine wave value for smooth breathing effect
float sineValue = (std::sin(2.0f * M_PI * i / steps) + 1.0f) / 2.0f;
uint8_t value = minValue + static_cast<uint8_t>(sineValue * (maxValue - minValue));
// Set the LED color with the calculated brightness (value)
this->setPixelColorHSV(hue, saturation, value);
// Delay for the next step
vTaskDelay(stepDelay);
}
}
|
Answers checklist.
Which component are you using? If you choose Other, provide details in More Information.
led_strip
ESP-IDF version.
5.2
Development Kit.
Custom Board
Used Component version.
2.5.4
More Information.
I'm randomly getting the below errors while using the library. They are not consistent and happen at different times during operation.
E (2460) rmt: rmt_tx_enable(717): channel not in init state
E (2460) led_strip_rmt: led_strip_rmt_refresh(72): enable RMT channel failed
The text was updated successfully, but these errors were encountered: