1489 Commits

Author SHA1 Message Date
Serban Waltter
4dbf5669d1 Added iGas interface
Signed-off-by: Serban Waltter <serban.waltter@rinftech.com>
2018-10-11 17:55:25 +03:00
Serban Waltter
5ad91e219f Added iMagnetometer interface
Signed-off-by: Serban Waltter <serban.waltter@rinftech.com>
2018-10-11 17:55:25 +03:00
Serban Waltter
050634bbaf Added iGyroscope interface
Signed-off-by: Serban Waltter <serban.waltter@rinftech.com>
2018-10-11 17:55:25 +03:00
Serban Waltter
5f9bebad14 Removed old interfaces and replaced them with the new ones.
Signed-off-by: Serban Waltter <serban.waltter@rinftech.com>
2018-10-11 17:55:25 +03:00
Serban Waltter
fae1da6c6f Added bindings for iAcceleration sensors
Signed-off-by: Serban Waltter <serban.waltter@rinftech.com>
2018-10-11 17:55:25 +03:00
Serban Waltter
a411723e5c Initial implementation of iAcceleration
Signed-off-by: Serban Waltter <serban.waltter@rinftech.com>
2018-10-11 17:55:25 +03:00
Serban Waltter
d431d1458e Updated interfaces and sensors
Signed-off-by: Serban Waltter <serban.waltter@rinftech.com>
2018-10-11 17:55:25 +03:00
Serban Waltter
d3ff8cfbc7 Update interface documentation
Signed-off-by: Serban Waltter <serban.waltter@rinftech.com>
2018-10-11 17:55:25 +03:00
Serban Waltter
2acecb1e62 Removed commented code
Ran clang-format on modified files

Signed-off-by: Serban Waltter <serban.waltter@rinftech.com>
2018-10-11 17:55:25 +03:00
Serban Waltter
f870362923 Added bindings for iElectromagnet interface.
Signed-off-by: Serban Waltter <serban.waltter@rinftech.com>
2018-10-11 17:54:55 +03:00
Serban Waltter
b0df70ca03 Added getVolts() to iEMG interface and its sensors.
Signed-off-by: Serban Waltter <serban.waltter@rinftech.com>
2018-10-11 17:54:55 +03:00
Serban Waltter
39515cb8ee Modified all iDistance sensors to return float.
Signed-off-by: Serban Waltter <serban.waltter@rinftech.com>
2018-10-11 17:54:55 +03:00
Serban Waltter
802e95fc8c Updated rule for ABP sensor.
Signed-off-by: Serban Waltter <serban.waltter@rinftech.com>
2018-10-11 17:54:09 +03:00
Serban Waltter
75dced21be Added bindings for iMotion and iPressure sensors.
Signed-off-by: Serban Waltter <serban.waltter@rinftech.com>
2018-10-11 17:54:09 +03:00
Serban Waltter
0483ffcff4 Added bindings for iMoisture sensors.
Signed-off-by: Serban Waltter <serban.waltter@rinftech.com>
2018-10-11 17:54:09 +03:00
Serban Waltter
e489f6c180 Added bindings for iLight sensors.
Removed old interfaces C++ examples.

Signed-off-by: Serban Waltter <serban.waltter@rinftech.com>
2018-10-11 17:54:09 +03:00
Serban Waltter
555a0f9f82 dded bindings for iHumidity sensors.
Signed-off-by: Serban Waltter <serban.waltter@rinftech.com>
2018-10-11 17:54:09 +03:00
Serban Waltter
dac8250765 Added bindings for iHeartRate sensors.
Signed-off-by: Serban Waltter <serban.waltter@rinftech.com>
2018-10-11 17:54:09 +03:00
Serban Waltter
d6bbe8ec24 Added bindings for iHallEffect sensors.
Signed-off-by: Serban Waltter <serban.waltter@rinftech.com>
2018-10-11 17:54:09 +03:00
Serban Waltter
7353449b2b Added bindings for iDistanceInterrupter sensors.
Signed-off-by: Serban Waltter <serban.waltter@rinftech.com>
2018-10-11 17:54:09 +03:00
Serban Waltter
852065f718 Added bindings for iDistance sensors.
Signed-off-by: Serban Waltter <serban.waltter@rinftech.com>
2018-10-11 17:54:09 +03:00
Serban Waltter
2ac7778d2d Added new interfaces bindings
Signed-off-by: Serban Waltter <serban.waltter@rinftech.com>
2018-10-11 17:54:09 +03:00
Serban Waltter
71a7491702 Added modifications to cmake to create a separate lib for the new interfaces using SWIG.
Signed-off-by: Serban Waltter <serban.waltter@rinftech.com>
2018-10-11 17:54:09 +03:00
Serban Waltter
360306db8d Added interface installing to cmake.
You can use it by setting IFACE_HDR with the names of the required interfaces or set module_iface in the sensor's CMakeLists.txt file.
Example files: src/abp/CMakeLists.txt src/lm35/CMakeLists.txt

