diff --git a/EdgarProCompetition.v5code b/EdgarProCompetition.v5code index 6163f57..bafe852 100644 --- a/EdgarProCompetition.v5code +++ b/EdgarProCompetition.v5code @@ -1 +1 @@ -{"title":"EdgarProCompetition","description":"E.D.G.A.R. (Ergonomicaly Decent Goal-Grabbing Automated Robot)","icon":"USER921x.bmp","version":"21.10.0712","sdk":"20210708_10_00_00","language":"cpp","competition":false,"files":[{"name":"include/robot-config.h","type":"File","specialType":"device_config"},{"name":"include/vex.h","type":"File","specialType":""},{"name":"makefile","type":"File","specialType":""},{"name":"src/main.cpp","type":"File","specialType":""},{"name":"src/robot-config.cpp","type":"File","specialType":"device_config"},{"name":"vex/mkenv.mk","type":"File","specialType":""},{"name":"vex/mkrules.mk","type":"File","specialType":""},{"name":"include","type":"Directory"},{"name":"src","type":"Directory"},{"name":"vex","type":"Directory"}],"device":{"slot":1,"uid":"276-4810","options":{}},"isExpertMode":true,"isExpertModeRC":false,"isVexFileImport":false,"robotconfig":[{"port":[8],"name":"frontMogo","customName":true,"deviceType":"Motor","setting":{"reversed":"false","fwd":"forward","rev":"reverse","gear":"ratio36_1"},"triportSourcePort":22},{"port":[6],"name":"rearMogo","customName":true,"deviceType":"Motor","setting":{"reversed":"true","fwd":"forward","rev":"reverse","gear":"ratio36_1"},"triportSourcePort":22},{"port":[8],"name":"frontHook","customName":true,"deviceType":"DigitalOut","setting":{"id":"partner"},"triportSourcePort":22},{"port":[13],"name":"inertialSensor","customName":true,"deviceType":"Inertial","setting":{"id":"partner"},"triportSourcePort":22},{"port":[],"name":"Controller1","customName":false,"deviceType":"Controller","setting":{"left":"","leftDir":"false","right":"","rightDir":"false","upDown":"","upDownDir":"false","xB":"","xBDir":"false","drive":"none","id":"primary"},"triportSourcePort":22},{"port":[11,12],"name":"LeftDriveSmart","customName":true,"deviceType":"MotorGroup","setting":{"fwd":"forward","rev":"reverse","gear":"ratio6_1","motor_a_reversed":"true","motor_b_reversed":"false"},"triportSourcePort":22},{"port":[1,2],"name":"RightDriveSmart","customName":true,"deviceType":"MotorGroup","setting":{"fwd":"forward","rev":"reverse","gear":"ratio6_1","motor_a_reversed":"false","motor_b_reversed":"true"},"triportSourcePort":22},{"port":[19],"name":"ringLift","customName":true,"deviceType":"Motor","setting":{"reversed":"false","fwd":"forward","rev":"reverse","gear":"ratio18_1"},"triportSourcePort":22},{"port":[7],"name":"rearMogoSwitch","customName":true,"deviceType":"LimitSwitch","setting":{"id":"partner"},"triportSourcePort":22}],"neverUpdate":null} \ No newline at end of file +{"title":"EdgarProCompetition","description":"E.D.G.A.R. (Ergonomicaly Decent Goal-Grabbing Automated Robot)","icon":"USER921x.bmp","version":"21.10.0712","sdk":"20210708_10_00_00","language":"cpp","competition":false,"files":[{"name":"include/robot-config.h","type":"File","specialType":"device_config"},{"name":"include/vex.h","type":"File","specialType":""},{"name":"makefile","type":"File","specialType":""},{"name":"src/main.cpp","type":"File","specialType":""},{"name":"src/robot-config.cpp","type":"File","specialType":"device_config"},{"name":"vex/mkenv.mk","type":"File","specialType":""},{"name":"vex/mkrules.mk","type":"File","specialType":""},{"name":"Auton Cheat Sheet.png","type":"File","specialType":""},{"name":"include","type":"Directory"},{"name":"src","type":"Directory"},{"name":"vex","type":"Directory"}],"device":{"slot":1,"uid":"276-4810","options":{}},"isExpertMode":true,"isExpertModeRC":false,"isVexFileImport":false,"robotconfig":[{"port":[8],"name":"frontMogo","customName":true,"deviceType":"Motor","setting":{"reversed":"false","fwd":"forward","rev":"reverse","gear":"ratio36_1"},"triportSourcePort":22},{"port":[6],"name":"rearMogo","customName":true,"deviceType":"Motor","setting":{"reversed":"true","fwd":"forward","rev":"reverse","gear":"ratio36_1"},"triportSourcePort":22},{"port":[8],"name":"frontHook","customName":true,"deviceType":"DigitalOut","setting":{"id":"partner"},"triportSourcePort":22},{"port":[13],"name":"inertialSensor","customName":true,"deviceType":"Inertial","setting":{"id":"partner"},"triportSourcePort":22},{"port":[],"name":"Controller1","customName":false,"deviceType":"Controller","setting":{"left":"","leftDir":"false","right":"","rightDir":"false","upDown":"","upDownDir":"false","xB":"","xBDir":"false","drive":"none","id":"primary"},"triportSourcePort":22},{"port":[11,12],"name":"LeftDriveSmart","customName":true,"deviceType":"MotorGroup","setting":{"fwd":"forward","rev":"reverse","gear":"ratio6_1","motor_a_reversed":"true","motor_b_reversed":"false"},"triportSourcePort":22},{"port":[1,2],"name":"RightDriveSmart","customName":true,"deviceType":"MotorGroup","setting":{"fwd":"forward","rev":"reverse","gear":"ratio6_1","motor_a_reversed":"false","motor_b_reversed":"true"},"triportSourcePort":22},{"port":[19],"name":"ringLift","customName":true,"deviceType":"Motor","setting":{"reversed":"false","fwd":"forward","rev":"reverse","gear":"ratio18_1"},"triportSourcePort":22},{"port":[7],"name":"rearMogoSwitch","customName":true,"deviceType":"LimitSwitch","setting":{"id":"partner"},"triportSourcePort":22}],"neverUpdate":null} \ No newline at end of file diff --git a/compile_commands.json b/compile_commands.json index c838f35..b933208 100644 --- a/compile_commands.json +++ b/compile_commands.json @@ -1 +1 @@ -[{"directory":"/Users/24wolfieldc/Documents/GitHub/Vex64040Edgar","file":"include/robot-config.h","arguments":["clang","-xc++","include/robot-config.h","-include","v5_vcs.h","--target=thumbv7-none-eabi","-U","__INT32_TYPE__","-U","__UINT32_TYPE__","-D","__INT32_TYPE__=long","-D","__UINT32_TYPE__=unsigned long","-std=gnu++11","-I","/Applications/VEXcode Pro V5.app/Contents/Resources/sdk/vexv5/include","-I","/Applications/VEXcode Pro V5.app/Contents/Resources/sdk/vexv5/clang/8.0.0/include","-I","/Applications/VEXcode Pro V5.app/Contents/Resources/sdk/vexv5/gcc/include","-I","/Applications/VEXcode Pro V5.app/Contents/Resources/sdk/vexv5/gcc/include/c++/4.9.3","-I","/Applications/VEXcode Pro V5.app/Contents/Resources/sdk/vexv5/gcc/include/c++/4.9.3/arm-none-eabi/armv7-ar/thumb"]},{"directory":"/Users/24wolfieldc/Documents/GitHub/Vex64040Edgar","file":"include/vex.h","arguments":["clang","-xc++","include/vex.h","-include","v5_vcs.h","--target=thumbv7-none-eabi","-U","__INT32_TYPE__","-U","__UINT32_TYPE__","-D","__INT32_TYPE__=long","-D","__UINT32_TYPE__=unsigned long","-std=gnu++11","-I","/Applications/VEXcode Pro V5.app/Contents/Resources/sdk/vexv5/include","-I","/Applications/VEXcode Pro V5.app/Contents/Resources/sdk/vexv5/clang/8.0.0/include","-I","/Applications/VEXcode Pro V5.app/Contents/Resources/sdk/vexv5/gcc/include","-I","/Applications/VEXcode Pro V5.app/Contents/Resources/sdk/vexv5/gcc/include/c++/4.9.3","-I","/Applications/VEXcode Pro V5.app/Contents/Resources/sdk/vexv5/gcc/include/c++/4.9.3/arm-none-eabi/armv7-ar/thumb"]},{"directory":"/Users/24wolfieldc/Documents/GitHub/Vex64040Edgar","file":"src/main.cpp","output":"build/src/main.o","arguments":["clang","-xc++","src/main.cpp","--target=thumbv7-none-eabi","-fshort-enums","-Wno-unknown-attributes","-U","__INT32_TYPE__","-U","__UINT32_TYPE__","-D","__INT32_TYPE__=long","-D","__UINT32_TYPE__=unsigned long","-march=armv7-a","-mfpu=neon","-mfloat-abi=softfp","-Os","-Wall","-Werror=return-type","-fno-rtti","-fno-threadsafe-statics","-fno-exceptions","-std=gnu++11","-ffunction-sections","-fdata-sections","-D","VexV5","-I","/Users/24wolfieldc/Documents/GitHub/Vex64040Edgar","-I","/Users/24wolfieldc/Documents/GitHub/Vex64040Edgar/include","-I","/Users/24wolfieldc/Documents/GitHub/Vex64040Edgar/src","-I","/Applications/VEXcode Pro V5.app/Contents/Resources/sdk/vexv5/include","-I","/Applications/VEXcode Pro V5.app/Contents/Resources/sdk/vexv5/clang/8.0.0/include","-I","/Applications/VEXcode Pro V5.app/Contents/Resources/sdk/vexv5/gcc/include","-I","/Applications/VEXcode Pro V5.app/Contents/Resources/sdk/vexv5/gcc/include/c++/4.9.3","-I","/Applications/VEXcode Pro V5.app/Contents/Resources/sdk/vexv5/gcc/include/c++/4.9.3/arm-none-eabi/armv7-ar/thumb","-c","-o","build/src/main.o","-mlinker-version=409.12","--target=armv7-none--eabi"]},{"directory":"/Users/24wolfieldc/Documents/GitHub/Vex64040Edgar","file":"src/robot-config.cpp","output":"build/src/robot-config.o","arguments":["clang","-xc++","src/robot-config.cpp","--target=thumbv7-none-eabi","-fshort-enums","-Wno-unknown-attributes","-U","__INT32_TYPE__","-U","__UINT32_TYPE__","-D","__INT32_TYPE__=long","-D","__UINT32_TYPE__=unsigned long","-march=armv7-a","-mfpu=neon","-mfloat-abi=softfp","-Os","-Wall","-Werror=return-type","-fno-rtti","-fno-threadsafe-statics","-fno-exceptions","-std=gnu++11","-ffunction-sections","-fdata-sections","-D","VexV5","-I","/Users/24wolfieldc/Documents/GitHub/Vex64040Edgar","-I","/Users/24wolfieldc/Documents/GitHub/Vex64040Edgar/include","-I","/Users/24wolfieldc/Documents/GitHub/Vex64040Edgar/src","-I","/Applications/VEXcode Pro V5.app/Contents/Resources/sdk/vexv5/include","-I","/Applications/VEXcode Pro V5.app/Contents/Resources/sdk/vexv5/clang/8.0.0/include","-I","/Applications/VEXcode Pro V5.app/Contents/Resources/sdk/vexv5/gcc/include","-I","/Applications/VEXcode Pro V5.app/Contents/Resources/sdk/vexv5/gcc/include/c++/4.9.3","-I","/Applications/VEXcode Pro V5.app/Contents/Resources/sdk/vexv5/gcc/include/c++/4.9.3/arm-none-eabi/armv7-ar/thumb","-c","-o","build/src/robot-config.o","-mlinker-version=409.12","--target=armv7-none--eabi"]}] \ No newline at end of file +[{"directory":"/Users/anthonyhalliday/Documents/vexcode-projects/Vex64040Edgar","file":"include/robot-config.h","arguments":["clang","-xc++","include/robot-config.h","-include","v5_vcs.h","--target=thumbv7-none-eabi","-U","__INT32_TYPE__","-U","__UINT32_TYPE__","-D","__INT32_TYPE__=long","-D","__UINT32_TYPE__=unsigned long","-std=gnu++11","-I","/Applications/VEXcode Pro V5.app/Contents/Resources/sdk/vexv5/include","-I","/Applications/VEXcode Pro V5.app/Contents/Resources/sdk/vexv5/clang/8.0.0/include","-I","/Applications/VEXcode Pro V5.app/Contents/Resources/sdk/vexv5/gcc/include","-I","/Applications/VEXcode Pro V5.app/Contents/Resources/sdk/vexv5/gcc/include/c++/4.9.3","-I","/Applications/VEXcode Pro V5.app/Contents/Resources/sdk/vexv5/gcc/include/c++/4.9.3/arm-none-eabi/armv7-ar/thumb"]},{"directory":"/Users/anthonyhalliday/Documents/vexcode-projects/Vex64040Edgar","file":"include/vex.h","arguments":["clang","-xc++","include/vex.h","-include","v5_vcs.h","--target=thumbv7-none-eabi","-U","__INT32_TYPE__","-U","__UINT32_TYPE__","-D","__INT32_TYPE__=long","-D","__UINT32_TYPE__=unsigned long","-std=gnu++11","-I","/Applications/VEXcode Pro V5.app/Contents/Resources/sdk/vexv5/include","-I","/Applications/VEXcode Pro V5.app/Contents/Resources/sdk/vexv5/clang/8.0.0/include","-I","/Applications/VEXcode Pro V5.app/Contents/Resources/sdk/vexv5/gcc/include","-I","/Applications/VEXcode Pro V5.app/Contents/Resources/sdk/vexv5/gcc/include/c++/4.9.3","-I","/Applications/VEXcode Pro V5.app/Contents/Resources/sdk/vexv5/gcc/include/c++/4.9.3/arm-none-eabi/armv7-ar/thumb"]},{"directory":"/Users/anthonyhalliday/Documents/vexcode-projects/Vex64040Edgar","file":"src/main.cpp","output":"build/src/main.o","arguments":["clang","-xc++","src/main.cpp","--target=thumbv7-none-eabi","-fshort-enums","-Wno-unknown-attributes","-U","__INT32_TYPE__","-U","__UINT32_TYPE__","-D","__INT32_TYPE__=long","-D","__UINT32_TYPE__=unsigned long","-march=armv7-a","-mfpu=neon","-mfloat-abi=softfp","-Os","-Wall","-Werror=return-type","-fno-rtti","-fno-threadsafe-statics","-fno-exceptions","-std=gnu++11","-ffunction-sections","-fdata-sections","-D","VexV5","-I","/Users/anthonyhalliday/Documents/vexcode-projects/Vex64040Edgar","-I","/Users/anthonyhalliday/Documents/vexcode-projects/Vex64040Edgar/include","-I","/Users/anthonyhalliday/Documents/vexcode-projects/Vex64040Edgar/src","-I","/Applications/VEXcode Pro V5.app/Contents/Resources/sdk/vexv5/include","-I","/Applications/VEXcode Pro V5.app/Contents/Resources/sdk/vexv5/clang/8.0.0/include","-I","/Applications/VEXcode Pro V5.app/Contents/Resources/sdk/vexv5/gcc/include","-I","/Applications/VEXcode Pro V5.app/Contents/Resources/sdk/vexv5/gcc/include/c++/4.9.3","-I","/Applications/VEXcode Pro V5.app/Contents/Resources/sdk/vexv5/gcc/include/c++/4.9.3/arm-none-eabi/armv7-ar/thumb","-c","-o","build/src/main.o","-mlinker-version=409.12","--target=armv7-none--eabi"]},{"directory":"/Users/anthonyhalliday/Documents/vexcode-projects/Vex64040Edgar","file":"src/robot-config.cpp","output":"build/src/robot-config.o","arguments":["clang","-xc++","src/robot-config.cpp","--target=thumbv7-none-eabi","-fshort-enums","-Wno-unknown-attributes","-U","__INT32_TYPE__","-U","__UINT32_TYPE__","-D","__INT32_TYPE__=long","-D","__UINT32_TYPE__=unsigned long","-march=armv7-a","-mfpu=neon","-mfloat-abi=softfp","-Os","-Wall","-Werror=return-type","-fno-rtti","-fno-threadsafe-statics","-fno-exceptions","-std=gnu++11","-ffunction-sections","-fdata-sections","-D","VexV5","-I","/Users/anthonyhalliday/Documents/vexcode-projects/Vex64040Edgar","-I","/Users/anthonyhalliday/Documents/vexcode-projects/Vex64040Edgar/include","-I","/Users/anthonyhalliday/Documents/vexcode-projects/Vex64040Edgar/src","-I","/Applications/VEXcode Pro V5.app/Contents/Resources/sdk/vexv5/include","-I","/Applications/VEXcode Pro V5.app/Contents/Resources/sdk/vexv5/clang/8.0.0/include","-I","/Applications/VEXcode Pro V5.app/Contents/Resources/sdk/vexv5/gcc/include","-I","/Applications/VEXcode Pro V5.app/Contents/Resources/sdk/vexv5/gcc/include/c++/4.9.3","-I","/Applications/VEXcode Pro V5.app/Contents/Resources/sdk/vexv5/gcc/include/c++/4.9.3/arm-none-eabi/armv7-ar/thumb","-c","-o","build/src/robot-config.o","-mlinker-version=409.12","--target=armv7-none--eabi"]}] \ No newline at end of file diff --git a/src/main.cpp b/src/main.cpp index 9ad8629..450ea2c 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -251,7 +251,7 @@ void soloWinPoint(void){ rearMogo.spinTo(550,rotationUnits::deg,200,velocityUnits::pct); ringLift.spinFor(3,timeUnits::sec,200,velocityUnits::pct); InertialRight(90); - +} void skillsAuton(void) { frontHook.set(false); @@ -361,6 +361,10 @@ void autonSelect(){ Competition.autonomous(skillsAuton); Controller1.Screen.print("SKILL"); } + else if(Controller1.ButtonL1.pressing()){ + Competition.autonomous(speedyAuton); + Controller1.Screen.print("SPEED"); + } else { autonSelect(); }