From Arduino IDE 1.6.10 onward the Arduino IDE compiles all source files in the src subfolder of the sketch and recursively through all folders under the src folder.
Support for compilation of sketch subfolders was added one or two IDE versions before 1.6.10 and was originally not limited to the src folder but a lot of problems were reported by people who had stored separate programs in subfolders of their sketch that caused compilation errors so this feature was restricted to the src subfolder only.
So if you structure a sketch like this:
foo
|_foo.ino
|_src
|_bar.cpp
|_bar.h
And use this #include directive in your sketch:
#include "src/bar.h"
it will work fine.
Almost as if the IDE is completely ignoring the C source files.
Arduino sketches are converted to C++ before being compiled. TheThey are not C. If you want to use C in C++ code you need to wrap it in extern "C" {}
extern "C" {
#include "src/sub1/gadget1.h"
}
what is the correct/current way of organizing the above project
project
|_project.ino
|_types.h
|_src
|_sub1
| |_gadget1.c
| |_gadget1.h
| |_gadget2.c
| |_gadget2.h
|_blarg
|_foobar.c
|_foobar.h