Closed stef-ladefense closed 4 years ago
Which platform (UNO ESP, ...) are you using? Which version of the library are you using?
arduino 1.8.12 ESP8266 2.6.3 3.8.0 for this library
i use this library with ESP8266 for long time, in classic mode, one bus, multiple DS18B20. I need to use the alarms, and cannot compile the exemple sketch.
Have no ESP 8266 installed, which tools path do you use? (I'll try ESP32 in the meantime)
ESP32 ==> same problem
I changed the code so it compiles for ESP32, can you try it for ESP8266?
Mainly it was adding const to address parameter of some functions.
Tried to compile all the example sketches for ESP32 and they all succeeded. So alarmHandler.pde was the only with this problem.
test your ino, compile with ESP8266 2.4.2 and 2.6.3 ok ! very good !
it's ok for me, and just little 'const' before DeviceAddress
@milesburton please close issue
the exemple AlarmHandler.pde is very old and not compile
C:\Users\stephane\Documents\Arduino\sketch_mar07a\sketch_mar07a.ino: In function 'void setup()':
sketch_mar07a:113:43: error: invalid conversion from 'void ()(uint8_t) {aka void ()(unsigned char)}' to 'void ()(const uint8_t) {aka void ()(const unsigned char)}' [-fpermissive]
sensors.setAlarmHandler(&newAlarmHandler);
In file included from C:\Users\stephane\Documents\Arduino\sketch_mar07a\sketch_mar07a.ino:2:0:
C:\Users\stephane\Documents\Arduino\libraries\Temperature-Control-Library/DallasTemperature.h:181:7: error: initializing argument 1 of 'void DallasTemperature::setAlarmHandler(void ()(const uint8_t))' [-fpermissive]
void setAlarmHandler(const AlarmHandler *);
exit status 1 invalid conversion from 'void ()(uint8_t) {aka void ()(unsigned char)}' to 'void ()(const uint8_t) {aka void ()(const unsigned char)}' [-fpermissive]