feat: V1 fonctionnel OK #8
@ -45,13 +45,14 @@ SwitchableEncodeur* SwitchableEncodeur::getInstance() {
|
||||
bool SwitchableEncodeur::update() {
|
||||
bool sortie = false;
|
||||
long newPosition = this->read()/4;
|
||||
if(newPosition <= 0){
|
||||
if(newPosition < 0){
|
||||
newPosition = 0;
|
||||
this->readAndReset();
|
||||
}
|
||||
if (newPosition != this->oldPosition || this->menu != this->oldMenu) {
|
||||
this->oldMenu = this->menu;
|
||||
this->oldPosition = newPosition;
|
||||
if(this->oldPosition < 0){
|
||||
if(this->oldPosition <= 0){
|
||||
this->oldPosition = 0;
|
||||
}
|
||||
sortie = true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user