Eddddddddy / Songguo-PTS200

165 stars 37 forks source link

The temp settings dont want to remember #19

Open sansansansansansan opened 1 year ago

sansansansansansan commented 1 year ago

The temp settings dont want to remember. I set the 350 degrees, then Return. And nothing - the temperature settings as default...

sysytwl commented 1 year ago

yes, i got the same problem

dexter323i commented 10 months ago

This part causes it at line 612 in Thermostat() function:

if (SetTemp != DefaultTemp) {
    DefaultTemp = SetTemp;  // 把设置里面的默认温度也修改了
    update_default_temp_EEPROM();
}

When user finishes setting up things, and exists to main screen, then update_EEPROM() is called, which saves everything correctly. Even DefaultTemp too! Then normal operation starts, Thermostat() called from loop, but SetTemp won't be equal to DefaultTemp, so DefaultTemp is overwitten with SetTemp, then it is also saved in eeprom. Which is wrong, because it overwrites user's previous DefaultTemp modification.

I don't know why this part is even here. What is the intended reason of it?

dexter323i commented 10 months ago

Update: now I get it what is the reason of this part: When the user changes temp with Plus and Minus buttons, it is stored as Deafult temp, which shifts the Boost temp too. I made a pull request to fix the original issue.