From f2e798a46155dc0c6f183a73800f7043a683914d Mon Sep 17 00:00:00 2001 From: Phil Date: Thu, 13 Aug 2020 11:51:06 +0100 Subject: [PATCH 1/4] Expose WiFi.setLEDs(r, g, b) through AdafruitIO_AIRLIFT class. To allow easy setting of status etc. --- src/wifi/AdafruitIO_AIRLIFT.h | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/wifi/AdafruitIO_AIRLIFT.h b/src/wifi/AdafruitIO_AIRLIFT.h index a6605f51..280f0bf8 100644 --- a/src/wifi/AdafruitIO_AIRLIFT.h +++ b/src/wifi/AdafruitIO_AIRLIFT.h @@ -93,6 +93,18 @@ class AdafruitIO_AIRLIFT : public AdafruitIO { if (_http) delete _http; } + + + /**************************************************************************/ + /*! + @brief Allows setting of the AirLift RGB led from the + Adafruit IO AirLift Class + */ + /**************************************************************************/ + void setLEDs( int r, int g, int b) { + WiFi.setLEDs( r, g, b); + } + /********************************************************/ /*! @@ -189,4 +201,4 @@ class AdafruitIO_AIRLIFT : public AdafruitIO { } }; -#endif // ADAFRUITIO_AIRLIFT_H \ No newline at end of file +#endif // ADAFRUITIO_AIRLIFT_H From dbe9f67e86c9f01d087dff15df1c204ce6165331 Mon Sep 17 00:00:00 2001 From: Phil Date: Thu, 13 Aug 2020 15:23:06 +0100 Subject: [PATCH 2/4] Update function comments --- .gitignore | 3 ++- .travis.yaml | 40 +++++++++++++++++++++++++++++++++++ src/wifi/AdafruitIO_AIRLIFT.h | 9 +++++++- 3 files changed, 50 insertions(+), 2 deletions(-) create mode 100644 .travis.yaml diff --git a/.gitignore b/.gitignore index 3333a9c5..f0f1f932 100644 --- a/.gitignore +++ b/.gitignore @@ -16,4 +16,5 @@ platformio.ini # Our handy .gitignore for automation ease Doxyfile* doxygen_sqlite3.db -html \ No newline at end of file +html +latex diff --git a/.travis.yaml b/.travis.yaml new file mode 100644 index 00000000..de729e47 --- /dev/null +++ b/.travis.yaml @@ -0,0 +1,40 @@ +language: c +sudo: false +cache: + directories: + - ~/arduino_ide + - ~/.arduino15/packages/ +git: + depth: false + quiet: true +addons: + apt: + sources: + - llvm-toolchain-trusty-5.0 + - key_url: 'http://apt.llvm.org/llvm-snapshot.gpg.key' + packages: + - python3-pip + - python3-wheel + - clang-format-5.0 +env: + global: +# - ARDUINO_IDE_VERSION="1.8.10" + - PRETTYNAME="Testing Arduino IO" +# Optional, will default to "$TRAVIS_BUILD_DIR/Doxyfile" +# - DOXYFILE: $TRAVIS_BUILD_DIR/Doxyfile + +before_install: + - source <(curl -SLs https://raw.githubusercontent.com/adafruit/travis-ci-arduino/master/install.sh) + - curl -SLs https://raw.githubusercontent.com/adafruit/travis-ci-arduino/master/run-clang-format.py > run-clang-format.py + +install: + - arduino --install-library "WiFiNINA" + +script: + - python run-clang-format.py -r . + - build_main_platforms + +# Generate and deploy documentation +after_success: + - source <(curl -SLs https://raw.githubusercontent.com/adafruit/travis-ci-arduino/master/library_check.sh) +# - source <(curl -SLs https://raw.githubusercontent.com/adafruit/travis-ci-arduino/master/doxy_gen_and_deploy.sh) diff --git a/src/wifi/AdafruitIO_AIRLIFT.h b/src/wifi/AdafruitIO_AIRLIFT.h index 280f0bf8..13f26643 100644 --- a/src/wifi/AdafruitIO_AIRLIFT.h +++ b/src/wifi/AdafruitIO_AIRLIFT.h @@ -98,7 +98,14 @@ class AdafruitIO_AIRLIFT : public AdafruitIO { /**************************************************************************/ /*! @brief Allows setting of the AirLift RGB led from the - Adafruit IO AirLift Class + Adafruit IO AirLift Class. + @param r + Red value + @param g + Green value + @param b + Blue value + */ /**************************************************************************/ void setLEDs( int r, int g, int b) { From 71c450839c7b7c9edc00d496c64d5dfffe232b98 Mon Sep 17 00:00:00 2001 From: Phil Date: Thu, 13 Aug 2020 16:57:27 +0100 Subject: [PATCH 3/4] Made setLEDs() method commment more explict, removed unwanted changes. --- .gitignore | 1 - .travis.yaml | 40 ----------------------------------- src/wifi/AdafruitIO_AIRLIFT.h | 9 ++++---- 3 files changed, 5 insertions(+), 45 deletions(-) delete mode 100644 .travis.yaml diff --git a/.gitignore b/.gitignore index f0f1f932..5cd86bfa 100644 --- a/.gitignore +++ b/.gitignore @@ -17,4 +17,3 @@ platformio.ini Doxyfile* doxygen_sqlite3.db html -latex diff --git a/.travis.yaml b/.travis.yaml deleted file mode 100644 index de729e47..00000000 --- a/.travis.yaml +++ /dev/null @@ -1,40 +0,0 @@ -language: c -sudo: false -cache: - directories: - - ~/arduino_ide - - ~/.arduino15/packages/ -git: - depth: false - quiet: true -addons: - apt: - sources: - - llvm-toolchain-trusty-5.0 - - key_url: 'http://apt.llvm.org/llvm-snapshot.gpg.key' - packages: - - python3-pip - - python3-wheel - - clang-format-5.0 -env: - global: -# - ARDUINO_IDE_VERSION="1.8.10" - - PRETTYNAME="Testing Arduino IO" -# Optional, will default to "$TRAVIS_BUILD_DIR/Doxyfile" -# - DOXYFILE: $TRAVIS_BUILD_DIR/Doxyfile - -before_install: - - source <(curl -SLs https://raw.githubusercontent.com/adafruit/travis-ci-arduino/master/install.sh) - - curl -SLs https://raw.githubusercontent.com/adafruit/travis-ci-arduino/master/run-clang-format.py > run-clang-format.py - -install: - - arduino --install-library "WiFiNINA" - -script: - - python run-clang-format.py -r . - - build_main_platforms - -# Generate and deploy documentation -after_success: - - source <(curl -SLs https://raw.githubusercontent.com/adafruit/travis-ci-arduino/master/library_check.sh) -# - source <(curl -SLs https://raw.githubusercontent.com/adafruit/travis-ci-arduino/master/doxy_gen_and_deploy.sh) diff --git a/src/wifi/AdafruitIO_AIRLIFT.h b/src/wifi/AdafruitIO_AIRLIFT.h index 13f26643..dfea9965 100644 --- a/src/wifi/AdafruitIO_AIRLIFT.h +++ b/src/wifi/AdafruitIO_AIRLIFT.h @@ -100,15 +100,15 @@ class AdafruitIO_AIRLIFT : public AdafruitIO { @brief Allows setting of the AirLift RGB led from the Adafruit IO AirLift Class. @param r - Red value + Red value, unsigned 8 bit value (0->255) @param g - Green value + Green value, unsigned 8 bit value (0->255) @param b - Blue value + Blue value, unsigned 8 bit value (0->255) */ /**************************************************************************/ - void setLEDs( int r, int g, int b) { + void setLEDs( uint8_t r, uint8_t g, uint8_t b) { WiFi.setLEDs( r, g, b); } @@ -209,3 +209,4 @@ class AdafruitIO_AIRLIFT : public AdafruitIO { }; #endif // ADAFRUITIO_AIRLIFT_H + From 32884eb3491e35cc6143817925186ed510b44bcf Mon Sep 17 00:00:00 2001 From: Phil Date: Sat, 15 Aug 2020 11:01:21 +0100 Subject: [PATCH 4/4] Reformatted using clang-format --- src/wifi/AdafruitIO_AIRLIFT.h | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/src/wifi/AdafruitIO_AIRLIFT.h b/src/wifi/AdafruitIO_AIRLIFT.h index dfea9965..532be84b 100644 --- a/src/wifi/AdafruitIO_AIRLIFT.h +++ b/src/wifi/AdafruitIO_AIRLIFT.h @@ -93,25 +93,21 @@ class AdafruitIO_AIRLIFT : public AdafruitIO { if (_http) delete _http; } - - + /**************************************************************************/ /*! - @brief Allows setting of the AirLift RGB led from the + @brief Allows setting of the AirLift RGB led from the Adafruit IO AirLift Class. @param r - Red value, unsigned 8 bit value (0->255) + Red value, unsigned 8 bit value (0->255) @param g - Green value, unsigned 8 bit value (0->255) + Green value, unsigned 8 bit value (0->255) @param b - Blue value, unsigned 8 bit value (0->255) - + Blue value, unsigned 8 bit value (0->255) + */ /**************************************************************************/ - void setLEDs( uint8_t r, uint8_t g, uint8_t b) { - WiFi.setLEDs( r, g, b); - } - + void setLEDs(uint8_t r, uint8_t g, uint8_t b) { WiFi.setLEDs(r, g, b); } /********************************************************/ /*! @@ -209,4 +205,3 @@ class AdafruitIO_AIRLIFT : public AdafruitIO { }; #endif // ADAFRUITIO_AIRLIFT_H -