public static void Initialize() { Probes = new ProbeController[Config.Probes.Count]; foreach (Config.ProbeType key in Config.Probes.Keys) { var probe = (ProbeController)Config.Probes[key]; Probes[(int)probe.ProbeType] = probe; } }
private static string GetProbeTempText(ProbeController probe) { if (!probe.HasTemp()) { return("-No " + probe.Name + " Probe"); } else if (probe.ProbeType == Config.ProbeType.Pit && GrillController.LidOpenResumeCountdown > 0) { return(probe.Name + ":" + probe.CurrentTemp.ToString("N0") + "F Lid:" + GrillController.LidOpenResumeCountdown); } else { return(probe.Name + ":" + probe.CurrentTemp.ToString("N0") + "F [" + probe.TargetTemp + "]"); } }
public static void changeTargetTemp(ProbeController probe) { var changeMultiplier = 1; if (_buttonDepressedElapsed > 3000) { changeMultiplier = 5; } if (_buttonDepressedElapsed > 6000) { changeMultiplier = 10; } if (_currentButton == Button.Up) { if (probe.TargetTemp < 700) { probe.TargetTemp += 1 * changeMultiplier; Debug.Print(probe.Name + ": Up target temp to " + probe.TargetTemp); } else { Debug.Print(probe.Name + ": Max target reached"); } } else if (_currentButton == Button.Down) { if (probe.TargetTemp > 80) { probe.TargetTemp -= 1 * changeMultiplier; Debug.Print(probe.Name + ": Down target temp to " + probe.TargetTemp); } else { Debug.Print(probe.Name + ": Min target reached"); } } }
private static string GetProbeTempText(ProbeController probe) { if (!probe.HasTemp()) { return "-No " + probe.Name + " Probe"; } else if (probe.ProbeType == Config.ProbeType.Pit && GrillController.LidOpenResumeCountdown > 0) { return probe.Name + ":" + probe.CurrentTemp.ToString("N0") + "F Lid:" + GrillController.LidOpenResumeCountdown; } else { return probe.Name + ":" + probe.CurrentTemp.ToString("N0") + "F [" + probe.TargetTemp + "]"; } }