fix encodeur update
This commit is contained in:
parent
d4396b4e2a
commit
213456b6ab
@ -45,6 +45,9 @@ SwitchableEncodeur* SwitchableEncodeur::getInstance() {
|
||||
bool SwitchableEncodeur::update() {
|
||||
bool sortie = false;
|
||||
long newPosition = this->read()/4;
|
||||
if(newPosition <= 0){
|
||||
newPosition = 0;
|
||||
}
|
||||
if (newPosition != this->oldPosition || this->menu != this->oldMenu) {
|
||||
this->oldMenu = this->menu;
|
||||
this->oldPosition = newPosition;
|
||||
@ -62,4 +65,5 @@ int SwitchableEncodeur::getValue() {
|
||||
|
||||
void SwitchableEncodeur::resetValue() {
|
||||
this->oldPosition = 0;
|
||||
this->readAndReset();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user