Signed-off-by: Serban Waltter <serban.waltter@rinftech.com>
2018-10-11 17:54:09 +03:00
Stefan Andritoiu
2c238661ce Added iElectromagnet interface
Signed-off-by: Stefan Andritoiu <stefan.andritoiu@gmail.com>
2018-10-11 17:54:09 +03:00
Stefan Andritoiu
5a5a034248 Added iGps interface
Signed-off-by: Stefan Andritoiu <stefan.andritoiu@gmail.com>
2018-10-11 17:54:09 +03:00
Stefan Andritoiu
024fd308fa Added iWater interface
Signed-off-by: Stefan Andritoiu <stefan.andritoiu@gmail.com>
2018-10-11 17:54:09 +03:00
Stefan Andritoiu
ec58633ca5 Added iVDiv interface
Signed-off-by: Stefan Andritoiu <stefan.andritoiu@gmail.com>
2018-10-11 17:54:09 +03:00
Stefan Andritoiu
b2441100fa Added interface iButton
Signed-off-by: Stefan Andritoiu <stefan.andritoiu@gmail.com>
2018-10-11 17:54:09 +03:00
Stefan Andritoiu
3dc21b1dc8 Added interface iRotaryAngle
Signed-off-by: Stefan Andritoiu <stefan.andritoiu@gmail.com>
2018-10-11 17:54:09 +03:00
Stefan Andritoiu
ab54cb7058 Added iProximity interface
Signed-off-by: Stefan Andritoiu <stefan.andritoiu@gmail.com>
2018-10-11 17:54:09 +03:00
Stefan Andritoiu
55b2787e08 Added interface iPH
Signed-off-by: Stefan Andritoiu <stefan.andritoiu@gmail.com>
2018-10-11 17:54:09 +03:00
Stefan Andritoiu
4e61a4027e Added iOrp interface
Signed-off-by: Stefan Andritoiu <stefan.andritoiu@gmail.com>
2018-10-11 17:54:09 +03:00
Stefan Andritoiu
69464ae93b Added interfaces iEC,iEmg,iClock,iHeartRate,iLineFinder
Signed-off-by: Stefan Andritoiu <stefan.andritoiu@gmail.com>
2018-10-11 17:54:09 +03:00
Mihai Stefanescu
e7820f2831 Added initial interfaces and some sensors implementing them 2018-10-11 17:54:09 +03:00
Manivannan Sadhasivam
85608a9f61 led: Update LED init API
mraa_led_init API expects led number. So, replace it with
mraa_led_init_raw for initializing an LED based on label.

Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2018-09-28 22:45:57 -07:00
Peter Robinson
ed4fe56ef8 Use IdleNotificationDeadline as deprecated IdleNotification has been removed
In v8 API 6.5 the long deprecated IdleNotification has been removed so we
need to use IdleNotificationDeadline as nodejs 10.x uses newer v8.

Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
Signed-off-by: Noel Eck <noel.eck@intel.com>
2018-09-09 11:26:28 -07:00
Mihai Tudor Panu
1af38e060e images: update Sparkfun license for images to CC BY 2.0
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2018-09-06 07:46:33 -07:00
Mihai Tudor Panu
62f84dcc47 mmap-gpio: remove deprecated mmapped gpio function calls
The memory mapped GPIO function calls have been deprecated and in turn removed from the UPM libraries. MRAA now provides the best/fastest GPIO access possible based on the selected platform/pin automatically.

Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2018-09-04 07:53:16 -07:00
Mihai Tudor Panu
07a9af07fe upm-c: remove uint8_t limit from pin/bus variables in structs
This removes unnecessary uint8 types from C driver structs that prevented some sensors from being initialized when connected to a MRAA subplatform.

Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2018-09-04 06:32:12 -07:00
Mihai Tudor Panu
89e2ec870a bh17xx: minor documentation and formatting updates, added rohm to vendor groups
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2018-08-10 10:24:50 -07:00
Assam Boudjelthia
4935a16530 BH1749: Add library blocks to headers, JSON format, and change SWIG JAVA vector type
- Add library blocks to header files
- Removed unneccessay new lines in JSON file
- Change SWIG Java floatVector to uint16Vector

