12 double targetHeading =
imu.get_heading();
14 bool hasClimbed =
false;
15 bool hasDropped =
false;
17 uint32_t startTime = pros::millis();
19 u_int32_t currentTime = pros::millis();
27 double currentPitch =
imu.get_pitch();
28 double currentHeading =
imu.get_heading();
29 double error = targetHeading - currentHeading;
31 while (error > 180) error -= 360;
32 while (error < -180) error += 360;
39 std::cout <<
"Status: CLIMBING" << std::endl;
44 std::cout <<
"Status: DROPPING" << std::endl;
48 std::cout <<
"Status: LANDED" << std::endl;
54 pros::Task::delay_until(¤tTime, 10);