mirror of
https://github.com/eclipse/upm.git
synced 2025-07-05 03:11:15 +03:00
Added initial interfaces and some sensors implementing them
This commit is contained in:

committed by
Serban Waltter

parent
85608a9f61
commit
e7820f2831
@ -48,3 +48,8 @@ bool BISS0001::value()
|
||||
{
|
||||
return biss0001_motion_detected(m_biss0001);
|
||||
}
|
||||
|
||||
bool BISS0001::motionDetected()
|
||||
{
|
||||
return value();
|
||||
}
|
||||
|
@ -24,6 +24,7 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <interfaces/iMotion.hpp>
|
||||
#include <biss0001.h>
|
||||
|
||||
namespace upm {
|
||||
@ -57,7 +58,7 @@ namespace upm {
|
||||
* @snippet biss0001.cxx Interesting
|
||||
*/
|
||||
|
||||
class BISS0001 {
|
||||
class BISS0001 : virtual public iMotion {
|
||||
public:
|
||||
/**
|
||||
* BISS0001 motion sensor constructor
|
||||
@ -81,11 +82,11 @@ namespace upm {
|
||||
/**
|
||||
* Gets the motion value from the sensor. This is a more
|
||||
* informative method name, but we want to keep compatibility
|
||||
* with the original for now.
|
||||
* with the original for now. Implements iMotion interface.
|
||||
*
|
||||
* @return true if motion was detected, false otherwise.
|
||||
*/
|
||||
bool motionDetected() { return value(); };
|
||||
virtual bool motionDetected();
|
||||
|
||||
private:
|
||||
/* Disable implicit copy and assignment operators */
|
||||
|
Reference in New Issue
Block a user