diff --git a/include/vars.h b/include/vars.h index 4c4e00f..3c31965 100755 --- a/include/vars.h +++ b/include/vars.h @@ -1,5 +1,5 @@ #pragma once -#define DEBUG Serial3 +#define DEBUG Serial #define GLOBAL_SPD_MULT 1.0 diff --git a/src/main.cpp b/src/main.cpp index 52a14e5..32115cd 100755 --- a/src/main.cpp +++ b/src/main.cpp @@ -1,5 +1,6 @@ #include +#include "test_menu.h" #include "behaviour_control/status_vector.h" #include "position/positionsys_zone.h" #include "sensors/sensors.h" @@ -19,10 +20,12 @@ void setup() { void loop() { updateSensors(); - +/* TestMenu testmenu; + testmenu.testMenu(); goalie->play(role==1); keeper->play(role==0); - + */ +drive->m1->test(); // Last thing to do: movement and update status vector drive->drivePrepared(); updateStatusVector(); diff --git a/src/motors_movement/motor.cpp b/src/motors_movement/motor.cpp index c0e301e..cb1589f 100644 --- a/src/motors_movement/motor.cpp +++ b/src/motors_movement/motor.cpp @@ -41,9 +41,9 @@ void Motor::test(){ digitalWrite(pinA, 1); digitalWrite(pinB, 0); analogWrite(pinPwm, 255); - delay(150); + delay(1500); digitalWrite(pinA, 0); digitalWrite(pinB, 1); analogWrite(pinPwm, 255); - delay(150); + delay(1500); } \ No newline at end of file diff --git a/src/test_menu.cpp b/src/test_menu.cpp index dddcc3f..771b7b5 100644 --- a/src/test_menu.cpp +++ b/src/test_menu.cpp @@ -83,6 +83,7 @@ void TestMenu :: testMenu(){ break; case '7': case '8': + if(DEBUG.available() == 0){ DEBUG.println("To do Line Sensors test, decide the role first"); DEBUG.println("1)Keeper"); DEBUG.println("2)Goalie"); @@ -97,6 +98,7 @@ void TestMenu :: testMenu(){ default: DEBUG.println("INVALID ROLE"); break; + } } break; default: