i'm trying to create an array of structures but when i make more than a handful my robot doesn't work. so in main.h i have
typedef struct SPid { int dState; // Last position input int iState; // Integrator state int iMax, iMin; // Maximum and minimum allowable integrator state int desired_value; // the desired value the PID should converge upon float iGain, // integral gain pGain, // proportional gain dGain; // derivative gain }SPid; extern SPid vel_Gains[];
#include "MAIN.H" struct SPid vel_Gains[5];