From 26c3ec53e312548356409d304ec07c6dcbb59f9a Mon Sep 17 00:00:00 2001 From: emamaker Date: Thu, 9 Jun 2022 10:04:02 +0200 Subject: [PATCH] misc code cleanup --- include/strategy_roles/games.h | 12 +----------- src/main.cpp | 8 +++++--- src/motors_movement/drivecontroller.cpp | 2 -- src/test_menu.cpp | 1 - 4 files changed, 6 insertions(+), 17 deletions(-) diff --git a/include/strategy_roles/games.h b/include/strategy_roles/games.h index 40085e1..3d55089 100644 --- a/include/strategy_roles/games.h +++ b/include/strategy_roles/games.h @@ -14,14 +14,4 @@ void initGames(); 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* 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; \ No newline at end of file +g_extr Game* keeper; \ No newline at end of file diff --git a/src/main.cpp b/src/main.cpp index ca62f3a..db9ced7 100755 --- a/src/main.cpp +++ b/src/main.cpp @@ -18,7 +18,7 @@ bool keeper_condition = false; void setup() { tone(BUZZER, 220, 250); - delay(1500); + delay(750); DEBUG.begin(115200); for(int i = 0; i < 360; i++){ @@ -37,7 +37,7 @@ void setup() { tone(BUZZER, 320, 250); initGames(); - delay(250); + delay(450); //Startup sound tone(BUZZER, 350.00, 250); @@ -48,9 +48,11 @@ void setup() { void loop() { updateSensors(); drive->resetDrive(); - testmenu->testMenu(); + + striker->play(1); drive->drivePrepared(); updateStatusVector(); + } \ No newline at end of file diff --git a/src/motors_movement/drivecontroller.cpp b/src/motors_movement/drivecontroller.cpp index 3e0dc5e..0a1c9b5 100644 --- a/src/motors_movement/drivecontroller.cpp +++ b/src/motors_movement/drivecontroller.cpp @@ -63,8 +63,6 @@ float DriveController::torad(float f){ void DriveController::drive(int dir, int speed, int tilt){ speed = speedFilter->calculate(speed)*GLOBAL_SPD_MULT; - //tilt = tilt > 180 ? tilt - 360 : tilt; - //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 // 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 diff --git a/src/test_menu.cpp b/src/test_menu.cpp index 17c393b..d7dedca 100644 --- a/src/test_menu.cpp +++ b/src/test_menu.cpp @@ -91,7 +91,6 @@ void TestMenu::testMenu() DEBUG.println(role); DEBUG.print("Left switch (goalOrientation): "); DEBUG.println(camera->goalOrientation); - DEBUG.print("Robot Identifier: "); delay(50); break; case 'p':