feat: V1 fonctionnel OK #8

Merged
Clement merged 8 commits from feat/main-algo-2 into master 2023-12-03 11:24:38 +00:00
Showing only changes of commit 76a2246882 - Show all commits

View File

@ -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;