5 Commits

Author SHA1 Message Date
Noel Eck
5cefe7f5f3 examples: Remove heap allocation from C++ examples
Cleanup of UPM C++ examples.  Switched from heap allocation to
stack allocation when possible.  This simplifies the samples since it
removes the need for explicit memory management.  A script was used to
identify and replace pointer use.  To simplify the replace script, I
re-formatted the C++ examples using the UPM .clang-format file.
Unfortuantely this changes the look of the UPM C++ examples to a large
degree.  However, examples will now have a standard look/feel and
uniform formatting.

    * Ran clang-format w/provided UPM .clang-format file
    * Removed new's/delete's whenever possible (left those in interface
      examples)
    * Added IIO sensor library implementation of callback void* arg
    * Converted all sleeps to upm defined delays (added header when
      necessary)
    * Scrubbed CXX example includes

Signed-off-by: Noel Eck <noel.eck@intel.com>
2017-09-19 12:41:58 -07:00
Nicolas Oliver
7bee29ba62 sonar: fix sonar scan
remove utf8 characters from:
  * examples/c++/mcp9808.cxx
  * examples/c++/tmp006.cxx
  * src/bmp280/bmp280.c
  * src/max30100/max30100.c

add -j8 options to make command in scripts/sonar-scan.sh

Signed-off-by: Nicolas Oliver <dario.n.oliver@intel.com>
2017-07-28 14:56:57 -07:00
Abhishek Malik
6c383dbd42 TMP006: Adding very basic support for TMP007
Signed-off-by: Abhishek Malik <abhishek.malik@intel.com>
2017-05-08 10:30:55 -07:00
Norbert Wesp
545e288967 examples/c++/<sensor>.cxx: changed cout / endl to std::cout / std::endl
Signed-off-by: Norbert Wesp <nwesp@phytec.de>
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2017-03-16 17:26:27 -07:00
Norbert Wesp
8342b4c079 tmp006: Added upm support for sensor TMP006
TMP006 is a infrared-thermopile sensor.

Signed-off-by: Norbert Wesp <nwesp@phytec.de>
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2017-03-16 17:24:01 -07:00