pstolarz / OneWireNg

Arduino 1-wire service library. OneWire compatible. Dallas thermometers support.
BSD 2-Clause "Simplified" License
89 stars 20 forks source link

Add `CONFIG_CPP_NEW_INCLUDE` Flag to force use of library (Fixes #39) #40

Closed thorrak closed 2 years ago

thorrak commented 2 years ago

This PR adds a CONFIG_CPP_NEW_INCLUDE flag (similar to the existing CONFIG_CPP_NEW_ALT) which will allow for a user to force the use of the library when __has_include(<new>) doesn't function. This flag shouldn't be needed for most use cases, but may be required for specific toolchains.

thorrak commented 2 years ago

I've tested this by updating my MCVE to include the new build flag for the previously-breaking platform, and things now work as intended:

[env:esp8266_2.6.3]
platform = espressif8266@2.6.3
board = nodemcuv2
framework = arduino
board_build.filesystem = littlefs
build_flags = 
    -DCONFIG_CPP_NEW_INCLUDE
lib_deps =
    https://github.com/thorrak/OneWireNg.git#platform_new_flag

upload_speed = 460800
monitor_speed = 115200
monitor_filters = esp8266_exception_decoder, default
thorrak commented 2 years ago

Closing, as #41 obviated the need