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>
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>
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>
There is a single monolithic .i file which provides documentation for
the python methods. The per-sensor flow is not used. Removing for now,
may investigate implementing a per-sensor doc.i file again in the future.
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>
Previously the JAVA packages re-compile UPM library source files. This
was a work-around for compiling JAVA-specific functionality from the UPM
source into the SWIG'ed JAVA pacakges.
This commit removes the source from the JAVA SWIG compile and provides
an example on how to add the JAVA-specific code with a swig extend call.
* Added _upm.i file for %import (not %include)
* Added macros to _upm.i; 1 which performs the loadLibrary, and one
which adds the java installISR runnable.
* Updated the src/CMakeLists.txt file to NOT build library src into
pacakges.
* Updated the a110x library with examples on how to use the macros.
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>
Tell the linker to error on unresolved symbols. This enables future
Java work (removing library source from Java packages) by flagging
missing reference.s
TODO: Move this up one level to all libraries. The reason this was not
done in the same commit is that the NodeJs libraries contain unresolved
references which must come from node but remain unresolved in the NodeJs
packages.
Signed-off-by: Noel Eck <noel.eck@intel.com>
Switched these macros to functions so changes at the
upm_swig_<extension> level don't propogate further than necessary.
Signed-off-by: Noel Eck <noel.eck@intel.com>
Removed include for pthreads from libraries where it appears NOT to be
used. Added ${CMAKE_THREAD_LIBS_INIT} to CMakeLists.txt for libraries
which appear to require threading.
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>
Previous commit failed because the C examples doesn't exist. The
version BEFORE that passes even though the C example filename pointed to
a test for a different sensor library.
Signed-off-by: Noel Eck <noel.eck@intel.com>
Fix for case where dataAvailable always returns true. Previously, if
this ever happened (eg mock platform), string resp is resized until the
system is out of memory.
Signed-off-by: Noel Eck <noel.eck@intel.com>
Removed the per-target install component in favor of a limited set of
insinstall components.
Available install components are: "upm" "upm-dev" "upm-java"
"upm-nodejs" "upm-python2" "upm-python3"
Signed-off-by: Noel Eck <noel.eck@intel.com>
Replace TemplateItem with SensorTemplate in the sensortemplate.json and
json ctest. Change to contributions.md which removes all objects
with a key starting with "//" from the generated sensor .json file.
This allows the json ctest to pass OOTB for new sensor libraries
generated from the make_new_sensor function.
Signed-off-by: Noel Eck <noel.eck@intel.com>
CurieIMU example includes curieimu.hpp, which uses pthread symbols but
does not include pthreads.h, and thus fails building. The library
builds successfully because the source file includes the pthread
header before including curieimu.hpp.
* Moved pthread.h include from src to header.
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>
swig_add_module has been deprecated
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
Signed-off-by: Abhishek Malik <abhishek.malik@intel.com>
Fixed the table.
Update the link of reference document.
Signed-off-by: Rex Tsai (蔡志展) <rex.cc.tsai@gmail.com>
Signed-off-by: Abhishek Malik <abhishek.malik@intel.com>
The mraa_i2c_read_bytes_call didn't work with firmata based
platforms and was changed to mraa_i2c_read_bytes_data call which
worked.
Signed-off-by: Abhishek Malik <abhishek.malik@intel.com>
This patch reworks error handling in the C driver to more reliably detect
errors, and for C++, throw exceptions when they are detected.
The C++ API is unchanged aside from the fact that more methods will
throw an exception on errors now.
This addresses the error handling deficiencies reported in Issue #593.
Signed-off-by: Jon Trulson <jtrulson@ics.com>
Signed-off-by: Abhishek Malik <abhishek.malik@intel.com>