Skip to content
Snippets Groups Projects
Commit dcc39860 authored by Félix Noël's avatar Félix Noël
Browse files

patch: added getter to servo angle

parent 1a0d5c75
No related branches found
No related tags found
No related merge requests found
Checking pipeline status
......@@ -75,6 +75,8 @@ class Servo {
setAngle((maxAngle + minAngle) / 2);
}
int16_t getAngle() const { return _currentAngle; }
void setAngle(int16_t angle) {
if (angle > _maxAngle) {
angle = _maxAngle;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment