TheThingsNetwork / arduino-device-lib

Arduino Library for TTN Devices
MIT License
207 stars 96 forks source link

Fix CI #119

Closed FokkeZB closed 7 years ago

FokkeZB commented 7 years ago

There's a few issues with the CI:

  1. [x] It throws trivial warnings like -Wparantheses

    lib/src/TheThingsNetwork.cpp: In member function 'void TheThingsNetwork::configureUS915(uint8_t, uint8_t)':
    lib/src/TheThingsNetwork.cpp:422:37: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
    if (ch == ch500 || ch <= chHigh && ch >= chLow) {
    ^

    I couldn't find out how to disable a warning: https://github.com/platformio/platformio/issues/816

  2. [ ] It throws warnings for missing builtin libraries like Wire:

    In file included from lib/src/Hackscribble_MCP9804.cpp:24:0:
    lib/src/Hackscribble_MCP9804.h:27:18: fatal error: Wire.h: No such file or directory
    #include <Wire.h>
    ^
    compilation terminated.
  3. [ ] When I add --project-option="lib_deps=Wire" to fix it fails over errors in libs we include:

    lib/src/Hackscribble_MCP9804.cpp:246:118: error: default argument given for parameter 2 of 'void Hackscribble_MCP9804::configureAlert(boolean, uint16_t)' [-fpermissive]
    void Hackscribble_MCP9804::configureAlert(boolean action, uint16_t settings = ALERT_ALL | ALERT_LOW | ALERT_INTERRUPT)
    ^
    In file included from lib/src/Hackscribble_MCP9804.cpp:24:0:
    lib/src/Hackscribble_MCP9804.h:99:8: error: after previous specification in 'void Hackscribble_MCP9804::configureAlert(boolean, uint16_t)' [-fpermissive]
    void configureAlert(boolean action, uint16_t settings = ALERT_ALL | ALERT_LOW | ALERT_INTERRUPT);
    ^
    lib/src/Hackscribble_MCP9804.cpp: In member function 'uint8_t Hackscribble_MCP9804::_readRegister8(MCP9804_Register)':
    lib/src/Hackscribble_MCP9804.cpp:51:1: warning: control reaches end of non-void function [-Wreturn-type]
    }
    ^
    lib/src/Hackscribble_MCP9804.cpp: In member function 'uint16_t Hackscribble_MCP9804::_readRegister16(MCP9804_Register)':
    lib/src/Hackscribble_MCP9804.cpp:79:1: warning: control reaches end of non-void function [-Wreturn-type]
    }
    ^
    *** [.pioenvs/sparkfun_promicro8/lib/src/Hackscribble_MCP9804.o] Error 1

    I'm not sure how we can ignore these files to be compiled/checked.

FokkeZB commented 7 years ago

Overall I do think platformio is great to use for ci, but until we know how to tune it better I'll first do a PR to disable it.