status vector c:

pull/1/head
u-siri-ous 2020-02-05 18:57:11 +01:00
parent c3ebf4913f
commit 3c09f031f1
2 changed files with 26 additions and 0 deletions

19
include/status_vector.h Normal file
View File

@ -0,0 +1,19 @@
#pragma once
#define dim 20
#include <Arduino.h>
typedef struct input{
int IMUAngle, USfr, USsx, USdx, USrr, BT;
byte ballByte, cameraByte, lineByte;
bool SW_DX, SW_SX;
}input;
typedef struct data{
int IMUAngle, ballAngle, ballDistance, cameraAngle, cameraDistance,
speed, tilt, dir, USfr, USsx, USdx, USrr, lineOutDir, matePos, role;
byte xb, yb, xy, yy, lineSeen, lineActive;
bool mate, ATKgoal, DEFgoal;
}data;
input inputs[dim];
data datas[dim];

7
src/status_vector.cpp Normal file
View File

@ -0,0 +1,7 @@
#include <status_vector.h>
void initStructs(){
for(int i=0; i>=dim; i++){
inputs[i] = input();
datas[i] = data();
}
}