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>
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>
Make sure I2c bus is initialized with provided bus number.
Removed unnecessary mraa::Result variable in favor of immediate checks.
Signed-off-by: Noel Eck <noel.eck@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>
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>
Removed redundant usage of MODULE_LIST and SUBDIRS variables.
Treat utilities and interfaces directories the same (add both if not
added when using MODULE_LIST).
Signed-off-by: Noel Eck <noel.eck@intel.com>
The custom command used to create a per-library jar can hit a race
condition where upm_interfaces.jar is in the process of building when
the javac command runs for a target. This is because the javac command
was provided a full path to the upm_interfaces.jar file for ALL java
targets (even targets which do NOT use the interfaces).
Example:
javac -cp path/to/upm_interfaces.jar
If upm_interfaces.jar does not exist, javac is fine.
if upm_interfaces.jar exists and is a valid file, javac is fine.
If upm_interfaces.jar exists and is empty, javac throws an error.
For the targets which do not have a dependency on the interfaces,
it's possible one will run javac when the upm_interfaces.jar file is
building in parallel and will fail since the file is
open/incomplete/empty.
The fix is to only provide the full path to the upm_interfaces.jar file
for targets which depend on the interfaces. These will pass since they
depend on the java interfaces target.
Signed-off-by: Noel Eck <noel.eck@intel.com>