Skip to content

Commit

Permalink
mk: clang-format-8 => clang-format-11
Browse files Browse the repository at this point in the history
GoDisplay example is disabled in CI due to
hardkernel/ODROID-GO#24
  • Loading branch information
yoursunny committed Oct 2, 2021
1 parent e27c0de commit a1d4877
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 24 deletions.
20 changes: 10 additions & 10 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,36 +18,36 @@ jobs:
ARDUINO_CORE_URI: https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json
- uses: actions/setup-python@v2
with:
python-version: '3.8'
python-version: '3.9'
- name: install dependencies
run: |
python -m pip install --upgrade pip
pip install esptool
sudo apt-get install -y clang-format-11 doxygen
- uses: actions/checkout@v2
- name: check code style
run: |
mk/format-code.sh
[[ $(git status --porcelain | tee >(cat 1>&2) | wc -l) -eq 0 ]]
git diff --exit-code
- name: link library
run: |
mkdir -p $HOME/Arduino/libraries/ODROID-GO
cd $HOME/Arduino/libraries
ln -s $GITHUB_WORKSPACE esp32cam
curl -sfL https://github.com/hardkernel/ODROID-GO/archive/${ODROIDGO_VERSION}.tar.gz | tar -C ODROID-GO -xz --strip-components=1
# curl -sfL https://github.com/hardkernel/ODROID-GO/archive/${ODROIDGO_VERSION}.tar.gz | tar -C ODROID-GO -xz --strip-components=1
env:
ODROIDGO_VERSION: master
- name: compile WifiCam example
run: |
arduino-cli compile -b esp32:esp32:esp32wrover ./examples/WifiCam
- name: compile GoDisplay example
run: |
arduino-cli compile -b esp32:esp32:odroid_esp32 ./examples/GoDisplay
# - name: compile GoDisplay example
# run: |
# arduino-cli compile -b esp32:esp32:odroid_esp32 ./examples/GoDisplay
# disabled due to https://github.com/hardkernel/ODROID-GO/issues/24
- name: build docs
run: |
sudo apt-get install doxygen
docs/build.sh
run: docs/build.sh
- name: deploy docs
uses: South-Paw/action-netlify-deploy@v1.2.0
uses: South-Paw/action-netlify-deploy@v1.2.1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
netlify-auth-token: ${{ secrets.NETLIFY_AUTH_TOKEN }}
Expand Down
4 changes: 2 additions & 2 deletions mk/format-code.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
set -eo pipefail
cd "$( dirname "${BASH_SOURCE[0]}" )"/..

find -name '*.[hc]pp' -or -name '*.ino' | \
xargs clang-format-8 -i -style=file
find -name '*.h' -or -name '*.[hc]pp' -or -name '*.ino' | \
xargs clang-format-11 -i -style=file
18 changes: 6 additions & 12 deletions src/esp32cam.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,25 +18,21 @@ class CameraClass
{
public:
/** @brief Enable camera. */
bool
begin(const Config& config);
bool begin(const Config& config);

/** @brief Disable camera. */
bool
end();
bool end();

/**
* @brief Change camera resolution.
* @pre Initial resolution is higher than specified resolution.
* @param resolution new resolution.
* @param sleepFor how long to wait for stabilization (millis).
*/
bool
changeResolution(const Resolution& resolution, int sleepFor = 500);
bool changeResolution(const Resolution& resolution, int sleepFor = 500);

/** @brief Capture a frame of picture. */
std::unique_ptr<Frame>
capture();
std::unique_ptr<Frame> capture();

struct StreamMjpegConfig
{
Expand All @@ -53,11 +49,9 @@ class CameraClass
* @pre The camera has been initialized to JPEG mode.
* @return number of frames streamed.
*/
int
streamMjpeg(Client& client, const StreamMjpegConfig& cfg);
int streamMjpeg(Client& client, const StreamMjpegConfig& cfg);

int
streamMjpeg(Client& client)
int streamMjpeg(Client& client)
{
return streamMjpeg(client, StreamMjpegConfig());
}
Expand Down

0 comments on commit a1d4877

Please sign in to comment.