From 730cc4338fd361983aa72ccf4bb579e908bfca96 Mon Sep 17 00:00:00 2001 From: Djuri Baars Date: Sat, 30 Mar 2024 14:16:24 +0100 Subject: [PATCH 1/9] Improved OrangeClock board defintion, add button handler --- boards/orangeclock.json | 2 +- src/config.cpp | 62 +++++++++++++++++++++++++++++++++++++++-- src/config.hpp | 4 ++- src/main.cpp | 53 +++++++++++++++++++---------------- src/shared.cpp | 1 + src/shared.hpp | 5 ++++ 6 files changed, 99 insertions(+), 28 deletions(-) diff --git a/boards/orangeclock.json b/boards/orangeclock.json index c852a39..7ea7754 100644 --- a/boards/orangeclock.json +++ b/boards/orangeclock.json @@ -11,7 +11,7 @@ "-DARDUINO_ORANGECLOCK", "-DARDUINO_ESP32S3_DEV", "-DIS_ORANGECLOCK", - "-DARDUINO_USB_MODE=1", + "-DARDUINO_USB_MODE=0", "-DARDUINO_RUNNING_CORE=1", "-DARDUINO_EVENT_RUNNING_CORE=1", "-DARDUINO_USB_CDC_ON_BOOT=1" diff --git a/src/config.cpp b/src/config.cpp index d676389..46c1e7b 100644 --- a/src/config.cpp +++ b/src/config.cpp @@ -6,6 +6,9 @@ const char *ntpServer = "pool.ntp.org"; // const long gmtOffset_sec = 0; const int daylightOffset_sec = 3600; TaskHandle_t OTAHandle = NULL; +SemaphoreHandle_t xButtonSemaphore = NULL; +const TickType_t debounceDelay = pdMS_TO_TICKS(500); +TickType_t lastButtonPressTime = 0; #define STA_SSID "" #define STA_PASS "" @@ -92,7 +95,7 @@ void setupWifi() WiFiManager wm; - #ifndef ARDUINO_ORANGECLOCK +#ifndef ARDUINO_ORANGECLOCK // Touch pin 14 to reset if (touchRead(14) > 9000) { @@ -109,7 +112,7 @@ void setupWifi() wm.resetSettings(); } } - #endif +#endif String softAP_SSID = String("OrangeBTClock"); @@ -264,6 +267,42 @@ void OTAUpdateTask(void *pvParameters) } } +void HandleButtonTask(void *pvParameters) +{ + for (;;) + { + if (xSemaphoreTake(xButtonSemaphore, portMAX_DELAY) == pdTRUE) + { + TickType_t currentTime = xTaskGetTickCount(); + if ((currentTime - lastButtonPressTime) >= debounceDelay) + { + lastButtonPressTime = currentTime; + + Serial.println("Button Pressed"); + + leds[0] = CRGB::SkyBlue; + leds[1] = CRGB::Black; + + FastLED.show(); + + vTaskDelay(100); + + leds[0] = CRGB::Black; + leds[1] = CRGB::DarkOrange; + + FastLED.show(); + + vTaskDelay(100); + + leds[0] = CRGB::Black; + leds[1] = CRGB::Black; + + FastLED.show(); + } + } + } +} + char getCurrencyIcon() { char ret; @@ -286,4 +325,23 @@ char getCurrencyIcon() } return ret; +} + +void IRAM_ATTR onButtonPress() +{ + xSemaphoreGiveFromISR(xButtonSemaphore, NULL); +} + +void setupButtonISR() +{ + xButtonSemaphore = xSemaphoreCreateBinary(); + + xTaskCreatePinnedToCore( + HandleButtonTask, // Task function + "Button Task", // Task name + 2048, // Stack size (bytes) + NULL, // Task parameters + 1, // Priority (1 is default) + NULL, // Task handle + 0); // Core to run the task (0 or 1) } \ No newline at end of file diff --git a/src/config.hpp b/src/config.hpp index c4936e4..fc4f7ca 100644 --- a/src/config.hpp +++ b/src/config.hpp @@ -21,4 +21,6 @@ void wakeModemSleep(); void setModemSleep(); bool inPowerSaveMode(); -char getCurrencyIcon(); \ No newline at end of file +char getCurrencyIcon(); +void IRAM_ATTR onButtonPress(); +void setupButtonISR(); \ No newline at end of file diff --git a/src/main.cpp b/src/main.cpp index 7cb1674..ce78854 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -8,7 +8,6 @@ #include "config.hpp" #include "webserver.hpp" #include -#include #define uS_TO_S_FACTOR 1000000 /* Conversion factor for micro seconds to seconds */ #define TIME_TO_SLEEP 5 /* Time ESP32 will go to sleep (in seconds) */ @@ -35,25 +34,31 @@ uint currentPrice = 0; String currentBlock = ""; String currentFees = ""; -#define NUM_LEDS 2 CRGB leds[NUM_LEDS]; void setup() { // setCpuFrequencyMhz(40); Serial.begin(115200); - - //#ifndef IS_ORANGECLOCK + delay(2500); + Serial.println("Hello"); + #ifndef IS_ORANGECLOCK pinMode(LED_BUILTIN, OUTPUT); digitalWrite(LED_BUILTIN, HIGH); - //#else - FastLED.addLeds(leds, NUM_LEDS); - leds[0] = CRGB::DarkOrange; + #else + + pinMode(BUTTON_PIN, INPUT_PULLUP); + attachInterrupt(BUTTON_PIN, onButtonPress, FALLING); + + FastLED.addLeds(leds, NUM_LEDS); + leds[0] = CRGB::GreenYellow; leds[1] = CRGB::OrangeRed; FastLED.show(); - //#endif + + setupButtonISR(); + #endif setupPreferences(); setupDisplay(); @@ -102,24 +107,24 @@ void loop() // - IPAddress res; - uint result = WiFi.hostByName("mempool.space", res); + // IPAddress res; + // uint result = WiFi.hostByName("mempool.space", res); - if (result >= 0) - { - Serial.print("SUCCESS!"); - Serial.println(res.toString()); - } - else - { - WiFi.reconnect(); + // if (result >= 0) + // { + // Serial.print("SUCCESS!"); + // Serial.println(res.toString()); + // } + // else + // { + // WiFi.reconnect(); - while (WiFi.status() != WL_CONNECTED) - { - Serial.print('.'); - delay(1000); - } - } + // while (WiFi.status() != WL_CONNECTED) + // { + // Serial.print('.'); + // delay(1000); + // } + // } for (uint i = 1; i <= 3; i++) { diff --git a/src/shared.cpp b/src/shared.cpp index 2547a42..a7dd264 100644 --- a/src/shared.cpp +++ b/src/shared.cpp @@ -1,2 +1,3 @@ #include "shared.hpp" +volatile bool buttonPressed = false; diff --git a/src/shared.hpp b/src/shared.hpp index ec281c6..4321542 100644 --- a/src/shared.hpp +++ b/src/shared.hpp @@ -7,6 +7,9 @@ #include #include "utils.hpp" #include "fonts/fonts.hpp" +#include +#include +#include #ifdef VERSION_EPD_2_13 #define EPD_CLASS GxEPD2_213_B74 @@ -101,3 +104,5 @@ extern char currentIcon1; extern char currentIcon2; extern char currentIcon3; +extern CRGB leds[NUM_LEDS]; +extern volatile bool buttonPressed; \ No newline at end of file From 486a1b9be2f4eefb536c1c5637ec4be692ad4f27 Mon Sep 17 00:00:00 2001 From: Djuri Baars Date: Sat, 30 Mar 2024 15:02:02 +0100 Subject: [PATCH 2/9] Pin settings in platformio.ini --- platformio.ini | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/platformio.ini b/platformio.ini index 613f146..09218a2 100644 --- a/platformio.ini +++ b/platformio.ini @@ -69,4 +69,6 @@ board = orangeclock build_flags = ${btclock_base.build_flags} -D VERSION_EPD_2_9 - -D IS_ORANGECLOCK \ No newline at end of file + -D IS_ORANGECLOCK + -D BUTTON_PIN=45 + -D NUM_LEDS=2 \ No newline at end of file From 0a3f747d002c1183b3a3acd15a80384cc6dfe8e9 Mon Sep 17 00:00:00 2001 From: Djuri Baars Date: Sat, 30 Mar 2024 15:24:10 +0100 Subject: [PATCH 3/9] Fix environments without leds --- src/config.cpp | 2 ++ src/main.cpp | 2 ++ src/shared.hpp | 2 ++ 3 files changed, 6 insertions(+) diff --git a/src/config.cpp b/src/config.cpp index 46c1e7b..a9ebdf8 100644 --- a/src/config.cpp +++ b/src/config.cpp @@ -280,6 +280,7 @@ void HandleButtonTask(void *pvParameters) Serial.println("Button Pressed"); + #ifdef NUM_LEDS leds[0] = CRGB::SkyBlue; leds[1] = CRGB::Black; @@ -298,6 +299,7 @@ void HandleButtonTask(void *pvParameters) leds[1] = CRGB::Black; FastLED.show(); + #endif } } } diff --git a/src/main.cpp b/src/main.cpp index ce78854..2647688 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -34,7 +34,9 @@ uint currentPrice = 0; String currentBlock = ""; String currentFees = ""; +#ifdef NUM_LEDS CRGB leds[NUM_LEDS]; +#endif void setup() { diff --git a/src/shared.hpp b/src/shared.hpp index 4321542..2d99256 100644 --- a/src/shared.hpp +++ b/src/shared.hpp @@ -104,5 +104,7 @@ extern char currentIcon1; extern char currentIcon2; extern char currentIcon3; +#ifdef NUM_LEDS extern CRGB leds[NUM_LEDS]; +#endif extern volatile bool buttonPressed; \ No newline at end of file From f80c314247af673bce101f38dfea47d9d57cd846 Mon Sep 17 00:00:00 2001 From: Djuri Baars Date: Sat, 30 Mar 2024 16:33:45 +0100 Subject: [PATCH 4/9] Add IP address to splash screen --- src/config.cpp | 1 + src/epd.cpp | 33 ++++++++++++++++++++++++++------- src/epd.hpp | 3 ++- src/main.cpp | 2 -- src/shared.hpp | 1 + 5 files changed, 30 insertions(+), 10 deletions(-) diff --git a/src/config.cpp b/src/config.cpp index a9ebdf8..2486370 100644 --- a/src/config.cpp +++ b/src/config.cpp @@ -154,6 +154,7 @@ void setupWifi() Serial.println("WiFi connected"); Serial.println("IP address: "); Serial.println(WiFi.localIP()); + epdShowIp(); // WiFi.setTxPower(WIFI_POWER_8_5dBm); // enableWiFi(); } diff --git a/src/epd.cpp b/src/epd.cpp index 65a50cf..ec23ee6 100644 --- a/src/epd.cpp +++ b/src/epd.cpp @@ -22,14 +22,14 @@ void setupDisplay() display.setRotation(1); display.setFont(&Antonio_SemiBold20pt7b); display.setTextColor(GxEPD_WHITE); - int16_t tbx, tby; - uint16_t tbw, tbh; - display.getTextBounds("OrangeBTClock", 0, 0, &tbx, &tby, &tbw, &tbh); - // center the bounding box by transposition of the origin: - uint16_t x = ((display.width() - tbw) / 2) - tbx; - uint16_t y = ((display.height() - tbh) / 2) - tby; + // int16_t tbx, tby; + // uint16_t tbw, tbh; + // display.getTextBounds("OrangeBTClock", 0, 0, &tbx, &tby, &tbw, &tbh); + // // center the bounding box by transposition of the origin: + // uint16_t x = ((display.width() - tbw) / 2) - tbx; + // uint16_t y = ((display.height() - tbh) / 2) - tby; display.fillScreen(GxEPD_BLACK); - display.setCursor(x, y); + // display.setCursor(x, y); // display.print("OrangeBTClock"); // display.drawImage(epd_bitmap_allArray[0], GxEPD_WHITE, 0,0 250,37); @@ -39,6 +39,9 @@ void setupDisplay() display.drawBitmap(xPos,yPos, epd_bitmap_oclogo, 250, 37, GxEPD_WHITE); display.display(false); + display.setCursor(0, 37); + + // display.fillScreen(GxEPD_WHITE); // display.drawLine(0, 10, display.width(), 10, GxEPD_BLACK); // display.drawLine(0, row2, display.width(), row2, GxEPD_BLACK); @@ -70,6 +73,22 @@ void setupDisplay() // display.display(true); } +void epdShowIp() { + display.setRotation(1); + display.setFont(&LibreFranklin_SemiBold10pt7b); + display.setTextColor(GxEPD_WHITE); + String ipStr = WiFi.localIP().toString(); + int16_t tbx, tby; + uint16_t tbw, tbh; + display.getTextBounds(ipStr, 0, 0, &tbx, &tby, &tbw, &tbh); + // center the bounding box by transposition of the origin: + uint16_t x = ((display.width() - tbw) / 2) - tbx; + uint16_t y = ((display.height() - tbh) / 2) - tby + 37; + display.setCursor(x, y); + display.println(WiFi.localIP()); + display.display(true); +} + void updateRow2(String c, char icon) { if (c.equals(currentRow2) && icon == currentIcon2) diff --git a/src/epd.hpp b/src/epd.hpp index 44d00b2..c566001 100644 --- a/src/epd.hpp +++ b/src/epd.hpp @@ -9,4 +9,5 @@ void showSetupText(String t); void updateRow1(String c, char icon); void updateRow2(String c, char icon); void updateRow3(String c, char icon); -void updateRows(String row1Content, String row2Content, String row3Content); \ No newline at end of file +void updateRows(String row1Content, String row2Content, String row3Content); +void epdShowIp(); \ No newline at end of file diff --git a/src/main.cpp b/src/main.cpp index 2647688..fe130cc 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -42,8 +42,6 @@ void setup() { // setCpuFrequencyMhz(40); Serial.begin(115200); - delay(2500); - Serial.println("Hello"); #ifndef IS_ORANGECLOCK pinMode(LED_BUILTIN, OUTPUT); diff --git a/src/shared.hpp b/src/shared.hpp index 2d99256..f0264e8 100644 --- a/src/shared.hpp +++ b/src/shared.hpp @@ -10,6 +10,7 @@ #include #include #include +#include #ifdef VERSION_EPD_2_13 #define EPD_CLASS GxEPD2_213_B74 From 99c34d029f583b5b65f954871f37c77c3709008e Mon Sep 17 00:00:00 2001 From: Djuri Baars Date: Thu, 19 Dec 2024 17:04:16 +0100 Subject: [PATCH 5/9] Updates and add Forgejo CI action --- .forgejo/workflows/push.yaml | 139 +++++++++++++++++++++++++++++++++++ platformio.ini | 9 +-- src/config.cpp | 3 - src/config.hpp | 2 +- src/main.cpp | 8 +- src/shared.hpp | 4 +- src/utils.hpp | 1 + 7 files changed, 151 insertions(+), 15 deletions(-) create mode 100644 .forgejo/workflows/push.yaml diff --git a/.forgejo/workflows/push.yaml b/.forgejo/workflows/push.yaml new file mode 100644 index 0000000..8cf5442 --- /dev/null +++ b/.forgejo/workflows/push.yaml @@ -0,0 +1,139 @@ +name: "BTClock CI" + +on: + push: + tags: + - "*" + workflow_dispatch: + +jobs: + build: + runs-on: docker + container: + image: ghcr.io/catthehacker/ubuntu:js-22.04 + permissions: + contents: write + checks: write + steps: + - uses: actions/checkout@v4 + with: + submodules: recursive + - uses: actions/setup-node@v4 + with: + node-version: lts/* + cache: yarn + cache-dependency-path: "**/yarn.lock" + - uses: actions/cache@v4 + with: + path: | + ~/.cache/pip + ~/.platformio/.cache + ~/data/node_modules + .pio + data/node_modules + key: ${{ runner.os }}-pio + - uses: actions/setup-python@v5 + with: + python-version: "3.9" + cache: "pip" + - name: Get current date + id: dateAndTime + shell: bash + run: echo "dateAndTime=$(date +'%Y-%m-%d-%H:%M')" >> $GITHUB_OUTPUT + - name: Install PlatformIO Core + shell: bash + run: pip install --upgrade platformio + - name: Run unit tests + shell: bash + run: mkdir -p junit-reports && pio test -e native_test_only --junit-output-path junit-reports/ + - name: Build BTClock firmware + shell: bash + run: pio run + - name: Build BTClock filesystem + shell: bash + run: pio run --target buildfs + - name: Copy bootloader to output folder + run: cp ~/.platformio/packages/framework-arduinoespressif32/tools/partitions/boot_app0.bin .pio + - name: Upload artifacts + uses: https://code.forgejo.org/forgejo/upload-artifact@v4 + with: + include-hidden-files: true + retention-days: 1 + name: prepared-outputs + path: .pio/**/*.bin + merge: + runs-on: docker + container: + image: ghcr.io/catthehacker/ubuntu:js-22.04 + permissions: + contents: write + checks: write + needs: build + continue-on-error: true + strategy: + matrix: + chip: + - name: lolin_s2_mini + version: esp32s2 + - name: lolin_s3_mini + version: esp32s3 + - name: orangeclock + version: esp32s3 + epd_variant: [213epd, 29epd] + exclude: + - chip: orangeclock + epd_variant: 213epd + steps: + - uses: https://code.forgejo.org/forgejo/download-artifact@v4 + with: + name: prepared-outputs + path: .pio + - name: Install esptools.py + run: pip install --upgrade esptool + - name: Create merged firmware binary + run: mkdir -p ${{ matrix.chip.name }}_${{ matrix.epd_variant }} && esptool.py --chip ${{ matrix.chip.version }} merge_bin -o ${{ matrix.chip.name }}_${{ matrix.epd_variant }}/${{ matrix.chip.name }}_${{ matrix.epd_variant }}.bin --flash_mode dio 0x0000 .pio/build/${{ matrix.chip.name }}_${{ matrix.epd_variant }}/bootloader.bin 0x8000 .pio/build/${{ matrix.chip.name }}_${{ matrix.epd_variant }}/partitions.bin 0xe000 .pio/boot_app0.bin 0x10000 .pio/build/${{ matrix.chip.name }}_${{ matrix.epd_variant }}/firmware.bin 0x369000 .pio/build/${{ matrix.chip.name }}_${{ matrix.epd_variant }}/littlefs.bin + + - name: Create checksum for firmware + shell: bash + run: shasum -a 256 .pio/build/${{ matrix.chip.name }}_${{ matrix.epd_variant }}/firmware.bin | awk '{print $1}' > ${{ matrix.chip.name }}_${{ matrix.epd_variant }}/${{ matrix.chip.name }}_${{ matrix.epd_variant }}_firmware.bin.sha256 + + - name: Create checksum for merged binary + run: shasum -a 256 ${{ matrix.chip.name }}_${{ matrix.epd_variant }}/${{ matrix.chip.name }}_${{ matrix.epd_variant }}.bin | awk '{print $1}' > ${{ matrix.chip.name }}_${{ matrix.epd_variant }}/${{ matrix.chip.name }}_${{ matrix.epd_variant }}.sha256 + + - name: Upload artifacts + uses: https://code.forgejo.org/forgejo/upload-artifact@v4 + with: + name: build-${{ matrix.chip.name }}-${{ matrix.epd_variant }} + path: | + ${{ matrix.chip.name }}_${{ matrix.epd_variant }}/*.bin + ${{ matrix.chip.name }}_${{ matrix.epd_variant }}/*.sha256 + release: + runs-on: docker + permissions: + contents: write + checks: write + needs: merge + steps: + - name: Download matrix outputs + uses: https://code.forgejo.org/forgejo/download-artifact@v4 + with: + pattern: build-* + merge-multiple: false + path: temp + - name: Copy files + run: | + mkdir -p release + find temp -type f \( -name "*.bin" -o -name "*.sha256" \) -exec cp -f {} release/ \; + - name: Create release + uses: https://code.forgejo.org/actions/forgejo-release@v2.4.0 + with: + url: "https://git.btclock.dev" + repo: "${{ github.repository }}" + direction: upload + tag: "${{ github.ref_name }}" + sha: "${{ github.sha }}" + release-dir: release + token: ${{ secrets.TOKEN }} + override: ${{ github.ref_type != 'tag' && github.ref_name != 'main' }} + prerelease: ${{ github.ref_type != 'tag' && github.ref_name != 'main' }} + release-notes-assistant: false diff --git a/platformio.ini b/platformio.ini index 09218a2..080de32 100644 --- a/platformio.ini +++ b/platformio.ini @@ -24,12 +24,11 @@ build_flags = !python scripts/git_rev.py -DLAST_BUILD_TIME=$UNIX_TIME lib_deps = - zinggjm/GxEPD2@^1.5.6 + zinggjm/GxEPD2@^1.6.1 https://github.com/tzapu/WiFiManager.git#v2.0.17 - bblanchon/ArduinoJson@^7.0.3 - mathieucarbou/ESP Async WebServer - gilmaimon/ArduinoWebsockets@^0.5.3 - fastled/FastLED@^3.6.0 + bblanchon/ArduinoJson@^7.2.1 + mathieucarbou/ESP Async WebServer@^3.0.6 + fastled/FastLED@^3.9.6 [env:lolin_s2_mini] extends = btclock_base board = lolin_s2_mini diff --git a/src/config.cpp b/src/config.cpp index 2486370..3788a9a 100644 --- a/src/config.cpp +++ b/src/config.cpp @@ -90,7 +90,6 @@ void setupWifi() randomSeed(seed); // WiFi.begin(, "); - WiFi.setAutoConnect(true); WiFi.setAutoReconnect(true); WiFiManager wm; @@ -181,7 +180,6 @@ void wakeModemSleep() void enableWiFi() { - adc_power_on(); delay(200); WiFi.disconnect(false); // Reconnect the network @@ -206,7 +204,6 @@ void enableWiFi() void disableWiFi() { - adc_power_off(); WiFi.disconnect(true); // Disconnect from the network WiFi.mode(WIFI_OFF); // Switch WiFi off Serial.println(""); diff --git a/src/config.hpp b/src/config.hpp index fc4f7ca..f7ead4a 100644 --- a/src/config.hpp +++ b/src/config.hpp @@ -3,11 +3,11 @@ #include #include #include "shared.hpp" -#include "driver/adc.h" #include #include #include "epd.hpp" #include +#include void enableWiFi(); void disableWiFi(); diff --git a/src/main.cpp b/src/main.cpp index fe130cc..b3c25fc 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1,7 +1,7 @@ #include #include -#include +#include #include #include "shared.hpp" #include "epd.hpp" @@ -29,7 +29,7 @@ typedef void (*MethodPtr)(String, char); MethodPtr methods[] = {nullptr, updateRow1, updateRow2, updateRow3}; -WiFiClientSecure client; +WiFiClient client; uint currentPrice = 0; String currentBlock = ""; String currentFees = ""; @@ -71,7 +71,7 @@ void setup() setupWebserver(); setupOTA(); } - client.setInsecure(); + // client.setInsecure(); #ifndef IS_ORANGECLOCK digitalWrite(LED_BUILTIN, LOW); @@ -103,7 +103,7 @@ void loop() return; } - client.setInsecure(); + // client.setInsecure(); // diff --git a/src/shared.hpp b/src/shared.hpp index f0264e8..dd17f5b 100644 --- a/src/shared.hpp +++ b/src/shared.hpp @@ -1,7 +1,7 @@ #pragma once #include -#include +#include #include #include #include @@ -92,7 +92,7 @@ const int LINE_DATE = 100; #define CURRENCY_AUD "AUD" #define CURRENCY_JPY "JPY" -extern WiFiClientSecure client; +extern WiFiClient client; extern GxEPD2_BW display; extern Preferences preferences; extern bool isUpdating; diff --git a/src/utils.hpp b/src/utils.hpp index 8c32d47..80419f0 100644 --- a/src/utils.hpp +++ b/src/utils.hpp @@ -4,6 +4,7 @@ #include #include #include "shared.hpp" +#include namespace ArduinoJson { template <> From d9063b606a0ce9b03e32c4311b8e2cef188abb21 Mon Sep 17 00:00:00 2001 From: Djuri Baars Date: Thu, 19 Dec 2024 17:06:25 +0100 Subject: [PATCH 6/9] Update webUI submodule location --- .gitmodules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitmodules b/.gitmodules index f9d84d8..55b6d4f 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,3 @@ [submodule "data"] path = data - url = https://github.com/btclock/oc-webui.git + url = https://git.btclock.dev/btclock/oc-webui.git From 7702398b36beae1523475fb1eda63b9295fe70bb Mon Sep 17 00:00:00 2001 From: Djuri Baars Date: Thu, 19 Dec 2024 17:10:23 +0100 Subject: [PATCH 7/9] Fix Forgejo CI --- .forgejo/workflows/push.yaml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.forgejo/workflows/push.yaml b/.forgejo/workflows/push.yaml index 8cf5442..cabc4e2 100644 --- a/.forgejo/workflows/push.yaml +++ b/.forgejo/workflows/push.yaml @@ -43,9 +43,6 @@ jobs: - name: Install PlatformIO Core shell: bash run: pip install --upgrade platformio - - name: Run unit tests - shell: bash - run: mkdir -p junit-reports && pio test -e native_test_only --junit-output-path junit-reports/ - name: Build BTClock firmware shell: bash run: pio run @@ -81,7 +78,7 @@ jobs: version: esp32s3 epd_variant: [213epd, 29epd] exclude: - - chip: orangeclock + - chip: { name: orangeclock, version: esp32s3 } epd_variant: 213epd steps: - uses: https://code.forgejo.org/forgejo/download-artifact@v4 From fc868a2d81a733a649686bd98237bbabf62d6b16 Mon Sep 17 00:00:00 2001 From: Djuri Baars Date: Thu, 19 Dec 2024 17:17:15 +0100 Subject: [PATCH 8/9] Remove unneeded import --- src/config.hpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/config.hpp b/src/config.hpp index f7ead4a..8a1aaa4 100644 --- a/src/config.hpp +++ b/src/config.hpp @@ -7,7 +7,6 @@ #include #include "epd.hpp" #include -#include void enableWiFi(); void disableWiFi(); From 63827d3ab67c00e8bd867a0986f7f2607f9f8670 Mon Sep 17 00:00:00 2001 From: Djuri Baars Date: Thu, 19 Dec 2024 19:51:57 +0100 Subject: [PATCH 9/9] Use correct Arduino framework version --- data | 2 +- platformio.ini | 1 + src/main.cpp | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/data b/data index b7c4c5f..8332fec 160000 --- a/data +++ b/data @@ -1 +1 @@ -Subproject commit b7c4c5ffbadcde44d6578e6a9a3498d40bf8dee6 +Subproject commit 8332fec4a1ec0045d91f063617bb441914e7b67a diff --git a/platformio.ini b/platformio.ini index 080de32..af5bf0f 100644 --- a/platformio.ini +++ b/platformio.ini @@ -15,6 +15,7 @@ default_envs = lolin_s2_mini_213epd, lolin_s2_mini_29epd, lolin_s3_mini_213epd, [btclock_base] platform = espressif32 framework = arduino +platform_packages = platformio/framework-arduinoespressif32 monitor_speed = 115200 monitor_filters = esp32_exception_decoder, colorize board_build.filesystem = littlefs diff --git a/src/main.cpp b/src/main.cpp index b3c25fc..3cf7b1b 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1,7 +1,7 @@ #include #include -#include +#include #include #include "shared.hpp" #include "epd.hpp"