@@ -53,14 +53,15 @@ struct Electronics {
53
53
* to keep execution time for this mode under a few seconds.
54
54
*/
55
55
56
- pros::rtos::Task MotorNotification (electronic.controllers.notify_motor_disconnect);
57
- pros::rtos::Task LadyBrownNotification (subsystem.ladybrown.edge_check);
56
+
58
57
59
58
void initialize () {
60
59
chassis.calibrate ();
61
60
62
61
chassis.setPose (0 , 0 , 0 );
62
+ pros::rtos::Task MotorNotification (electronic.controllers .notify_motor_disconnect );
63
63
64
+ // pros::rtos::Task LadyBrownNotification(subsystem.ladybrown.edge_check);
64
65
// screen.selector.selector();
65
66
pros::lcd::initialize ();
66
67
pros::Task screen_task ([&]() {
@@ -112,20 +113,27 @@ void competition_initialize() {}
112
113
void autonomous () {
113
114
114
115
pros::lcd::initialize ();
115
- pros::Task screen_task ([&]() {
116
- while (true ) {
117
- // print robot location to the brain screen
118
- pros::lcd::print (0 , " X: %f" , chassis.getPose ().x ); // x
119
- pros::lcd::print (1 , " Y: %f" , chassis.getPose ().y ); // y
120
- pros::lcd::print (2 , " Theta: %f" , chassis.getPose ().theta ); // heading
121
- // delay to save resources
122
- pros::lcd::print (3 , " Rotation Sensor: %i" , lateral_sensor.get_position ());
123
- pros::lcd::print (4 , " Rotation Sensor: %i" , horizontal_sensor.get_position ());
124
- pros::delay (20 );
125
- }
126
- });
116
+ // pros::Task screen_task([&]() {
117
+ // while (true) {
118
+ // // print robot location to the brain screen
119
+ // pros::lcd::print(0, "X: %f", chassis.getPose().x); // x
120
+ // pros::lcd::print(1, "Y: %f", chassis.getPose().y); // y
121
+ // pros::lcd::print(2, "Theta: %f", chassis.getPose().theta); // heading
122
+ // // delay to save resources
123
+ // pros::lcd::print(3, "Rotation Sensor: %i", lateral_sensor.get_position());
124
+ // pros::lcd::print(4, "Rotation Sensor: %i", horizontal_sensor.get_position());
125
+ // pros::delay(20);
126
+ // }
127
+ // });
127
128
128
129
subsystem.autonomous .AutoDrive (subsystem.intake , subsystem.latch );
130
+
131
+ // chassis.turnToHeading(90, 100000);
132
+ // chassis.turnToHeading(180, 2000);
133
+ // chassis.moveToPoint(0, 24, 10000);
134
+
135
+
136
+
129
137
}
130
138
131
139
/* *
@@ -163,16 +171,6 @@ void opcontrol() {
163
171
// Output the current drive mode to the controller screen
164
172
controller.print (0 , 0 , " reversal: %d" , Drivetrain::isReversed);
165
173
}
166
- if (controller.get_digital_new_press (pros::E_CONTROLLER_DIGITAL_X)) {
167
- if (LadyBrownNotification.get_state () == 2 ) {
168
- LadyBrownNotification.suspend ();
169
- controller.print (0 , 0 , " LB-Disabled" );
170
- } else {
171
- LadyBrownMotor.set_zero_position (LadyBrownMotor.get_position ());
172
- LadyBrownNotification.resume ();
173
- controller.print (0 , 0 , " LB-Enabled" );
174
- }
175
- }
176
174
177
175
subsystem.drivetrain .run ();
178
176
subsystem.latch .run ();
0 commit comments