I'm looking at the V1.0 code and I think I see a few instances of referencing non-declared variables. I mean they've been initiated but no value is assigned to them. Are they assigned a value of 0 by default? For example:
static uint32_t rcTime;
static uint8_t armed = 0;
float error;
float dTerm;
float timeFactor;
float windUp = 1000.0;
float tmp;
static float errorI[3];
static float lastGyro[3];
static float delta1[3];
static float delta2[3];
uint16_t maxMotor;
static uint8_t rcDelayCommand; // this indicates the number of time (multiple of RC measurement at 50Hz) the sticks must be maintained to run or cut the motors
static uint32_t LEDTime;
static uint8_t statusLED = 1;
if (currentTime > (rcTime + 20000) ) { // 50Hz
computeRC();
here, rcTime has been intialized, but no value has been assigned to it. So I'm confused how this statement (currentTime > (rcTime + 20000) ) is true or false unless there is a defult value for non-declared variables. Thanks for the time guys!