feature/servo_motor_component #17
Loading…
x
Reference in New Issue
Block a user
No description provided.
Delete Branch "feature/servo_motor_component"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@ -0,0 +13,4 @@
return this->myservo.read(this->PIN);
}
void ServoMotorComponent::setCurrentPosition() {
???
@ -0,0 +17,4 @@
this->currentPosition = this->myservo.read(this->PIN);
}
void ServoMotorComponent::setDesiredPosition(Position desiredPosition) {
Nom des variables pas claire
@ -0,0 +39,4 @@
|| millis() - this->lastUpTime <= this->updatePeriod) return;
if (this->currentPosition > this->desiredposition) {
this->currentPosition--;
Limite faire en sorte de pouvoir configurer le pas dans le constructeur (avec une valeur par défaut)
en double ou float
@ -0,0 +44,4 @@
if (this->currentPosition < this->desiredposition) {
this->currentPosition++;
}
this->lastUpTime = millis();
typo ctrl C
@ -0,0 +49,4 @@
}
void ServoMotorComponent::setPin(int PIN) {
pas besoins car déja fait dans constructeur
@ -0,0 +9,4 @@
RIGHT
};
class ServoMotorComponent
il n'y a pas d'interface
@ -0,0 +13,4 @@
{
public:
ServoMotorComponent(int PIN, unsigned long updatePeriod);
~ServoMotorComponent() = default;
tu peut viré le destructeur
@ -0,0 +15,4 @@
ServoMotorComponent(int PIN, unsigned long updatePeriod);
~ServoMotorComponent() = default;
int getCurrentPosition();
void setCurrentPosition();
met des commentaire doxygen sur tes fonction
@ -2,28 +2,17 @@
#include "Arduino.h"
vire tes changement dans Program.CPP avant de push