public void doUpdates() { Single slider = screen.GetProperty <Single>("ChangeIntervalSlider"); if (slider < 5) { menu.Up(); screen.SetProperty <Single>("ChangeIntervalSlider", (Single)5); } if (slider > 5) { menu.Down(); screen.SetProperty <Single>("ChangeIntervalSlider", (Single)5); } Single delay = timer.GetProperty <Single>("TriggerDelay"); if (delay > 5) { menu.Choose(); timer.SetProperty <Single>("TriggerDelay", (Single)5); } if (delay < 5) { menu.Back(); timer.SetProperty <Single>("TriggerDelay", (Single)5); } lcd.clear(); lcd.update(); lcd.SetText(menu.Draw()); }
public void doUpdates() { if (this.inCAL) { lcd.WritePublicTitle(calCommand); } else { var lines = menu.Draw().Split("\n".ToCharArray()); string cmd = ""; foreach (var line in lines) { cmd += "Echo " + line + ";"; } cmd = cmd.Substring(0, cmd.Length - 1); lcd.WritePublicTitle(cmd); } cal.RunPB(); }
// Runs every 100 milliseconds public void doUpdates() { // Get value of change interval slider from LCD screen Single slider = screen.GetProperty <Single>("ChangeIntervalSlider"); if (slider < 5) { menu.Up(); screen.SetProperty <Single>("ChangeIntervalSlider", (Single)5); } if (slider > 5) { menu.Down(); screen.SetProperty <Single>("ChangeIntervalSlider", (Single)5); } // Get value of trigger delay from timer block Single delay = timer.GetProperty <Single>("TriggerDelay"); if (delay > 5) { menu.Choose(); timer.SetProperty <Single>("TriggerDelay", (Single)5); } if (delay < 5) { menu.Back(); timer.SetProperty <Single>("TriggerDelay", (Single)5); } // Clear LCD and display menu lcd.clear(); lcd.update(); lcd.SetText(menu.Draw(70, 7)); }
public void doUpdates() { lcd.clear(); lcd.update(); lcd.SetText(menu.Draw()); }