I have an Arduino Uno connected to an uLCD-35DT Diablo display.
Whenever I run the code below to disable buttons on Form 1 the display on Form 0 does some funny things and does not look normal. If I switch to a different form and back to Form 0 to refresh the display this fixes the issue with Form 0.
I have uploaded screen images,
Form 0 Before Buttons are disabled.jpg - shows what Form 0 should normally look like.
Form 0 After Buttons are disabled.jpg - shows what happens to Form 0 after the buttons on Form 1 are disabled.
Below is the code I use to disable the buttons on Form 1.
// disable all watering time select buttons other than 5 min
if(T5Disable_Watering_Buttons == 1 & (Start_Watering == 1 || Start_Watering_Sequence == 1))
{
genie.WriteObject(GENIE_OBJ_WINBUTTON, 3, -1); // if the 5min watering button is selected and watering is started then diable the 10 min time button
genie.WriteObject(GENIE_OBJ_WINBUTTON, 4, -1); // if the 5min watering button is selected and watering is started then diable the 15 min time button
genie.WriteObject(GENIE_OBJ_WINBUTTON, 5, -1); // if the 5min watering button is selected and watering is started then diable the 20 min time button
genie.WriteObject(GENIE_OBJ_WINBUTTON, 6, -1); // if the 5min watering button is selected and watering is started then diable the 25 min time button
genie.WriteObject(GENIE_OBJ_WINBUTTON, 7, -1); // if the 5min watering button is selected and watering is started then diable the 30 min time button
genie.WriteObject(GENIE_OBJ_WINBUTTON, 8, -1); // if the 5min watering button is selected and watering is started then diable the 35 min time button
genie.WriteObject(GENIE_OBJ_WINBUTTON, 9, -1); // if the 5min watering button is selected and watering is started then diable the 40 min time button
genie.WriteObject(GENIE_OBJ_WINBUTTON, 10, -1); // if the 5min watering button is selected and watering is started then diable the 45 min time button
genie.WriteObject(GENIE_OBJ_WINBUTTON, 11, -1); // if the 5min watering button is selected and watering is started then diable the 50 min time button
genie.WriteObject(GENIE_OBJ_WINBUTTON, 12, -1); // if the 5min watering button is selected and watering is started then diable the 55 min time button
genie.WriteObject(GENIE_OBJ_WINBUTTON, 13, -1); // if the 5min watering button is selected and watering is started then diable the 60 min time button
T5Disable_Watering_Buttons = 0;
If I comment out the above code the issue disappears.
Attached also is the Visie Genie project.
Does anyone know why this could be occurring?
Whenever I run the code below to disable buttons on Form 1 the display on Form 0 does some funny things and does not look normal. If I switch to a different form and back to Form 0 to refresh the display this fixes the issue with Form 0.
I have uploaded screen images,
Form 0 Before Buttons are disabled.jpg - shows what Form 0 should normally look like.
Form 0 After Buttons are disabled.jpg - shows what happens to Form 0 after the buttons on Form 1 are disabled.
Below is the code I use to disable the buttons on Form 1.
// disable all watering time select buttons other than 5 min
if(T5Disable_Watering_Buttons == 1 & (Start_Watering == 1 || Start_Watering_Sequence == 1))
{
genie.WriteObject(GENIE_OBJ_WINBUTTON, 3, -1); // if the 5min watering button is selected and watering is started then diable the 10 min time button
genie.WriteObject(GENIE_OBJ_WINBUTTON, 4, -1); // if the 5min watering button is selected and watering is started then diable the 15 min time button
genie.WriteObject(GENIE_OBJ_WINBUTTON, 5, -1); // if the 5min watering button is selected and watering is started then diable the 20 min time button
genie.WriteObject(GENIE_OBJ_WINBUTTON, 6, -1); // if the 5min watering button is selected and watering is started then diable the 25 min time button
genie.WriteObject(GENIE_OBJ_WINBUTTON, 7, -1); // if the 5min watering button is selected and watering is started then diable the 30 min time button
genie.WriteObject(GENIE_OBJ_WINBUTTON, 8, -1); // if the 5min watering button is selected and watering is started then diable the 35 min time button
genie.WriteObject(GENIE_OBJ_WINBUTTON, 9, -1); // if the 5min watering button is selected and watering is started then diable the 40 min time button
genie.WriteObject(GENIE_OBJ_WINBUTTON, 10, -1); // if the 5min watering button is selected and watering is started then diable the 45 min time button
genie.WriteObject(GENIE_OBJ_WINBUTTON, 11, -1); // if the 5min watering button is selected and watering is started then diable the 50 min time button
genie.WriteObject(GENIE_OBJ_WINBUTTON, 12, -1); // if the 5min watering button is selected and watering is started then diable the 55 min time button
genie.WriteObject(GENIE_OBJ_WINBUTTON, 13, -1); // if the 5min watering button is selected and watering is started then diable the 60 min time button
T5Disable_Watering_Buttons = 0;
If I comment out the above code the issue disappears.
Attached also is the Visie Genie project.
Does anyone know why this could be occurring?

Comment