pull/1/head
u-siri-ous 2020-01-20 18:57:14 +01:00
parent 21d14cf878
commit 3f6835ac94
2 changed files with 27 additions and 5 deletions

View File

@ -1,7 +1,7 @@
#pragma once #pragma once
#define startp 0b01111111 #define startp 105
#define endp 0b10000000 #define endp 115
#define unkn 0b01101001 //#define unkn 0b01101001
#include "data_source.h" #include "data_source.h"
class DataSourceCamera : public DataSource{ class DataSourceCamera : public DataSource{

View File

@ -174,14 +174,36 @@ int DataSourceCamera::getValueDef(bool fixed){
void DataSourceCamera::test(){ void DataSourceCamera::test(){
goalOrientation = digitalRead(SWITCH_SX); //se HIGH attacco gialla, difendo blu goalOrientation = digitalRead(SWITCH_SX); //se HIGH attacco gialla, difendo blu
DEBUG.print(pAtk); /* DEBUG.print(pAtk);
DEBUG.print(" | "); DEBUG.print(" | ");
DEBUG.print(fixCamIMU(pAtk)); DEBUG.print(fixCamIMU(pAtk));
DEBUG.print(" --- "); DEBUG.print(" --- ");
DEBUG.print(pDef); DEBUG.print(pDef);
DEBUG.print(" | "); DEBUG.print(" | ");
DEBUG.println(fixCamIMU(pDef)); DEBUG.println(fixCamIMU(pDef)); */
update();
DEBUG.print(xb);
DEBUG.print("|");
delay(100);
DEBUG.print(yb);
DEBUG.print("|");
delay(100);
DEBUG.print(xy);
DEBUG.print("|");
delay(100);
DEBUG.print(yy);
DEBUG.println("---------------");
DEBUG.print(true_xb);
DEBUG.print("|");
delay(100);
DEBUG.print(true_yb);
DEBUG.print("|");
delay(100);
DEBUG.print(true_xy);
DEBUG.print("|");
delay(100);
DEBUG.print(true_yy);
} }
int DataSourceCamera::fixCamIMU(int d){ int DataSourceCamera::fixCamIMU(int d){