Exemplo n.º 1
0
    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());
    }
    // 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));
    }