Open hpsaturn opened 1 year ago
ESP_LOGX and the TAG_MHZ19 definition, both require the ESP32 definition to be set, so that's quite odd.
It might be worth moving the lines below to the top of the .cpp file, just in case they are being compiled differently. https://github.com/WifWaf/MH-Z19/blob/49658e5938669c5a54b6b8456611d0afbb5b90b0/src/MHZ19.h#L8-L11
I'll try and look at this soon if no luck, otherwise I'll push the fix.
Overview
The library fails when the debug level is increased, when you define
CORE_DEBUG_LEVEL=3
for example, its necessary pass the TAG like this:'-D TAG_MHZ19="MHZ19"'
on PlatformIO ini file for example.