RIT VEXU Core API
Loading...
Searching...
No Matches
screen::PIDPage Class Reference

PIDPage provides a way to tune a pid controller on the screen. More...

#include <screen.h>

Inheritance diagram for screen::PIDPage:
screen::Page

Public Member Functions

 PIDPage (PID &pid, std::string name, std::function< void(void)> onchange=[]() {})
 Create a PIDPage.
 
void update (bool was_pressed, int x, int y) override
 
void draw (vex::brain::lcd &, bool first_draw, unsigned int frame_number) override
 

Detailed Description

PIDPage provides a way to tune a pid controller on the screen.

Constructor & Destructor Documentation

◆ PIDPage()

screen::PIDPage::PIDPage ( PID & pid,
std::string name,
std::function< void(void)> onchange = []() {} )

Create a PIDPage.

Parameters
pidthe pid controller we're changing
namea name to recognize this pid controller if we've got multiple pid screens
onchangea function that is called when a tuning parameter is changed. If you need to update stuff on that change register a handler here

Member Function Documentation

◆ draw()

void screen::PIDPage::draw ( vex::brain::lcd & scr,
bool first_draw,
unsigned int frame_number )
overridevirtual
See also
Page::draw

Reimplemented from screen::Page.

◆ update()

void screen::PIDPage::update ( bool was_pressed,
int x,
int y )
overridevirtual
See also
Page::update

Reimplemented from screen::Page.


The documentation for this class was generated from the following files: