make all possible functions const

This commit is contained in:
2023-08-18 11:44:10 +02:00
parent 11d21e2e89
commit 4cd2b9368d
18 changed files with 33 additions and 52 deletions
+5 -5
View File
@@ -103,19 +103,19 @@ class MotorControl : public Component {
*
* @return int8_t percent of power (-100 to 100)
*/
int8_t getPower();
int8_t getPower() const { return this->power; };
/**
* @brief Get the target power
*
* @return int8_t percent of power (-100 to 100)
*/
int8_t getTargetPower();
int8_t getTargetPower() const { return this->targetPower; };
uint16_t getDutycycle() const { return this->dutycycle; }
bool isTargetPowerReached();
bool isAccelerationPositive();
bool isAccelerationNegative();
bool isTargetPowerReached() const;
bool isAccelerationPositive() const;
bool isAccelerationNegative() const;
private:
void run() override;