Added actual angle
This commit is contained in:
parent
25cb1e1822
commit
0779554313
@ -1,6 +1,6 @@
|
|||||||
#include "NetworkSync.h"
|
#include "NetworkSync.h"
|
||||||
|
|
||||||
#define RC_DEBUG 1
|
// #define RC_DEBUG 1
|
||||||
|
|
||||||
#ifdef RC_DEBUG
|
#ifdef RC_DEBUG
|
||||||
#include <Arduino.h>
|
#include <Arduino.h>
|
||||||
|
@ -97,4 +97,8 @@ void ServoMotor::Update(unsigned long currentTimeMs) {
|
|||||||
|
|
||||||
this->lastUpdateTimeMs = currentTimeMs;
|
this->lastUpdateTimeMs = currentTimeMs;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ServoMotor::SetAngle(Angle16 angle) {
|
||||||
|
this->actualAngle = angle;
|
||||||
|
};
|
||||||
|
@ -32,6 +32,7 @@ class ServoMotor : public Thing {
|
|||||||
protected:
|
protected:
|
||||||
bool hasTargetAngle = false;
|
bool hasTargetAngle = false;
|
||||||
Angle16 targetAngle = 0.0F;
|
Angle16 targetAngle = 0.0F;
|
||||||
|
Angle16 actualAngle = 0.0F;
|
||||||
|
|
||||||
float maxVelocity = 0.0F;
|
float maxVelocity = 0.0F;
|
||||||
|
|
||||||
@ -40,7 +41,7 @@ class ServoMotor : public Thing {
|
|||||||
|
|
||||||
float lastUpdateTimeMs = 0.0F;
|
float lastUpdateTimeMs = 0.0F;
|
||||||
|
|
||||||
virtual void SetAngle(Angle16 angle) {};
|
virtual void SetAngle(Angle16 angle);
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace RoboidContol
|
} // namespace RoboidContol
|
||||||
|
Loading…
x
Reference in New Issue
Block a user