public void SeedData() { ReportDateTime = DateTimeOffset.Now; CabinStatus = Modes.Uncrewed; HumidityLevel = 40; HumiditySetLevel = 40; Temperature = 19; SetTemperatureDay = 19; SetTemperatureNight = 17; ReprocessBafflePosition = DiverterValvePositions.Accept; FanSpeed = 40; LiquidInOutflow = false; Pressure = 14; SetPressure = 14; SeperatorSpeed = 0; SeperatorFull = false; TempControlBafflePosition = 60; }
public AtmosphereData(AtmosphereData other) { ReportDateTime = other.ReportDateTime; CabinStatus = other.CabinStatus; AmbientNoiseLevel = other.AmbientNoiseLevel; HumidityLevel = other.HumidityLevel; HumiditySetLevel = other.HumiditySetLevel; Temperature = other.Temperature; SetTemperatureDay = other.SetTemperatureDay; SetTemperatureNight = other.SetTemperatureNight; ReprocessBafflePosition = other.ReprocessBafflePosition; FanSpeed = other.FanSpeed; LiquidInOutflow = other.LiquidInOutflow; Pressure = other.Pressure; SetPressure = other.SetPressure; SeperatorSpeed = other.SeperatorSpeed; SeperatorFull = other.SeperatorFull; TempControlBafflePosition = other.TempControlBafflePosition; }
public void ProcessData() { GenerateData(); if (IsManualMode) { return; } // too hot or humid if (Temperature > (SetTemperatureDay + tempControlIncrement) || HumidityLevel > (HumiditySetLevel + cabinHumidityLevelTolerance)) { DecreaseTemperature(); } // too cold or dry if (CabinStatus == Modes.Crewed) { if (Temperature < (SetTemperatureDay - tempControlIncrement) || (HumidityLevel < (HumiditySetLevel - cabinHumidityLevelTolerance))) { IncreaseTemperature(); } } if (CabinStatus == Modes.Uncrewed) { if (Temperature < (cabinTemperatureUncrewedLowerLimit - tempControlIncrement) || (HumidityLevel < (HumiditySetLevel - cabinHumidityLevelTolerance))) { IncreaseTemperature(); } } if (LiquidInOutflow) { ReprocessBafflePosition = DiverterValvePositions.Reprocess; } else { ReprocessBafflePosition = DiverterValvePositions.Accept; } }