Signed-off-by: Assam Boudjelthia <assam.boudjelthia@fi.rohmeurope.com>
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2018-08-09 12:03:40 -07:00
Assam Boudjelthia
5f2557b159 bh1749: C/C++ driver implementation for BH1749 color sensor
* Main C implementation
* C++ wrapper on C implementation

Signed-off-by: Assam Boudjelthia <assam.boudjelthia@fi.rohmeurope.com>
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2018-08-09 12:03:29 -07:00
Assam Boudjelthia
e0105cb601 BH1792: C/C++ driver for ROHM heart rate sensor
- Base C implementation, with all features and measurement modes (interrupts uses ISR)
- C++ wrapper around C implementation

Signed-off-by: Assam Boudjelthia <assam.boudjelthia@fi.rohmeurope.com>
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2018-08-09 12:03:19 -07:00
Noel Eck
db3c73cbd1 utilities: Update time/r methods for LINUX
Default to MONOTONIC clock for timer methods to avoid falling victim to
clock corrections.  Changed signatures from accepting pointers since
this is not needed an complicates calls and Java/JS/Python bindings.

    * Switched from nanosleep to clock_nanosleep to allow developers to
      provide a clock for LINUX
    * Default upm_clock_init to CLOCK_MONOTONIC
    * Updated logic to calculating delay and elapsed to be more readable
    * Added ns flavors for completeness
    * Refactored all upm_* delay/timer methods
    * Added #else for preprocessor cases w/o an #else
    * Added test for AQI
    * Added test fixture with logic to identify a minimum delay time
      which is used as a metric for testing all delay methods
    * Much more lenient unit testing of delays to minimize false CI
      failures

Signed-off-by: Noel Eck <noel.eck@intel.com>
2018-07-31 14:20:30 -07:00
Khem Raj
8a617aa904 upm: musl and gcc8 fixes
gcc8 detects that strncpy is overwiritng the null terminating character
the source strings are already initialized to 0 so memcpy would do the same
job

Fixes
rn2903.c:153:5: error: 'strncpy' output may be truncated copying 16 bytes from a string of length 511 [-Werror=stringop-truncation]
     strncpy(dev->hardware_eui, dev->resp_data, RN2903_MAX_HEX_EUI64);
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

include sys/types.h for uint definition

uint is defined in sys/types.h, therefore this
header needs to be included, it gets exposed with
musl where this header is not getting included indirectly
as it is happening when building on glibc

Fixes build errors on musl e.g.
upm/src/kx122/kx122.hpp:456:31: error: 'uint' has not been declared
|        void setBufferThreshold(uint samples);
|                                ^~~~

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2018-07-13 13:36:39 -07:00
Noel Eck
a16d279b6f bma220: Added std_vector to SWIG interface file
Updated the bma220 SWIG interface file to use std_vector.i for JS and
Python.

Signed-off-by: Noel Eck <noel.eck@intel.com>
2018-07-02 15:14:47 -07:00
Noel Eck
3e84b74bdf kxtj3: A few last-minute changes to the kxtj3 src
* Removed trailing whitespace
    * Fixed a few spelling errors
    * Switched to upm_delay_us for C source

Signed-off-by: Noel Eck <noel.eck@intel.com>
2018-06-21 10:33:38 -07:00
Assam Boudjelthia
186bbfab76 kxtj3: Add java/python/javascript examples
* 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>
2018-06-21 10:04:36 -07:00
Assam Boudjelthia
01cc3a0734 kxtj3: fixed requested issues
* Virtual destructor
* Add header guards
* Constructor default values
* Remove methods with pointer parameters in C++ code

Signed-off-by: Assam Boudjelthia <assam.boudjelthia@fi.rohmeurope.com>
Signed-off-by: Noel Eck <noel.eck@intel.com>
2018-06-21 10:04:24 -07:00