AngeloCasi / FUGU-ARDUINO-MPPT-FIRMWARE

An open source Arduino ESP32 MPPT Charger firmware equipped with charging algorithms, WiFi, LCD menus & more!
Creative Commons Zero v1.0 Universal
519 stars 133 forks source link

error: insn does not satisfy its constraints: 555 | } #34

Open charansaitiru opened 3 months ago

charansaitiru commented 3 months ago

I am only getting error for this part of SETTING MENU ITEM CHARGING CURRENT code rest part of the code is fine...

`///// SETTINGS MENU ITEM: CHARGING CURRENT ///// else if(subMenuPage==4) { lcd.setCursor(0,0);lcd.print("CHARGING CURRENT"); if(setMenuPage==1){lcd.setCursor(0,1);lcd.print(" >");} else{lcd.setCursor(0,1);lcd.print("= "); } lcd.setCursor(2,1);lcd.print(currentCharging,2);lcd.print("A");
lcd.print(" ");

  //SET MENU - FLOATTYPE
  if(setMenuPage==0){floatTemp = currentCharging;}
  else
  {
    if(digitalRead(buttonBack)==1){while(digitalRead(buttonBack)==1){}currentCharging = floatTemp;cancelledMessageLCD();setMenuPage=0;} 
    if(digitalRead(buttonSelect)==1){while(digitalRead(buttonSelect)==1){}saveSettings();setMenuPage=0;savedMessageLCD();}     
    currentMenuSetMillis = millis();
    if(digitalRead(buttonRight)==1)
    {                                                  //Right button press (increments setting values)
      while(digitalRead(buttonRight)==1)
      {
        if(millis()-currentMenuSetMillis>longPressTime)
        {                              //Long Press     
          currentCharging += 1.00;                                                    //Increment by 1
          currentCharging = constrain(currentCharging,0.0,cOutSystemMax);             //Limit settings values to a range
          lcd.setCursor(2,1);lcd.print(currentCharging,2);delay(longPressInterval);   //Display settings data                               
        }
        else
        {                                                                         //Short Press  
          currentCharging += 0.01;                                                    //Increment by 0.01
          currentCharging = constrain(currentCharging,0.0,cOutSystemMax);             //Limit settings values to a range
          lcd.setCursor(2,1);lcd.print(currentCharging,2);delay(shortPressInterval);  //Display settings data                            
        }  
        lcd.print("A   ");                                                            //Display unit
      } 
    }
    else if(digitalRead(buttonLeft)==1)
    {                                              //Left button press (decrements setting values)
      while(digitalRead(buttonLeft)==1)
      {
        if(millis()-currentMenuSetMillis>longPressTime)
        {                              //Long Press     
          currentCharging -= 1.00;                                                    //Increment by 1
          currentCharging = constrain(currentCharging,0.0,cOutSystemMax);             //Limit settings values to a range
          lcd.setCursor(2,1);lcd.print(currentCharging,2);delay(longPressInterval);   //Display settings data                               
        }
        else
        {                                                                         //Short Press  
          currentCharging -= 0.01;                                                    //Increment by 0.01
          currentCharging =  constrain(currentCharging,0.0,cOutSystemMax);            //Limit settings values to a range
          lcd.setCursor(2,1);lcd.print(currentCharging,2);delay(shortPressInterval);  //Display settings data                                      
        } 
        lcd.print("A   ");                                                            //Display unit
      } 
    }
  } 
}`

ERROR