xoseperez / sonoffsc

Itead Studio SonoffSC custom firmware with MQTT and Domoticz support
GNU General Public License v3.0
104 stars 35 forks source link

Errors trying to build projects using Platform IO #35

Open pablobolomey opened 5 years ago

pablobolomey commented 5 years ago

I get the following errors when trying to build projects using PlatformIo using dev s=version of github master causing cloning errors

ompiling .pioenvs\sonoffsc\lib9b4\Ethernet\EthernetClient.cpp.o Compiling .pioenvs\sonoffsc\lib9b4\Ethernet\EthernetServer.cpp.o

.piolibdeps\ESP Async WebServer\src\WebHandlers.cpp: In member function 'AsyncStaticWebHandler& AsyncStaticWebHandler::setLastModified(tm)': .piolibdeps\ESP Async WebServer\src\WebHandlers.cpp:67:64: error: 'strftime' was not declared in this scope strftime (result,30,"%a, %d %b %Y %H:%M:%S %Z", last_modified); ^ .piolibdeps\ESP Async WebServer\src\WebHandlers.cpp: In member function 'AsyncStaticWebHandler& AsyncStaticWebHandler::setLastModified(time_t)': .piolibdeps\ESP Async WebServer\src\WebHandlers.cpp:73:60: error: 'gmtime' was not declared in this scope return setLastModified((struct tm )gmtime(&last_modified)); ^ .piolibdeps\ESP Async WebServer\src\WebHandlers.cpp: In member function 'AsyncStaticWebHandler& AsyncStaticWebHandler::setLastModified()': .piolibdeps\ESP Async WebServer\src\WebHandlers.cpp:78:25: error: 'time' was not declared in this scope if(time(&last_modified) == 0) //time is not yet set ^ Compiling .pioenvs\sonoffsc\lib9b4\Ethernet\EthernetUdp.cpp.o Compiling .pioenvs\sonoffsc\lib9b4\Ethernet\utility\socket.cpp.o Compiling .pioenvs\sonoffsc\lib9b4\Ethernet\utility\w5100.cpp.o Archiving .pioenvs\sonoffsc\lib339\libSPI.a *** [.pioenvs\sonoffsc\lib297\ESP Async WebServer\WebHandlers.cpp.o] Error 1 [ERROR] Took 6.47 seconds

[SUMMARY] Environment ota [SKIP] Environment sonoffsc [ERROR] [ERROR] Took 6.47 seconds

Tontze commented 5 years ago

Have some problems too. Im newb and im not sure do i need to modify platformio.ini, i replaced DHT11 to DHT22 and trying to upload atmega ..

platformio run
Processing sonoffsc (platform: atmelavr; board: uno; framework: arduino)

Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/atmelavr/uno.html
PLATFORM: Atmel AVR > Arduino Uno
HARDWARE: ATMEGA328P 16MHz 2KB RAM (31.50KB Flash)
Converting sonoffsc.ino

Library Dependency Finder -> http://bit.ly/configure-pio-ldf
LDF MODES: FINDER(chain) COMPATIBILITY(soft)
Collected 11 compatible libraries
Scanning dependencies...
Dependency Graph
|-- <Adafruit Unified Sensor> 1.0.2
|-- <DHT sensor library> 1.3.4
|   |-- <Adafruit Unified Sensor> 1.0.2
|-- <Adafruit NeoPixel> 1.1.8
|-- <WS2812FX> 1.1.7
|   |-- <Adafruit NeoPixel> 1.1.8
|-- <Ticker> 3.1.4
|-- <SerialLink> 0.1.0 #abdf382
Compiling .pioenvs\sonoffsc\src\sonoffsc.ino.cpp.o
Archiving .pioenvs\sonoffsc\lib571\libAdafruit Unified Sensor_ID31.a
Compiling .pioenvs\sonoffsc\lib1ce\DHT sensor library_ID19\DHT.cpp.o
Compiling .pioenvs\sonoffsc\lib1ce\DHT sensor library_ID19\DHT_U.cpp.o
Compiling .pioenvs\sonoffsc\lib955\Adafruit NeoPixel_ID28\Adafruit_NeoPixel.cpp.o
C:/esp/sonoffsc-master/atmega328/sonoffsc/sonoffsc.ino:130:8: error: no matching function for call to 'Ticker::Ticker()'
Ticker fanTicker;
^
In file included from C:/esp/sonoffsc-master/atmega328/sonoffsc/sonoffsc.ino:25:0:
.piolibdeps\Ticker_ID1586/Ticker.h:61:2: note: candidate: Ticker::Ticker(fptr, uint32_t, uint16_t, resolution_t)
Ticker(fptr callback, uint32_t timer, uint16_t repeat = 0, resolution_t resolution = MICROS);
^
.piolibdeps\Ticker_ID1586/Ticker.h:61:2: note:   candidate expects 4 arguments, 0 provided
.piolibdeps\Ticker_ID1586/Ticker.h:49:7: note: candidate: constexpr Ticker::Ticker(const Ticker&)
class Ticker {

^
.piolibdeps\Ticker_ID1586/Ticker.h:49:7: note:   candidate expects 1 argument, 0 provided
C:/esp/sonoffsc-master/atmega328/sonoffsc/sonoffsc.ino: In function 'void getDustDefer(bool)':
C:/esp/sonoffsc-master/atmega328/sonoffsc/sonoffsc.ino:240:19: error: 'class Ticker' has no member named 'setInterval'
fanTicker.setInterval(fanoff);
^
C:/esp/sonoffsc-master/atmega328/sonoffsc/sonoffsc.ino:241:19: error: 'class Ticker' has no member named 'setCallback'
fanTicker.setCallback([](){
^
.piolibdeps\DHT sensor library_ID19\DHT.cpp: In member function 'bool DHT::read(bool)':
.piolibdeps\DHT sensor library_ID19\DHT.cpp:200:26: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (expectPulse(LOW) == TIMEOUT) {
^
.piolibdeps\DHT sensor library_ID19\DHT.cpp:205:27: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (expectPulse(HIGH) == TIMEOUT) {
^
.piolibdeps\DHT sensor library_ID19\DHT.cpp:230:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if ((lowCycles == TIMEOUT) || (highCycles == TIMEOUT)) {
^
.piolibdeps\DHT sensor library_ID19\DHT.cpp:230:47: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if ((lowCycles == TIMEOUT) || (highCycles == TIMEOUT)) {
^
*** [.pioenvs\sonoffsc\src\sonoffsc.ino.cpp.o] Error 1
 [ERROR] Took 1.52 seconds