Updated interfaces and sensors

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:
Serban Waltter
2018-07-26 18:04:31 +03:00
committed by Mihai Tudor Panu
parent bfdd2c37c0
commit 90524273ec
18 changed files with 44 additions and 63 deletions

View File

@ -53,6 +53,6 @@ int RotaryEncoder::position()
return rotaryencoder_get_position(m_rotaryencoder);
}
float RotaryEncoder::getValue() {
return (float) RotaryEncoder::position();
float RotaryEncoder::getAngle() {
return (float) RotaryEncoder::position() / 20.0 * 360;
}

View File

@ -24,7 +24,7 @@
#pragma once
#include "rotaryencoder.h"
#include <interfaces/iRotaryAngle.hpp>
#include <interfaces/iAngle.hpp>
namespace upm {
@ -61,7 +61,7 @@ namespace upm {
* @snippet rotaryencoder.cxx Interesting
*/
class RotaryEncoder : virtual public iRotaryAngle {
class RotaryEncoder : virtual public iAngle {
public:
/**
* RotaryEncoder constructor
@ -93,7 +93,7 @@ namespace upm {
*
* @return rotation value.
*/
virtual float getValue();
virtual float getAngle();
private:
/* Disable implicit copy and assignment operators */