Beispiel #1
0
 public void ToggleStatus()
 {
     if (this.RoasterStatus == RoasterStatus.Off)
     {
         this.RoasterStatus = RoasterStatus.On;
     }
     else
     {
         this.RoasterStatus = RoasterStatus.Off;
     }
 }
Beispiel #2
0
        public RoasterStatus GetRoasterStatus()
        {
            RoasterStatus status = new RoasterStatus();

            status.CurrentHoldTemperature = HoldApp.Instance.GetTemperature();
            status.CurrentTemperature     = TemperatureProbeApp.Instance.CurrentTemperature();
            status.IsHoldOn           = HoldApp.Instance.IsOn();
            status.IsFanOn            = fan.IsOn();
            status.IsHeaterOn         = heater.IsOn();
            status.IsProfileRunning   = ProfileApp.Instance.IsRunning();
            status.ProfileElapsedTime = ProfileApp.Instance.ElapsedRunTime().TotalSeconds.ToString();
            status.RoastSchedule      = ProfileApp.Instance.GetCurrentProfile().RoastSchedule;

            return(status);
        }
        public IGetResponse GetRoasterStatus()
        {
            RoasterStatus status = RoasterApp.Instance.GetRoasterStatus();

            return(new GetResponse(GetResponse.ResponseStatus.OK, status));
        }