Compilation error



  • Hi all,
    This is my very firt try to use NodeManager, but i get error on compilation, any advice?

    Building in release mode
    Compiling .pio\build\nodemcuv2\src\main.cpp.o
    Archiving .pio\build\nodemcuv2\lib6d1\libSPI.a
    Archiving .pio\build\nodemcuv2\libbd2\libEEPROM.a
    Compiling .pio\build\nodemcuv2\lib32a\ESP8266SdFat\FatLib\FmtNumber.cpp.o
    Compiling .pio\build\nodemcuv2\lib32a\ESP8266SdFat\FatLib\StdioStream.cpp.o
    Compiling .pio\build\nodemcuv2\lib32a\ESP8266SdFat\FatLib\fstream.cpp.o
    Compiling .pio\build\nodemcuv2\lib32a\ESP8266SdFat\FatLib\istream.cpp.o
    Compiling .pio\build\nodemcuv2\lib32a\ESP8266SdFat\FatLib\ostream.cpp.o
    Compiling .pio\build\nodemcuv2\lib32a\ESP8266SdFat\MinimumSerial.cpp.o
    Compiling .pio\build\nodemcuv2\lib32a\ESP8266SdFat\SdCard\SdSpiCard.cpp.o
    Compiling .pio\build\nodemcuv2\lib32a\ESP8266SdFat\SdCard\SdSpiCardEX.cpp.o
    In file included from .pio\libdeps\nodemcuv2\MySensors NodeManager/MySensors_NodeManager.h:87:0,
                     from src\main.cpp:178:
    .pio\libdeps\nodemcuv2\MySensors NodeManager/nodemanager/Sensor.cpp: In member function 'void Sensor::presentation()':
    .pio\libdeps\nodemcuv2\MySensors NodeManager/nodemanager/Sensor.cpp:135:55: error: invalid conversion from 'uint8_t {aka unsigned char}' to 'mysensors_sensor_t' [-fpermissive]
       present(child->getChildId(), child->getPresentation(), child->getDescription(), nodeManager.getAck());
                                                           ^
    In file included from .pio\libdeps\nodemcuv2\MySensors/MySensors.h:433:0,
                     from .pio\libdeps\nodemcuv2\MySensors NodeManager/MySensors_NodeManager.h:43,
                     from src\main.cpp:178:
    .pio\libdeps\nodemcuv2\MySensors/core/MySensorsCore.cpp:375:6: error:   initializing argument 2 of 'bool present(uint8_t, mysensors_sensor_t, const char*, bool)' [-fpermissive]
     bool present(const uint8_t childSensorId, const mysensors_sensor_t sensorType,
          ^
    *** [.pio\build\nodemcuv2\src\main.cpp.o] Error 1
    =========================================================================================== [FAILED] Took 2.56 seconds ===========================================================================================
    Compiling .pio\build\nodemcuv2\libbd2\EEPROM\EEPROM.cpp.o
    Compiling .pio\build\nodemcuv2\lib32a\ESP8266SdFat\FatLib\FatFile.cpp.o
    Compiling .pio\build\nodemcuv2\lib32a\ESP8266SdFat\FatLib\FatFileLFN.cpp.o
    Compiling .pio\build\nodemcuv2\lib32a\ESP8266SdFat\FatLib\FatFilePrint.cpp.o
    Compiling .pio\build\nodemcuv2\lib32a\ESP8266SdFat\FatLib\FatFileSFN.cpp.o
    Compiling .pio\build\nodemcuv2\lib32a\ESP8266SdFat\FatLib\FatVolume.cpp.o
    In file included from .pio\libdeps\nodemcuv2\MySensors NodeManager/MySensors_NodeManager.h:87:0,
                     from src\main.cpp:178:
    .pio\libdeps\nodemcuv2\MySensors NodeManager/nodemanager/Sensor.cpp: In member function 'void Sensor::presentation()':
    .pio\libdeps\nodemcuv2\MySensors NodeManager/nodemanager/Sensor.cpp:135:55: error: invalid conversion from 'uint8_t {aka unsigned char}' to 'mysensors_sensor_t' [-fpermissive]
       present(child->getChildId(), child->getPresentation(), child->getDescription(), nodeManager.getAck());
                                                           ^
    In file included from .pio\libdeps\nodemcuv2\MySensors/MySensors.h:433:0,
                     from .pio\libdeps\nodemcuv2\MySensors NodeManager/MySensors_NodeManager.h:43,
                     from src\main.cpp:178:
    .pio\libdeps\nodemcuv2\MySensors/core/MySensorsCore.cpp:375:6: error:   initializing argument 2 of 'bool present(uint8_t, mysensors_sensor_t, const char*, bool)' [-fpermissive]
     bool present(const uint8_t childSensorId, const mysensors_sensor_t sensorType,
          ^
    *** [.pio\build\nodemcuv2\src\main.cpp.o] Error 1
    =========================================================================================== [FAILED] Took 2.72 seconds ===========================================================================================
    

  • Contest Winner

    Hi, yes a few things have changed in the latest versions of the MySensors library and the current version of NodeManager is not compiling correctly. Give a try to the development version (https://github.com/mysensors/NodeManager/tree/development) in which the fix has been applied and let me know. Thanks!


Log in to reply
 

Suggested Topics

  • 2
  • 16
  • 2
  • 1
  • 2
  • 8

53
Online

11.4k
Users

11.1k
Topics

112.7k
Posts