Mercurial > louis > mq > lightsd
changeset 399:c8da8c535829
wip
author | Louis Opter <kalessin@kalessin.fr> |
---|---|
date | Sun, 27 Dec 2015 14:36:12 +0100 |
parents | b290ad1e2b30 |
children | da42466a7c5e |
files | docs_improvements.patch |
diffstat | 1 files changed, 35 insertions(+), 20 deletions(-) [+] |
line wrap: on
line diff
--- a/docs_improvements.patch Sun Dec 27 12:59:23 2015 +0100 +++ b/docs_improvements.patch Sun Dec 27 14:36:12 2015 +0100 @@ -6,14 +6,14 @@ new file mode 100644 --- /dev/null +++ b/CONTRIBUTING.rst -@@ -0,0 +1,190 @@ +@@ -0,0 +1,192 @@ +Contributing to lightsd +======================= + -+lightsd is open-source_ software licensed under the GPLv3_ (see -+gplv3_rationale_). This basically means that you can use lightsd free of charge, -+as you see fit, for an unlimited amount of time, no ads, no evaluation period, -+no activation key. ++lightsd is open-source_ software licensed under the GPLv3_ (see `Rationale for ++the GPLv3`_). This basically means that you can use lightsd free of charge, as ++you see fit, for an unlimited amount of time, no ads, no evaluation period, no ++activation key. + +Likewise, you can also download and consult the entire source code of lightsd. +Finally, you are welcome to modify lightsd but the GPLv3 forces you to make @@ -57,10 +57,10 @@ + +- being able to work as a proxy makes lightsd easy to extend to other IoT + protocols. It also allows network isolation; -+- being as real time as possible will, I hope, pave the way for new kind of ++- being as real time as possible will –I hope– pave the way for new kind of + usages. For example lightsd is currently is used to pair LIFX bulbs with -+ motion sensors, such system requires low latency [latency]_. Integrations with -+ video games also come to mind and may require low latency. ++ motion sensors, such system requires low latency [#]_. Integrations with ++ video games also come to mind and may require low latency [#]_. + +lightsd took the bold choice of being implemented in pure C. C simply is the +most portable language both from a tool-chain perspective but also from a @@ -78,9 +78,11 @@ +that and inspire the user to learn more. Using lightsd has to be a rewarding +experience. + -+.. [latency] When motion is detected you want to turn the lights immediatly not -+ in 100 or more milliseconds. ++.. [#] When motion is detected you want to turn the lights immediatly not in 100 ++ or more milliseconds. ++.. [#] This is actually `already happening`_. + ++.. _already happening: https://community.lifx.com/t/lightsd-a-daemon-with-a-json-rpc-api-to-control-your-bulbs/446/41 +.. _LIFX LAN protocol: http://lan.developer.lifx.com/ + +Non-goals @@ -108,7 +110,7 @@ +Submitting contributions +------------------------ + -+Submitting a contribution is pretty much like a reporting a bug. At this point, ++Submitting a contribution is pretty much like reporting a bug. At this point, +I'll deal with pretty much any non f'ed-up format. What really matters to me is +the content: make sure your understand how the project is governed and what the +goals are. @@ -148,18 +150,17 @@ +on. Currently supported systems are: Linux, BSD and Darwin (Mac OS X), new +features must work on all three of them. + -+New code must be unit-tested, CMake is used as a test runner. ++New code must be unit-tested, CMake is also used as a test runner. + +lightsd coding style is: + ++- overall mostly `K&R`_/1TBS_; +- tabs are 4 spaces; +- C++ style comments; +- 80 columns max (kinda flexible in the headers); -+- braces are mandatory around any conditional (rationale: see previous SSL -+ vulnerabilities, also Go's style); +- don't use typedef (rationale: reduces readability, typedefs in C are really -+ only useful on integers for things like ``pid_t``, where an int isn't the -+ right semantic or for fixed-width integers); ++ only useful on integers for things like ``pid_t`` where an int isn't the right ++ semantic or for fixed-width integers); +- no includes in the headers (rationale: avoid fucked-up circular dependencies + scenarios); +- includes order: alphabetically sorted system includes (with ``sys/`` includes @@ -168,15 +169,16 @@ + different lines (rationale: make searching a function definition really easy + with the ``^`` regular expression anchor). + -+Overall, just be consistent with the existing coding-style, I'll setup clang -+format or astyle_ when I get a chance to make the style a non-issue. ++Overall, just be consistent with the existing coding-style, I'll setup `clang ++format`_ or astyle_ when I get a chance, it should make the style a non-issue. + +.. _FPU: https://en.wikipedia.org/wiki/Floating-point_unit +.. _CMake: https://cmake.org/overview/ ++.. _K&R: https://en.wikipedia.org/wiki/Indent_style#K.26R_style ++.. _1TBS: https://en.wikipedia.org/wiki/Indent_style#Variant:_1TBS ++.. _clang format: http://clang.llvm.org/docs/ClangFormat.html +.. _astyle: http://astyle.sourceforge.net/astyle.html + -+.. _gplv3_rationale: -+ +Rationale for the GPLv3 +----------------------- + @@ -197,6 +199,19 @@ +be a good incentive to achieve that goal. + +.. vim: set tw=80 spelllang=en spell: +diff --git a/README.rst b/README.rst +--- a/README.rst ++++ b/README.rst +@@ -77,4 +77,9 @@ + Feel free to reach out via email or irc (kalessin on freenode, insist if I don't + reply). As the project name implies, I'm fairly interested in other smart bulbs. + ++Check out the `contribution guide`_ for the vision behind the project and how to ++contribute. ++ ++.. _contribution guide: https://github.com/lopter/lightsd/blob/master/CONTRIBUTING.rst ++ + .. vim: set tw=80 spelllang=en spell: diff --git a/docs/first-steps.rst b/docs/first-steps.rst --- a/docs/first-steps.rst +++ b/docs/first-steps.rst