Skip to content
This repository has been archived by the owner on May 16, 2024. It is now read-only.

Commit

Permalink
pushing a lil more
Browse files Browse the repository at this point in the history
  • Loading branch information
cowsed committed Mar 8, 2024
1 parent 869d044 commit 53616ef
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 11 deletions.
5 changes: 4 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
{
"C_Cpp.default.systemIncludePath": [
"${config:vexrobotics.vexcode.Cpp.Sdk.Home}/V5/V5_20220726_10_00_00/vexv5/gcc/include/sys"
]
],
"files.associations": {
"new": "cpp"
}
}
2 changes: 1 addition & 1 deletion .vscode/vex_project_settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"creationDate": "10/5/2023, 8:40:34 PM",
"platform": "V5",
"language": "cpp",
"slot": 2,
"slot": 1,
"sdkVersion": "V5_20220726_10_00_00",
"cpp": {
"includePath": [],
Expand Down
23 changes: 15 additions & 8 deletions src/competition/autonomous.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ void autonomous() {
while (imu.isCalibrating()) {
vexDelay(1);
}
just_auto();
jideways_skills();
}
AutoCommand *intake_cmd(double amt = 8.0) {
return new FunctionCommand([=]() {
Expand Down Expand Up @@ -75,14 +75,19 @@ void jideways_skills() {
new DelayCommand(400),
toggle_wing_r(), // in
new DelayCommand(800),
}, (new IfTimePassed(35))->Or(new TimesTestedCondition(22))),
}, (new IfTimePassed(35))->Or(new TimesTestedCondition(2))),
// pushing
outtake_cmd(),
drive_sys.DriveToPointCmd({37, 6.0},vex::fwd,0.5),
drive_sys.TurnToHeadingCmd(-20, 0.5),
drive_sys.DriveToPointCmd({37, 6.0},vex::fwd,0.5)->withTimeout(2.0),
drive_sys.TurnToHeadingCmd(0, 0.5)->withTimeout(2.0),
toggle_wing_l(),

// stop things circa half court
new Async(new FunctionCommand([](){
if (odom.get_position().x > 46){
left_wing.set(false);
return false;
}
if (odom.get_position().x > 69){
left_wing.set(true);
outtake(0);
Expand All @@ -92,19 +97,21 @@ void jideways_skills() {
})),

// across half court
drive_sys.DriveToPointCmd({108, 7},vex::fwd, 0.75),
// drive_sys.TurnToHeadingCmd(29, 0.5),
// drive_sys.DriveForwardCmd(-2, vex::fwd),
drive_sys.DriveToPointCmd({96, 7},vex::fwd, 0.75),

toggle_wing_l(),

drive_sys.TurnToPointCmd(122.5,16.52,vex::fwd, 0.5),
drive_sys.DriveToPointCmd({122.5, 16.52},vex::fwd, 0.5),

toggle_wing_l(),
drive_sys.TurnDegreesCmd(-180)->withTimeout(0.35), // start spinning the right way

drive_sys.TurnToPointCmd(132.5,36.2, vex::reverse, 0.5),
drive_sys.DriveForwardCmd(20, vex::reverse, 1.0)->withTimeout(1.0),
drive_sys.DriveForwardCmd(20, vex::fwd, 1.0)->withTimeout(1.0),



drive_sys.TurnToHeadingCmd(247, 0.65),
drive_sys.DriveForwardCmd(28, vex::reverse, 1.0)->withTimeout(1.0),
drive_sys.DriveForwardCmd(20, vex::fwd, 1.0)->withTimeout(1.0),
Expand Down
2 changes: 1 addition & 1 deletion src/competition/opcontrol.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const vex::controller::button &climb_wing_button = con.ButtonUp;

const double fold_out_time = 0.25;
void opcontrol() {

autonomous();
// odom.set_position({.x = 40, .y = 12, .rot = 90});
while (imu.isCalibrating()) {
vexDelay(1);
Expand Down

0 comments on commit 53616ef

Please sign in to comment.