add encodeur set value

This commit is contained in:
Clement 2023-11-18 19:44:39 +01:00
parent 8c19ae96fa
commit 2e593cb4e0
2 changed files with 11 additions and 0 deletions

View File

@ -39,6 +39,13 @@ public:
*/ */
int getValue(); int getValue();
/**
* @brief set the encodeur value
*
* @param val the new encodeur value
*/
void setValue(int val);
/** /**
* @brief update the encodeur value * @brief update the encodeur value
* *

View File

@ -67,3 +67,7 @@ void SwitchableEncodeur::resetValue() {
this->oldPosition = 0; this->oldPosition = 0;
this->readAndReset(); this->readAndReset();
} }
void SwitchableEncodeur::setValue(int val){
this->write(val*4);
}