Browse files

Bugfix and minor tweaks

  • Loading branch information...
1 parent bbefae7 commit 63b36baa9fbc15815debf64db4bed6b852b38a33 @phrusher committed Jun 20, 2012
Showing with 7 additions and 7 deletions.
  1. +7 −7 ReefAngel/ReefAngel.cpp
View
14 ReefAngel/ReefAngel.cpp
@@ -3142,8 +3142,8 @@ void ReefAngelClass::SetupCalibratePH()
{
enum choices {
TARGETPH,
- OK,
- CANCEL
+ CANCEL,
+ OK
};
byte sel = CANCEL;
@@ -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 {
@@ -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 {
@@ -3291,9 +3291,9 @@ void ReefAngelClass::SetupCalibratePH()
bRedraw = true;
bDrawButtons = true;
sel--;
- if ( sel > CANCEL )
+ if ( sel > OK )
{
- sel = CANCEL;
+ sel = OK;
}
}
@@ -3302,7 +3302,7 @@ void ReefAngelClass::SetupCalibratePH()
bRedraw = true;
bDrawButtons = true;
sel++;
- if ( sel > CANCEL )
+ if ( sel > OK )
{
sel = TARGETPH;
}

0 comments on commit 63b36ba

Please sign in to comment.