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>
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>
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>
Since UPM uses doxy2swig, there is no need for the swig interface
file autodoc for python.
Also, turned on the doxy2swig --quiet switch which cleans up the build
log a tiny bit.
This removes a redundant chunk of documentation from python modules
(per each function).
Old:
def pH(self, samples=15):
+-> """
| pH(DFRPH self, unsigned int samples=15) -> float
|
| Parameters
| ----------
swig| samples: unsigned int
|
| pH(DFRPH self) -> float
|
| Parameters
| ----------
+-> self: upm::DFRPH *
+-> float pH(unsigned int
| samples=15)
|
| Take a number of samples and return the detected pH value. The default
| number of samples is 15.
|
doxy2swig| Parameters:
| -----------
|
| samples: The number of samples to average over, default 15
|
| The pH value detected
| """
+-> return _pyupm_dfrph.DFRPH_pH(self, samples)
New:
def pH(self, samples=15):
+-> """
| float pH(unsigned int
| samples=15)
|
| Take a number of samples and return the detected pH value. The default
| number of samples is 15.
|
doxy2swig| Parameters:
| -----------
|
| samples: The number of samples to average over, default 15
|
| The pH value detected
+-> """
Signed-off-by: Noel Eck <noel.eck@intel.com>
Since src/utilities now builds a C/C++ library, other targets which were
using symbols from utilities now need to include the correct target
dependency. This is mainly for upm_delay* functions. Added utilities-c
target to all sensor library CMakeLists.txt which require it.
Moved macro for __FILENAME__ from upm_utilities.h to upm_fti.h since
ONLY the FTI headers used this.
Signed-off-by: Noel Eck <noel.eck@intel.com>
* Updated pom file generation: Generate pom files after all sensor
library targets have been created - allows for dependencies
* Changes for compiling on Android
* Check for mraa build options: Look at symbols in mraa library to
determine UPM build options (example: mraa_iio_init, mraa_firmata_init)
* Add per target summary for C/C++/java/nodejs/python
* Added hierarchy to fti include directory...
old: #include "upm_voltage.h"
new: #include "fti/upm_voltage.h"
* Removed unimplemented methods from mpu9150 library and java example
* Add utilities-c target for all c examples. Most of the C examples
rely on the upm_delay methods. Add a dependency on the utilities-c
target for all c examples.
* Updated the examples/CMakeLists.txt to add dependencies passed via
TARGETS to the target name parsed from the example name. Also updated
the interface example names to start with 'interfaces'.
* Updated src/examples/CMakeLists.txt to ALWAYS remove examples from the
example_src_list (moved this from end of function to beginning).
Signed-off-by: Noel Eck <noel.eck@intel.com>
In an effort to clean-up and standardize UPM library
documentation, this commit updates (and in most cases,
unifies) the CMake description string AND CXX header
@comname string.
Strings were taken from datasheets when possible, spelling
mistakes were addressed, copy/paste errors where fixed,
Title Case was used, etc.
* Tested/updated/added @web tags
* Added/updated invalid sensor images
* Added/updated @man tags, added missing manufacturers
Signed-off-by: Noel Eck <noel.eck@intel.com>
Handle failure in ISR routine - attempt to read status and
FIFO registers and continue sampleing (vs exiting and turning
off continuous sampling).
Signed-off-by: Noel Eck <noel.eck@intel.com>