protected void SetFanManual(decimal fanDuty) { ThreadPool.QueueUserWorkItem(p => { CallingVariations.SetFanDuty(1, (int)(255 * fanDuty)); for (var i = 0; i < 3; i++) { Thread.Sleep(500); UpdateFanStateFromEc(); } }); }
private void SetFanDutyToEc(int percentage) { var fanDutyIn256 = (int)Math.Round(percentage / 100.0m * 255.0m); CallingVariations.SetFanDuty(1, fanDutyIn256); }