Skip to content

Instantly share code, notes, and snippets.

@billowdood
Created November 6, 2012 00:36
Show Gist options
  • Save billowdood/4021592 to your computer and use it in GitHub Desktop.
Save billowdood/4021592 to your computer and use it in GitHub Desktop.
public void setOnOff(int environmentTemp){
System.out.println("SETONOFF");
if(environmentTemp <= 20){
this.onOff = false;
}
if(environmentTemp > 20 && environmentTemp < 25){
this.onOff = true;
/*Set the speed to slow*/
this.speed = false;
}
if(environmentTemp > 25){
this.onOff = true;
this.speed = true;
}
}
public void setEnvironmentTemp(int actualHour){
if(actualHour >= 0 && actualHour < 12){
this.environmentTemp = (((10*hourOfDay)/6) + (95/6));
}
if(actualHour >= 12 && actualHour <= 23){
this.environmentTemp = (((-10 * hourOfDay)/6) + (335/6));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment