add main alogo WIP

This commit is contained in:
2023-10-25 22:36:09 +02:00
parent 92943ff3e9
commit f49d3de893
5 changed files with 63 additions and 5 deletions

View File

@ -26,9 +26,10 @@ void LedLib::actLed(int nb, int start){
// Boucle dans les LEDs
// Loop in LEDs
for (int i = start; i <= nb+start-1; i++) {
for (int i = start; i <= nb+start; i++) {
int j = i;
if(j > 24){
//TODO: géré le cas ou j > 24
if(j >= 24){
j -= 24;
}
@ -52,7 +53,7 @@ void LedLib::actLed(int nb, int start){
int LedLib::getledNB(){
return this->ledNb;
}
//FIXME: this function is broken
void LedLib::okBlink(){
int tempR;
int tempV;

View File

@ -17,7 +17,7 @@ SwitchableEncodeur::SwitchableEncodeur(uint8_t pin1, uint8_t pin2, uint8_t pinSW
this->menu = 0;
this->nbMenu = nbMenu;
pinMode(pinSW, INPUT_PULLUP);
attachInterrupt(digitalPinToInterrupt(pinSW), switchEncoder, RISING);//FIXME: maybe change to FALLING
attachInterrupt(digitalPinToInterrupt(pinSW), switchEncoder, RISING);
this->oldPosition = -999;
this->oldMenu = -999;
}