initial commit for Climate, attributes and setTargetTemp member function
This commit is contained in:
parent
523beb540f
commit
340d753818
1 changed files with 21 additions and 0 deletions
21
Climate.java
Normal file
21
Climate.java
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
public class Climate {
|
||||||
|
public int[] targetTemp; //array to store temps, index 0 is driver, index 1 i passenger
|
||||||
|
public int[] currentTemp;
|
||||||
|
public enum fanLevels {OFF, LOW, MED, HI}; //standardization of fan levels
|
||||||
|
fanLevels[] fanSpeed; //array to store fan speeds, zones match temp indices
|
||||||
|
|
||||||
|
public void setTargetTemp(int driverZone, int passengerZone) {
|
||||||
|
//temp range should be between 65 F and 90 F, these if statements prohibit temps outside that range
|
||||||
|
if (driverZone < 65) {driverZone = 65;}
|
||||||
|
if (driverZone > 90) {driverZone = 90;}
|
||||||
|
if (passengerZone < 65) {passengerZone = 65;}
|
||||||
|
if (passengerZone > 90) {passengerZone = 90;}
|
||||||
|
|
||||||
|
targetTemp[0] = driverZone;
|
||||||
|
targetTemp[1] = passengerZone;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void updateCurrentTemps() {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue