From 01f0ad70a11a6c7e66c6a36256ca504f17d5b4df Mon Sep 17 00:00:00 2001 From: u-siri-ous Date: Thu, 12 Mar 2020 11:14:13 +0100 Subject: [PATCH 1/2] looking at past days' work --- include/vars.h | 2 +- src/main.cpp | 7 +++++-- src/motors_movement/motor.cpp | 4 ++-- src/test_menu.cpp | 2 ++ 4 files changed, 10 insertions(+), 5 deletions(-) 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: From 60f4878a08ab90262e3415aa7cd6e782d4dc1589 Mon Sep 17 00:00:00 2001 From: u-siri-ous Date: Thu, 12 Mar 2020 11:16:23 +0100 Subject: [PATCH 2/2] fix last merge --- src/main.cpp | 7 +------ src/test_menu.cpp | 1 + 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index ef48ca0..223d48f 100755 --- a/src/main.cpp +++ b/src/main.cpp @@ -24,15 +24,10 @@ void loop() { testmenu.testMenu(); goalie->play(role==1); keeper->play(role==0); -<<<<<<< HEAD - */ -drive->m1->test(); -======= camera->test(); ->>>>>>> 4cd4b8f9d6012a435a9d2e4f1e1983a0adf3475e // Last thing to do: movement and update status vector drive->drivePrepared(); - updateStatusVector(); + updateStatusVector(); */ } diff --git a/src/test_menu.cpp b/src/test_menu.cpp index 771b7b5..1b10f00 100644 --- a/src/test_menu.cpp +++ b/src/test_menu.cpp @@ -56,6 +56,7 @@ void TestMenu :: testMenu(){ case '0': DEBUG.println("Exiting test menu, may the odds be in your favor c:"); flagtest = false; + DEBUG.flush(); return; break; case '1':