I have problem with an if statement not being executed. The corners below are fixed, const. Now I want a static variable alphadrone move from one corner to the other.
The first 'if' works, the second not.
LATLON_TO_CM is 1.113195f. I tried to put f behind every number, made all float, double, the statement don't gets executed. This isn't logic, I put the same number into two variables (that have different names but the same datatype) and it doesn't work.
const int32_t corner_1_X = 47.590000 * 1e3 * LATLON_TO_CM;
const int32_t corner_1_Y = 7.646000 * 1e3 * LATLON_TO_CM; //bigger
const int32_t corner_2_X = 47.590000 * 1e3 * LATLON_TO_CM;
const int32_t corner_2_Y = 7.644000 * 1e3 * LATLON_TO_CM; //smaller
static int32_t alphadroneXposition = corner_1_X;
static int32_t alphadroneYposition = corner_1_Y;
// if (corner_1_Y > corner_2_Y)
// moveAlphadroneYneg(&alphadroneYposition);
if (alphadroneYposition > corner_2_Y)
moveAlphadroneYneg(&alphadroneYposition);