Skip to content

Not necessarily an issue, but feedback #1

@Lucas-Bruder

Description

@Lucas-Bruder

Hey, looking @ your code right now.

If you want to delete the start_rainbow task, you're going to need to declare the led_strip outside of it and pass it to the task as an argument. I haven't really looked at any of the code logic, but if you want to dynamically create and delete the start_rainbow task without running into errors, I would do the following:

  1. Declare the LED strip in the http_server code. Take care of initialization in there.
  2. When you want to run the start_rainbow task, pass the pointer to the led strip to the start_rainbow task.

Then you should be able to dynamically delete the start_rainbow task without affecting the functionality of the LED strip.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions