Added code to parse GPTXT nmea sentences. Added methods to calculate
sentences/second and raw bytes/second.
Signed-off-by: Noel Eck <noel.eck@intel.com>
Small fixes for new nmea_gps code. Fixed an iterator which could get
dereferenced incorrectly, and changed an auto to an explicit type.
Signed-off-by: Noel Eck <noel.eck@intel.com>
NMEA GPS class now uses threads to handle parsing NMEA sentences.
Currently only handles GGA, GSV, and GLL types. Added queues for
holding parsed data.
* Parsing thread
* Parse GPS Fix from GGA and GLL
* Parse satellite info from GSV
* Provide a queue for GPS fix data as well as raw sentences
(for debugging)
* Target structures and NMEAGPS class have a __str__() method
which summarizes the objects into a std::string. These are
tied to the __str__ method in python
* Added google unit test for the above functionality
Signed-off-by: Noel Eck <noel.eck@intel.com>
Allow targets to specify a CMake build type but do not set a default
(removed 'Release'). The CXX flags for Release slow the builds down
significantly on Travis-CI (which can hit the time limit for jobs).
Signed-off-by: Noel Eck <noel.eck@intel.com>
Removed the 'return false;' lines after throws since these are not
needed and are generally flagged by static analysis tools. Also removed
a EOL spaces and added initializers for member variables at declaration
(since more than one constructor exists).
Signed-off-by: Noel Eck <noel.eck@intel.com>
This commit adds an additional constructor to the MHZ16 which takes a
path (string reference) to a UART device on the filesystem.
Example: MHZ16("/dev/ttyS0");
* Added constructor for device path w/default
* Removed unused global consts from header
Signed-off-by: g-vidal <gerard.vidal@ens-lyon.fr>
Signed-off-by: Noel Eck <noel.eck@intel.com>
While a 'make install' under a target library directory (build/src/lcd)
will build all dependencies required to make the target, it will NOT
install those dependencies. This can cause confusion for developers.
Adding a note to the build docs to clarify this case.
Signed-off-by: Noel Eck <noel.eck@intel.com>
This commit removes the double-backslash when installing the examples.
Before:
.../upm//examples/...
Before:
.../upm/examples/...
Signed-off-by: Noel Eck <noel.eck@intel.com>
Updated the API documentation with changes to the kx122. Removed a few
extra EOL spaces.
Signed-off-by: Antoine W. Campagna <AntoineW@Campagna.org>
Signed-off-by: Noel Eck <noel.eck@intel.com>
Renamed find module from FindCordova to FindUpmCordovaGenerator to be
more descriptive with the intent of the find module. Updated the find
module to use find_package_handle_standard_args so a version can be
specified and handle REQUIRED keyword.
Signed-off-by: Noel Eck <noel.eck@intel.com>
The UPM Cordova binding generator creates Cordova plugs for each Java
package when BUILDCORDOVA=ON and BUILDSWIGJAVA=ON. This requires an NPM
install of the UPM Cordova plugin generator. Cordova bindings are built
under <build-dir>/cordova.
Signed-off-by: Noel Eck <noel.eck@intel.com>
The hardcoded frequency of 10kHz was much slower than the capacity of the device
Signed-off-by: Antoine W. Campagna <AntoineW@Campagna.org>
Signed-off-by: Noel Eck <noel.eck@intel.com>
It appears that an additional tsl2561 Java example existed.
Removed the *newer* Tsl2561_Example.java in favor of the original
example. Updated all corresponding collateral which references the
Tsl2561_Example.java file (CMake and library descriptor file).
Signed-off-by: Noel Eck <noel.eck@intel.com>
Be a bit more lenient with the acceptable range for the microsecond
flavor of upm_delay (+/- 150us instead of +/- 100us).
Signed-off-by: Noel Eck <noel.eck@intel.com>
Added an additional job to the CI matrix which does a minimal UPM
build (only C, C++, and unit tests) which can run and pass/fail quickly.
Signed-off-by: Noel Eck <noel.eck@intel.com>
MRAA deprecated mraa_gpio_use_mmaped which gets flagged as a warning
in UPM and then fails since -Werror is set.
For now, don't flag deprecations as warnings.
Signed-off-by: Noel Eck <noel.eck@intel.com>
According to SonarCloud's email notification,
they're dropping sonarqube.com in favor of sonarcloud.io.
Signed-off-by: Alex Tereschenko <alext.mkrs@gmail.com>
Signed-off-by: Noel Eck <noel.eck@intel.com>
Added Google Test for unit testing. Currently NOT required by UPM
CMake.
* Added a test fixture for the utilities library.
* Fixed bug in delay methods provided by utilities library.
Signed-off-by: Noel Eck <noel.eck@intel.com>
Unified all Java examples to *match* <LIBRARY>[_otherstuf]_Example.java.
Note, a handful of the examples have a pseudo-random string for the
first component (see FlexSensor_Example.java, ideally this would be
Flex_Example.java).
This commit allows for quick development on a single sensor library
since a -DMODULE_LIST=mysensorlib now works with Java examples
(previously Java examples would fail generation when using
MODULE_LIST).
* Renamed examples
* Updated class names
* Updated library descriptor .json files
* Updated sample mapping file
TODO: Make this work like the C/C++ examples - grab the target library
name from the filename and grab all dependencies from that target
library. Fix the handful of example names which don't conform.
Signed-off-by: Noel Eck <noel.eck@intel.com>
Implemented a swig interface file for the kx122 and added corresponding
swig language examples. Also added an STL vector flavor for getting
acceleration values from the kx122.
Signed-off-by: Noel Eck <noel.eck@intel.com>
This commit changes how the UPM doc targets build. The doc targets no
longer rebuild each time.
* doc (doxygen) target depends only on C/C++ source
* jsdoc (yuidoc) depends on doc and a stamp file
* pydoc (sphinx) depends on the output index.xml from doc
* pyupm_doxy2swig depends on python2 python extensions
Signed-off-by: Noel Eck <noel.eck@intel.com>
This commit moves common SWIG syntax to a ${libname}.i for sensor
libraries. Much of the swig content was originally duplicated for
each wrapper language which has lead to inconsistencies between wrappers
over time. This commit moves all swig syntax to a common file. Language
specific swig syntax can be added with #ifdef SWIG<LANGUAGE>.
The src/CMakeLists.txt will look first for a language-specific .i file,
then fall back to ${libname}.i. In this way, it's possible to override
the common ${libname}.i file. If a fallback .i file does NOT exist,
UPM CMake will generate a simple interface file for all languages.
Example:
If no src/abp/pyupm_abp.i and no src/abp/abp.i then
generate ${CMAKE_CURRENT_BINARY_DIR}/abp.i
When src/CMakeLists.txt uses a common ${libname}.i, it adds a -module
<language>upm_${libname} to the swig command line.
In the example below, a -module argument is provided for both Java and
Javascript, while the python module takes all syntax from pyupm_abp.i.
SWIG FILE Language CMake added SWIG args
--------------- ---------- ---------------------
src/abp/abp.i java -module javaupm_abp
src/abp/abp.i javascript -module jsupm_abp
src/abp/pyupm_abp.i python
This commit removes ~4500 redundant lines for the UPM repository and
helps promote uniformity for the SWIG'ed languages.
Signed-off-by: Noel Eck <noel.eck@intel.com>
Touched on all library brief descriptions for better integration with ISS and fixed a few typos and connection tags in the process.
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
This ensures the generated xml paragraphs for the connection field won't have nested children and hence should be readable by the ISS parser properly
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
The pydoc target copies python binaries and modules to pyupm. Since the
find command didn't make a distinction between python2/3 modules, a mix
of each could end up in pyupm. If sphinx runs under a mismatching
interpreter (mismatching against the python binaries) the build would
fail with load errors
* Only copy python2 modules (and binaries) to pyupm directory
* Explicitly run the sphinx tools w/python2
* Removed doc dependency to each library target (not needed).
Signed-off-by: Noel Eck <noel.eck@intel.com>
Added explicit error for sign compares to CMake. Updated a handful of C
source which compared unsigned vs signed.
Signed-off-by: Noel Eck <noel.eck@intel.com>
Currently ~2/5 UPM travis-ci jobs are failing with an SSL error from curl
when grabbing the 1.9.0 version of docker-compose. This commit is a
brute-force attempt to make this go away.
Signed-off-by: Noel Eck <noel.eck@intel.com>
FindNpm REQUIRE functionality was not provided by FindNpm.cmake.
UpdatedUpdated FindNpm to extract version, global node_modules
directory, and to fail if REQUIRE was set and npm was not found.
Signed-off-by: Noel Eck <noel.eck@intel.com>
Updates to the FindNodejs.cmake module to find newer installs of nodejs
across other distros. For example openSUSE: /usr/include/node6/node.h
* Added PATH_SUFFIX to find_path for node.h.
* Standardized usage of message() (added STATUS)
* Call find_package_handle_standard_args with version
* Reformatted to look uniform.
Signed-off-by: Noel Eck <noel.eck@intel.com>
As we've established in PR #623 (adding lis3dh support), this coefficient
is not needed and actually is cancelled out in calculations, so remove it.
Signed-off-by: Alex Tereschenko <alext.mkrs@gmail.com>
These four libaries were previously blacklisted for building Java
packages. Updating to include loadLibrary macro.
Signed-off-by: Noel Eck <noel.eck@intel.com>