bdring / FluidNC

The next generation of motion control firmware
Other
1.61k stars 383 forks source link

conditional compilation / inclusion of OLED support #1259

Closed craiglink closed 3 months ago

craiglink commented 4 months ago

... provide an option to not included it.

build_src_filter is not an option because of other dependencies in the source code on the OLED class existence.

MitchBradley commented 4 months ago

Instead of adding more ifdefs I am looking into eliminating the current ones so all inclusion/exclusion can be done via build_src_filter. It appears that a combination of weak links and use of the registration pattern may do the trick. The methods that need to be called from registered modules appear to be init(), poll(), make_settings(), and reset_settings(). Possibly something related to reporting too.

MitchBradley commented 3 months ago

This is moot as a result of #1274. You can now omit many different features by adding, e.g. -<src/OLED.cpp> , to platformio.ini . OLED is now a "module" that can be excluded that way. Most of the WiFi/network protocols are similarly modularized.