Util
controller
The pros controller is defined globally in our library as master.
- Prototype
- Example
void opcontrol() {
while (true) {
int l_stick = left_curve_function(master.get_analog(ANALOG_LEFT_Y));
int r_stick = left_curve_function(master.get_analog(ANALOG_RIGHT_Y));
chassis.set_tank(l_stick, r_stick);
pros::delay(ez::util::DELAY_TIME);
}
}
extern pros::Controller master();
print_to_screen()
Prints to the LLEMU. This function handles text that's too long for a line by finding the last word and starting it on a new line, and takes \n to set a new line.
text input string
line starting line
- Prototype
- Example
- Example 2
Returns:
hello, this is line 0
this is line 1
void initialize() {
ez::print_to_screen("hello, this is line 0\nthis is line 1");
}
void print_to_screen(std::string text, int line)
Returns:
01234567890123456789012345678901
hello
void initialize() {
std::string 32char = 01234567890123456789012345678901;
ez::print_to_screen(32char + "hello", 2);
}
print_ez_template()
Prints our branding on your terimnal :D.
- Prototype
- Example
void initialize() {
print_ez_template();
}
void print_ez_template();