For best view: /media/uploads/Staray/problem.doc
Hi all,
This is the problem that I have:
First method:
void configurateHours()
{
While(setPushed == 1)
{
do something
}
}
Second method:
void setTimeMinutesHours()
{
setPushed++;
switch (setPushed) {
case 1:
do something
case 2:
SetMinutes();
do something
}
One interruptIn:
SetTimeButton.rise(&setTimeMinutesHours);
The problem is that every time I press the SetTimeButton the method setTimeMinutesHours has to be called. The first time I push the button the setPushed variable will be 1. It will go to the configurateHours method.
But then it will never step out the while loop, because the interruptIn isn’t working anymore...the setTimeMinutesHours will never be called.
When I press the SetTimeButton button for the second it should go to the setTimeMinutesHours method and set the setPushed variable to 2 so it should step out the while loop and call the method SetMinutes() in case 2.
How can I fix this problem?
For best view: /media/uploads/Staray/problem.doc
Hi all,
This is the problem that I have:
First method:
void configurateHours() { While(setPushed == 1) { do something } }
Second method:
void setTimeMinutesHours() { setPushed++;
switch (setPushed) { case 1: do something case 2: SetMinutes(); do something }
One interruptIn: SetTimeButton.rise(&setTimeMinutesHours);
The problem is that every time I press the SetTimeButton the method setTimeMinutesHours has to be called. The first time I push the button the setPushed variable will be 1. It will go to the configurateHours method.
But then it will never step out the while loop, because the interruptIn isn’t working anymore...the setTimeMinutesHours will never be called.
When I press the SetTimeButton button for the second it should go to the setTimeMinutesHours method and set the setPushed variable to 2 so it should step out the while loop and call the method SetMinutes() in case 2.
How can I fix this problem?