mirror of
https://github.com/eclipse/upm.git
synced 2025-07-26 21:51:16 +03:00
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:

committed by
Mihai Tudor Panu

parent
bfdd2c37c0
commit
90524273ec
@ -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;
|
||||
}
|
||||
|
@ -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 */
|
||||
|
Reference in New Issue
Block a user