Toggle Button Force State / Invalidate work for one function call but not another.
I'm using an event to update indication statuses in my screen. There are four independent events that update the screen in the same fashion (with different images toggling for active/inactive). I added in another indication to show that when any of the events are registered it would indicate the 'global' status as well as the individual statuses.
The individual statuses all indicate properly, and debugging shows the program is reaching every one successfully. However, in my global status, only the fourth event (zone4heatcallstatus) indicates the global indication.
The code is identical (except numbers) for all. Any idea why this could be happening?
void MainMenuView::setHeatCallTextStatus(uint8_t status)
{
if(status == 0)
{
textHeatCall_Active.setVisible(false);
textHeatCall_Inactive.setVisible(true);
textHeatCall_Active.invalidate();
textHeatCall_Inactive.invalidate();
}
else
{
textHeatCall_Active.setVisible(true);
textHeatCall_Inactive.setVisible(false);
textHeatCall_Active.invalidate();
textHeatCall_Inactive.invalidate();
}
}Thanks!
void MainMenuView::setZone1HeatCallStatus(uint8_t status)
{
if(status==0)
{
toggleZone1Thermostat.forceState(false);
toggleZone1Thermostat.invalidate();
toggleHeatCall.forceState(false);
toggleHeatCall.invalidate();
setHeatCallTextStatus(status);
}
else
{
toggleZone1Thermostat.forceState(true);
toggleZone1Thermostat.invalidate();
toggleHeatCall.forceState(true);
toggleHeatCall.invalidate();
setHeatCallTextStatus(status);
}
}
void MainMenuView::setZone2HeatCallStatus(uint8_t status)
{
if(status==0)
{
toggleZone2Thermostat.forceState(false);
toggleZone2Thermostat.invalidate();
toggleHeatCall.forceState(false);
toggleHeatCall.invalidate();
setHeatCallTextStatus(status);
}
else
{
toggleZone2Thermostat.forceState(true);
toggleZone2Thermostat.invalidate();
toggleHeatCall.forceState(true);
toggleHeatCall.invalidate();
setHeatCallTextStatus(status);
}
}
void MainMenuView::setZone3HeatCallStatus(uint8_t status)
{
if(status==0)
{
toggleZone3Thermostat.forceState(false);
toggleZone3Thermostat.invalidate();
toggleHeatCall.forceState(false);
toggleHeatCall.invalidate();
setHeatCallTextStatus(status);
}
else
{
toggleZone3Thermostat.forceState(true);
toggleZone3Thermostat.invalidate();
toggleHeatCall.forceState(true);
toggleHeatCall.invalidate();
setHeatCallTextStatus(status);
}
}
void MainMenuView::setZone4HeatCallStatus(uint8_t status)
{
if(status==0)
{
toggleZone4Thermostat.forceState(false);
toggleZone4Thermostat.invalidate();
toggleHeatCall.forceState(false);
toggleHeatCall.invalidate();
setHeatCallTextStatus(status);
}
else
{
toggleZone4Thermostat.forceState(true);
toggleZone4Thermostat.invalidate();
toggleHeatCall.forceState(true);
toggleHeatCall.invalidate();
setHeatCallTextStatus(status);
}
}