Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 Add default LLEMU init code back to main.cpp #165

Merged
merged 2 commits into from
Sep 3, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 17 additions & 6 deletions src/main.cpp
Original file line number Diff line number Diff line change
@@ -1,21 +1,34 @@
#include "main.h"

void on_center_button() {
HotelCalifornia marked this conversation as resolved.
Show resolved Hide resolved
static bool pressed = false;
pressed = !pressed;
if (pressed) {
pros::lcd::set_text(2, "I was pressed!");
} else {
pros::lcd::clear_line(2);
}
}

/**
* Runs initialization code. This occurs as soon as the program is started.
*
* All other competition modes are blocked by initialize; it is recommended
* to keep execution time for this mode under a few seconds.
*/
void initialize() {
pros::lcd::initialize();
pros::lcd::set_text(1, "Hello PROS User!");

pros::lcd::register_btn1_cb(on_center_button);
}

/**
* Runs while the robot is in the disabled state of Field Management System or
* the VEX Competition Switch, following either autonomous or opcontrol. When
* the robot is enabled, this task will exit.
*/
void disabled() {
}
void disabled() {}

/**
* Runs after initialize(), and before autonomous when connected to the Field
Expand All @@ -26,8 +39,7 @@ void disabled() {
* This task will exit when the robot is enabled and autonomous or opcontrol
* starts.
*/
void competition_initialize() {
}
void competition_initialize() {}

/**
* Runs the user autonomous code. This function will be started in its own task
Expand All @@ -40,8 +52,7 @@ void competition_initialize() {
* will be stopped. Re-enabling the robot will restart the task, not re-start it
* from where it left off.
*/
void autonomous() {
}
void autonomous() {}

/**
* Runs the operator control code. This function will be started in its own task
Expand Down