Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 27 additions & 18 deletions .github/workflows/githubci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,33 @@ name: Arduino Library CI
on: [pull_request, push, repository_dispatch]

jobs:
build:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run pre-commit
uses: pre-commit/[email protected]

- uses: actions/checkout@v4
with:
repository: adafruit/ci-arduino
path: ci

- name: pre-install
run: bash ci/actions_install.sh

- name: doxygen
env:
GH_REPO_TOKEN: ${{ secrets.GH_REPO_TOKEN }}
PRETTYNAME : "Adafruit Arcada Library"
run: bash ci/doxy_gen_and_deploy.sh

build:
runs-on: ubuntu-latest
needs: pre-commit
steps:
- uses: actions/setup-python@v4
with:
python-version: '3.x'
- uses: actions/checkout@v3
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: actions/checkout@v4
with:
repository: adafruit/ci-arduino
path: ci
Expand All @@ -24,21 +42,12 @@ jobs:

- name: list
run: |
ls
ls examples/*/build/
ls
ls examples/*/build/

- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: example_uf2s
path: |
examples/*/build/*/*.uf2

- name: clang
run: python3 ci/run-clang-format.py -e "ci/*" -e "bin/*" -r .

- name: doxygen
env:
GH_REPO_TOKEN: ${{ secrets.GH_REPO_TOKEN }}
PRETTYNAME : "Adafruit PyCamera Library"
run: bash ci/doxy_gen_and_deploy.sh
examples/*/build/*/*.uf2
11 changes: 11 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# SPDX-FileCopyrightText: 2020 Diego Elio Pettenò
#
# SPDX-License-Identifier: Unlicense

repos:
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v15.0.7
hooks:
- id: clang-format
types_or: [c++, c, header]
exclude: \.ino$
4 changes: 2 additions & 2 deletions Adafruit_PyCamera.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ bool Adafruit_PyCamera::initSD(void) {
}

Serial.println("Card successfully initialized");
uint32_t size = sd.card()->cardSize();
uint32_t size = sd.card()->sectorCount();
if (size == 0) {
Serial.println("Can't determine the card size");
} else {
Expand Down Expand Up @@ -494,7 +494,7 @@ bool Adafruit_PyCamera::takePhoto(const char *filename_base,
return false;
}

if (!sd.card() || (sd.card()->cardSize() == 0)) {
if (!sd.card() || (sd.card()->sectorCount() == 0)) {
Serial.println("No SD card found");
// try to initialize?
if (!initSD())
Expand Down
2 changes: 1 addition & 1 deletion Adafruit_PyCamera.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include <Adafruit_AW9523.h>
#include <Adafruit_NeoPixel.h>
#include <Adafruit_ST7789.h> // Hardware-specific library for ST7789
#include <SdFat.h>
#include <SdFat_Adafruit_Fork.h>

#ifndef TAG
#define TAG "PYCAM"
Expand Down
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=Adafruit PyCamera Library
version=1.0.7
version=1.0.8
author=Adafruit
maintainer=Adafruit <[email protected]>
sentence=Arduino library for the MEMENTO ESP32-S3 camera
Expand Down