Esempio n. 1
0
 public void UpdateTemperature()
 {
     if (Camera.Temperature > Temperature)
     {
         Compressor.UpdateTemperature(RefrigeratorMode.CoolTemperature);
     }
     else if (Camera.Temperature < Temperature)
     {
         DefrostMachine.UpdateTemperature(RefrigeratorMode.HeatTemperature);
     }
     if (Compressor.Temperature >= Compressor.Threshold)
     {
         Compressor.Enabled = false;
         notifier.Notify();
     }
     if (DefrostMachine.Temperature >= DefrostMachine.Threshold)
     {
         DefrostMachine.Enabled = false;
         notifier.Notify();
     }
 }