-
-
Notifications
You must be signed in to change notification settings - Fork 5
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
3.4.0: Added support for the ancient Launchpad MK1 #9
Conversation
Thank you! I was unable to find a second hand mk1 myself hence I was unable to add it |
My pleasure! Don't buy one though hehe, mine unfortunately hasn't held up quite that well over the past 13 years with some half working buttons and flickering LEDs. |
Another note: I incorrectly assumed RGB values for other LP models were in range I didn't implement this behavior yet (MK1 only supports Scaling would allow continuity along newer models but it could also mask the limitations of MK1... I'm curious about your view on this. EDIT: On second thought, I will add scaling because it does make it a lot easier in case you need to switch between models and improve the docs a little about the limitations. (: |
Keeping the API consistent indeed sounds like the best solution here |
Limitations for MK1:
Result: MK1 is "backwards compatible", replacing a MK1+ device with MK1 won't cause compilation issues, though I think this is the most compatibility we can reasonably get :) |
Hi, thanks for developing and providing this package!
I added support for the prehistoric legacy Launchpad. It has some limitations as expected (which are described in the README) but it should work fine with the API you set out.
Changes made shouldn't affect the API that was already in place, except for one:
I added a TS generic argument to
autoDetect()
to be able to easily modify the expected return type of the method in case you already know the type of Launchpad that is returned.Example usage:
This should be fully backwards compatible though as it will return
ILaunchpad
by default.It might have been better to actually restrict the kind of result that is returned by
autoDetect()
in order to properly detect the right Launchpad instance to return but I think in most cases the generic argument should be sufficient.Additionally, for MK1 I added
LaunchpadMK1.BUTTONS
(of new typeButtonLayout
) to easily iterate through available buttons which might be useful for newer models too.I tested these changes for MK1 only as I don't have access to other models. Please let me know if you need anything :)