mirror of
https://github.com/eclipse/upm.git
synced 2025-03-14 20:47:30 +03:00
Removed old interfaces and replaced them with the new ones.
Signed-off-by: Serban Waltter <serban.waltter@rinftech.com>
This commit is contained in:
parent
fae1da6c6f
commit
5f9bebad14
@ -4,9 +4,9 @@ file (GLOB example_src_list RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*.cxx")
|
||||
# - Handle special cases here --------------------------------------------------
|
||||
|
||||
# Test temperature interface for 2 sensor libraries
|
||||
add_example(iTemperature_sample.cxx TARGETS new_interfaces lm35 abp)
|
||||
add_example(iTemperature_sample.cxx TARGETS interfaces lm35 abp)
|
||||
# Test light interface for 3 sensor libraries
|
||||
add_example(iLight_sample.cxx TARGETS new_interfaces apds9002 bh1750 max44009)
|
||||
add_example(iLight_sample.cxx TARGETS interfaces apds9002 bh1750 max44009)
|
||||
|
||||
# - Create an executable for all other src files in this directory -------------
|
||||
foreach (_example_src ${example_src_list})
|
||||
|
@ -27,7 +27,6 @@
|
||||
#include <stddef.h>
|
||||
|
||||
#include "ads1015.hpp"
|
||||
#include "iADC.hpp"
|
||||
#include "mraa/gpio.hpp"
|
||||
#include "upm_utilities.h"
|
||||
|
||||
@ -39,24 +38,21 @@ int
|
||||
main()
|
||||
{
|
||||
/* Create an instance of the ADS1015 sensor */
|
||||
upm::ADS1015 sensor(EDISON_I2C_BUS);
|
||||
upm::ADS1015 adc(EDISON_I2C_BUS);
|
||||
mraa::Gpio gpio(EDISON_GPIO_SI7005_CS);
|
||||
gpio.dir(mraa::DIR_OUT_HIGH);
|
||||
|
||||
/* Show usage from the IADC interface */
|
||||
upm::IADC* adc = static_cast<upm::IADC*>(&sensor);
|
||||
|
||||
if (adc == NULL) {
|
||||
std::cout << "ADC not detected" << std::endl;
|
||||
return 1;
|
||||
}
|
||||
std::cout << "ADC " << adc->getModuleName() << " detected. ";
|
||||
std::cout << adc->getNumInputs() << " inputs available" << std::endl;
|
||||
// if (adc == NULL) {
|
||||
// std::cout << "ADC not detected" << std::endl;
|
||||
// return 1;
|
||||
// }
|
||||
std::cout << "ADC " << adc.getModuleName() << " detected. ";
|
||||
std::cout << adc.getNumInputs() << " inputs available" << std::endl;
|
||||
while (true) {
|
||||
for (unsigned int i = 0; i < adc->getNumInputs(); ++i) {
|
||||
for (unsigned int i = 0; i < adc.getNumInputs(); ++i) {
|
||||
std::cout << "Input " << i;
|
||||
try {
|
||||
float voltage = adc->getVoltage(i);
|
||||
float voltage = adc.getVoltage(i);
|
||||
std::cout << ": Voltage = " << voltage << "V" << std::endl;
|
||||
} catch (std::exception& e) {
|
||||
std::cerr << e.what() << std::endl;
|
||||
|
@ -8,7 +8,7 @@
|
||||
#define DS1808_GPIO_PWR 15 // Edison GP165
|
||||
|
||||
void
|
||||
printState(upm::ILightController& lightController)
|
||||
printState(upm::DS1808LC& lightController)
|
||||
{
|
||||
if (lightController.isPowered()) {
|
||||
std::cout << "Light is powered, brightness = " << lightController.getBrightness()
|
||||
|
@ -3,13 +3,12 @@
|
||||
#include <string>
|
||||
|
||||
#include "hlg150h.hpp"
|
||||
#include "iLightController.hpp"
|
||||
|
||||
#define HLG150H_GPIO_RELAY 21
|
||||
#define HLG150H_GPIO_PWM 22
|
||||
|
||||
void
|
||||
printState(upm::ILightController& lightController)
|
||||
printState(upm::HLG150H& lightController)
|
||||
{
|
||||
if (lightController.isPowered()) {
|
||||
std::cout << "Light is powered, brightness = " << lightController.getBrightness()
|
||||
|
@ -2,14 +2,13 @@
|
||||
#include <stdlib.h>
|
||||
#include <string>
|
||||
|
||||
#include "iLightController.hpp"
|
||||
#include "lp8860.hpp"
|
||||
|
||||
#define EDISON_I2C_BUS 1 // Edison I2C-1
|
||||
#define LP8860_GPIO_PWR 45 // Edison GP45
|
||||
|
||||
void
|
||||
printState(upm::ILightController& lightController)
|
||||
printState(upm::LP8860& lightController)
|
||||
{
|
||||
if (lightController.isPowered()) {
|
||||
std::cout << "Light is powered, brightness = " << lightController.getBrightness()
|
||||
|
@ -27,7 +27,6 @@
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include "iCO2Sensor.hpp"
|
||||
#include "mraa/common.h"
|
||||
#include "t6713.hpp"
|
||||
#include "upm_utilities.h"
|
||||
@ -40,19 +39,16 @@ int
|
||||
main()
|
||||
{
|
||||
/* Create an instance of the T6713 sensor */
|
||||
upm::T6713 sensor(EDISON_I2C_BUS);
|
||||
upm::T6713 cO2Sensor(EDISON_I2C_BUS);
|
||||
|
||||
/* Show usage from the ICO2Sensor interface */
|
||||
upm::ICO2Sensor* cO2Sensor = static_cast<upm::ICO2Sensor*>(&sensor);
|
||||
|
||||
if (cO2Sensor == NULL) {
|
||||
std::cout << "CO2 sensor not detected" << std::endl;
|
||||
return 1;
|
||||
}
|
||||
std::cout << "CO2 sensor " << cO2Sensor->getModuleName() << " detected" << std::endl;
|
||||
// if (cO2Sensor == NULL) {
|
||||
// std::cout << "CO2 sensor not detected" << std::endl;
|
||||
// return 1;
|
||||
// }
|
||||
std::cout << "CO2 sensor " << cO2Sensor.getModuleName() << " detected" << std::endl;
|
||||
while (true) {
|
||||
try {
|
||||
uint16_t value = cO2Sensor->getPpm();
|
||||
uint16_t value = cO2Sensor.getPpm();
|
||||
std::cout << "CO2 level = " << value << " ppm" << std::endl;
|
||||
} catch (std::exception& e) {
|
||||
std::cerr << e.what() << std::endl;
|
||||
|
@ -24,7 +24,7 @@
|
||||
*/
|
||||
|
||||
import upm_bmp280.*;
|
||||
import upm_new_interfaces.*;
|
||||
import upm_interfaces.*;
|
||||
|
||||
public class BME280_Interface_Example
|
||||
{
|
||||
|
@ -64,81 +64,81 @@ function(add_example example_class_name dependency_list)
|
||||
add_dependencies(${example_class_name} ${java_targets_list})
|
||||
endfunction()
|
||||
|
||||
add_example(A110X_Example "a110x;new_interfaces")
|
||||
add_example(A110X_intr_Example "a110x;new_interfaces")
|
||||
add_example(A110X_Example "a110x;interfaces")
|
||||
add_example(A110X_intr_Example "a110x;interfaces")
|
||||
add_example(Ad8232_Example ad8232)
|
||||
add_example(ADC121C021_Example adc121c021)
|
||||
add_example(Ads1015_Example "ads1x15;interfaces")
|
||||
add_example(Ads1015_Example "ads1x15")
|
||||
add_example(Ads1115_Example ads1x15)
|
||||
add_example(Adxl345_Example adxl345)
|
||||
add_example(AM2315_Example "am2315;new_interfaces")
|
||||
add_example(AM2315_Example "am2315;interfaces")
|
||||
add_example(APA102_Example apa102)
|
||||
add_example(Apds9002_Example "apds9002;new_interfaces")
|
||||
add_example(BH1750_Example "bh1750;new_interfaces")
|
||||
add_example(BISS0001_Example "biss0001;new_interfaces")
|
||||
add_example(BMA250E_Example "bma250e;new_interfaces")
|
||||
add_example(BMC150_Example "bmx055;new_interfaces")
|
||||
add_example(BME280_Example "bmp280;new_interfaces")
|
||||
add_example(Apds9002_Example "apds9002;interfaces")
|
||||
add_example(BH1750_Example "bh1750;interfaces")
|
||||
add_example(BISS0001_Example "biss0001;interfaces")
|
||||
add_example(BMA250E_Example "bma250e;interfaces")
|
||||
add_example(BMC150_Example "bmx055;interfaces")
|
||||
add_example(BME280_Example "bmp280;interfaces")
|
||||
add_example(BMG160_Example bmg160)
|
||||
add_example(BMI055_Example "bmx055;new_interfaces")
|
||||
add_example(BMI160_Example "bmi160;new_interfaces")
|
||||
add_example(BMI055_Example "bmx055;interfaces")
|
||||
add_example(BMI160_Example "bmi160;interfaces")
|
||||
add_example(BMM150_Example bmm150)
|
||||
add_example(BMP280_Example "bmp280;new_interfaces")
|
||||
add_example(BMPX8X_Example "bmpx8x;new_interfaces")
|
||||
add_example(BMX055_Example "bmx055;new_interfaces")
|
||||
add_example(BMP280_Example "bmp280;interfaces")
|
||||
add_example(BMPX8X_Example "bmpx8x;interfaces")
|
||||
add_example(BMX055_Example "bmx055;interfaces")
|
||||
add_example(BNO055_Example bno055)
|
||||
add_example(Button_Example button)
|
||||
add_example(Button_intr_Example button)
|
||||
add_example(Button_Example "button;interfaces")
|
||||
add_example(Button_intr_Example "button;interfaces")
|
||||
add_example(Buzzer_Example buzzer)
|
||||
add_example(CJQ4435_Example cjq4435)
|
||||
add_example(Collision_Example "collision;new_interfaces")
|
||||
add_example(Collision_Example "collision;interfaces")
|
||||
add_example(CWLSXXA_Example cwlsxxa)
|
||||
add_example(DFREC_Example dfrec)
|
||||
add_example(DFRORP_Example dfrorp)
|
||||
add_example(DFREC_Example "dfrec;interfaces")
|
||||
add_example(DFRORP_Example "dfrorp;interfaces")
|
||||
add_example(DS1307_Example ds1307)
|
||||
add_example(ECEZO_Example ecezo)
|
||||
add_example(ECEZO_Example "ecezo;interfaces")
|
||||
add_example(ECS1030_Example ecs1030)
|
||||
add_example(EHR_Example "ehr;new_interfaces")
|
||||
add_example(Emg_Example emg)
|
||||
add_example(EHR_Example "ehr;interfaces")
|
||||
add_example(Emg_Example "emg;interfaces")
|
||||
add_example(ENC03R_Example enc03r)
|
||||
add_example(ES08A_Example "servo;interfaces")
|
||||
add_example(ES08A_Example "servo")
|
||||
add_example(FlexSensor_Example flex)
|
||||
add_example(Gp2y0a_Example gp2y0a)
|
||||
add_example(GroveButton_Example grove)
|
||||
add_example(GroveButton_intr_Example grove)
|
||||
add_example(GroveEHR_Example "groveehr;new_interfaces")
|
||||
add_example(GroveEmg_Example groveemg)
|
||||
add_example(GroveGsr_Example grovegsr)
|
||||
add_example(Gp2y0a_Example "gp2y0a;interfaces")
|
||||
add_example(GroveButton_Example "grove;interfaces")
|
||||
add_example(GroveButton_intr_Example "grove;interfaces")
|
||||
add_example(GroveEHR_Example "groveehr;interfaces")
|
||||
add_example(GroveEmg_Example "groveemg;interfaces")
|
||||
add_example(GroveGsr_Example "grovegsr;interfaces")
|
||||
add_example(GroveLEDBar_Example my9221)
|
||||
add_example(GroveLED_Example grove)
|
||||
add_example(GroveLed_multi_Example grove)
|
||||
add_example(GroveLight_Example "grove;new_interfaces")
|
||||
add_example(GroveLineFinder_Example grovelinefinder)
|
||||
add_example(GroveLight_Example "grove;interfaces")
|
||||
add_example(GroveLineFinder_Example "grovelinefinder;interfaces")
|
||||
add_example(GroveMD_Example grovemd)
|
||||
add_example(GroveMoisture_Example "grovemoisture;new_interfaces")
|
||||
add_example(GroveMoisture_Example "grovemoisture;interfaces")
|
||||
add_example(GroveMQ3_Example gas)
|
||||
add_example(GroveMQ9_Example gas)
|
||||
add_example(GroveO2_Example groveo2)
|
||||
add_example(GroveQTouch_Example at42qt1070)
|
||||
add_example(GroveRelay_Example grove)
|
||||
add_example(GroveRotary_Example grove)
|
||||
add_example(GroveRotary_Example "grove;interfaces")
|
||||
add_example(GROVESCAM_Example grovescam)
|
||||
add_example(GroveSlide_Example grove)
|
||||
add_example(GroveSpeaker_Example grovespeaker)
|
||||
add_example(GroveTemp_Example "grove;new_interfaces")
|
||||
add_example(GroveVDiv_Example grovevdiv)
|
||||
add_example(GroveTemp_Example "grove;interfaces")
|
||||
add_example(GroveVDiv_Example "grovevdiv;interfaces")
|
||||
add_example(GroveWater_Example grovewater)
|
||||
add_example(GroveWFS_Example grovewfs)
|
||||
add_example(Gsr_Example gsr)
|
||||
add_example(Gsr_Example "gsr;interfaces")
|
||||
add_example(GUVAS12D_Example guvas12d)
|
||||
add_example(H3LIS331DL_Example "h3lis331dl;new_interfaces")
|
||||
add_example(HCSR04_Example "hcsr04;new_interfaces")
|
||||
add_example(H3LIS331DL_Example "h3lis331dl;interfaces")
|
||||
add_example(HCSR04_Example "hcsr04;interfaces")
|
||||
add_example(HKA5_Example hka5)
|
||||
add_example(HM11_Example hm11)
|
||||
add_example(Hmc5883l_Example hmc5883l)
|
||||
add_example(HMTRP_Example hmtrp)
|
||||
add_example(HP20x_Example "hp20x;new_interfaces")
|
||||
add_example(HTU21D_Example "htu21d;new_interfaces")
|
||||
add_example(HP20x_Example "hp20x;interfaces")
|
||||
add_example(HTU21D_Example "htu21d;interfaces")
|
||||
add_example(Itg3200_Example itg3200)
|
||||
add_example(Jhd1313m1_Example jhd1313m1)
|
||||
add_example(Jhd1313m1_lcd_Example jhd1313m1)
|
||||
@ -150,60 +150,60 @@ add_example(Lcm1602_parallel_Example lcm1602)
|
||||
add_example(LDT0028_Example ldt0028)
|
||||
add_example(LE910_Example uartat)
|
||||
add_example(LED_Example led)
|
||||
add_example(Light_Example "light;new_interfaces")
|
||||
add_example(LineFinder_Example linefinder)
|
||||
add_example(LIS2DS12_Example "lis2ds12;new_interfaces")
|
||||
add_example(Light_Example "light;interfaces")
|
||||
add_example(LineFinder_Example "linefinder;interfaces")
|
||||
add_example(LIS2DS12_Example "lis2ds12;interfaces")
|
||||
add_example(LoL_Example lol)
|
||||
add_example(LSM303AGR_Example "lsm303agr;new_interfaces")
|
||||
add_example(LSM303D_Example "lsm303d;new_interfaces")
|
||||
add_example(LSM303AGR_Example "lsm303agr;interfaces")
|
||||
add_example(LSM303D_Example "lsm303d;interfaces")
|
||||
add_example(LSM303DLH_Example lsm303dlh)
|
||||
add_example(LSM6DS3H_Example "lsm6ds3h;new_interfaces")
|
||||
add_example(LSM6DSL_Example "lsm6dsl;new_interfaces")
|
||||
add_example(LSM6DS3H_Example "lsm6ds3h;interfaces")
|
||||
add_example(LSM6DSL_Example "lsm6dsl;interfaces")
|
||||
add_example(M24LR64E_Example m24lr64e)
|
||||
add_example(MAX30100_Example max30100)
|
||||
add_example(MAX31855_Example max31855)
|
||||
add_example(MAX44000_Example max44000)
|
||||
add_example(MAX44000_Example "max44000;interfaces")
|
||||
add_example(MAX5487_Example max5487)
|
||||
add_example(MAXds3231m_Example maxds3231m)
|
||||
add_example(MB704X_Example "mb704x;new_interfaces")
|
||||
add_example(MB704X_Example "mb704x;interfaces")
|
||||
add_example(MCP2515_Example mcp2515)
|
||||
add_example(MCP2515_TXRX_Example mcp2515)
|
||||
add_example(MD_Example md)
|
||||
add_example(MHZ16_Example mhz16)
|
||||
add_example(Microphone_Example mic)
|
||||
add_example(MMA7361_Example mma7361)
|
||||
add_example(MMA7455_Example "mma7455;new_interfaces")
|
||||
add_example(MMA7660_Example "mma7660;new_interfaces")
|
||||
add_example(Moisture_Example "moisture;new_interfaces")
|
||||
add_example(MPL3115A2_Example "mpl3115a2;new_interfaces")
|
||||
add_example(MMA7455_Example "mma7455;interfaces")
|
||||
add_example(MMA7660_Example "mma7660;interfaces")
|
||||
add_example(Moisture_Example "moisture;interfaces")
|
||||
add_example(MPL3115A2_Example "mpl3115a2;interfaces")
|
||||
add_example(MPR121_Example mpr121)
|
||||
add_example(MPU9150_Example "mpu9150;new_interfaces")
|
||||
add_example(MPU9150_Example "mpu9150;interfaces")
|
||||
add_example(MQ2_Example gas)
|
||||
add_example(MQ303A_Example mq303a)
|
||||
add_example(MQ5_Example gas)
|
||||
add_example(MS5803_Example "ms5803;new_interfaces")
|
||||
add_example(MS5803_Example "ms5803;interfaces")
|
||||
add_example(NMEAGPS_Example nmea_gps)
|
||||
add_example(NMEAGPS_I2C_Example nmea_gps)
|
||||
add_example(NRF24L01_receiver_Example nrf24l01)
|
||||
add_example(NRF24L01_transmitter_Example nrf24l01)
|
||||
add_example(NUNCHUCK_Example nunchuck)
|
||||
add_example(O2_Example o2)
|
||||
add_example(OTP538U_Example otp538u)
|
||||
add_example(OTP538U_Example "otp538u;interfaces")
|
||||
add_example(P9813_Example p9813)
|
||||
add_example(PPD42NS_Example ppd42ns)
|
||||
add_example(Pulsensor_Example pulsensor)
|
||||
add_example(Relay_Example relay)
|
||||
add_example(RFR359F_Example "rfr359f;new_interfaces")
|
||||
add_example(RFR359F_Example "rfr359f;interfaces")
|
||||
add_example(RN2903_Example rn2903)
|
||||
add_example(RN2903_P2P_RX_Example rn2903)
|
||||
add_example(RN2903_P2P_TX_Example rn2903)
|
||||
add_example(RotaryEncoder_Example rotaryencoder)
|
||||
add_example(Rotary_Example rotary)
|
||||
add_example(RotaryEncoder_Example "rotaryencoder;interfaces")
|
||||
add_example(Rotary_Example "rotary;interfaces")
|
||||
add_example(RPR220_Example rpr220)
|
||||
add_example(RPR220_intr_Example rpr220)
|
||||
add_example(SCAM_Example scam)
|
||||
add_example(SensorTemplate_Example sensortemplate)
|
||||
add_example(SHT1X_Example "sht1x;new_interfaces")
|
||||
add_example(SHT1X_Example "sht1x;interfaces")
|
||||
add_example(Slide_Example slide)
|
||||
add_example(SM130_Example sm130)
|
||||
add_example(Speaker_Example speaker)
|
||||
@ -211,18 +211,18 @@ add_example(SpeakerPWM_Example speaker)
|
||||
add_example(SSD1308_oled_Example lcd)
|
||||
add_example(SSD1327_oled_Example lcd)
|
||||
add_example(ST7735_Example st7735)
|
||||
add_example(TEAMS_Example teams)
|
||||
add_example(Temperature_Example temperature)
|
||||
add_example(TEX00_Example tex00)
|
||||
add_example(Th02_Example "th02;new_interfaces")
|
||||
add_example(TEAMS_Example "teams;interfaces")
|
||||
add_example(Temperature_Example "temperature;interfaces")
|
||||
add_example(TEX00_Example "tex00;interfaces")
|
||||
add_example(Th02_Example "th02;interfaces")
|
||||
add_example(TM1637_Example tm1637)
|
||||
add_example(TP401_Example gas)
|
||||
add_example(TSL2561_Example "tsl2561;new_interfaces")
|
||||
add_example(TTP223_Example ttp223)
|
||||
add_example(TSL2561_Example "tsl2561;interfaces")
|
||||
add_example(TTP223_Example "ttp223;interfaces")
|
||||
add_example(ULN200XA_Example uln200xa)
|
||||
add_example(VDiv_Example vdiv)
|
||||
add_example(VDiv_Example "vdiv;interfaces")
|
||||
add_example(VEML6070_Example veml6070)
|
||||
add_example(Water_Example water)
|
||||
add_example(Water_Example "water;interfaces")
|
||||
add_example(WaterLevelSensor_Example waterlevel)
|
||||
add_example(WFS_Example wfs)
|
||||
add_example(WT5001_Example wt5001)
|
||||
@ -230,9 +230,9 @@ add_example(YG1006_Example yg1006)
|
||||
add_example(ZFM20_Example zfm20)
|
||||
|
||||
if(SWIG_VERSION VERSION_GREATER 3.0.8)
|
||||
add_example(BME280_Interface_Example "bmp280;new_interfaces")
|
||||
add_example(IMS_Example "ims;new_interfaces")
|
||||
add_example(RHUSB_Example "rhusb;new_interfaces")
|
||||
add_example(BME280_Interface_Example "bmp280;interfaces")
|
||||
add_example(IMS_Example "ims;interfaces")
|
||||
add_example(RHUSB_Example "rhusb;interfaces")
|
||||
endif()
|
||||
|
||||
if (OPENZWAVE_FOUND)
|
||||
|
@ -23,7 +23,7 @@
|
||||
*/
|
||||
|
||||
import upm_sht1x.SHT1X;
|
||||
import upm_new_interfaces.*;
|
||||
import upm_interfaces.*;
|
||||
|
||||
public class SHT1X_Example
|
||||
{
|
||||
|
@ -2,7 +2,7 @@
|
||||
* Author: Serban Waltter <serban.waltter@rinftech.com>
|
||||
*/
|
||||
|
||||
import upm_new_interfaces.*;
|
||||
import upm_interfaces.*;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
* Author: Serban Waltter <serban.waltter@rinftech.com>
|
||||
*/
|
||||
|
||||
import upm_new_interfaces.*;
|
||||
import upm_interfaces.*;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
* Author: Serban Waltter <serban.waltter@rinftech.com>
|
||||
*/
|
||||
|
||||
import upm_new_interfaces.*;
|
||||
import upm_interfaces.*;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
* Author: Serban Waltter <serban.waltter@rinftech.com>
|
||||
*/
|
||||
|
||||
import upm_new_interfaces.*;
|
||||
import upm_interfaces.*;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
* Author: Serban Waltter <serban.waltter@rinftech.com>
|
||||
*/
|
||||
|
||||
import upm_new_interfaces.*;
|
||||
import upm_interfaces.*;
|
||||
|
||||
import upm_moisture.*;
|
||||
import upm_ims.*;
|
||||
|
@ -7,7 +7,7 @@ import java.util.ArrayList;
|
||||
import upm_bmp280.BMP280;
|
||||
import upm_hp20x.HP20X;
|
||||
import upm_ms5611.MS5611;
|
||||
import upm_new_interfaces.*;
|
||||
import upm_interfaces.*;
|
||||
|
||||
/**
|
||||
* iPressure_Example
|
||||
|
@ -1,4 +1,4 @@
|
||||
set (libname "new_interfaces")
|
||||
set (libname "interfaces")
|
||||
set (libdescription "CXX Interface Library")
|
||||
set (module_src ${libname}.cxx)
|
||||
|
||||
|
@ -40,7 +40,7 @@ namespace upm
|
||||
* Get acceleration values on X, Y and Z axis.
|
||||
* v[0] = X, v[1] = Y, v[2] = Z
|
||||
*
|
||||
* @return vector of 3 floats containing acceleration on each axis
|
||||
* @return vector of 3 floats containing acceleration on each axis in Gs
|
||||
*/
|
||||
virtual std::vector<float> getAcceleration() = 0;
|
||||
};
|
||||
|
@ -1,9 +1,14 @@
|
||||
#include "iAcceleration.hpp"
|
||||
#include "iAngle.hpp"
|
||||
#include "iButton.hpp"
|
||||
#include "iClock.hpp"
|
||||
#include "iCollision.hpp"
|
||||
#include "iDistance.hpp"
|
||||
#include "iDistanceInterrupter.hpp"
|
||||
#include "iEC.hpp"
|
||||
#include "iElectromagnet.hpp"
|
||||
#include "iEmg.hpp"
|
||||
#include "iGps.hpp"
|
||||
#include "iHallEffect.hpp"
|
||||
#include "iHeartRate.hpp"
|
||||
#include "iHumidity.hpp"
|
||||
@ -11,6 +16,10 @@
|
||||
#include "iLineFinder.hpp"
|
||||
#include "iMoisture.hpp"
|
||||
#include "iMotion.hpp"
|
||||
#include "iOrp.hpp"
|
||||
#include "iPH.hpp"
|
||||
#include "iPressure.hpp"
|
||||
#include "iProximity.hpp"
|
||||
#include "iTemperature.hpp"
|
||||
#include "iAcceleration.hpp"
|
||||
#include "iVDiv.hpp"
|
||||
#include "iWater.hpp"
|
@ -1,7 +1,7 @@
|
||||
#ifdef SWIGPYTHON
|
||||
%module (package="upm") pyupm_new_interfaces
|
||||
%module (package="upm") pyupm_interfaces
|
||||
#else
|
||||
%module new_interfaces
|
||||
%module interfaces
|
||||
#endif
|
||||
|
||||
#ifdef SWIGJAVA
|
||||
@ -39,11 +39,17 @@ import java.lang.Float;
|
||||
|
||||
%template(floatVector) std::vector<float>;
|
||||
|
||||
%interface_impl (upm::iAcceleration);
|
||||
%interface_impl (upm::iAngle);
|
||||
%interface_impl (upm::iButton);
|
||||
%interface_impl (upm::iClock);
|
||||
%interface_impl (upm::iCollision);
|
||||
%interface_impl (upm::iDistance);
|
||||
%interface_impl (upm::iDistanceInterrupter);
|
||||
%interface_impl (upm::iEC);
|
||||
%interface_impl (upm::iElectromagnet);
|
||||
%interface_impl (upm::iEmg);
|
||||
%interface_impl (upm::iGps);
|
||||
%interface_impl (upm::iHallEffect);
|
||||
%interface_impl (upm::iHeartRate);
|
||||
%interface_impl (upm::iHumidity);
|
||||
@ -51,17 +57,27 @@ import java.lang.Float;
|
||||
%interface_impl (upm::iLineFinder);
|
||||
%interface_impl (upm::iMoisture);
|
||||
%interface_impl (upm::iMotion);
|
||||
%interface_impl (upm::iOrp);
|
||||
%interface_impl (upm::iPH);
|
||||
%interface_impl (upm::iPressure);
|
||||
%interface_impl (upm::iProximity);
|
||||
%interface_impl (upm::iTemperature);
|
||||
%interface_impl (upm::iAcceleration);
|
||||
%interface_impl (upm::iVDiv);
|
||||
%interface_impl (upm::iWater);
|
||||
#endif
|
||||
|
||||
%{
|
||||
#include "iAcceleration.hpp"
|
||||
#include "iAngle.hpp"
|
||||
#include "iButton.hpp"
|
||||
#include "iClock.hpp"
|
||||
#include "iCollision.hpp"
|
||||
#include "iDistance.hpp"
|
||||
#include "iDistanceInterrupter.hpp"
|
||||
#include "iEC.hpp"
|
||||
#include "iElectromagnet.hpp"
|
||||
#include "iEmg.hpp"
|
||||
#include "iGps.hpp"
|
||||
#include "iHallEffect.hpp"
|
||||
#include "iHeartRate.hpp"
|
||||
#include "iHumidity.hpp"
|
||||
@ -69,16 +85,26 @@ import java.lang.Float;
|
||||
#include "iLineFinder.hpp"
|
||||
#include "iMoisture.hpp"
|
||||
#include "iMotion.hpp"
|
||||
#include "iOrp.hpp"
|
||||
#include "iPH.hpp"
|
||||
#include "iPressure.hpp"
|
||||
#include "iProximity.hpp"
|
||||
#include "iTemperature.hpp"
|
||||
#include "iAcceleration.hpp"
|
||||
#include "iVDiv.hpp"
|
||||
#include "iWater.hpp"
|
||||
%}
|
||||
|
||||
%include "iAcceleration.hpp"
|
||||
%include "iAngle.hpp"
|
||||
%include "iButton.hpp"
|
||||
%include "iClock.hpp"
|
||||
%include "iCollision.hpp"
|
||||
%include "iDistance.hpp"
|
||||
%include "iDistanceInterrupter.hpp"
|
||||
%include "iEC.hpp"
|
||||
%include "iElectromagnet.hpp"
|
||||
%include "iEmg.hpp"
|
||||
%include "iGps.hpp"
|
||||
%include "iHallEffect.hpp"
|
||||
%include "iHeartRate.hpp"
|
||||
%include "iHumidity.hpp"
|
||||
@ -86,9 +112,13 @@ import java.lang.Float;
|
||||
%include "iLineFinder.hpp"
|
||||
%include "iMoisture.hpp"
|
||||
%include "iMotion.hpp"
|
||||
%include "iOrp.hpp"
|
||||
%include "iPH.hpp"
|
||||
%include "iPressure.hpp"
|
||||
%include "iProximity.hpp"
|
||||
%include "iTemperature.hpp"
|
||||
%include "iAcceleration.hpp"
|
||||
%include "iVDiv.hpp"
|
||||
%include "iWater.hpp"
|
||||
|
||||
/* Java-specific SWIG syntax */
|
||||
#ifdef SWIGJAVA
|
@ -25,7 +25,7 @@ cd ${ROOT_DIR} && make -j8 -Cbuild 2> ${BUILD_LOGS_DIR}/build-doc.log
|
||||
cd ${BUILD_DIR} && find ../src/ -name "*.i" > upm.i.list && \
|
||||
../doxy/doxyport/doxyport upm.i.list \
|
||||
--cmake ./compile_commands.json \
|
||||
--source ../src/interfaces/,../src/bacnetmstp,src \
|
||||
--source ../src/bacnetmstp,src \
|
||||
--destination src/ \
|
||||
--convert-protected-to-private \
|
||||
--output upm-java-files.txt \
|
||||
|
@ -255,23 +255,23 @@ function (_get_current_dot_i_file filePrefix varDotIFile)
|
||||
string(REPLACE "#" "%" SWIG_PERCENT_INCLUDES "${SWIG_HASH_INCLUDES}")
|
||||
if(module_iface)
|
||||
# Set up Python bindings
|
||||
set(PYTHON_NEW_INTERFACES "#ifdef SWIGPYTHON\n")
|
||||
string(APPEND PYTHON_NEW_INTERFACES "%module (package=\"pyupm_new_interfaces\") ${libname}\n")
|
||||
string(APPEND PYTHON_NEW_INTERFACES "#endif")
|
||||
set(PYTHON_INTERFACES "#ifdef SWIGPYTHON\n")
|
||||
string(APPEND PYTHON_INTERFACES "%module (package=\"upm\") ${libname}\n")
|
||||
string(APPEND PYTHON_INTERFACES "#endif")
|
||||
# Include interfaces
|
||||
set(IMPORT_NEW_INTERFACES "%import \"interfaces/new_interfaces.i\"")
|
||||
set(IMPORT_INTERFACES "%import \"interfaces/interfaces.i\"")
|
||||
# Set up Java bindings
|
||||
string(APPEND JAVA_TYPEMAPS "%typemap(javaimports) SWIGTYPE %{\n")
|
||||
string(APPEND JAVA_TYPEMAPS "import upm_new_interfaces.*;\n%}")
|
||||
string(APPEND JAVA_TYPEMAPS "import upm_interfaces.*;\n%}")
|
||||
if (CMAKE_VERSION VERSION_LESS "3.3" )
|
||||
list (FIND module_iface "iAcceleration.hpp" _index)
|
||||
if (${_index} GREATER -1)
|
||||
set(JAVA_TYPEMAPS "%typemap(javaimports) SWIGTYPE %{\nimport upm_new_interfaces.*;\n\nimport java.util.AbstractList;\nimport java.lang.Float;\n%}\n")
|
||||
set(JAVA_TYPEMAPS "%typemap(javaimports) SWIGTYPE %{\nimport upm_interfaces.*;\n\nimport java.util.AbstractList;\nimport java.lang.Float;\n%}\n")
|
||||
endif()
|
||||
else()
|
||||
cmake_policy(SET CMP0057 NEW)
|
||||
if ("iAcceleration.hpp" IN_LIST module_iface)
|
||||
set(JAVA_TYPEMAPS "%typemap(javaimports) SWIGTYPE %{\nimport upm_new_interfaces.*;\n\nimport java.util.AbstractList;\nimport java.lang.Float;\n%}\n")
|
||||
set(JAVA_TYPEMAPS "%typemap(javaimports) SWIGTYPE %{\nimport upm_interfaces.*;\n\nimport java.util.AbstractList;\nimport java.lang.Float;\n%}\n")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
@ -329,7 +329,7 @@ macro(_upm_swig_python)
|
||||
set (python_wrapper_target ${SWIG_MODULE_${python_wrapper_name}_REAL_NAME})
|
||||
|
||||
if(module_iface)
|
||||
add_dependencies(${python_wrapper_target} _pyupm_new_interfaces-python${PYTHON_VERSION_MAJOR})
|
||||
add_dependencies(${python_wrapper_target} _pyupm_interfaces-python${PYTHON_VERSION_MAJOR})
|
||||
endif()
|
||||
|
||||
add_dependencies(${python_wrapper_target} ${libname})
|
||||
@ -464,7 +464,7 @@ function(upm_swig_node)
|
||||
|
||||
# Add interfaces if necessary
|
||||
if(module_iface)
|
||||
add_dependencies(jsupm_${libname} jsupm_new_interfaces)
|
||||
add_dependencies(jsupm_${libname} jsupm_interfaces)
|
||||
endif()
|
||||
|
||||
add_dependencies(jsupm_${libname} ${libname})
|
||||
@ -556,15 +556,9 @@ function(upm_swig_java)
|
||||
|
||||
# If the C++ target depends on C++ interfaces, make the JAVA target
|
||||
# depend on the JAVA interfaces
|
||||
if ("${_c_cxx_dependency_list}" MATCHES interfaces)
|
||||
add_dependencies(javaupm_${libname} javaupm_interfaces)
|
||||
# If this target depends on interfaces, include the java interfaces
|
||||
# target .jar file in the classpath, otherwise this variable will be empty
|
||||
set (INTERFACES_JAR_FILE ${CMAKE_BINARY_DIR}/src/interfaces/upm_interfaces.jar)
|
||||
endif ()
|
||||
if(module_iface)
|
||||
add_dependencies(javaupm_${libname} javaupm_new_interfaces)
|
||||
set (NEW_INTERFACES_JAR_FILE ${CMAKE_BINARY_DIR}/interfaces/upm_new_interfaces.jar)
|
||||
add_dependencies(javaupm_${libname} javaupm_interfaces)
|
||||
set (INTERFACES_JAR_FILE ${CMAKE_BINARY_DIR}/interfaces/upm_interfaces.jar)
|
||||
endif()
|
||||
# For linker to report unresolved symbols. Note, there is currently no test
|
||||
# for linker flags (similar to compile files), so this is it for now.
|
||||
@ -616,7 +610,7 @@ function(upm_swig_java)
|
||||
add_custom_command (TARGET javaupm_${libname}
|
||||
POST_BUILD
|
||||
COMMAND cmake -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/upm_${libname}
|
||||
COMMAND ${JAVAC} *.java -d ${CMAKE_CURRENT_BINARY_DIR} -cp ${INTERFACES_JAR_FILE}:${NEW_INTERFACES_JAR_FILE}:.
|
||||
COMMAND ${JAVAC} *.java -d ${CMAKE_CURRENT_BINARY_DIR} -cp ${INTERFACES_JAR_FILE}:.
|
||||
COMMAND ${JAR} cf upm_${libname}.jar upm_${libname}
|
||||
)
|
||||
|
||||
@ -678,10 +672,8 @@ if (BUILDSWIGNODE)
|
||||
|
||||
# Utilities and interfaces
|
||||
file (COPY ${CMAKE_SOURCE_DIR}/src/utilities DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/jsupm_${libname})
|
||||
file (COPY ${CMAKE_SOURCE_DIR}/src/interfaces DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/jsupm_${libname})
|
||||
set (upm_LIB_SRCS_GYP "'utilities/upm_utilities.c',\n${upm_LIB_SRCS_GYP}")
|
||||
set (upm_LIB_INCLUDE_DIRS_GYP "'utilities',\n${upm_LIB_INCLUDE_DIRS_GYP}")
|
||||
set (upm_LIB_INCLUDE_DIRS_GYP "'interfaces',\n${upm_LIB_INCLUDE_DIRS_GYP}")
|
||||
|
||||
# Add readme, package.json for NPM and node-gyp config file
|
||||
configure_file (${PROJECT_SOURCE_DIR}/src/binding.gyp.in ${CMAKE_CURRENT_BINARY_DIR}/jsupm_${libname}/binding.gyp @ONLY)
|
||||
@ -978,12 +970,6 @@ if (NOT "${MODULE_LIST}" MATCHES ";utilities;")
|
||||
set(MODULE_LIST "utilities;${MODULE_LIST}")
|
||||
endif()
|
||||
|
||||
# If the module list does NOT include the interfaces directory, prepend it since
|
||||
# some sensor library targets depend on interfaces
|
||||
if (NOT "${MODULE_LIST}" MATCHES ";interfaces;")
|
||||
set(MODULE_LIST "interfaces;${MODULE_LIST}")
|
||||
endif()
|
||||
|
||||
# Iterate over each directory in MODULE_LIST
|
||||
foreach(subdir ${MODULE_LIST})
|
||||
if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${subdir}/CMakeLists.txt)
|
||||
|
@ -2,14 +2,14 @@
|
||||
%module (package="upm") a110x
|
||||
#endif
|
||||
|
||||
%import "interfaces/new_interfaces.i"
|
||||
%import "interfaces/interfaces.i"
|
||||
|
||||
%include "../common_top.i"
|
||||
|
||||
/* BEGIN Java syntax ------------------------------------------------------- */
|
||||
#ifdef SWIGJAVA
|
||||
%typemap(javaimports) SWIGTYPE %{
|
||||
import upm_new_interfaces.*;
|
||||
import upm_interfaces.*;
|
||||
%}
|
||||
|
||||
/* Macro for loading javaupm_a110x */
|
||||
|
@ -2,14 +2,14 @@
|
||||
%module (package="upm") htu21d
|
||||
#endif
|
||||
|
||||
%import "interfaces/new_interfaces.i"
|
||||
%import "interfaces/interfaces.i"
|
||||
|
||||
%include "../common_top.i"
|
||||
|
||||
/* BEGIN Java syntax ------------------------------------------------------- */
|
||||
#ifdef SWIGJAVA
|
||||
%typemap(javaimports) SWIGTYPE %{
|
||||
import upm_new_interfaces.*;
|
||||
import upm_interfaces.*;
|
||||
%}
|
||||
|
||||
JAVA_JNI_LOADLIBRARY(javaupm_abp)
|
||||
|
@ -2,7 +2,7 @@ set (libname "ads1x15")
|
||||
set (libdescription "Texas Instruments I2C ADC Library")
|
||||
set (module_src ${libname}.cxx ads1115.cxx ads1015.cxx)
|
||||
set (module_hpp ${libname}.hpp ads1115.hpp ads1015.hpp)
|
||||
upm_module_init(interfaces mraa)
|
||||
upm_module_init(mraa)
|
||||
compiler_flag_supported(CXX is_supported -Wno-overloaded-virtual)
|
||||
if (is_supported)
|
||||
target_compile_options(${libname} PUBLIC -Wno-overloaded-virtual)
|
||||
|
@ -26,7 +26,6 @@
|
||||
#pragma once
|
||||
|
||||
#include "ads1x15.hpp"
|
||||
#include "interfaces/iADC.hpp"
|
||||
|
||||
#define ADS1015_VREF 2.048
|
||||
|
||||
@ -85,7 +84,9 @@ namespace upm {
|
||||
* @snippet ads1x15-ads1015.cxx Interesting
|
||||
* @snippet ads1x15-adc-sensor.cxx Interesting
|
||||
*/
|
||||
class ADS1015 : public ADS1X15, public IADC {
|
||||
#define UPM_THROW(msg) throw std::runtime_error(std::string(__FUNCTION__) + ": " + (msg))
|
||||
|
||||
class ADS1015 : public ADS1X15 {
|
||||
|
||||
public:
|
||||
|
||||
|
@ -2,27 +2,10 @@
|
||||
|
||||
/* BEGIN Java syntax ------------------------------------------------------- */
|
||||
#ifdef SWIGJAVA
|
||||
%import "../interfaces/javaupm_iADC.i"
|
||||
%typemap(javaimports) SWIGTYPE %{import upm_interfaces.*;%}
|
||||
|
||||
JAVA_JNI_LOADLIBRARY(javaupm_ads1x15)
|
||||
#endif
|
||||
/* END Java syntax */
|
||||
|
||||
/* BEGIN Javascript syntax ------------------------------------------------- */
|
||||
#ifdef SWIGJAVASCRIPT
|
||||
%include "iModuleStatus.hpp"
|
||||
%include "iADC.hpp"
|
||||
#endif
|
||||
/* END Javascript syntax */
|
||||
|
||||
/* BEGIN Python syntax ----------------------------------------------------- */
|
||||
#ifdef SWIGPYTHON
|
||||
%include "iModuleStatus.hpp"
|
||||
%include "iADC.hpp"
|
||||
#endif
|
||||
/* END Python syntax */
|
||||
|
||||
/* BEGIN Common SWIG syntax ------------------------------------------------- */
|
||||
%{
|
||||
#include "ads1x15.hpp"
|
||||
|
@ -2,7 +2,7 @@
|
||||
%module (package="upm") adxl335
|
||||
#endif
|
||||
|
||||
%import "interfaces/new_interfaces.i"
|
||||
%import "interfaces/interfaces.i"
|
||||
|
||||
%include "../common_top.i"
|
||||
|
||||
@ -10,7 +10,7 @@
|
||||
#ifdef SWIGJAVA
|
||||
|
||||
%typemap(javaimports) SWIGTYPE %{
|
||||
import upm_new_interfaces.*;
|
||||
import upm_interfaces.*;
|
||||
|
||||
import java.util.AbstractList;
|
||||
import java.lang.Float;
|
||||
|
@ -2,7 +2,7 @@
|
||||
%module (package="upm") adxl345
|
||||
#endif
|
||||
|
||||
%import "interfaces/new_interfaces.i"
|
||||
%import "interfaces/interfaces.i"
|
||||
|
||||
%include "../common_top.i"
|
||||
|
||||
@ -36,7 +36,7 @@
|
||||
}
|
||||
|
||||
%typemap(javaimports) SWIGTYPE %{
|
||||
import upm_new_interfaces.*;
|
||||
import upm_interfaces.*;
|
||||
|
||||
import java.util.AbstractList;
|
||||
import java.lang.Float;
|
||||
|
@ -2,14 +2,14 @@
|
||||
%module (package="upm") htu21d
|
||||
#endif
|
||||
|
||||
%import "interfaces/new_interfaces.i"
|
||||
%import "interfaces/interfaces.i"
|
||||
|
||||
%include "../common_top.i"
|
||||
|
||||
/* BEGIN Java syntax ------------------------------------------------------- */
|
||||
#ifdef SWIGJAVA
|
||||
%typemap(javaimports) SWIGTYPE %{
|
||||
import upm_new_interfaces.*;
|
||||
import upm_interfaces.*;
|
||||
%}
|
||||
|
||||
JAVA_JNI_LOADLIBRARY(javaupm_bh1750)
|
||||
|
@ -2,7 +2,7 @@
|
||||
%module (package="upm") bma220
|
||||
#endif
|
||||
|
||||
%import "interfaces/new_interfaces.i"
|
||||
%import "interfaces/interfaces.i"
|
||||
|
||||
%include "../common_top.i"
|
||||
|
||||
@ -32,7 +32,7 @@
|
||||
%ignore installISR(int, mraa::Edge, void *, void *);
|
||||
|
||||
%typemap(javaimports) SWIGTYPE %{
|
||||
import upm_new_interfaces.*;
|
||||
import upm_interfaces.*;
|
||||
|
||||
import java.util.AbstractList;
|
||||
import java.lang.Float;
|
||||
|
@ -2,7 +2,7 @@
|
||||
%module (package="upm") bma250e
|
||||
#endif
|
||||
|
||||
%import "interfaces/new_interfaces.i"
|
||||
%import "interfaces/interfaces.i"
|
||||
|
||||
%include "../common_top.i"
|
||||
|
||||
@ -14,7 +14,7 @@
|
||||
%ignore installISR (BMA250E_INTERRUPT_PINS_T, int, mraa::Edge , void *, void *);
|
||||
|
||||
%typemap(javaimports) SWIGTYPE %{
|
||||
import upm_new_interfaces.*;
|
||||
import upm_interfaces.*;
|
||||
|
||||
import java.util.AbstractList;
|
||||
import java.lang.Float;
|
||||
|
@ -2,7 +2,7 @@
|
||||
%module (package="upm") bmi160
|
||||
#endif
|
||||
|
||||
%import "interfaces/new_interfaces.i"
|
||||
%import "interfaces/interfaces.i"
|
||||
|
||||
%include "../common_top.i"
|
||||
|
||||
@ -29,7 +29,7 @@
|
||||
%ignore getMagnetometer(float *, float *, float *);
|
||||
|
||||
%typemap(javaimports) SWIGTYPE %{
|
||||
import upm_new_interfaces.*;
|
||||
import upm_interfaces.*;
|
||||
|
||||
import java.util.AbstractList;
|
||||
import java.lang.Float;
|
||||
|
@ -6,5 +6,5 @@ upm_mixed_module_init (NAME bmp280
|
||||
CPP_SRC bmp280.cxx bme280.cxx
|
||||
IFACE_HDR iHumidity.hpp iPressure.hpp iTemperature.hpp
|
||||
CPP_WRAPS_C
|
||||
REQUIRES mraa interfaces utilities-c)
|
||||
REQUIRES mraa utilities-c)
|
||||
target_link_libraries(${libnamec} m)
|
||||
|
@ -2,14 +2,14 @@
|
||||
%module (package="upm") bmp280
|
||||
#endif
|
||||
|
||||
%import "interfaces/new_interfaces.i"
|
||||
%import "interfaces/interfaces.i"
|
||||
|
||||
%include "../common_top.i"
|
||||
|
||||
/* BEGIN Java syntax ------------------------------------------------------- */
|
||||
#ifdef SWIGJAVA
|
||||
%typemap(javaimports) SWIGTYPE %{
|
||||
import upm_new_interfaces.*;
|
||||
import upm_interfaces.*;
|
||||
%}
|
||||
|
||||
JAVA_JNI_LOADLIBRARY(javaupm_bmp280)
|
||||
|
@ -7,5 +7,5 @@ upm_mixed_module_init (NAME bmpx8x
|
||||
IFACE_HDR iPressure.hpp
|
||||
FTI_SRC bmpx8x_fti.c
|
||||
CPP_WRAPS_C
|
||||
REQUIRES mraa interfaces utilities-c)
|
||||
REQUIRES mraa utilities-c)
|
||||
target_link_libraries(${libnamec} m)
|
||||
|
@ -2,14 +2,14 @@
|
||||
%module (package="upm") htu21d
|
||||
#endif
|
||||
|
||||
%import "interfaces/new_interfaces.i"
|
||||
%import "interfaces/interfaces.i"
|
||||
|
||||
%include "../common_top.i"
|
||||
|
||||
/* BEGIN Java syntax ------------------------------------------------------- */
|
||||
#ifdef SWIGJAVA
|
||||
%typemap(javaimports) SWIGTYPE %{
|
||||
import upm_new_interfaces.*;
|
||||
import upm_interfaces.*;
|
||||
%}
|
||||
|
||||
JAVA_JNI_LOADLIBRARY(javaupm_bmpx8x)
|
||||
|
@ -2,7 +2,7 @@
|
||||
%module (package="upm") bmx055
|
||||
#endif
|
||||
|
||||
%import "interfaces/new_interfaces.i"
|
||||
%import "interfaces/interfaces.i"
|
||||
|
||||
%include "../common_top.i"
|
||||
|
||||
@ -17,7 +17,7 @@
|
||||
%ignore getGyroscope(float *, float *, float *);
|
||||
|
||||
%typemap(javaimports) SWIGTYPE %{
|
||||
import upm_new_interfaces.*;
|
||||
import upm_interfaces.*;
|
||||
|
||||
import java.util.AbstractList;
|
||||
import java.lang.Float;
|
||||
|
@ -4,4 +4,5 @@ upm_mixed_module_init (NAME button
|
||||
C_SRC button.c
|
||||
CPP_HDR button.hpp
|
||||
CPP_SRC button.cxx
|
||||
IFACE_HDR iButton.hpp
|
||||
REQUIRES mraa)
|
||||
|
@ -1,7 +1,16 @@
|
||||
#ifdef SWIGPYTHON
|
||||
%module (package="upm") button
|
||||
#endif
|
||||
|
||||
%import "interfaces/interfaces.i"
|
||||
|
||||
%include "../common_top.i"
|
||||
|
||||
/* BEGIN Java syntax ------------------------------------------------------- */
|
||||
#ifdef SWIGJAVA
|
||||
%typemap(javaimports) SWIGTYPE %{
|
||||
import upm_interfaces.*;
|
||||
%}
|
||||
%apply int {mraa::Edge}
|
||||
|
||||
JAVA_ADD_INSTALLISR_EDGE(upm::Button)
|
||||
|
@ -5,5 +5,6 @@ upm_mixed_module_init (NAME collision
|
||||
CPP_HDR collision.hpp
|
||||
CPP_SRC collision.cxx
|
||||
FTI_SRC collision_fti.c
|
||||
IFACE_HDR iCollision.hpp
|
||||
CPP_WRAPS_C
|
||||
REQUIRES mraa)
|
||||
|
@ -6,6 +6,7 @@ if (MRAA_OW_FOUND)
|
||||
CPP_HDR dfrec.hpp
|
||||
CPP_SRC dfrec.cxx
|
||||
FTI_SRC dfrec_fti.c
|
||||
IFACE_HDR iEC.hpp
|
||||
CPP_WRAPS_C
|
||||
REQUIRES ds18b20 mraa utilities-c)
|
||||
# make sure the C library has the appropriate dependency on the UPM
|
||||
|
@ -1,7 +1,17 @@
|
||||
#ifdef SWIGPYTHON
|
||||
%module (package="upm") dfrec
|
||||
#endif
|
||||
|
||||
%import "interfaces/interfaces.i"
|
||||
|
||||
%include "../common_top.i"
|
||||
|
||||
/* BEGIN Java syntax ------------------------------------------------------- */
|
||||
#ifdef SWIGJAVA
|
||||
%typemap(javaimports) SWIGTYPE %{
|
||||
import upm_interfaces.*;
|
||||
%}
|
||||
|
||||
JAVA_JNI_LOADLIBRARY(javaupm_dfrec)
|
||||
#endif
|
||||
/* END Java syntax */
|
||||
|
@ -5,5 +5,6 @@ upm_mixed_module_init (NAME dfrorp
|
||||
CPP_HDR dfrorp.hpp
|
||||
CPP_SRC dfrorp.cxx
|
||||
FTI_SRC dfrorp_fti.c
|
||||
IFACE_HDR iOrp.hpp
|
||||
CPP_WRAPS_C
|
||||
REQUIRES mraa utilities-c)
|
||||
|
@ -1,7 +1,17 @@
|
||||
#ifdef SWIGPYTHON
|
||||
%module (package="upm") dfrorp
|
||||
#endif
|
||||
|
||||
%import "interfaces/interfaces.i"
|
||||
|
||||
%include "../common_top.i"
|
||||
|
||||
/* BEGIN Java syntax ------------------------------------------------------- */
|
||||
#ifdef SWIGJAVA
|
||||
%typemap(javaimports) SWIGTYPE %{
|
||||
import upm_interfaces.*;
|
||||
%}
|
||||
|
||||
JAVA_JNI_LOADLIBRARY(javaupm_dfrorp)
|
||||
#endif
|
||||
/* END Java syntax */
|
||||
|
@ -5,5 +5,6 @@ upm_mixed_module_init (NAME dfrph
|
||||
CPP_HDR dfrph.hpp
|
||||
CPP_SRC dfrph.cxx
|
||||
FTI_SRC dfrph_fti.c
|
||||
IFACE_HDR iPH.hpp
|
||||
CPP_WRAPS_C
|
||||
REQUIRES mraa)
|
||||
|
@ -2,4 +2,4 @@ set (libname "ds1808lc")
|
||||
set (libdescription "Lighting Controller")
|
||||
set (module_src ${libname}.cxx mraa-utils.cxx)
|
||||
set (module_hpp ${libname}.hpp)
|
||||
upm_module_init(interfaces mraa)
|
||||
upm_module_init(mraa )
|
||||
|
@ -22,7 +22,6 @@
|
||||
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "iLightController.hpp"
|
||||
#include "mraa/i2c.hpp"
|
||||
|
||||
namespace upm
|
||||
@ -51,7 +50,9 @@ namespace upm
|
||||
*
|
||||
* @snippet ds1808lc.cxx Interesting
|
||||
*/
|
||||
class DS1808LC : public upm::ILightController
|
||||
#define UPM_THROW(msg) throw std::runtime_error(std::string(__FUNCTION__) + ": " + (msg))
|
||||
|
||||
class DS1808LC
|
||||
{
|
||||
public:
|
||||
DS1808LC(int gpioPower, int i2cBus);
|
||||
|
@ -4,8 +4,6 @@
|
||||
#ifdef SWIGJAVA
|
||||
%include "arrays_java.i";
|
||||
%include "../java_buffer.i"
|
||||
%typemap(javaimports) SWIGTYPE %{import upm_interfaces.*;%}
|
||||
%import "../interfaces/javaupm_iLightController.i"
|
||||
|
||||
JAVA_JNI_LOADLIBRARY(javaupm_ds1808lc)
|
||||
#endif
|
||||
@ -13,15 +11,11 @@ JAVA_JNI_LOADLIBRARY(javaupm_ds1808lc)
|
||||
|
||||
/* BEGIN Javascript syntax ------------------------------------------------- */
|
||||
#ifdef SWIGJAVASCRIPT
|
||||
%include "iModuleStatus.hpp"
|
||||
%include "iLightController.hpp"
|
||||
#endif
|
||||
/* END Javascript syntax */
|
||||
|
||||
/* BEGIN Python syntax ----------------------------------------------------- */
|
||||
#ifdef SWIGPYTHON
|
||||
%include "iModuleStatus.hpp"
|
||||
%include "iLightController.hpp"
|
||||
#endif
|
||||
/* END Python syntax */
|
||||
|
||||
|
@ -5,5 +5,6 @@ upm_mixed_module_init (NAME ecezo
|
||||
CPP_HDR ecezo.hpp
|
||||
CPP_SRC ecezo.cxx
|
||||
FTI_SRC ecezo_fti.c
|
||||
IFACE_HDR iEC.hpp
|
||||
CPP_WRAPS_C
|
||||
REQUIRES mraa utilities-c)
|
||||
|
@ -1,7 +1,17 @@
|
||||
#ifdef SWIGPYTHON
|
||||
%module (package="upm") ecezo
|
||||
#endif
|
||||
|
||||
%import "interfaces/interfaces.i"
|
||||
|
||||
%include "../common_top.i"
|
||||
|
||||
/* BEGIN Java syntax ------------------------------------------------------- */
|
||||
#ifdef SWIGJAVA
|
||||
%typemap(javaimports) SWIGTYPE %{
|
||||
import upm_interfaces.*;
|
||||
%}
|
||||
|
||||
JAVA_JNI_LOADLIBRARY(javaupm_ecezo)
|
||||
#endif
|
||||
/* END Java syntax */
|
||||
|
@ -2,14 +2,14 @@
|
||||
%module (package="upm") ehr
|
||||
#endif
|
||||
|
||||
%import "interfaces/new_interfaces.i"
|
||||
%import "interfaces/interfaces.i"
|
||||
|
||||
%include "../common_top.i"
|
||||
|
||||
/* BEGIN Java syntax ------------------------------------------------------- */
|
||||
#ifdef SWIGJAVA
|
||||
%typemap(javaimports) SWIGTYPE %{
|
||||
import upm_new_interfaces.*;
|
||||
import upm_interfaces.*;
|
||||
%}
|
||||
|
||||
%ignore beatISR;
|
||||
|
@ -5,4 +5,5 @@ upm_mixed_module_init (NAME emg
|
||||
CPP_HDR emg.hpp
|
||||
CPP_SRC emg.cxx
|
||||
FTI_SRC emg_fti.c
|
||||
IFACE_HDR iEmg.hpp
|
||||
REQUIRES mraa)
|
||||
|
@ -5,5 +5,6 @@ upm_mixed_module_init (NAME gp2y0a
|
||||
CPP_HDR gp2y0a.hpp
|
||||
CPP_SRC gp2y0a.cxx
|
||||
FTI_SRC gp2y0a_fti.c
|
||||
IFACE_HDR iProximity.hpp
|
||||
CPP_WRAPS_C
|
||||
REQUIRES mraa)
|
||||
|
@ -2,14 +2,14 @@
|
||||
%module (package="upm") htu21d
|
||||
#endif
|
||||
|
||||
%import "interfaces/new_interfaces.i"
|
||||
%import "interfaces/interfaces.i"
|
||||
|
||||
%include "../common_top.i"
|
||||
|
||||
/* BEGIN Java syntax ------------------------------------------------------- */
|
||||
#ifdef SWIGJAVA
|
||||
%typemap(javaimports) SWIGTYPE %{
|
||||
import upm_new_interfaces.*;
|
||||
import upm_interfaces.*;
|
||||
%}
|
||||
|
||||
%apply int {mraa::Edge}
|
||||
|
@ -2,4 +2,5 @@ set (libname "grovecollision")
|
||||
set (libdescription "Collision Sensor")
|
||||
set (module_src ${libname}.cxx)
|
||||
set (module_hpp ${libname}.hpp)
|
||||
set (module_iface iCollision.hpp)
|
||||
upm_module_init(mraa)
|
||||
|
@ -2,14 +2,14 @@
|
||||
%module (package="upm") ehr
|
||||
#endif
|
||||
|
||||
%import "interfaces/new_interfaces.i"
|
||||
%import "interfaces/interfaces.i"
|
||||
|
||||
%include "../common_top.i"
|
||||
|
||||
/* BEGIN Java syntax ------------------------------------------------------- */
|
||||
#ifdef SWIGJAVA
|
||||
%typemap(javaimports) SWIGTYPE %{
|
||||
import upm_new_interfaces.*;
|
||||
import upm_interfaces.*;
|
||||
%}
|
||||
|
||||
%ignore beatISR;
|
||||
|
@ -2,4 +2,5 @@ set (libname "groveemg")
|
||||
set (libdescription "Electromyography (EMG) Sensor")
|
||||
set (module_src ${libname}.cxx)
|
||||
set (module_hpp ${libname}.hpp)
|
||||
set (module_iface iEmg.hpp)
|
||||
upm_module_init(mraa)
|
||||
|
@ -2,4 +2,5 @@ set (libname "grovegsr")
|
||||
set (libdescription "Galvanic Skin Response (GSR) Sensor")
|
||||
set (module_src ${libname}.cxx)
|
||||
set (module_hpp ${libname}.hpp)
|
||||
set (module_iface iEC.hpp)
|
||||
upm_module_init(mraa)
|
||||
|
@ -2,4 +2,5 @@ set (libname "grovelinefinder")
|
||||
set (libdescription "Line Finder")
|
||||
set (module_src ${libname}.cxx)
|
||||
set (module_hpp ${libname}.hpp)
|
||||
set (module_iface iLineFinder.hpp)
|
||||
upm_module_init(mraa)
|
||||
|
@ -2,4 +2,5 @@ set (libname "grovevdiv")
|
||||
set (libdescription "Voltage Divider")
|
||||
set (module_src ${libname}.cxx)
|
||||
set (module_hpp ${libname}.hpp)
|
||||
set (module_iface iVDiv.hpp)
|
||||
upm_module_init(mraa)
|
||||
|
@ -5,4 +5,5 @@ upm_mixed_module_init (NAME gsr
|
||||
CPP_HDR gsr.hpp
|
||||
CPP_SRC gsr.cxx
|
||||
FTI_SRC gsr_fti.c
|
||||
IFACE_HDR iEC.hpp
|
||||
REQUIRES mraa)
|
||||
|
@ -2,7 +2,7 @@
|
||||
%module (package="upm") h3lis331dl
|
||||
#endif
|
||||
|
||||
%import "interfaces/new_interfaces.i"
|
||||
%import "interfaces/interfaces.i"
|
||||
|
||||
%include "../common_top.i"
|
||||
|
||||
@ -18,7 +18,7 @@
|
||||
%ignore i2cContext;
|
||||
|
||||
%typemap(javaimports) SWIGTYPE %{
|
||||
import upm_new_interfaces.*;
|
||||
import upm_interfaces.*;
|
||||
|
||||
import java.util.AbstractList;
|
||||
import java.lang.Float;
|
||||
|
@ -2,14 +2,14 @@
|
||||
%module (package="upm") hcsr04
|
||||
#endif
|
||||
|
||||
%import "interfaces/new_interfaces.i"
|
||||
%import "interfaces/interfaces.i"
|
||||
|
||||
%include "../common_top.i"
|
||||
|
||||
/* BEGIN Java syntax ------------------------------------------------------- */
|
||||
#ifdef SWIGJAVA
|
||||
%typemap(javaimports) SWIGTYPE %{
|
||||
import upm_new_interfaces.*;
|
||||
import upm_interfaces.*;
|
||||
%}
|
||||
|
||||
JAVA_JNI_LOADLIBRARY(javaupm_hcsr04)
|
||||
|
@ -2,4 +2,4 @@ set (libname "hlg150h")
|
||||
set (libdescription "150W Constant Voltage/current LED Driver")
|
||||
set (module_src ${libname}.cxx mraa-utils.cxx)
|
||||
set (module_hpp ${libname}.hpp)
|
||||
upm_module_init(mraa interfaces)
|
||||
upm_module_init(mraa)
|
||||
|
@ -22,12 +22,12 @@
|
||||
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "interfaces/iLightController.hpp"
|
||||
// #include "mraa/gpio.hpp"
|
||||
#include "mraa/pwm.hpp"
|
||||
|
||||
namespace upm
|
||||
{
|
||||
#define UPM_THROW(msg) throw std::runtime_error(std::string(__FUNCTION__) + ": " + (msg))
|
||||
|
||||
/**
|
||||
* @brief Meanwell HLG150H Lighting Power Supply Controller
|
||||
@ -53,13 +53,13 @@ namespace upm
|
||||
* @snippet hlg150h.cxx Interesting
|
||||
*/
|
||||
|
||||
class HLG150H : public upm::ILightController
|
||||
class HLG150H
|
||||
{
|
||||
public:
|
||||
HLG150H(int pinRelay, int pinPWM);
|
||||
~HLG150H();
|
||||
|
||||
virtual int getBrightness();
|
||||
int getBrightness();
|
||||
const char* getModuleName() { return "hlg150h"; }
|
||||
void setPowerOn();
|
||||
void setPowerOff();
|
||||
|
@ -4,8 +4,6 @@
|
||||
#ifdef SWIGJAVA
|
||||
%include "arrays_java.i";
|
||||
%include "../java_buffer.i"
|
||||
%typemap(javaimports) SWIGTYPE %{import upm_interfaces.*;%}
|
||||
%import "../interfaces/javaupm_iLightController.i"
|
||||
|
||||
JAVA_JNI_LOADLIBRARY(javaupm_hlg150h)
|
||||
#endif
|
||||
|
@ -2,14 +2,14 @@
|
||||
%module (package="upm") htu21d
|
||||
#endif
|
||||
|
||||
%import "interfaces/new_interfaces.i"
|
||||
%import "interfaces/interfaces.i"
|
||||
|
||||
%include "../common_top.i"
|
||||
|
||||
/* BEGIN Java syntax ------------------------------------------------------- */
|
||||
#ifdef SWIGJAVA
|
||||
%typemap(javaimports) SWIGTYPE %{
|
||||
import upm_new_interfaces.*;
|
||||
import upm_interfaces.*;
|
||||
%}
|
||||
|
||||
%ignore getHumidityData(float*, float*, float*);
|
||||
|
@ -2,14 +2,14 @@
|
||||
%module (package="upm") hwxpxx
|
||||
#endif
|
||||
|
||||
%import "interfaces/new_interfaces.i"
|
||||
%import "interfaces/interfaces.i"
|
||||
|
||||
%include "../common_top.i"
|
||||
|
||||
/* BEGIN Java syntax ------------------------------------------------------- */
|
||||
#ifdef SWIGJAVA
|
||||
%typemap(javaimports) SWIGTYPE %{
|
||||
import upm_new_interfaces.*;
|
||||
import upm_interfaces.*;
|
||||
%}
|
||||
|
||||
JAVA_JNI_LOADLIBRARY(javaupm_hwxpxx)
|
||||
|
@ -2,14 +2,14 @@
|
||||
%module (package="upm") htu21d
|
||||
#endif
|
||||
|
||||
%import "interfaces/new_interfaces.i"
|
||||
%import "interfaces/interfaces.i"
|
||||
|
||||
%include "../common_top.i"
|
||||
|
||||
/* BEGIN Java syntax ------------------------------------------------------- */
|
||||
#ifdef SWIGJAVA
|
||||
%typemap(javaimports) SWIGTYPE %{
|
||||
import upm_new_interfaces.*;
|
||||
import upm_interfaces.*;
|
||||
%}
|
||||
|
||||
JAVA_JNI_LOADLIBRARY(javaupm_ims)
|
||||
|
@ -1,22 +0,0 @@
|
||||
set (libname "interfaces")
|
||||
set (libdescription "CXX Interface Library")
|
||||
set (module_src ${libname}.cxx)
|
||||
|
||||
upm_module_init()
|
||||
|
||||
# Add a PUBLIC include directory to the CMAKE src dir
|
||||
target_include_directories (${libname} PUBLIC ${CMAKE_SOURCE_DIR}/src)
|
||||
|
||||
# Don't add the hpp files with upm_module_init, this allows
|
||||
# them to be installed separately
|
||||
set (module_hpp iADC.hpp
|
||||
iCO2Sensor.hpp
|
||||
iHumiditySensor.hpp
|
||||
iLightController.hpp
|
||||
iLightSensor.hpp
|
||||
iModuleStatus.hpp
|
||||
iPressureSensor.hpp
|
||||
iTemperatureSensor.hpp)
|
||||
# Install interfaces headers a bit differently
|
||||
install (FILES ${module_hpp} DESTINATION include/upm/${libname}
|
||||
COMPONENT ${CMAKE_PROJECT_NAME})
|
@ -1,47 +0,0 @@
|
||||
/*
|
||||
* Author: Henry Bruce <henry.bruce@intel.com>
|
||||
* Copyright (c) 2015 Intel Corporation.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining
|
||||
* a copy of this software and associated documentation files (the
|
||||
* "Software"), to deal in the Software without restriction, including
|
||||
* without limitation the rights to use, copy, modify, merge, publish,
|
||||
* distribute, sublicense, and/or sell copies of the Software, and to
|
||||
* permit persons to whom the Software is furnished to do so, subject to
|
||||
* the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be
|
||||
* included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
|
||||
#pragma once
|
||||
#include <stdint.h>
|
||||
#include "iModuleStatus.hpp"
|
||||
|
||||
namespace upm
|
||||
{
|
||||
/**
|
||||
* @brief Interface for ADC Sensors
|
||||
*/
|
||||
|
||||
class IADC : virtual public IModuleStatus
|
||||
{
|
||||
public:
|
||||
virtual unsigned int getResolutionInBits() = 0;
|
||||
virtual unsigned int getNumInputs() = 0;
|
||||
virtual uint16_t getRawValue(unsigned int input) = 0;
|
||||
virtual float getVoltage(unsigned int input) = 0;
|
||||
virtual ~IADC() {}
|
||||
};
|
||||
|
||||
}
|
||||
|
@ -1,43 +0,0 @@
|
||||
/*
|
||||
* Author: Henry Bruce <henry.bruce@intel.com>
|
||||
* Copyright (c) 2015 Intel Corporation.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining
|
||||
* a copy of this software and associated documentation files (the
|
||||
* "Software"), to deal in the Software without restriction, including
|
||||
* without limitation the rights to use, copy, modify, merge, publish,
|
||||
* distribute, sublicense, and/or sell copies of the Software, and to
|
||||
* permit persons to whom the Software is furnished to do so, subject to
|
||||
* the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be
|
||||
* included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
|
||||
#pragma once
|
||||
#include "iModuleStatus.hpp"
|
||||
|
||||
namespace upm
|
||||
{
|
||||
/**
|
||||
* @brief Interface for CO Sensor
|
||||
*/
|
||||
|
||||
class ICO2Sensor : virtual public IModuleStatus
|
||||
{
|
||||
public:
|
||||
virtual uint16_t getPpm() = 0;
|
||||
virtual ~ICO2Sensor() {}
|
||||
};
|
||||
|
||||
}
|
||||
|
@ -1,42 +0,0 @@
|
||||
/*
|
||||
* Author: Henry Bruce <henry.bruce@intel.com>
|
||||
* Copyright (c) 2015 Intel Corporation.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining
|
||||
* a copy of this software and associated documentation files (the
|
||||
* "Software"), to deal in the Software without restriction, including
|
||||
* without limitation the rights to use, copy, modify, merge, publish,
|
||||
* distribute, sublicense, and/or sell copies of the Software, and to
|
||||
* permit persons to whom the Software is furnished to do so, subject to
|
||||
* the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be
|
||||
* included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#include "iModuleStatus.hpp"
|
||||
|
||||
namespace upm
|
||||
{
|
||||
/**
|
||||
* @brief Interface for Humidity Sensors
|
||||
*/
|
||||
|
||||
class IHumiditySensor : virtual public IModuleStatus
|
||||
{
|
||||
public:
|
||||
virtual int getHumidityRelative () = 0;
|
||||
virtual ~IHumiditySensor() {}
|
||||
};
|
||||
|
||||
}
|
||||
|
@ -1,94 +0,0 @@
|
||||
/*
|
||||
* Author: Henry Bruce <henry.bruce@intel.com>
|
||||
* Copyright (c) 2014 Intel Corporation.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining
|
||||
* a copy of this software and associated documentation files (the
|
||||
* "Software"), to deal in the Software without restriction, including
|
||||
* without limitation the rights to use, copy, modify, merge, publish,
|
||||
* distribute, sublicense, and/or sell copies of the Software, and to
|
||||
* permit persons to whom the Software is furnished to do so, subject to
|
||||
* the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be
|
||||
* included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "iModuleStatus.hpp"
|
||||
|
||||
namespace upm
|
||||
{
|
||||
/**
|
||||
* @brief ILightController Interface for Light Controllers
|
||||
*/
|
||||
|
||||
/**
|
||||
*
|
||||
* @brief Interface for Light Controllers
|
||||
|
||||
* This interface is used to represent light controllers
|
||||
|
||||
* @snippet light-controllers.cxx Interesting
|
||||
*/
|
||||
|
||||
class ILightController : virtual public IModuleStatus
|
||||
{
|
||||
public:
|
||||
/**
|
||||
* Turn on power
|
||||
*
|
||||
* @throws std::runtime_error
|
||||
*/
|
||||
virtual void setPowerOn() = 0;
|
||||
|
||||
/**
|
||||
* Turn off power
|
||||
*
|
||||
* @throws std::runtime_error
|
||||
*/
|
||||
virtual void setPowerOff() = 0;
|
||||
|
||||
/**
|
||||
* Get power state
|
||||
*
|
||||
* @return true if powered, false otherwise
|
||||
*
|
||||
* @throws std::runtime_error
|
||||
*/
|
||||
virtual bool isPowered() = 0;
|
||||
|
||||
/**
|
||||
* Set brightness
|
||||
*
|
||||
* @param percent brightness as percentage
|
||||
*
|
||||
* @throws std::runtime_error
|
||||
*/
|
||||
virtual void setBrightness(int percent) = 0;
|
||||
|
||||
/**
|
||||
* Get brightness
|
||||
*
|
||||
* @return brightness as percentage
|
||||
*
|
||||
* @throws std::runtime_error
|
||||
*/
|
||||
virtual int getBrightness() = 0;
|
||||
|
||||
virtual ~ILightController() {}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -1,61 +0,0 @@
|
||||
/*
|
||||
* Author: Henry Bruce <henry.bruce@intel.com>
|
||||
* Copyright (c) 2015 Intel Corporation.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining
|
||||
* a copy of this software and associated documentation files (the
|
||||
* "Software"), to deal in the Software without restriction, including
|
||||
* without limitation the rights to use, copy, modify, merge, publish,
|
||||
* distribute, sublicense, and/or sell copies of the Software, and to
|
||||
* permit persons to whom the Software is furnished to do so, subject to
|
||||
* the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be
|
||||
* included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <stdint.h>
|
||||
#include "iModuleStatus.hpp"
|
||||
|
||||
namespace upm
|
||||
{
|
||||
/**
|
||||
* @brief ILightSensor Interface for Light Sensors
|
||||
*/
|
||||
|
||||
/**
|
||||
*
|
||||
* @brief Interface for Light Sensors
|
||||
|
||||
* This interface is used to represent light sensors
|
||||
|
||||
* @snippet light-sensor.cxx Interesting
|
||||
*/
|
||||
|
||||
class ILightSensor : virtual public IModuleStatus
|
||||
{
|
||||
public:
|
||||
|
||||
/**
|
||||
* Get visible illuminance in Lux.
|
||||
*
|
||||
* @return double visible illuminance in Lux
|
||||
*/
|
||||
virtual double getVisibleLux() = 0;
|
||||
|
||||
|
||||
virtual ~ILightSensor() {}
|
||||
};
|
||||
}
|
||||
|
@ -1,53 +0,0 @@
|
||||
/*
|
||||
* Author: Henry Bruce <henry.bruce@intel.com>
|
||||
* Copyright (c) 2014 Intel Corporation.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining
|
||||
* a copy of this software and associated documentation files (the
|
||||
* "Software"), to deal in the Software without restriction, including
|
||||
* without limitation the rights to use, copy, modify, merge, publish,
|
||||
* distribute, sublicense, and/or sell copies of the Software, and to
|
||||
* permit persons to whom the Software is furnished to do so, subject to
|
||||
* the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be
|
||||
* included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <stdexcept>
|
||||
|
||||
namespace upm
|
||||
{
|
||||
/**
|
||||
* @brief Interface for Module Status. Sensor and Actuactor Interfaces Derive from this Interface.
|
||||
*/
|
||||
|
||||
#define UPM_THROW(msg) throw std::runtime_error(std::string(__FUNCTION__) + ": " + (msg))
|
||||
|
||||
class IModuleStatus
|
||||
{
|
||||
public:
|
||||
/**
|
||||
* Returns name of module. This is the string in library name after libupm_
|
||||
|
||||
* @return name of module
|
||||
*/
|
||||
virtual const char* getModuleName() = 0;
|
||||
|
||||
virtual ~IModuleStatus() {}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -1,44 +0,0 @@
|
||||
/*
|
||||
* Author: Henry Bruce <henry.bruce@intel.com>
|
||||
* Copyright (c) 2014 Intel Corporation.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining
|
||||
* a copy of this software and associated documentation files (the
|
||||
* "Software"), to deal in the Software without restriction, including
|
||||
* without limitation the rights to use, copy, modify, merge, publish,
|
||||
* distribute, sublicense, and/or sell copies of the Software, and to
|
||||
* permit persons to whom the Software is furnished to do so, subject to
|
||||
* the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be
|
||||
* included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
|
||||
#pragma once
|
||||
#include <stdint.h>
|
||||
#include "iModuleStatus.hpp"
|
||||
|
||||
namespace upm
|
||||
{
|
||||
/*
|
||||
* @brief Interface for Pressue Sensors
|
||||
*/
|
||||
|
||||
class IPressureSensor : virtual public IModuleStatus
|
||||
{
|
||||
public:
|
||||
virtual int getPressurePa() = 0;
|
||||
virtual ~IPressureSensor() {}
|
||||
};
|
||||
|
||||
}
|
||||
|
@ -1,42 +0,0 @@
|
||||
/*
|
||||
* Author: Henry Bruce <henry.bruce@intel.com>
|
||||
* Copyright (c) 2015 Intel Corporation.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining
|
||||
* a copy of this software and associated documentation files (the
|
||||
* "Software"), to deal in the Software without restriction, including
|
||||
* without limitation the rights to use, copy, modify, merge, publish,
|
||||
* distribute, sublicense, and/or sell copies of the Software, and to
|
||||
* permit persons to whom the Software is furnished to do so, subject to
|
||||
* the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be
|
||||
* included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#include "iModuleStatus.hpp"
|
||||
|
||||
namespace upm
|
||||
{
|
||||
/**
|
||||
* @brief Interface for Temperature Sensors
|
||||
*/
|
||||
|
||||
class ITemperatureSensor : virtual public IModuleStatus
|
||||
{
|
||||
public:
|
||||
virtual int getTemperatureCelsius () = 0;
|
||||
virtual ~ITemperatureSensor() {}
|
||||
};
|
||||
|
||||
}
|
||||
|
@ -1 +0,0 @@
|
||||
#include "iLightSensor.hpp"
|
@ -1,18 +0,0 @@
|
||||
%include "../common_top.i"
|
||||
|
||||
/* BEGIN Java syntax ------------------------------------------------------- */
|
||||
#ifdef SWIGJAVA
|
||||
%import "../_upm.i"
|
||||
|
||||
%include javaupm_iModuleStatus.i
|
||||
%include javaupm_iADC.i
|
||||
%include javaupm_iCO2Sensor.i
|
||||
%include javaupm_iHumiditySensor.i
|
||||
%include javaupm_iLightController.i
|
||||
%include javaupm_iLightSensor.i
|
||||
%include javaupm_iPressureSensor.i
|
||||
%include javaupm_iTemperatureSensor.i
|
||||
|
||||
JAVA_JNI_LOADLIBRARY(javaupm_interfaces)
|
||||
#endif
|
||||
/* END Java syntax */
|
@ -1,11 +0,0 @@
|
||||
#if SWIG_VERSION >= 0x030009
|
||||
%include <swiginterface.i>
|
||||
%interface_impl(upm::IADC);
|
||||
#endif
|
||||
%include "interfaces.i"
|
||||
%include "javaupm_iModuleStatus.i"
|
||||
|
||||
%include "iADC.hpp"
|
||||
%{
|
||||
#include "iADC.hpp"
|
||||
%}
|
@ -1,12 +0,0 @@
|
||||
#if SWIG_VERSION >= 0x030009
|
||||
%include <swiginterface.i>
|
||||
%interface_impl(upm::ICO2Sensor);
|
||||
#endif
|
||||
%include "stdint.i"
|
||||
%include "interfaces.i"
|
||||
%include "javaupm_iModuleStatus.i"
|
||||
|
||||
%include "iCO2Sensor.hpp"
|
||||
%{
|
||||
#include "iCO2Sensor.hpp"
|
||||
%}
|
@ -1,11 +0,0 @@
|
||||
#if SWIG_VERSION >= 0x030009
|
||||
%include <swiginterface.i>
|
||||
%interface_impl(upm::IHumiditySensor);
|
||||
#endif
|
||||
%include "interfaces.i"
|
||||
%include "javaupm_iModuleStatus.i"
|
||||
|
||||
%include "iHumiditySensor.hpp"
|
||||
%{
|
||||
#include "iHumiditySensor.hpp"
|
||||
%}
|
@ -1,11 +0,0 @@
|
||||
#if SWIG_VERSION >= 0x030009
|
||||
%include <swiginterface.i>
|
||||
%interface_impl(upm::ILightController);
|
||||
#endif
|
||||
%include "interfaces.i"
|
||||
%include "javaupm_iModuleStatus.i"
|
||||
|
||||
%{
|
||||
#include "iLightController.hpp"
|
||||
%}
|
||||
%include "iLightController.hpp"
|
@ -1,11 +0,0 @@
|
||||
#if SWIG_VERSION >= 0x030009
|
||||
%include <swiginterface.i>
|
||||
%interface_impl(upm::ILightSensor);
|
||||
#endif
|
||||
%include "interfaces.i"
|
||||
%include "javaupm_iModuleStatus.i"
|
||||
|
||||
%include "iLightSensor.hpp"
|
||||
%{
|
||||
#include "iLightSensor.hpp"
|
||||
%}
|
@ -1,8 +0,0 @@
|
||||
#if SWIG_VERSION >= 0x030009
|
||||
%include <swiginterface.i>
|
||||
%interface_impl(upm::IModuleStatus);
|
||||
#endif
|
||||
%include "iModuleStatus.hpp"
|
||||
%{
|
||||
#include "iModuleStatus.hpp"
|
||||
%}
|
@ -1,11 +0,0 @@
|
||||
#if SWIG_VERSION >= 0x030009
|
||||
%include <swiginterface.i>
|
||||
%interface_impl(upm::IPressureSensor);
|
||||
#endif
|
||||
%include "interfaces.i"
|
||||
%include "javaupm_iModuleStatus.i"
|
||||
|
||||
%include "iPressureSensor.hpp"
|
||||
%{
|
||||
#include "iPressureSensor.hpp"
|
||||
%}
|
@ -1,11 +0,0 @@
|
||||
#if SWIG_VERSION >= 0x030009
|
||||
%include <swiginterface.i>
|
||||
%interface_impl(upm::ITemperatureSensor);
|
||||
#endif
|
||||
%include "interfaces.i"
|
||||
%include "javaupm_iModuleStatus.i"
|
||||
|
||||
%include "iTemperatureSensor.hpp"
|
||||
%{
|
||||
#include "iTemperatureSensor.hpp"
|
||||
%}
|
@ -2,14 +2,14 @@
|
||||
%module (package="upm") lidarlitev3
|
||||
#endif
|
||||
|
||||
%import "interfaces/new_interfaces.i"
|
||||
%import "interfaces/interfaces.i"
|
||||
|
||||
%include "../common_top.i"
|
||||
|
||||
/* BEGIN Java syntax ------------------------------------------------------- */
|
||||
#ifdef SWIGJAVA
|
||||
%typemap(javaimports) SWIGTYPE %{
|
||||
import upm_new_interfaces.*;
|
||||
import upm_interfaces.*;
|
||||
%}
|
||||
|
||||
JAVA_JNI_LOADLIBRARY(javaupm_lidarlitev3)
|
||||
|
@ -5,5 +5,6 @@ upm_mixed_module_init (NAME linefinder
|
||||
CPP_HDR linefinder.hpp
|
||||
CPP_SRC linefinder.cxx
|
||||
FTI_SRC linefinder_fti.c
|
||||
IFACE_HDR iLineFinder.hpp
|
||||
CPP_WRAPS_C
|
||||
REQUIRES mraa)
|
||||
|
@ -2,7 +2,7 @@
|
||||
%module (package="upm") lis2ds12
|
||||
#endif
|
||||
|
||||
%import "interfaces/new_interfaces.i"
|
||||
%import "interfaces/interfaces.i"
|
||||
|
||||
%include "../common_top.i"
|
||||
|
||||
@ -12,7 +12,7 @@
|
||||
#%ignore installISR(LIS2DS12_INTERRUPT_PINS_T , int , mraa::Edge, void *, void *);
|
||||
|
||||
%typemap(javaimports) SWIGTYPE %{
|
||||
import upm_new_interfaces.*;
|
||||
import upm_interfaces.*;
|
||||
|
||||
import java.util.AbstractList;
|
||||
import java.lang.Float;
|
||||
|
@ -2,7 +2,7 @@
|
||||
%module (package="upm") lis3dh
|
||||
#endif
|
||||
|
||||
%import "interfaces/new_interfaces.i"
|
||||
%import "interfaces/interfaces.i"
|
||||
|
||||
%include "../common_top.i"
|
||||
|
||||
@ -16,7 +16,7 @@
|
||||
%enddef
|
||||
|
||||
%typemap(javaimports) SWIGTYPE %{
|
||||
import upm_new_interfaces.*;
|
||||
import upm_interfaces.*;
|
||||
|
||||
import java.util.AbstractList;
|
||||
import java.lang.Float;
|
||||
|
@ -2,4 +2,4 @@ set (libname "lp8860")
|
||||
set (libdescription "LED Lighting Controller")
|
||||
set (module_src ${libname}.cxx mraa-utils.cxx)
|
||||
set (module_hpp ${libname}.hpp)
|
||||
upm_module_init(mraa interfaces)
|
||||
upm_module_init(mraa)
|
||||
|
@ -22,11 +22,12 @@
|
||||
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "interfaces/iLightController.hpp"
|
||||
#include "mraa/i2c.hpp"
|
||||
|
||||
namespace upm
|
||||
{
|
||||
#define UPM_THROW(msg) throw std::runtime_error(std::string(__FUNCTION__) + ": " + (msg))
|
||||
|
||||
/**
|
||||
* @brief LP8860 LED Lighting Controller
|
||||
* @defgroup lp8860 libupm-lp8860
|
||||
@ -51,12 +52,12 @@ namespace upm
|
||||
*
|
||||
* @snippet lp8860.cxx Interesting
|
||||
*/
|
||||
class LP8860 : public upm::ILightController
|
||||
class LP8860
|
||||
{
|
||||
public:
|
||||
LP8860(int gpioPower, int i2cBus);
|
||||
~LP8860();
|
||||
virtual const char* getModuleName() { return "lp8860"; }
|
||||
const char* getModuleName() { return "lp8860"; }
|
||||
bool isPowered();
|
||||
void setPowerOn();
|
||||
void setPowerOff();
|
||||
|
@ -2,9 +2,6 @@
|
||||
|
||||
/* BEGIN Java syntax ------------------------------------------------------- */
|
||||
#ifdef SWIGJAVA
|
||||
%typemap(javaimports) SWIGTYPE %{import upm_interfaces.*;%}
|
||||
%import "../interfaces/javaupm_iLightController.i"
|
||||
|
||||
JAVA_JNI_LOADLIBRARY(javaupm_lp8860)
|
||||
#endif
|
||||
/* END Java syntax */
|
||||
|
@ -2,7 +2,7 @@
|
||||
%module (package="upm") lsm303agr
|
||||
#endif
|
||||
|
||||
%import "interfaces/new_interfaces.i"
|
||||
%import "interfaces/interfaces.i"
|
||||
|
||||
%include "../common_top.i"
|
||||
|
||||
@ -14,7 +14,7 @@
|
||||
%ignore installISR(LSM303AGR_INTERRUPT_PINS_T , int , mraa::Edge , void *, void *);
|
||||
|
||||
%typemap(javaimports) SWIGTYPE %{
|
||||
import upm_new_interfaces.*;
|
||||
import upm_interfaces.*;
|
||||
|
||||
import java.util.AbstractList;
|
||||
import java.lang.Float;
|
||||
|
@ -2,7 +2,7 @@
|
||||
%module (package="upm") lsm303d
|
||||
#endif
|
||||
|
||||
%import "interfaces/new_interfaces.i"
|
||||
%import "interfaces/interfaces.i"
|
||||
|
||||
%include "../common_top.i"
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
%ignore getAccelerometer(float *, float *, float *);
|
||||
|
||||
%typemap(javaimports) SWIGTYPE %{
|
||||
import upm_new_interfaces.*;
|
||||
import upm_interfaces.*;
|
||||
|
||||
import java.util.AbstractList;
|
||||
import java.lang.Float;
|
||||
|
@ -2,14 +2,14 @@
|
||||
%module (package="upm") lsm6ds3h
|
||||
#endif
|
||||
|
||||
%import "interfaces/new_interfaces.i"
|
||||
%import "interfaces/interfaces.i"
|
||||
|
||||
%include "../common_top.i"
|
||||
|
||||
/* BEGIN Java syntax ------------------------------------------------------- */
|
||||
#ifdef SWIGJAVA
|
||||
%typemap(javaimports) SWIGTYPE %{
|
||||
import upm_new_interfaces.*;
|
||||
import upm_interfaces.*;
|
||||
|
||||
import java.util.AbstractList;
|
||||
import java.lang.Float;
|
||||
|
@ -2,14 +2,14 @@
|
||||
%module (package="upm") lsm6dsl
|
||||
#endif
|
||||
|
||||
%import "interfaces/new_interfaces.i"
|
||||
%import "interfaces/interfaces.i"
|
||||
|
||||
%include "../common_top.i"
|
||||
|
||||
/* BEGIN Java syntax ------------------------------------------------------- */
|
||||
#ifdef SWIGJAVA
|
||||
%typemap(javaimports) SWIGTYPE %{
|
||||
import upm_new_interfaces.*;
|
||||
import upm_interfaces.*;
|
||||
|
||||
import java.util.AbstractList;
|
||||
import java.lang.Float;
|
||||
|
@ -2,7 +2,7 @@
|
||||
%module (package="upm") lsm9ds0
|
||||
#endif
|
||||
|
||||
%import "interfaces/new_interfaces.i"
|
||||
%import "interfaces/interfaces.i"
|
||||
|
||||
%include "../common_top.i"
|
||||
|
||||
@ -12,7 +12,7 @@
|
||||
%include "../java_buffer.i"
|
||||
|
||||
%typemap(javaimports) SWIGTYPE %{
|
||||
import upm_new_interfaces.*;
|
||||
import upm_interfaces.*;
|
||||
|
||||
import java.util.AbstractList;
|
||||
import java.lang.Float;
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user