looking at past days' work

pull/1/head
u-siri-ous 2020-03-12 11:14:13 +01:00
parent f535fbdbef
commit 01f0ad70a1
4 changed files with 10 additions and 5 deletions

View File

@ -1,5 +1,5 @@
#pragma once #pragma once
#define DEBUG Serial3 #define DEBUG Serial
#define GLOBAL_SPD_MULT 1.0 #define GLOBAL_SPD_MULT 1.0

View File

@ -1,5 +1,6 @@
#include <Arduino.h> #include <Arduino.h>
#include "test_menu.h"
#include "behaviour_control/status_vector.h" #include "behaviour_control/status_vector.h"
#include "position/positionsys_zone.h" #include "position/positionsys_zone.h"
#include "sensors/sensors.h" #include "sensors/sensors.h"
@ -19,10 +20,12 @@ 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);
*/
drive->m1->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

@ -83,6 +83,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");
@ -97,6 +98,7 @@ void TestMenu :: testMenu(){
default: default:
DEBUG.println("INVALID ROLE"); DEBUG.println("INVALID ROLE");
break; break;
}
} }
break; break;
default: default: