ANDROID: CMake/src changes to build on android-24

* Updated pom file generation: Generate pom files after all sensor
      library targets have been created - allows for dependencies
    * Changes for compiling on Android
    * Check for mraa build options: Look at symbols in mraa library to
      determine UPM build options (example: mraa_iio_init, mraa_firmata_init)
    * Add per target summary for C/C++/java/nodejs/python
    * Added hierarchy to fti include directory...
        old: #include "upm_voltage.h"
        new: #include "fti/upm_voltage.h"
    * Removed unimplemented methods from mpu9150 library and java example
    * Add utilities-c target for all c examples.  Most of the C examples
      rely on the upm_delay methods.  Add a dependency on the utilities-c
      target for all c examples.
    * Updated the examples/CMakeLists.txt to add dependencies passed via
      TARGETS to the target name parsed from the example name.  Also updated
      the interface example names to start with 'interfaces'.
    * Updated src/examples/CMakeLists.txt to ALWAYS remove examples from the
      example_src_list (moved this from end of function to beginning).

Signed-off-by: Noel Eck <noel.eck@intel.com>
This commit is contained in:
Noel Eck
2017-02-07 17:00:29 -08:00
parent b2aa2515b0
commit 0bd68e4e2b
93 changed files with 525 additions and 326 deletions

View File

@ -154,12 +154,12 @@ HTU21D::getDewPoint(int bSampleData)
sampleData();
}
float fA = 8.1332;
float fB = 1762.39;
float fC = 235.66;
float fT = getTemperature(false);
float fRH = getHumidity(false);
float fPP = exp10(fA - (fB / (fT + fC)));
float fA = 8.1332;
float fB = 1762.39;
float fC = 235.66;
float fT = getTemperature(false);
float fRH = getHumidity(false);
float fPP = powf(10, fA - (fB / (fT + fC)));
float fDP = -(fB / (log10(fRH * fPP / 100) - fA) + fC);
return (fDP);

View File

@ -5,14 +5,10 @@
%apply float *OUTPUT {float *fHum};
%apply float *OUTPUT {float *fHumTemp};
%apply float *OUTPUT {float *fDewPt};
%inline %{
extern int getHumidityData(float* fHum, float* fHumTemp, float* fDewPt);
%}
%{
#include "htu21d.hpp"
%}
%include "htu21d.hpp"
%pragma(java) jniclasscode=%{