diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 882060c..8453cbc 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -158,7 +158,9 @@ jobs: uses: softprops/action-gh-release@v2 with: body: ${{steps.github_release.outputs.changelog}} + make_latest: true draft: false + prerelease: false files: | artifacts/*.bin artifacts/*.elf diff --git a/platformio.ini b/platformio.ini index f3c7ea0..5c17850 100644 --- a/platformio.ini +++ b/platformio.ini @@ -72,8 +72,7 @@ lib_deps = mathieucarbou/MycilaLogger @ 3.2.0 mathieucarbou/MycilaMQTT @ 4.2.2 mathieucarbou/MycilaNTP @ 5.0.1 - mathieucarbou/MycilaPulseAnalyzer @ 2.3.6 - ; https://github.com/mathieucarbou/MycilaPulseAnalyzer + mathieucarbou/MycilaPulseAnalyzer @ 2.4.0 mathieucarbou/MycilaPZEM004Tv3 @ 5.0.0 mathieucarbou/MycilaRelay @ 4.0.1 mathieucarbou/MycilaSystem @ 3.1.0 @@ -146,8 +145,9 @@ build_flags = -Og ; -Os -D CONFIG_ARDUHAL_LOG_COLORS - ; -D CORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_INFO - -D CORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_VERBOSE + -D CORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_INFO + ; -D CORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_DEBUG + ; -D CORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_VERBOSE build_unflags = -std=gnu++11 diff --git a/src/Utils.cpp b/src/Utils.cpp index 5400632..1f97d0d 100644 --- a/src/Utils.cpp +++ b/src/Utils.cpp @@ -14,11 +14,11 @@ float detectGridFrequency() { return frequency; frequency = round(pzemO1.data.frequency); - if (frequency) + if (!isnanf(frequency) && frequency) return frequency; frequency = round(pzemO2.data.frequency); - if (frequency) + if (!isnanf(frequency) && frequency) return frequency; frequency = config.get(KEY_GRID_FREQUENCY).toInt();