ajfisher / node-pixel

Library for using addressable LEDs (such as NeoPixels/WS2812) with Firmata and JohnnyFive
MIT License
275 stars 71 forks source link

feat: break down controllers #189

Closed hweeks closed 3 years ago

hweeks commented 3 years ago

this should be reviewed after #188

What Does This Do?

This makes a few key changes:

  1. adds the strips WeakMap to controller init, so that it doesn't need access to the variable as a "global"
  2. stores the strips WeakMap in the controller
  3. breaks the controllers into a folder per @ajfisher suggestion in #186

Why break them apart?

The controllers as a folder of individual pieces make it easier to add more controllers in a readable and contribution forward way.

What else is coming?

There are a few more PRs I will be opening. They complete all of the work that was in #186

ajfisher commented 3 years ago

@hweeks after merging #188 in and rebasing, this is resulting in some conflicts. Worth having a look and resolving - just not sure exactly where you're expecting the individual changes to land in relation to the other PRs so didn't want to blindly resolve them and cause more issues with subsequent changes.

hweeks commented 3 years ago

checking on it now

hweeks commented 3 years ago

@ajfisher fixed!

ajfisher commented 3 years ago

Thanks - going through it now.