New module uploaded (keypad) #1310
salarizadi
started this conversation in
Announcements
Replies: 1 comment 7 replies
-
Very nice. That will be useful for other developers. It also looks like you implement debounce, which is important. You might want to mention that in the docs. In reading the implementation, I had a couple of minor observations.
constructor (config, callback) {
if (typeof config !== "object")
return false It is a little unusual to have a return value from a constructor. It would be more conventional to throw an exception with an error message. if (typeof $this.#pins[config.pin] !== "undefined")
$this.#pins[config.pin].close() This can be more concisely written as: |
Beta Was this translation helpful? Give feedback.
7 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
happy New Year ! I'm back with a new module to set up all kinds of matrix keypads, from now on you can easily set up your own matrix keypads
https://github.com/salarizadi/moddable-sdk/tree/main/Modules/keypad
Beta Was this translation helpful? Give feedback.
All reactions