You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I build with SENSOR_PUBLISH_ADDRESSES turned on. When I merged the newest code (git commit 3a34f06 dated Sept 22, 2023), I found the following build error
(Arduino IDE 1.8.15)
Arduino: 1.8.15 (Windows 10), Board: "LOLIN(WEMOS) D1 R2 & mini, 80 MHz, Flash, Disabled (new aborts on oom), Disabled, All SSL ciphers (most compatible), 32KB cache + 32KB IRAM (balanced), Use pgm_read macros for IRAM/PROGMEM, 4MB (FS:2MB OTA:~1019KB), v2 Lower Memory, Disabled, None, Only Sketch, 921600"
...
In file included from C:\Users\craig\Documents\Arduino\espurna-pcc-ice-sensor\code\espurna\build.h:11,
from C:\Users\craig\Documents\Arduino\espurna-pcc-ice-sensor\code\espurna\espurna.h:29,
from C:\Users\craig\Documents\Arduino\espurna-pcc-ice-sensor\code\espurna\sensor.cpp:10:
C:\Users\craig\Documents\Arduino\espurna-pcc-ice-sensor\code\espurna\sensor.cpp: In function 'void espurna::sensor::magnitude::report(const espurna::sensor::Value&)':
types.h:398:42: error: '__pstr__' declared 'static' in 'constexpr' context
398 | alignas(4) static constexpr char __pstr__[] PROGMEM_STRING_ATTR = (X);\
| ^~~~~~~~
C:\Users\craig\Documents\Arduino\espurna-pcc-ice-sensor\code\espurna\sensor.cpp:1843:50: note: in expansion of macro 'STRING_VIEW'
1843 | static constexpr auto AddressTopic = STRING_VIEW(SENSOR_ADDRESS_TOPIC);
| ^~~~~~~~~~~
I am not sure of the correct remedy, but removing "constexpr" does resolve the compiler error.
Running board version 3.1.2 should also fix the issue, updated compiler would understand the 'static constexpr' line correctly
Fixed in commit above via macro usage
Device
Wemos D1 Mini
Version
git commit 3a34f06
Question
I build with SENSOR_PUBLISH_ADDRESSES turned on. When I merged the newest code (git commit 3a34f06 dated Sept 22, 2023), I found the following build error
(Arduino IDE 1.8.15)
The offending code is here in sensor.cpp:
I am not sure of the correct remedy, but removing "constexpr" does resolve the compiler error.
I have a feeling I'm the only person using sensor addresses, so this section of code hasn't been exercised in a while.
The text was updated successfully, but these errors were encountered: