From 3c09f031f1833bf48d5dc14c166307217dee7fcf Mon Sep 17 00:00:00 2001 From: u-siri-ous Date: Wed, 5 Feb 2020 18:57:11 +0100 Subject: [PATCH] status vector c: --- include/status_vector.h | 19 +++++++++++++++++++ src/status_vector.cpp | 7 +++++++ 2 files changed, 26 insertions(+) create mode 100644 include/status_vector.h create mode 100644 src/status_vector.cpp diff --git a/include/status_vector.h b/include/status_vector.h new file mode 100644 index 0000000..9b142c2 --- /dev/null +++ b/include/status_vector.h @@ -0,0 +1,19 @@ +#pragma once +#define dim 20 +#include + +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]; \ No newline at end of file diff --git a/src/status_vector.cpp b/src/status_vector.cpp new file mode 100644 index 0000000..b430b02 --- /dev/null +++ b/src/status_vector.cpp @@ -0,0 +1,7 @@ +#include +void initStructs(){ + for(int i=0; i>=dim; i++){ + inputs[i] = input(); + datas[i] = data(); + } +} \ No newline at end of file