-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove unused configuration files and update motor configurations for…
… improved functionality
- Loading branch information
Showing
12 changed files
with
54 additions
and
46 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,28 @@ | ||
#include "main.h" | ||
|
||
bool sortToggle = true; | ||
bool lock = false; | ||
bool intakeLock = false; | ||
|
||
// Colour Sorter | ||
|
||
|
||
void initializeColourSort() { | ||
pros::Task([] { | ||
while (true) { | ||
if (alliance == "red" && optical.get_hue() > 100 && optical.get_hue() < 200 && lock == false && sortToggle == true) { | ||
//console.printf("Hue: %d\n", optical.get_hue()); | ||
if (alliance == "red" && optical.get_hue() > 100 && optical.get_hue() < 230) { | ||
// eject blue rings | ||
console.println("eject blue impostor"); | ||
intakeLock = true; | ||
intake.brake(); | ||
pros::delay(600); | ||
intake.move_voltage(12000); | ||
intakeLock = false; | ||
} | ||
if (alliance == "blue" && optical.get_hue() > 15 && optical.get_hue() < 40 && lock == false && sortToggle == true) { | ||
if (alliance == "blue" && optical.get_hue() > 15 && optical.get_hue() < 40) { | ||
// eject red rings | ||
intake.brake(); | ||
console.println("eject red impostor"); | ||
} | ||
|
||
if (controller.get_digital_new_press(pros::E_CONTROLLER_DIGITAL_B)) { | ||
sortToggle = !sortToggle; | ||
optical.set_led_pwm((sortToggle == true ? 75 : 0)); // Turn off LED if not sorting | ||
} | ||
|
||
pros::delay(10); | ||
} | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters