inav icon indicating copy to clipboard operation
inav copied to clipboard

Code cleanup

Open xdigyx opened this issue 10 years ago • 5 comments

Hi,

I am going through the code ver 1.1, trying to understand some of it and noticed some lines regarding gpsFakeGPSUpdate function, definded only in CC3D, for testing probably, but should be removed from the official release code.

xdigyx avatar Aug 29 '16 13:08 xdigyx

Why? It's compiled out in release binaries.

digitalentity avatar Aug 30 '16 02:08 digitalentity

In case someone could forget to comment this out or put #endif in the wrong place, etc, etc.

xdigyx avatar Aug 30 '16 03:08 xdigyx

We have loads of #ifdef's in the code, there's no point in removing all of the #ifdef'ed code even if it is used for one specific case on one specific target. It's either using conditional blocks of code or maintaining zillion of separate source code branches which IMO is an unreasonble waste of time.

digitalentity avatar Aug 30 '16 03:08 digitalentity

BTW, those #defines are commented out. If somebody uncomments them he should be knowing what he's doing anyway.

digitalentity avatar Aug 30 '16 03:08 digitalentity

OK. It's your code your decision. Personally, I'd remove. Closed.

xdigyx avatar Aug 30 '16 04:08 xdigyx