agsh / onvif

ONVIF node.js implementation
http://agsh.github.io/onvif/
MIT License
692 stars 234 forks source link

Fix documentation #227

Closed rodrigograca31 closed 2 years ago

rodrigograca31 commented 2 years ago

Hi.

Im not sure why there are differences between the code comments and the docs but shouldn't the docs be auto generated from the code comments to avoid this exact problem? 🤔

Thanks.

RogerHardiman commented 2 years ago

Hi In ContinuousMove, the velocity for Pan, Tilt and Zoom are -1 to +1 (it is the speed to turn and the direction to turn in). I see you changed it to be 0 to 1 which I don't think it correct.

RogerHardiman commented 2 years ago

The other changes all look good. Thank you for making the changes.

You are correct that the docs should auto generate. @agsh may know if they used to auto generate once, a long time ago.

agsh commented 2 years ago

Hello, guys! Yes, docs can be generated easily via instruction here: https://github.com/agsh/onvif#documentation Also today I finally rebuilt it with all recent changes: http://agsh.github.io/onvif/ @rodrigograca31 If you fix a liitle bit README.md due to the comment from @RogerHardiman about ContinuousMove, I'll be glad to approve this PR BTW: I'm looking for the node.js jobs with relocation from Russia :smile: My LinkedIn: https://www.linkedin.com/in/laptev/

rodrigograca31 commented 2 years ago

You guys are correct and I will make that change but the JSDocs say otherwise:

https://github.com/agsh/onvif/blob/ad5500087800784ce80356508c4e028a795458b1/lib/ptz.js#L451-L464

Should I fix both then? 🤔

agsh commented 2 years ago

@rodrigograca31 Yep, I think that this is my fault in jsdocs. Roger knows a lot more than I do about the ONVIF specification. Just update the PR to fit the specs in the js code. And I'll immediately merge it and update the autogenerated docs as well.

rodrigograca31 commented 2 years ago

Done.

rodrigograca31 commented 2 years ago

I just noticed now that theres basically 2 docs.

I was reading README.md but theres a branch/pages just for the actual docs: https://agsh.github.io/onvif/

IMHO the stuff on the README.md should be removed and a link to the docs page should be added. otherwise multiple places have to be maintained.

agsh commented 2 years ago

@rodrigograca31 Sorry for the late reply. Thanks a lot! About the docs: There is a link to the jsdocs in the readme here And yes, I also think that I should cut a lot of the readme. I will set myself this task for the future.