1679 Commits

Author SHA1 Message Date
Noel Eck
b5a33f6ee3 cmake: Cleanup of src CMakeLists.txt description field
Removed 'upm' string, capitalized first character, added descriptions
where necessary.

Signed-off-by: Noel Eck <noel.eck@intel.com>
2016-10-20 16:19:59 -07:00
Jon Trulson
94cd7f185f c++11: enable c++11 compliance unconditionally.
Signed-off-by: Jon Trulson <jtrulson@ics.com>
2016-10-20 14:22:02 -06:00
Jon Trulson
dd3e5290b2 src/CMakeLists.txt: Always install .jar files in <prefix>/lib/java/
In certain cases (debian/ubuntu multi-arch machines) the jar files
were bing installed in <prefix>/lib/lib/java/.

Regardless of platform or architecture, these files need to be in
<prefix>/lib/java/ .

Signed-off-by: Jon Trulson <jtrulson@ics.com>
2016-10-20 14:21:55 -06:00
Noel Eck
dc48698d86 a110x: Updated description
Updated CMakeListst.txt DESCRIPTION field to better represent the library.

Signed-off-by: Noel Eck <noel.eck@intel.com>
2016-10-19 13:12:43 -07:00
Noel Eck
497a7dbd55 descriptions: Updated cmake DESCRIPTION field
This commit touches a subset of UPM sensors which contain C source.
Cleaned up the CMakeLists.txt DESCRIPTION field to better represent
the library.

Signed-off-by: Noel Eck <noel.eck@intel.com>
2016-10-19 12:18:02 -07:00
Jon Trulson
8ac8be9e0a md: C implementation; C++ wraps C
Signed-off-by: Jon Trulson <jtrulson@ics.com>
2016-10-18 17:04:50 -06:00
Noel Eck
df5b3805c5 cmake: If git-describe failes with *-NOTFOUND, tag version dirty
There is a case where git_describe was returning 'HEAD-HASH-NOTFOUND'
which missed the STREQUAL check and VERSION was set incorrectly.

Changed the STREQUAL to a MATCH on -NOTFOUND.  In this way, any of the
-NOTFOUND returns change the version to dirty.

Signed-off-by: Noel Eck <noel.eck@intel.com>
2016-10-17 15:29:42 -07:00
Jon Trulson
758fa32b75 .gitignore: add wildcard so all build*/ dirs are ignored
Signed-off-by: Jon Trulson <jtrulson@ics.com>
2016-10-17 13:59:05 -06:00
Jon Trulson
770e43c627 rpr220: add C driver and examples; FTI; C++ wraps C
Signed-off-by: Jon Trulson <jtrulson@ics.com>
2016-10-14 13:53:34 -06:00
Jon Trulson
78904ef2b8 rotaryencoder: make sure mraa contexts are NULL after context creation
Signed-off-by: Jon Trulson <jtrulson@ics.com>
2016-10-14 12:09:05 -06:00
Jon Trulson
07d0168a96 rotaryencoder: add C driver and example; FTI; C++ wraps C
Signed-off-by: Jon Trulson <jtrulson@ics.com>
2016-10-13 16:00:04 -06:00
Noel Eck
6ce4b2dcca changelog: Added entries for recent python modules changes
Updated the changelog.md to reflect the recent python modules changes.
Added a vnext which can be replaced with the next UPM release version
number.

Signed-off-by: Noel Eck <noel.eck@intel.com>
2016-10-13 10:23:17 -07:00
Noel Eck
bf425014ab python: Added upm directory for python modules
* Grouped UPM python modules into upm directory, for example:
      /usr/local/lib/python2.7/dist-packages/upm
    * Updated UPM example import statements
    * Removed unused RPATH statements from UPM src CMakeLists.txt,
      currently build collateral contains an explicit RPATH which
      is stripped from the install collateral.
    * Converted python examples to work on both python2 AND python3
    * Added ctest for loading examples w/python3
    * Removed returns from swig macros
    * UPM python module use will change...
        Before:
            import pyupm_dfrph
        After:
            from upm import pyupm_dfrph
            or
            import upm.pyupm_dfrph
            etc...
    * This commit fixes #468

