diff --git a/src/EZ-Template/rotation_mechanisms/lift_rotation.cpp b/src/EZ-Template/rotation_mechanisms/lift_rotation.cpp index 9066624..e6812c0 100644 --- a/src/EZ-Template/rotation_mechanisms/lift_rotation.cpp +++ b/src/EZ-Template/rotation_mechanisms/lift_rotation.cpp @@ -108,7 +108,7 @@ void LiftMech::reset_state() { void LiftMech::lift_control() { liftError = liftTarget - liftRotation.get_position(); liftVelocity = get_lift_kp() * liftError; - lift.move(liftVelocity); + lift.move(-liftVelocity); } void LiftMech::set_lift_kp(float _liftKp) { diff --git a/src/main.cpp b/src/main.cpp index 9aae3f3..81ad306 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -41,7 +41,11 @@ namespace ez { // Lift constructor LiftMech liftObj( +<<<<<<< HEAD {0, 0, 0, 0}, 4); +======= + {0, -19714, -13017, -27993, -17491, -48393, -37459, -69706, -58957, -89693, -79453, -106664, -99115}, 13); +>>>>>>> 4be5e2958fb4be3d35cbe58b8933bfde5ce90ed3 // Wrist constructor /*WristMech wristObj( @@ -77,12 +81,12 @@ void initialize() { liftRotation.reset_position(); //wristRotation.reset_position(); - /*pros::Task liftControlTasck([&]{ + pros::Task liftControlTasck([&]{ while (true) { liftObj.lift_control(); pros::delay(10); } - });*/ + }); // Look at your horizontal tracking wheel and decide if it's in front of the midline of your robot or behind it // - change `back` to `front` if the tracking wheel is in front of the midline @@ -313,8 +317,8 @@ void opcontrol() { // Call custom drive functions here pistonControl.control_piston(PistonsP::PlaceHolderP, ControlPeriodP::driver, ControllerP::master, ButtonsP::arrow_buttons); - motorControl.motor_control(ControlPeriodM::driver, ControllerM::master, ButtonsM::right_shoulder_buttons, - MotorGroups::lift_MG, 127, -127); + /*motorControl.motor_control(ControlPeriodM::driver, ControllerM::master, ButtonsM::right_shoulder_buttons, + MotorGroups::lift_MG, 127, -127);*/ motorControl.motor_control(ControlPeriodM::driver, ControllerM::master, ButtonsM::left_shoulder_buttons, MotorGroups::claw_M, -127, 127); motorControl.motor_control(ControlPeriodM::driver, ControllerM::master, ButtonsM::Y_B_buttons, @@ -322,7 +326,7 @@ void opcontrol() { // Basic control scheme //armObj.arm_driver_control(ControllerR::master, ButtonsR::left_shoulder_buttons); - //liftObj.lift_driver_control(ControllerR::master, ButtonsR::right_shoulder_buttons); + liftObj.lift_driver_control(ControllerR::master, ButtonsR::right_shoulder_buttons); //armObj.arm_driver_control(ControllerR::slave, ButtonsR::left_shoulder_buttons); //liftObj.lift_driver_control(ControllerR::slave, ButtonsR::right_shoulder_buttons);