OpenSprinkler Forums OpenSprinkler Unified Firmware Creating a third program stops UI access Reply To: Creating a third program stops UI access

#35014

Ray
Keymaster

A quick update: I found a fix to the issue. The source of the issue is not clear but is definitely odd — it seems to me like a compiler bug. The line of code that outputs the ]} ending characters is being ignored when the number of programs is a multiple of 3. This might be due to a glitch in the compiler optimization. A strong evidence is that when I turned on serial debugging code, the issue is immediately gone. Another evidence is that the issue happens on OpenSprinkler hardware 2.1 and 2.2, but not on 2.0 — all three use the same code, but have different microcontroller frequencies, so the generated code is different.

In any case, the fix is to add some dummy lines (e.g. delay(1)) after the line of code that outputs ]}, and my guess is that it causes the compiler to optimize the code in different way thus avoiding the issue.

Another issue with firmware 2.1.1 as you probably have noticed is that it’s not correctly handling the SPACE character in the program name (I noticed that you used underscore in place of SPACE). So we will be releasing firmware 2.1.2 shortly to address these two bugs. Thanks.