* Java/Python/Javascript examples
* change usleep to upm_delay_us in C++ example
* Add Java example to CMakeLists
Signed-off-by: Assam Boudjelthia <assam.boudjelthia@fi.rohmeurope.com>
Signed-off-by: Noel Eck <noel.eck@intel.com>
Since UPM Travis-CI runs ctests (one of which loads python examples),
the added lines would fail if the RSC_DATA_RATE and RSC_MODE have not
been included in the python rsc module.)
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>
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>
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>
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>
All other upm library directories match their corresponding library
name, the i2clcd was an outlier which caused problems for CMake and
testing.
* Replaced usage of i2clcd with lcd
* Renamed source files and examples
* Updated examples to use correct class
* Updated documentation where necessary (left changelog sections)
Signed-off-by: Noel Eck <noel.eck@intel.com>
Removed all references to #ifdef SWIGJAVA and JAVACALLBACK from the
library source. All java-specific source code has been moved to the
corresponding library's .i file for java.
* Update library source
* Update examples where necessary
* The function pointer methodology has been remove from libraries
which provided callbacks as both a class and a function pointer
implementation. Examples were updated to use the class version
of callbacks.
* Updated documentation for SWIGJAVA
Signed-off-by: Noel Eck <noel.eck@intel.com>
Updated the ZFM20 class to use UART functionality provided through the
mraa::Uart class instead of using the UART directly.
* Switch to mraa::Uart
* Added raw uart string constructor, closes#621
* Updated examples
* Added a common.i to minimize interface duplication
* Removed pointers from C++ functions where references are
preferable
* Removed dependency on termios
* Added typedefs to handle pass-by-reference
* Removed flushes
* Removed code after throws
Signed-off-by: Noel Eck <noel.eck@intel.com>
Adding STMicro LIS3DH sensor support. This module is based on
the one for lis2ds12 (thanks, jontrulson!), but as sensors are
noticeably different, the contents underwent major rework.
Examples and basic API are left the same.
Tested on Intel Edison with Arduino board using both I2C and SPI.
Signed-off-by: Alex Tereschenko <alext.mkrs@gmail.com>
This commit fixes issue 614. Updated the example to use pyupm_led as
the module name (and skip the local module rename).
Signed-off-by: Noel Eck <noel.eck@intel.com>
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>
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>
Many of the UPM libraries allocate space on the heap but do not
explicitly handle copying and assignment. This commit uses C++11 delete
to forbit both the copy and assignment operator for these classes.
The C++ examples which used assignment operators to initialize class
instances were also updated since it did not appear necessary in those
cases to use the assignment operator.
Signed-off-by: Noel Eck <noel.eck@intel.com>
The IMS library will now change its I2C address after resetting the HW to a new
address. It will attempt to close the mraa context and re-init each
time.
Signed-off-by: Noel Eck <noel.eck@intel.com>
and example
LIDAR-Lite v3, a compact, high-performance optical distance measurement
sensor from Garmin™. It is the ideal solution for drone, robot or unmanned
vehicle applications.
The library provided is libupm-lidarlitev3.so
The example provided is lidarlitev3.cxx where it will print the distance
of object/obstacle from the sensor.
The image of the sensor is at docs/images/lidarlitev3.jpg
Signed-off-by: Saloni Jain <saloni.jain@tcs.com>
Signed-off-by: Niti Rohilla <niti.rohilla@tcs.com>
Signed-off-by: Abhishek Malik <abhishek.malik@intel.com>
This commit provides a basic driver for the Vishay VEML6070 UV
Sensor. Some functionality might be missing. Binding examples have
not been tested as of now.
Signed-off-by: Abhishek Malik <abhishek.malik@intel.com>
The 00B7 unicode character in 4 of the Java examples can cause warnings
(and possible errors) when compiling. Removed to minimize this risk.
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>
There are a variety of LSM303 devices out there with various
incompatibilities and differing capabilities. The current lsm303
driver in UPM only supports the LSM303DLH variant, so it has been
renamed to lsm303dlh to avoid confusion and to make it clear which
variant is actually supported.
All examples and source files have been renamed, including header
files. In addition, the class name, LSM303, has been renamed to
LSM303DLH. No other functionality or behavior has been changed.
Signed-off-by: Jon Trulson <jtrulson@ics.com>