Signed-off-by: Noel Eck <noel.eck@intel.com>
2016-10-13 08:22:40 -07:00
Jon Trulson
8624a07b77 lm35: add C driver and example; FTI; C++ wraps C
Signed-off-by: Jon Trulson <jtrulson@ics.com>
2016-10-12 16:37:59 -06:00
Jon Trulson
cbf94414e2 jhd1313m1/lcm1602: update doxygen headers
Signed-off-by: Jon Trulson <jtrulson@ics.com>
2016-10-11 13:20:54 -06:00
Jon Trulson
758234f887 jhd1313m1: Add C++ wrapper
Signed-off-by: Jon Trulson <jtrulson@ics.com>
2016-10-11 13:20:45 -06:00
Jon Trulson
643d262fef lcm1602: Add C++ wrapper
Signed-off-by: Jon Trulson <jtrulson@ics.com>
2016-10-11 13:20:41 -06:00
Jon Trulson
0c0ad04cf9 lcm1602/jhd1313m1: use correct library names in interface files
Signed-off-by: Jon Trulson <jtrulson@ics.com>
2016-10-07 18:55:18 -06:00
Jon Trulson
7e64848146 bacnetmstp: fix compiler warnings when building python wrappers
Signed-off-by: Jon Trulson <jtrulson@ics.com>
2016-10-07 16:04:44 -06:00
Jon Trulson
64b142ecf3 jhd1313m1: Initial C implementation
Signed-off-by: Jon Trulson <jtrulson@ics.com>
2016-10-07 15:42:16 -06:00
Jon Trulson
7fe6f856a1 lcm1602: Initial C implementation
Signed-off-by: Jon Trulson <jtrulson@ics.com>
2016-10-07 15:42:12 -06:00
Mihai Tudor Panu
255d6139ee mlx90614: patched i2c reads from temperature registers
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2016-10-06 17:31:13 -07:00
Mihai Tudor Panu
94de822499 docs: added STMicro manufacturer and updated corresponding sensors
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2016-10-06 16:44:22 -07:00
Mihai Tudor Panu
bb1155700d docs: minor updates to C driver sensor descriptions
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2016-10-06 15:59:23 -07:00
Noel Eck
c6610bdf46 tests: Switch from PYTHON_EXECUTABLE to PYTHON_DEFAULT_EXECUTABLE
The DetectPython cmake script now outputs a default python executable.
Updated other cmake scripts to use this concept.  Used default where
python2/3 will work, use explicit PYTHON2/3_EXECUTABLE where an
explicit version is needed.  Also, fail if python is required and NO
version of python was found.

Signed-off-by: Noel Eck <noel.eck@intel.com>
2016-10-05 17:12:02 -07:00
Noel Eck
edd8df4c50 encodings: Added check for non-8bit encodings in src tree.
This commit sanitizes source files for unicode encodings which
cause failures in downstream flows (docgen, python2 module loading,
etc...).

    * Removed explicit encodings from src files
    * Replaced 2 byte character encodings with ascii encodies:
        ± -> +/-
        ° -> deg
        “ -> "
        etc...
    * Added ctest to check src tree files for non-8bit encodings

Signed-off-by: Noel Eck <noel.eck@intel.com>
2016-10-05 14:39:30 -07:00
Noel Eck
131947dc74 check_pythonload: Updated assert print.
Print out failing files in order in a python3-friendly way.

Signed-off-by: Noel Eck <noel.eck@intel.com>
2016-10-05 11:54:21 -07:00
Noel Eck
2f78d9f62b python_examples: Reformatted, self-checking, executable
* Moved body of each python example to main.  This allows for basic
      load module testing for CI
    * General cleanup of python modules (crlf/tabs/prints/etc)
    * Chmod'ed to 755 to allow running examples without specifying the
      python interpreter
    * Added ctest for loading python2/3 modules
    * Added jniclasscode pragma for java swig interface files.
    * Updated check_examplenames.py module to check all languages vs. a
      cxx example name
    * Added tests for checking python module and test loading
    * Added 'make test' to travis-ci run (run ctests)
    * Print a more meaningful message when not building cxx docs into
      python modules
    * Updated check_clean.py to only check java wrapper files
    * ENABLED ctests for UPM
    * Deleted using_carrays.py python example - this is covered by other
      examples

Signed-off-by: Noel Eck <noel.eck@intel.com>
2016-10-04 16:10:17 -07:00
Noel Eck
62718daf0b python: Build both python2 and python3 modules
Updated UPM cmake to build both python2/3 modules if the necessary
python libs are available.

    * Removed BUILDPYTHON3 cmake option in favor of building both
      versions
    * Added cmake module to find both python2 and python3
    * Added macro which can be called from per-sensor cmake files
      to add dependency libraries via target_link_libraries as well
      as swig_link_libraries (for java, nodejs, and python)
    * Python2 is required for python documentation builds
    * Cleanup of python usage throughout UPM cmakelists.
    * Make find_package for Node required.  Removed check for NODE_FOUND
      (which should have been NODEJS_FOUND) in favor of REQUIRED.
    * The cxx and .py wrapper files get generated in python2/3 (instead
      of the same directory).  It appears these files are identical,
      however since the targets can be built in parallel it's safer to split
      them out.
    * Updated all cmake dependencies related to building documentation.
    * Removed unused classname from cmake files

Signed-off-by: Noel Eck <noel.eck@intel.com>
2016-09-30 17:01:41 -07:00
Jon Trulson
f0fa6f7b68 utilities/101: Add 1 tick offset to nanotimer
In certain cases with the Arduino 101/Zephyr, using the upm_delay*()
functions can cause hangs and/or exceptions.  Adding a single tick to
the generated offset resolves these issues.

The documentation warns that this is a good idea to ensure that a
timer does not expire early.  Adding this made the random hangs and
CPU exceptions go away.

