Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Bugfix and minor tweaks
  • Loading branch information
jenshorn committed Jun 20, 2012
1 parent bbefae7 commit 63b36ba
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions ReefAngel/ReefAngel.cpp
Expand Up @@ -3142,8 +3142,8 @@ void ReefAngelClass::SetupCalibratePH()
{
enum choices {
TARGETPH,
OK,
CANCEL
CANCEL,
OK
};
byte sel = CANCEL;

Expand Down Expand Up @@ -3242,7 +3242,7 @@ void ReefAngelClass::SetupCalibratePH()
iTarget[b]++;
if(b==1 && iTarget[0]==iTarget[b])
{
if((iTarget[b] + 1) < maxPh)
if((iTarget[b] + 1) <= maxPh)
{
iTarget[b]++;
} else {
Expand All @@ -3267,7 +3267,7 @@ void ReefAngelClass::SetupCalibratePH()
iTarget[b]--;
if(b==1 && iTarget[0]==iTarget[b])
{
if((iTarget[b] - 1) > minPh)
if((iTarget[b] - 1) >= minPh)
{
iTarget[b]--;
} else {
Expand All @@ -3291,9 +3291,9 @@ void ReefAngelClass::SetupCalibratePH()
bRedraw = true;
bDrawButtons = true;
sel--;
if ( sel > CANCEL )
if ( sel > OK )
{
sel = CANCEL;
sel = OK;
}
}

Expand All @@ -3302,7 +3302,7 @@ void ReefAngelClass::SetupCalibratePH()
bRedraw = true;
bDrawButtons = true;
sel++;
if ( sel > CANCEL )
if ( sel > OK )
{
sel = TARGETPH;
}
Expand Down

0 comments on commit 63b36ba

Please sign in to comment.