Is the 1e-20 in the second line a typo? In the old version this was 1e-10.
float utils_fast_atan2(float y, float x) {
float abs_y = fabsf(y) + 1e-20; // kludge to prevent 0/0 condition
float angle;
if (x >= 0) {
float r = (x - abs_y) / (x + abs_y);
float rsq = r * r;
angle = ((0.1963 * rsq) - 0.9817) * r + (M_PI / 4.0);
} else {
float r = (x + abs_y) / (abs_y - x);
float rsq = r * r;
angle = ((0.1963 * rsq) - 0.9817) * r + (3.0 * M_PI / 4.0);
}
if (y < 0) {
return(-angle);
} else {
return(angle);
}
}
I guess the 10^-20 is only to prevent divide by zero. The smaller the amount the closer you get to infinity hence a smaller number is better ( 10^-20 < 10^-10 ).
In File: rf.c
// Enable dynamic payload length
void rf_enable_pipe_dlp(int pipes)
i think you meant to write "rf_enable_pipe_dpl" instead of "rf_enable_pipe_dlp" ?
i could be wrong, idk..
but either way no big deal...
;-)
Dimitri.