misc code cleanup
parent
6d2c43d93a
commit
26c3ec53e3
|
@ -14,14 +14,4 @@
|
||||||
void initGames();
|
void initGames();
|
||||||
|
|
||||||
g_extr Game* striker;
|
g_extr Game* striker;
|
||||||
g_extr Game* striker_roller;
|
|
||||||
g_extr Game* precision_shooter;
|
|
||||||
g_extr Game* pass_and_shoot;
|
|
||||||
g_extr Game* keeper;
|
g_extr Game* keeper;
|
||||||
|
|
||||||
g_extr Game* tc1;
|
|
||||||
g_extr Game* tc2;
|
|
||||||
g_extr Game* st_tc1;
|
|
||||||
g_extr Game* st_tc3;
|
|
||||||
g_extr Game* tc3_1;
|
|
||||||
g_extr Game* tc3_2;
|
|
|
@ -18,7 +18,7 @@ bool keeper_condition = false;
|
||||||
|
|
||||||
void setup() {
|
void setup() {
|
||||||
tone(BUZZER, 220, 250);
|
tone(BUZZER, 220, 250);
|
||||||
delay(1500);
|
delay(750);
|
||||||
DEBUG.begin(115200);
|
DEBUG.begin(115200);
|
||||||
|
|
||||||
for(int i = 0; i < 360; i++){
|
for(int i = 0; i < 360; i++){
|
||||||
|
@ -37,7 +37,7 @@ void setup() {
|
||||||
|
|
||||||
tone(BUZZER, 320, 250);
|
tone(BUZZER, 320, 250);
|
||||||
initGames();
|
initGames();
|
||||||
delay(250);
|
delay(450);
|
||||||
|
|
||||||
//Startup sound
|
//Startup sound
|
||||||
tone(BUZZER, 350.00, 250);
|
tone(BUZZER, 350.00, 250);
|
||||||
|
@ -48,9 +48,11 @@ void setup() {
|
||||||
void loop() {
|
void loop() {
|
||||||
updateSensors();
|
updateSensors();
|
||||||
drive->resetDrive();
|
drive->resetDrive();
|
||||||
|
|
||||||
testmenu->testMenu();
|
testmenu->testMenu();
|
||||||
|
|
||||||
|
striker->play(1);
|
||||||
|
|
||||||
drive->drivePrepared();
|
drive->drivePrepared();
|
||||||
updateStatusVector();
|
updateStatusVector();
|
||||||
|
|
||||||
}
|
}
|
|
@ -63,8 +63,6 @@ float DriveController::torad(float f){
|
||||||
void DriveController::drive(int dir, int speed, int tilt){
|
void DriveController::drive(int dir, int speed, int tilt){
|
||||||
speed = speedFilter->calculate(speed)*GLOBAL_SPD_MULT;
|
speed = speedFilter->calculate(speed)*GLOBAL_SPD_MULT;
|
||||||
|
|
||||||
//tilt = tilt > 180 ? tilt - 360 : tilt;
|
|
||||||
|
|
||||||
//TODO: Changing CURRENT_DATA_READ to CURRENT_DATA_WRITE?
|
//TODO: Changing CURRENT_DATA_READ to CURRENT_DATA_WRITE?
|
||||||
// Disable vector sum because calculations are a bitty crappy imho. Will have to test if it's what makes the robot act strange with lines
|
// Disable vector sum because calculations are a bitty crappy imho. Will have to test if it's what makes the robot act strange with lines
|
||||||
// Re enabling the below lines requires to comment out drive->prepareDrive and uncommenting the lines relative to vector sum inside positionsys_camera and comment out the other lines here
|
// Re enabling the below lines requires to comment out drive->prepareDrive and uncommenting the lines relative to vector sum inside positionsys_camera and comment out the other lines here
|
||||||
|
|
|
@ -91,7 +91,6 @@ void TestMenu::testMenu()
|
||||||
DEBUG.println(role);
|
DEBUG.println(role);
|
||||||
DEBUG.print("Left switch (goalOrientation): ");
|
DEBUG.print("Left switch (goalOrientation): ");
|
||||||
DEBUG.println(camera->goalOrientation);
|
DEBUG.println(camera->goalOrientation);
|
||||||
DEBUG.print("Robot Identifier: ");
|
|
||||||
delay(50);
|
delay(50);
|
||||||
break;
|
break;
|
||||||
case 'p':
|
case 'p':
|
||||||
|
|
Loading…
Reference in New Issue