From b4c265005f5819f9822ae89db05a69ad5f790f6e Mon Sep 17 00:00:00 2001 From: Mihai Tudor Panu Date: Wed, 4 Mar 2015 11:22:56 -0800 Subject: [PATCH] docs: few touch ups and typos fixed Signed-off-by: Mihai Tudor Panu --- docs/contributions.md | 4 ++-- docs/documentation.md | 7 ++++--- docs/max31855.md | 8 ++++---- docs/naming.md | 9 ++++++--- docs/porting.md | 12 ++++++------ src/upm.h | 2 +- 6 files changed, 23 insertions(+), 19 deletions(-) diff --git a/docs/contributions.md b/docs/contributions.md index 07eb8897..04c4eb77 100644 --- a/docs/contributions.md +++ b/docs/contributions.md @@ -11,8 +11,8 @@ Here are the rules of contribution: avoid GPL. (LGPL is fine). If your license is not MIT please include a LICENSE file in src/mymodule/. - Please test your module builds before contributing and make sure it works on - the latest version of mraa. If you tested on a specific board/platform please - tell us what this was in your PR. + the latest version of libmraa. If you tested on a specific board/platform + please tell us what this was in your PR. - Try not to break master. In any commit. - Attempt to have some decent API documentation as described in the the @ref documentation [guide](documentation.md). diff --git a/docs/documentation.md b/docs/documentation.md index d0b00c78..6ba8f3f7 100644 --- a/docs/documentation.md +++ b/docs/documentation.md @@ -15,7 +15,7 @@ New libraries must have the "@brief", "@defgroup" and "@ingroup" tags in one block. This usually follows the namespace and it is common to have one sensor per library. -Here's how this looks: +Here's how this looks (disregard the "@verbatim" tags in your actual code): ``` @verbatim @@ -50,8 +50,9 @@ this example: ``` Libraries with multiple sensors can add specific "@ingroup" tags here, but make -sure that the first one is the "" specified in the library "@defgroup" -tag. An example of such a library for reference is our libupm-i2clcd. +sure that the first one is the name specified in the library "@defgroup" tag. +Also, add this block to every sensor. An example of such a library for +reference is our libupm-i2clcd, which acts as a driver for multiple I2C LCDs. Optionally, a small representative image can be placed in the "docs/images" subfolder. **Please do not use existing, copyrighted images with your sensors!** diff --git a/docs/max31855.md b/docs/max31855.md index 564855b2..04706024 100644 --- a/docs/max31855.md +++ b/docs/max31855.md @@ -2,7 +2,7 @@ Making a UPM module for MAX31855 {#max31855} ================================ The Maxim Integrated MAX31855 is a thermocouple amplifier allowing you to read -from a K type themocouple. My board comes from the Pmod kit form Maxim +from a K type thermocouple. My board comes from the Pmod kit form Maxim (MAX31855PMB1) but you can get this from many different sources. The adafruit people made arduino code already so we'll use that as a [reference](https://github.com/adafruit/Adafruit-MAX31855-library/blob/master/Adafruit_MAX31855.cpp). @@ -69,7 +69,7 @@ the implementation of MAX31855::getTemp() Then using the arduino code as reference we simply reconstruct form the 4 uint8_t values a 32bit int value and select only the valuable parts of -information from that. The MAX31855 datahseet explains exactly which bits are +information from that. The MAX31855 datasheet explains exactly which bits are useful, we will just do the same as the adafruit code, first checking the error bit and then scrapping everything but the 14bit of thermocouple data that are useful to us and converting it to a double. @@ -78,7 +78,7 @@ useful to us and converting it to a double. ### Finalizing -Our final example, very easy to use api! +Our final example, very easy to use API! @snippet examples/max31855.cxx Interesting @@ -92,6 +92,6 @@ include_directories (${PROJECT_SOURCE_DIR}/src/max31855) target_link_libraries (max31855-example max31855 ${CMAKE_THREAD_LIBS_INIT}) ~~~~~~~~~~~ -Note you dont have to rebuild everything, cmake keeps target lists so if you +Note you don't have to rebuild everything, cmake keeps target lists so if you named your example target modulename-example you can simply do make max31855-example and both the library & example will build. diff --git a/docs/naming.md b/docs/naming.md index 68569ddd..51ace8d9 100644 --- a/docs/naming.md +++ b/docs/naming.md @@ -1,7 +1,7 @@ Naming a module {#naming} =============== -UPM attemps to follow a clear naming pattern. Modules should be sensibly named +UPM attempts to follow a clear naming pattern. Modules should be sensibly named and then placed in ${libdir}/upm and headers in ${includedir}/upm, all modules should be prefixed with libupm-. The upm_module_init will automatically name python UPM modules as pyupm_ and javascript @@ -24,6 +24,9 @@ sensor can inherit your class if they only have minor changes. ### Doubt -If ever, give me a ping via email: brendan.le.foll@intel.com and I'll try -suggest decent names for your module. +If ever, give either of us a ping via email: + mihai.tudor.panu@intel.com + john.r.van.drasek@intel.com + brendan.le.foll@intel.com +and we'll try suggest decent names for your module. diff --git a/docs/porting.md b/docs/porting.md index ebf9204d..a75041ab 100644 --- a/docs/porting.md +++ b/docs/porting.md @@ -3,7 +3,7 @@ Porting a module from Arduino {#porting} Porting arduino libraries to libmraa as UPM libraries is usually fairly easy. The issues typically come from misunderstanding of how a non real time OS deals -with interupts and timers. It also highly depends on the sensor. A concrete +with interrupts and timers. It also highly depends on the sensor. A concrete example is explained in detail on @ref max31855 ### Adding a new module to UPM @@ -36,9 +36,9 @@ required to talk to the board's IO. An I2c sensor will create a mraa_i2c_context, keep it as a private member and require a bus number and slave address in it's constructor. -Typically in sensors a simple object->read() function is prefered, depending on -your sensor/actuaotr this may or may not be easy or not even make sense. Most -UPM apis have a simple set of functions. +Typically in sensors a simple object->read() function is preferred, depending on +your sensor/actuator this may or may not be easy or not even make sense. Most +UPM APIs have a simple set of functions. ### Mapping arduino API to libmraa @@ -59,7 +59,7 @@ the UPM build system. The last step is when you're happy with your module and it works send us a pull request! We'd love to include your sensor in our repository. -If you don't like github you can also send brendan.le.foll@intel.com a git -formatted patch if your sensor. More details are on @ref contributions and on +If you don't like github you can also send mihai.tudor.panu@intel.com a git +formatted patch of your sensor. More details are on @ref contributions and on https://help.github.com/articles/creating-a-pull-request diff --git a/src/upm.h b/src/upm.h index a8cab697..f1962649 100644 --- a/src/upm.h +++ b/src/upm.h @@ -338,6 +338,6 @@ /** * @brief Grove Starter Kit - * @defgroup grovesk Grove Starter Kit + * @defgroup gsk Grove Starter Kit * @ingroup bykit */