pull/1/head
EmaMaker 2020-03-12 12:13:25 +01:00
commit 49a5689443
4 changed files with 9 additions and 7 deletions

View File

@ -1,5 +1,5 @@
#pragma once #pragma once
#define DEBUG Serial3 #define DEBUG Serial
#ifdef VARS #ifdef VARS
#define extr #define extr

View File

@ -27,12 +27,11 @@ void setup() {
void loop() { void loop() {
updateSensors(); updateSensors();
//TestMenu testmenu;
//testmenu.testMenu();
goalie->play(role==1); goalie->play(role==1);
keeper->play(role==0); keeper->play(role==0);
camera->test();
// Last thing to do: movement and update status vector // Last thing to do: movement and update status vector
drive->drivePrepared(); drive->drivePrepared();
updateStatusVector(); updateStatusVector();

View File

@ -41,9 +41,9 @@ void Motor::test(){
digitalWrite(pinA, 1); digitalWrite(pinA, 1);
digitalWrite(pinB, 0); digitalWrite(pinB, 0);
analogWrite(pinPwm, 255); analogWrite(pinPwm, 255);
delay(150); delay(1500);
digitalWrite(pinA, 0); digitalWrite(pinA, 0);
digitalWrite(pinB, 1); digitalWrite(pinB, 1);
analogWrite(pinPwm, 255); analogWrite(pinPwm, 255);
delay(150); delay(1500);
} }

View File

@ -56,6 +56,7 @@ void TestMenu :: testMenu(){
case '0': case '0':
DEBUG.println("Exiting test menu, may the odds be in your favor c:"); DEBUG.println("Exiting test menu, may the odds be in your favor c:");
flagtest = false; flagtest = false;
DEBUG.flush();
return; return;
break; break;
case '1': case '1':
@ -83,6 +84,7 @@ void TestMenu :: testMenu(){
break; break;
case '7': case '7':
case '8': case '8':
if(DEBUG.available() == 0){
DEBUG.println("To do Line Sensors test, decide the role first"); DEBUG.println("To do Line Sensors test, decide the role first");
DEBUG.println("1)Keeper"); DEBUG.println("1)Keeper");
DEBUG.println("2)Goalie"); DEBUG.println("2)Goalie");
@ -98,6 +100,7 @@ void TestMenu :: testMenu(){
DEBUG.println("INVALID ROLE"); DEBUG.println("INVALID ROLE");
break; break;
} }
}
break; break;
default: default:
break; break;