From 65d30f859a628fc6c54ee7777fc5e9e2052dc701 Mon Sep 17 00:00:00 2001 From: Mario Mariete <11509521+melkati@users.noreply.github.com> Date: Sun, 2 Jun 2024 13:21:34 +0200 Subject: [PATCH 1/4] Prepare for release --- platformio.ini | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/platformio.ini b/platformio.ini index bf0af6dc..e5499523 100644 --- a/platformio.ini +++ b/platformio.ini @@ -9,8 +9,8 @@ extra_configs = platformio_extra_configs.ini [version] build_flags = - -D CO2_GADGET_VERSION="\"0.12."\" - -D CO2_GADGET_REV="\"084-development"\" + -D CO2_GADGET_VERSION="\"0.14."\" + -D CO2_GADGET_REV="\"0"\" ;**************************************************************************************** ;*** You can disable features by commenting the line with a semicolon at the beginning From 636615933ec64ec1f40b2533617c51b65c561ba8 Mon Sep 17 00:00:00 2001 From: Mario Mariete <11509521+melkati@users.noreply.github.com> Date: Sun, 2 Jun 2024 13:30:41 +0200 Subject: [PATCH 2/4] Update GitHub Action for release --- .github/workflows/release3.yml | 374 ++++++++++++++++----------------- 1 file changed, 179 insertions(+), 195 deletions(-) diff --git a/.github/workflows/release3.yml b/.github/workflows/release3.yml index 3ae761df..e480d978 100644 --- a/.github/workflows/release3.yml +++ b/.github/workflows/release3.yml @@ -1,11 +1,11 @@ -name: Release V2.5 +name: Release V2.93 # # # # # # # # # # # # To create new release, just push a new tag with the format v* (v1.0, v2.0, v2.1, v2.2, etc) -# +# # In a terminal in platformIO do, for example: -# git tag -a v0.10.005 -m "For general release v0.10.005" -# git push origin v0.10.005 +# git tag -a v1.0.1 -m "Release v1.0.1" +# git push origin v1.0.1 # # # # # # # # # # # on: @@ -15,196 +15,180 @@ on: workflow_dispatch: jobs: + build_release: + name: Create Release + + runs-on: ubuntu-latest + + strategy: + matrix: + environment: + - esp32dev + - esp32dev_OLED + - TTGO_TDISPLAY + - TTGO_TDISPLAY_SANDWICH + - TDISPLAY_S3 + - esp32dev_ST7789_240x320 + - ttgo-t5-EINKBOARDGDEM0213B74 + - ttgo-t5-EINKBOARDDEPG0213BN + - ttgo-t5-EINKBOARDGDEW0213M21 + - ttgo-t7-EINKBOARDGDEM029T94 + - ttgo-t7-WEACT_GDEH0154D67 + - ttgo-t7-WEACT_DEPG0213BN + - ttgo-t7-WEACT_GxEPD2_290_BS + + env: + CHIP_FAMILY: ${{ matrix.environment == 'TDISPLAY_S3' && 'ESP32-S3' || 'ESP32' }} + + timeout-minutes: 30 + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Show environments + run: | + echo + + - name: Determine chipFamily + id: determine_chip_family + run: | + case "${{ matrix.environment }}" in + "esp32dev") + CHIP_FAMILY="ESP32";; + "TDISPLAY_S3") + CHIP_FAMILY="ESP32-S3";; + # Add more cases for other environments as needed + *) + CHIP_FAMILY="UNKNOWN";; + esac + echo "::set-output name=chipFamily::${CHIP_FAMILY}" + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v1 + with: + python-version: ${{ matrix.python-version }} + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -U platformio + platformio update + + - name: Get the version + id: get_version + run: echo ::set-output name=VERSION::${GITHUB_REF#refs/tags/} + + - name: Show version + run: echo ${{ steps.get_version.outputs.VERSION }} + + - name: Get current date + id: date + run: | + echo "::set-output name=date::$(date +'%d-%m-%Y')" + echo "::set-output name=time::$(date +'%H:%M:%S')" + + - name: Create manifest file + id: createmanifest + run: | + + # Define offset values based on env.CHIP_FAMILY + if [[ "${{ env.CHIP_FAMILY }}" == "ESP32-S3" ]]; then + bootloader_offset=0 + partitions_offset=32768 + firmware_offset=65536 + spiffs_offset=3604480 + else + # Default values for ESP32 or other environments + bootloader_offset=4096 + partitions_offset=32768 + firmware_offset=65536 + spiffs_offset=3604480 + fi + + # Create manifest + echo "{" > ${{ github.event.repository.name }}-${{ matrix.environment }}.manifest.json + echo " \"name\": \"${{ github.event.repository.name }}-${{ matrix.environment }}\"," >> ${{ github.event.repository.name }}-${{ matrix.environment }}.manifest.json + echo " \"flavour\": \"${{ matrix.environment }}\"," >> ${{ github.event.repository.name }}-${{ matrix.environment }}.manifest.json + echo " \"version\": \"${{ steps.get_version.outputs.VERSION }}\"," >> ${{ github.event.repository.name }}-${{ matrix.environment }}.manifest.json + echo " \"compilation_date\": \"${{ steps.date.outputs.date }}\"," >> ${{ github.event.repository.name }}-${{ matrix.environment }}.manifest.json + echo " \"compilation_time\": \"${{ steps.date.outputs.time }}\"," >> ${{ github.event.repository.name }}-${{ matrix.environment }}.manifest.json + echo " \"new_install_prompt_erase\": true," >> ${{ github.event.repository.name }}-${{ matrix.environment }}.manifest.json + echo " \"new_install_improv_wait_time\": 20," >> ${{ github.event.repository.name }}-${{ matrix.environment }}.manifest.json + echo " \"builds\": [" >> ${{ github.event.repository.name }}-${{ matrix.environment }}.manifest.json + echo " {" >> ${{ github.event.repository.name }}-${{ matrix.environment }}.manifest.json + echo " \"chipFamily\": \"${{ env.CHIP_FAMILY }}\"," >> ${{ github.event.repository.name }}-${{ matrix.environment }}.manifest.json + echo " \"improv\": true," >> ${{ github.event.repository.name }}-${{ matrix.environment }}.manifest.json + echo " \"parts\": [" >> ${{ github.event.repository.name }}-${{ matrix.environment }}.manifest.json + echo " { \"path\": \"${{ github.event.repository.name }}-${{ matrix.environment }}-${{ steps.get_version.outputs.VERSION }}-bootloader.bin\", \"offset\": $bootloader_offset }," >> ${{ github.event.repository.name }}-${{ matrix.environment }}.manifest.json + echo " { \"path\": \"${{ github.event.repository.name }}-${{ matrix.environment }}-${{ steps.get_version.outputs.VERSION }}-partitions.bin\", \"offset\": $partitions_offset }," >> ${{ github.event.repository.name }}-${{ matrix.environment }}.manifest.json + echo " { \"path\": \"${{ github.event.repository.name }}-${{ matrix.environment }}-${{ steps.get_version.outputs.VERSION }}-firmware.bin\", \"offset\": $firmware_offset }," >> ${{ github.event.repository.name }}-${{ matrix.environment }}.manifest.json + echo " { \"path\": \"${{ github.event.repository.name }}-${{ matrix.environment }}-${{ steps.get_version.outputs.VERSION }}-spiffs.bin\", \"offset\": $spiffs_offset }" >> ${{ github.event.repository.name }}-${{ matrix.environment }}.manifest.json + echo " ]" >> ${{ github.event.repository.name }}-${{ matrix.environment }}.manifest.json + echo " }" >> ${{ github.event.repository.name }}-${{ matrix.environment }}.manifest.json + echo " ]" >> ${{ github.event.repository.name }}-${{ matrix.environment }}.manifest.json + echo "}" >> ${{ github.event.repository.name }}-${{ matrix.environment }}.manifest.json + echo "::set-output name=manifest::$(cat ${{ github.event.repository.name }}-${{ matrix.environment }}.manifest.json)" + + - name: Read manifest files + run: | + echo "Manifest:" + echo ${{ github.event.repository.name }}-${{ matrix.environment }}.manifest.json + echo "Manifest file contents readed with cat:" + cat ${{ github.event.repository.name }}-${{ matrix.environment }}.manifest.json + + - name: Copy manifest files + if: startsWith(github.ref, 'refs/tags/') + run: | + mkdir ./firmware + cp ${{ github.event.repository.name }}-${{ matrix.environment }}.manifest.json ./firmware/${{ github.event.repository.name }}-${{ matrix.environment }}.manifest.json + + - name: Build firmware file + run: | + pio run -e ${{ matrix.environment }} + + - name: Copy firmware files + if: startsWith(github.ref, 'refs/tags/') + run: | + cp .pio/build/${{ matrix.environment }}/bootloader.bin ./firmware/${{ github.event.repository.name }}-${{ matrix.environment }}-${{ steps.get_version.outputs.VERSION }}-bootloader.bin + cp .pio/build/${{ matrix.environment }}/partitions.bin ./firmware/${{ github.event.repository.name }}-${{ matrix.environment }}-${{ steps.get_version.outputs.VERSION }}-partitions.bin + cp .pio/build/${{ matrix.environment }}/firmware.bin ./firmware/${{ github.event.repository.name }}-${{ matrix.environment }}-${{ steps.get_version.outputs.VERSION }}-firmware.bin + + - name: Build spiffs file + run: | + pio run -e ${{ matrix.environment }} -t buildfs + + - name: Copy spiffs files + if: startsWith(github.ref, 'refs/tags/') + run: | + ls -la ./firmware + cp .pio/build/${{ matrix.environment }}/spiffs.bin ./firmware/${{ github.event.repository.name }}-${{ matrix.environment }}-${{ steps.get_version.outputs.VERSION }}-spiffs.bin + + - name: Create Release + id: create_release + uses: softprops/action-gh-release@v1 + if: startsWith(github.ref, 'refs/tags/') + with: + name: ${{ github.event.repository.name }}-${{ steps.get_version.outputs.VERSION }} + files: | + ./firmware/*.bin + ./firmware/*.json + draft: false + generate_release_notes: true + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - # get_default_envs: - # name: Gather Environments - # runs-on: ubuntu-latest - # steps: - # - uses: actions/checkout@v2 - # - uses: actions/setup-python@v2 - # - name: Install PlatformIO - # run: | - # pip install -U platformio - # platformio update - # - name: Dump github context - # run: echo "$GITHUB_CONTEXT" - # shell: bash - # env: - # GITHUB_CONTEXT: ${{ toJson(github) }} - # - name: Get default environments - # id: envs - # run: | - # echo "::set-output name=environments::$(pio project config --json-output | jq -cr '.[0][1][0][1]')" - # echo ${{ steps.envs.outputs.environments }} - # outputs: - # environments: ${{ steps.envs.outputs.environments }} - - build: - name: Create Release - - runs-on: ubuntu-latest - # needs: get_default_envs - - strategy: - matrix: - # environment: ${{ fromJSON(needs.get_default_envs.outputs.environments) }} - environment: [esp32dev, esp32dev_OLED, TTGO_TDISPLAY, TTGO_TDISPLAY_SANDWICH, TDISPLAY_S3, esp32dev_ST7789_240x320] - + - name: 📂 Sync files - FTP-Deploy-Action + uses: SamKirkland/FTP-Deploy-Action@2.0.0 env: - CHIP_FAMILY: ${{ matrix.environment == 'TDISPLAY_S3' && 'ESP32-S3' || 'ESP32' }} - - timeout-minutes: 30 # time out after 30 minutes (default is 360 minutes) - - steps: - - - name: Checkout code - uses: actions/checkout@v2 - - - name: Show enviroments - run: | - echo - - - name: Determine chipFamily - id: determine_chip_family - run: | - case "${{ matrix.environment }}" in - "esp32dev") - CHIP_FAMILY="ESP32";; - "TDISPLAY_S3") - CHIP_FAMILY="ESP32-S3";; - # Add more cases for other environments as needed - *) - CHIP_FAMILY="UNKNOWN";; - esac - echo "::set-output name=chipFamily::${CHIP_FAMILY}" - - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v1 - with: - python-version: ${{ matrix.python-version }} - - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install -U platformio - platformio update - - - name: Get the version - id: get_version - run: echo ::set-output name=VERSION::${GITHUB_REF#refs/tags/} - - - name: Show version - run: echo ${{ steps.get_version.outputs.VERSION }} - - - name: Get current date - id: date - run: | - echo "::set-output name=date::$(date +'%d-%m-%Y')" - echo "::set-output name=time::$(date +'%H:%M:%S')" - - - name: Create manifest file - id: createmanifest - run: | - - # Define offset values based on env.CHIP_FAMILY - if [[ "${{ env.CHIP_FAMILY }}" == "ESP32-S3" ]]; then - bootloader_offset=0 - partitions_offset=32768 - app0_offset=57344 - firmware_offset=65536 - spiffs_offset=13172736 - else - # Default values for ESP32 or other environments - bootloader_offset=4096 - partitions_offset=32768 - app0_offset=57344 - firmware_offset=65536 - spiffs_offset=3997696 - fi - - # Create manifest - echo "{" > ${{ github.event.repository.name }}-${{ matrix.environment }}.manifest.json - echo " \"name\": \"${{ github.event.repository.name }}-${{ matrix.environment }}\"," >> ${{ github.event.repository.name }}-${{ matrix.environment }}.manifest.json - echo " \"flavour\": \"${{ matrix.environment }}\"," >> ${{ github.event.repository.name }}-${{ matrix.environment }}.manifest.json - echo " \"version\": \"${{ steps.get_version.outputs.VERSION }}\"," >> ${{ github.event.repository.name }}-${{ matrix.environment }}.manifest.json - echo " \"compilation_date\": \"${{ steps.date.outputs.date }}\"," >> ${{ github.event.repository.name }}-${{ matrix.environment }}.manifest.json - echo " \"compilation_time\": \"${{ steps.date.outputs.time }}\"," >> ${{ github.event.repository.name }}-${{ matrix.environment }}.manifest.json - echo " \"new_install_prompt_erase\": true," >> ${{ github.event.repository.name }}-${{ matrix.environment }}.manifest.json - echo " \"new_install_improv_wait_time\": 20," >> ${{ github.event.repository.name }}-${{ matrix.environment }}.manifest.json - echo " \"builds\": [" >> ${{ github.event.repository.name }}-${{ matrix.environment }}.manifest.json - echo " {" >> ${{ github.event.repository.name }}-${{ matrix.environment }}.manifest.json - echo " \"chipFamily\": \"${{ env.CHIP_FAMILY }}\"," >> ${{ github.event.repository.name }}-${{ matrix.environment }}.manifest.json - echo " \"improv\": true," >> ${{ github.event.repository.name }}-${{ matrix.environment }}.manifest.json - echo " \"parts\": [" >> ${{ github.event.repository.name }}-${{ matrix.environment }}.manifest.json - echo " { \"path\": \"${{ github.event.repository.name }}-${{ matrix.environment }}-${{ steps.get_version.outputs.VERSION }}-bootloader.bin\", \"offset\": $bootloader_offset }," >> ${{ github.event.repository.name }}-${{ matrix.environment }}.manifest.json - echo " { \"path\": \"${{ github.event.repository.name }}-${{ matrix.environment }}-${{ steps.get_version.outputs.VERSION }}-partitions.bin\", \"offset\": $partitions_offset }," >> ${{ github.event.repository.name }}-${{ matrix.environment }}.manifest.json - echo " { \"path\": \"${{ github.event.repository.name }}-${{ matrix.environment }}-${{ steps.get_version.outputs.VERSION }}-firmware.bin\", \"offset\": $firmware_offset }," >> ${{ github.event.repository.name }}-${{ matrix.environment }}.manifest.json - echo " { \"path\": \"${{ github.event.repository.name }}-${{ matrix.environment }}-${{ steps.get_version.outputs.VERSION }}-spiffs.bin\", \"offset\": $spiffs_offset }" >> ${{ github.event.repository.name }}-${{ matrix.environment }}.manifest.json - echo " ]" >> ${{ github.event.repository.name }}-${{ matrix.environment }}.manifest.json - echo " }" >> ${{ github.event.repository.name }}-${{ matrix.environment }}.manifest.json - echo " ]" >> ${{ github.event.repository.name }}-${{ matrix.environment }}.manifest.json - echo "}" >> ${{ github.event.repository.name }}-${{ matrix.environment }}.manifest.json - echo "::set-output name=manifest::$(cat ${{ github.event.repository.name }}-${{ matrix.environment }}.manifest.json)" - - - name: Read manifest files - run: | - echo "Manifest:" - echo ${{ github.event.repository.name }}-${{ matrix.environment }}.manifest.json - echo "Manifest file contents readed with cat:" - cat ${{ github.event.repository.name }}-${{ matrix.environment }}.manifest.json - - - name: Copy manifest files - if: startsWith(github.ref, 'refs/tags/') - run: | - mkdir ./firmware - cp ${{ github.event.repository.name }}-${{ matrix.environment }}.manifest.json ./firmware/${{ github.event.repository.name }}-${{ matrix.environment }}.manifest.json - - - name: Build firmware file - run: | - pio run -e ${{ matrix.environment }} - - - name: Copy firmware files - if: startsWith(github.ref, 'refs/tags/') - run: | - cp .pio/build/${{ matrix.environment }}/bootloader.bin ./firmware/${{ github.event.repository.name }}-${{ matrix.environment }}-${{ steps.get_version.outputs.VERSION }}-bootloader.bin - cp .pio/build/${{ matrix.environment }}/partitions.bin ./firmware/${{ github.event.repository.name }}-${{ matrix.environment }}-${{ steps.get_version.outputs.VERSION }}-partitions.bin - cp .pio/build/${{ matrix.environment }}/firmware.bin ./firmware/${{ github.event.repository.name }}-${{ matrix.environment }}-${{ steps.get_version.outputs.VERSION }}-firmware.bin - - - name: Build spiffs file - run: | - pio run -e ${{ matrix.environment }} -t buildfs - - - name: Copy spiffs files - if: startsWith(github.ref, 'refs/tags/') - run: | - ls -la ./firmware - cp .pio/build/${{ matrix.environment }}/spiffs.bin ./firmware/${{ github.event.repository.name }}-${{ matrix.environment }}-${{ steps.get_version.outputs.VERSION }}-spiffs.bin - - - name: Create Release - id: create_release - uses: softprops/action-gh-release@v1 - if: startsWith(github.ref, 'refs/tags/') - with: - name: ${{ github.event.repository.name }}-${{ steps.get_version.outputs.VERSION }} - files: | - ./firmware/*.bin - ./firmware/*.json - draft: false - # prerelease: true - generate_release_notes: true - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_ACTION_TOKEN }} - - name: 📂 Sync files - FTP-Deploy-Action - uses: SamKirkland/FTP-Deploy-Action@2.0.0 - env: - FTP_SERVER: ${{ secrets.FTP_SERVER }} - FTP_USERNAME: ${{ secrets.FTP_USER }} - FTP_PASSWORD: ${{ secrets.FTP_PASSWORD }} - LOCAL_DIR: ./firmware/ - REMOTE_DIR: /${{ github.event.repository.name }}/ - METHOD: ftp - PORT: 21 - ARGS: --verbose - - name: Clean eMariete.com Cache - # run: curl https://emariete.com/clean_cache_wp_rocket.php - run: curl https://emariete.com/clean_cache_litespeed.php + FTP_SERVER: ${{ secrets.FTP_SERVER }} + FTP_USERNAME: ${{ secrets.FTP_USER }} + FTP_PASSWORD: ${{ secrets.FTP_PASSWORD }} + LOCAL_DIR: ./firmware/ + REMOTE_DIR: /${{ github.event.repository.name }}/ + METHOD: ftp + PORT: 21 + ARGS: --verbose + + - name: Clean eMariete.com Cache + run: curl https://emariete.com/clean_cache_litespeed.php From be6a94039088588c310bfd9aaf567eb68e864e6d Mon Sep 17 00:00:00 2001 From: Mario Mariete <11509521+melkati@users.noreply.github.com> Date: Sun, 2 Jun 2024 15:19:11 +0200 Subject: [PATCH 3/4] Improve preferences.h logging --- CO2_Gadget_Preferences.h | 11 +++++++++++ platformio.ini | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/CO2_Gadget_Preferences.h b/CO2_Gadget_Preferences.h index 250da990..ab11d269 100644 --- a/CO2_Gadget_Preferences.h +++ b/CO2_Gadget_Preferences.h @@ -709,6 +709,7 @@ bool handleSavePreferencesFromJSON(String jsonPreferences) { preferences.begin("CO2-Gadget", false); customCalibrationValue = JsonDocument["customCalValue"]; if (tempOffset != float(JsonDocument["tempOffset"])) { + Serial.println("-->[PREF] Temp Offset changed from " + String(tempOffset) + " to " + String(JsonDocument["tempOffset"].as())); tempOffset = float(JsonDocument["tempOffset"]); sensors.setTempOffset(tempOffset); } @@ -733,6 +734,7 @@ bool handleSavePreferencesFromJSON(String jsonPreferences) { batteryDischargedMillivolts = JsonDocument["batDischgd"]; batteryFullyChargedMillivolts = JsonDocument["batChargd"]; if (vRef != JsonDocument["vRef"]) { // If battery reference changed, apply it + Serial.println("-->[PREF] vRef changed from " + String(vRef) + " to " + String(JsonDocument["vRef"].as())); vRef = JsonDocument["vRef"]; battery.begin(vRef, voltageDividerRatio, &asigmoidal); readBatteryVoltage(); @@ -763,6 +765,7 @@ bool handleSavePreferencesFromJSON(String jsonPreferences) { debugSensors = JsonDocument["debugSensors"]; #if defined(SUPPORT_TFT) || defined(SUPPORT_OLED) || defined(SUPPORT_EINK) if (displayReverse != JsonDocument["displayReverse"]) { + Serial.println("-->[PREF] Display Reverse changed from " + String(displayReverse) + " to " + String(JsonDocument["displayReverse"].as())); displayReverse = JsonDocument["displayReverse"]; setDisplayReverse(displayReverse); reverseButtons(displayReverse); @@ -790,31 +793,37 @@ bool handleSavePreferencesFromJSON(String jsonPreferences) { } if (displayShowTemperature != JsonDocument["showTemp"]) { + Serial.println("-->[PREF] Display Temperature changed from " + String(displayShowTemperature) + " to " + String(JsonDocument["showTemp"].as())); displayShowTemperature = JsonDocument["showTemp"]; shouldRedrawDisplay = true; } if (displayShowHumidity != JsonDocument["showHumidity"]) { + Serial.println("-->[PREF] Display Humidity changed from " + String(displayShowHumidity) + " to " + String(JsonDocument["showHumidity"].as())); displayShowHumidity = JsonDocument["showHumidity"]; shouldRedrawDisplay = true; } if (displayShowBattery != JsonDocument["showBattery"]) { + Serial.println("-->[PREF] Display Battery changed from " + String(displayShowBattery) + " to " + String(JsonDocument["showBattery"].as())); displayShowBattery = JsonDocument["showBattery"]; shouldRedrawDisplay = true; } if (displayShowBatteryVoltage != JsonDocument["showBattVolt"]) { + Serial.println("-->[PREF] Display Battery Voltage changed from " + String(displayShowBatteryVoltage) + " to " + String(JsonDocument["showBattVolt"].as())); displayShowBatteryVoltage = JsonDocument["showBattVolt"]; shouldRedrawDisplay = true; } if (displayShowCO2 != JsonDocument["showCO2"]) { + Serial.println("-->[PREF] Display CO2 changed from " + String(displayShowCO2) + " to " + String(JsonDocument["showCO2"].as())); displayShowCO2 = JsonDocument["showCO2"]; shouldRedrawDisplay = true; } if (displayShowPM25 != JsonDocument["showPM25"]) { + Serial.println("-->[PREF] Display PM2.5 changed from " + String(displayShowPM25) + " to " + String(JsonDocument["showPM25"].as())); displayShowPM25 = JsonDocument["showPM25"]; shouldRedrawDisplay = true; } @@ -854,11 +863,13 @@ bool handleSavePreferencesFromJSON(String jsonPreferences) { // If JsonDocument["wifiPass"] is present and different from the current one, update the wifiPass variable if (JsonDocument.containsKey("wifiPass") && wifiPass != JsonDocument["wifiPass"].as().c_str()) { + Serial.println("-->[PREF] WiFi Password changed. Updating WiFi Password in preferences"); wifiPass = JsonDocument["wifiPass"].as().c_str(); wifiChanged = true; } // If JsonDocument["mqttPass"] is present and different from the current one, update the mqttPass variable if (JsonDocument.containsKey("mqttPass") && mqttPass != JsonDocument["mqttPass"].as().c_str()) { + Serial.println("-->[PREF] MQTT Password changed. Updating MQTT Password in preferences"); mqttPass = JsonDocument["mqttPass"].as().c_str(); wifiChanged = true; } diff --git a/platformio.ini b/platformio.ini index e5499523..352cd1c3 100644 --- a/platformio.ini +++ b/platformio.ini @@ -10,7 +10,7 @@ extra_configs = platformio_extra_configs.ini [version] build_flags = -D CO2_GADGET_VERSION="\"0.14."\" - -D CO2_GADGET_REV="\"0"\" + -D CO2_GADGET_REV="\"000"\" ;**************************************************************************************** ;*** You can disable features by commenting the line with a semicolon at the beginning From e8de5dea9de74aacc0785a22a2dd32e86903629a Mon Sep 17 00:00:00 2001 From: Mario Mariete <11509521+melkati@users.noreply.github.com> Date: Mon, 3 Jun 2024 07:15:49 +0200 Subject: [PATCH 4/4] chore: Update font color in style.css to increase contrast for value and units in dark mode --- data/style.css | 4 ++-- data/style.css.gz | Bin 2412 -> 2413 bytes 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/data/style.css b/data/style.css index 639e1b50..bf88c2c1 100644 --- a/data/style.css +++ b/data/style.css @@ -360,14 +360,14 @@ button:hover { } .value { - fill: #666; + fill: var(--font-color); font-family: sans-serif; font-size: 0.7em; text-anchor: middle; } .unit { - fill: #666; + fill: var(--font-color); font-family: sans-serif; font-size: 0.3em; text-anchor: middle; diff --git a/data/style.css.gz b/data/style.css.gz index c8b3db1f035eaba64a211a0750031fa13da0db55..7686d9fdc08584f9783d64e286e878439da57497 100644 GIT binary patch delta 2407 zcmV-t37Gcm673QPABzYGmrz}i2O)pFV=?h98WR(ZCVnw~C{VU41JZ(5CH!|!TcFUw zo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