mirror of
https://github.com/eclipse/upm.git
synced 2025-07-02 01:41:12 +03:00
Added iMagnetometer interface
Signed-off-by: Serban Waltter <serban.waltter@rinftech.com> Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
This commit is contained in:

committed by
Mihai Tudor Panu

parent
aa966946d5
commit
f28a6d2561
@ -18,8 +18,10 @@ set (module_hpp iClock.hpp
|
||||
iHallEffect.hpp
|
||||
iHeartRate.hpp
|
||||
iHumidity.hpp
|
||||
iGyroscope.hpp
|
||||
iLight.hpp
|
||||
iLineFinder.hpp
|
||||
iMagnetometer.hpp
|
||||
iMoisture.hpp
|
||||
iMotion.hpp
|
||||
iPressure.hpp
|
||||
|
48
include/interfaces/iMagnetometer.hpp
Normal file
48
include/interfaces/iMagnetometer.hpp
Normal file
@ -0,0 +1,48 @@
|
||||
/*
|
||||
* Author: Serban Waltter <serban.waltter@rinftech.com>
|
||||
* Copyright (c) 2018 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 <vector>
|
||||
|
||||
namespace upm
|
||||
{
|
||||
/**
|
||||
* @brief Interface for acceleration sensors
|
||||
*/
|
||||
class iMagnetometer
|
||||
{
|
||||
public:
|
||||
virtual ~iMagnetometer() {}
|
||||
|
||||
/**
|
||||
* Return gyroscope data in degrees per second in the form of
|
||||
* a floating point vector in micro Tesla.
|
||||
*
|
||||
* @return A floating point vector containing x, y, and z in
|
||||
* that order in micro Tesla.
|
||||
*/
|
||||
virtual std::vector<float> getMagnetometer() = 0;
|
||||
};
|
||||
} // upm
|
@ -15,6 +15,7 @@
|
||||
#include "iHumidity.hpp"
|
||||
#include "iLight.hpp"
|
||||
#include "iLineFinder.hpp"
|
||||
#include "iMagnetometer.hpp"
|
||||
#include "iMoisture.hpp"
|
||||
#include "iMotion.hpp"
|
||||
#include "iOrp.hpp"
|
||||
|
@ -56,6 +56,7 @@ import java.lang.Float;
|
||||
%interface_impl (upm::iHumidity);
|
||||
%interface_impl (upm::iLight);
|
||||
%interface_impl (upm::iLineFinder);
|
||||
%interface_impl (upm::iMagnetometer);
|
||||
%interface_impl (upm::iMoisture);
|
||||
%interface_impl (upm::iMotion);
|
||||
%interface_impl (upm::iOrp);
|
||||
@ -85,6 +86,7 @@ import java.lang.Float;
|
||||
#include "iHumidity.hpp"
|
||||
#include "iLight.hpp"
|
||||
#include "iLineFinder.hpp"
|
||||
#include "iMagnetometer.hpp"
|
||||
#include "iMoisture.hpp"
|
||||
#include "iMotion.hpp"
|
||||
#include "iOrp.hpp"
|
||||
@ -113,6 +115,7 @@ import java.lang.Float;
|
||||
%include "iHumidity.hpp"
|
||||
%include "iLight.hpp"
|
||||
%include "iLineFinder.hpp"
|
||||
%include "iMagnetometer.hpp"
|
||||
%include "iMoisture.hpp"
|
||||
%include "iMotion.hpp"
|
||||
%include "iOrp.hpp"
|
||||
|
Reference in New Issue
Block a user