Closed Vinnl closed 5 years ago
Could be improved
Then maybe add an index.js to abstract that simulator controller link done in:
You can copy this file to simulator/index.js https://github.com/SamsungInternet/color-sensor-js/blob/master/example/index.js
and then adjust ...
I don't see anything about a simulator in that file... Did you mean to link to this, perchance? https://github.com/SamsungInternet/color-sensor-js/blob/master/lib/index.js
try to rebase and squash commits and it should be good
Thanks for the controller skeleton, that helped me to understand what you needed there :)
With "clean style patch" do you mean "squash it all into a single commit"?
Ah, I see. The only errors I get on master
, though, are about throwing literals, the unexpected console.log
I'm still seeing on this branch, and about unimplemented code - the fixes to which are to actually implement it. The only linting error that was there before my changes is the function statement vs. declaration; I can rebase the fix for that?
Ah, I see. The only errors I get on
master
, though, are about throwing literals, the unexpectedconsole.log
I'm still seeing on this branch, and about unimplemented code - the fixes to which are to actually implement it. The only linting error that was there before my changes is the function statement vs. declaration; I can rebase the fix for that?
yea rebase is the way ;) actually many developers miss that awesome feature of git
Alright, I fixed that error with an earlier commit. Couldn't live without rebase :)
Alright, I've added it to /lib/index.js
, but can't test it ("Error: Cannot find module '../build/Release/i2c'").
Ok I tested it seems to work except that it misses the type in constructor it should be 'geolocation' , also console.log are using "log: ..." prefix, I can merge now until you want to squash that upcoming fix. Then I will have release a package to NPM Thanks again for your patience
try:
npm install
node lib
Sorry to bother but also please can you sign your commit like I did
https://stackoverflow.com/questions/1962094/what-is-the-sign-off-feature-in-git-for
They actually were signed, I just hadn't told GitHub about my GPG key yet :) I have now, and prefixed log:
to the log and added the type to the sensor.
Ah good catch, I did not mean to commit that - removed. I've also added the prefix.
And not to worry; it helps that I'm not actually using this package, so I'm not in a hurry ;)
Congratulation ;-)
For anyone inspired in this
I'll leave a couple of suggestions at: https://github.com/rzr/generic-sensors-lite/issues/4
Not sure how useful this is, nor exactly how to check whether this suits requirements, but... I think this is what you were looking for.
Fixes #4.