Signed-off-by: Jon Trulson <jtrulson@ics.com>
2016-09-30 17:05:15 -06:00
Jon Trulson
4b149313e6 bmi160: remove leftover debugging
Signed-off-by: Jon Trulson <jtrulson@ics.com>
2016-09-30 17:02:10 -06:00
Jon Trulson
0086626173 bmi160: add C driver and example. Add SPI support, other improvments.
This adds SPI support to the BMI160, as well as a C driver and a C
example.  In addition, some changes were made to more properly detect
and handle errors.

Functions supplied by the bosch_bmi160 driver source code is also
exported and made available to callers who want more than what the
basic driver support.  Bus access methods (I2C and SPI) are also now
exposed to both C and C++.

Signed-off-by: Jon Trulson <jtrulson@ics.com>
2016-09-29 15:41:18 -06:00
Jon Trulson
e7c80217c2 C examples: move mraa_init() calls out of C examples and into C drivers.
Signed-off-by: Jon Trulson <jtrulson@ics.com>
2016-09-28 17:34:42 -06:00
Noel Eck
c3a5b8dd3c cmake: Updated pkg_check_modules usage for TPV libraries
* Moved CMAKE_MODULE_PATH append hier in top-level CMakeLists file
      so that it's before all calls to find_package.
    * Added pkg_check_modules for BACNET, MODBUS, JPEG, and OPENZWAVE
      to top-level CMakeLists file.
    * Removed pkg_check_modules from individual sensor libraries.
    * Simplified SWIG find_package call - require 3.0.5 for all SWIG
      wrappers.
    * Moved options to beginning of top-level CMakeLists.

Signed-off-by: Noel Eck <noel.eck@intel.com>
2016-09-28 11:50:42 -07:00
Noel Eck
dd9050e0aa dfrph: Updated to use mraa read_float
Use mraa's normalized adc read.  Updated names of struct
members accordingly.

Signed-off-by: Noel Eck <noel.eck@intel.com>
2016-09-28 11:47:16 -07:00
Mihai Tudor Panu
eb7a3ceac7 upm-c: added doxygen tags to generate documentation for C APIs
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2016-09-26 17:28:21 -07:00
Noel Eck
73719a6659 dfrph: Added set/get adc ref
Added missing getter/setter for the C library adc reference voltage.

Signed-off-by: Noel Eck <noel.eck@intel.com>
2016-09-26 12:04:14 -07:00
Mihai Tudor Panu
c66247b3d3 groups.md: changed file style from code to markdown
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2016-09-23 15:08:02 -07:00
Mihai Tudor Panu
5df0fe8836 curieimu: rearranged comment blocks to subpage class under module in doc
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2016-09-23 15:08:02 -07:00
Jon Trulson
b8061943aa biss0001: add C driver and example, C++ wraps C driver
Signed-off-by: Jon Trulson <jtrulson@ics.com>
2016-09-23 14:18:08 -06:00
Jon Trulson
22c7310428 yg1006: add C driver and example, C++ wraps C driver
Signed-off-by: Jon Trulson <jtrulson@ics.com>
2016-09-23 12:20:05 -06:00
Jon Trulson
c9ed65f22d water: C example, fix bad error message
Signed-off-by: Jon Trulson <jtrulson@ics.com>
2016-09-23 12:20:05 -06:00
Jon Trulson
3047049402 water: zephyr: don't use mraa_result_print, use proper includes
Signed-off-by: Jon Trulson <jtrulson@ics.com>
2016-09-22 17:15:31 -06:00
Jon Trulson
dff782a477 water: add C driver and example. C++ wraps C driver.
Signed-off-by: Jon Trulson <jtrulson@ics.com>
2016-09-22 16:43:48 -06:00
Jon Trulson
29b11063ee dfrorp: fix error in mraa_init() check
Signed-off-by: Jon Trulson <jtrulson@ics.com>
2016-09-22 16:43:48 -06:00
Jon Trulson
6f2c65b0d5 upm_utilities: remove unused upm_malloc/free, add comments
Signed-off-by: Jon Trulson <jtrulson@ics.com>
2016-09-22 16:43:48 -06:00
Noel Eck
80fb4ed6da mq303a: Header requires mraa gpio include.
Added mraa/gpio.h to mq303a.

Signed-off-by: Noel Eck <noel.eck@intel.com>
2016-09-22 14:17:39 -07:00
Noel Eck
177f77f1f2 dereferencing: Small fixes for deref errors.
Cleanup some dereferencing after free.

Signed-off-by: Noel Eck <noel.eck@intel.com>
2016-09-22 14:14:46 -07:00
Noel Eck
a57f1c9691 memory: Small changes to fix some memory leaks.
Four small leaks in *scam, sx1276, and ozw.  Added calls to
cleanup resources before throws.

Signed-off-by: Noel Eck <noel.eck@intel.com>
2016-09-21 12:25:02 -07:00
Mihai Tudor Panu
87b10e33d0 curieimu: updated description and added Firmata connection type to groups
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2016-09-20 16:52:50 -07:00