Closed bergera closed 7 years ago
Awesome! If you have more, keep them coming. Thanks!
I made a few cosmetic changes and published the new version (0.5.7) on npmjs.com. Thanks again!
I'm thinking the setTemperatureChangeTrigger()
method would probably be better named setTemperatureChangeThreshold()
, setTemperatureThreshold()
or, given that it's a temperature sensor, simply setThreshold()
What do you think?
TemperatureChangeTrigger
is defined in http://www.phidgets.com/docs/1048_User_Guide#API as well as the C header files for libphidget21, while the keyword expected as input and given as output from the Web service is just Trigger
, and in the Phidget Control Panel GUI the label is "Sensitivity".
My feeling personally is that it should be as close to the "official" documentation as possible (that is, left as setTemperatureChangeTrigger
), even when that documentation isn't consistent. But with all those differing names, it could be whatever you think is most appropriate and it wouldn't be without precedent ;).
Yeah... their API and documentation is not the most consistent. For me, trigger, sensitivity and threshold are 3 different things but I guess we can stick to setTemperatureChangeTrigger
all things considered.
I think the README could be reorganized to more directly point potential users to the generated API docs, which are pretty clear on the intention of the methods. And it's a pretty simple class, with only two methods and three events.
And yeah, threshold would be my preferred terminology in a perfect world, too.
Sure. What do you have in mind regarding the README?
The repo's README is mostly directed at the PhidgetInterfaceKit
, with the other devices briefly mentioned at the end. I had already written most of the PhidgetTemperatureSensor
code before I realized there was link at the bottom to the online docs.
I would move any detailed device-specific examples into the inline YUIDoc blocks for each device, and add links for each device directly to the API doc page.
I can take a swing at it tomorrow if you'd like.
Oh really? I never realized I had burrowed the API doc so deep. If you'd like to take a swing at it, that would be great!
Sure, I'll try to have something worked out this week.
For that matter, the API docs provided within the repo under docs/
seem to be pretty out of date.
You're so right about the docs folder. Something was broken in the Gruntfile. I fixed it.
I've successfully tested this with a 1048_0 - PhidgetTemperatureSensor 4-input.
I did my best to follow the existing style (which is nice and clean, thanks for that), let me know if there's anything I can change.