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
2 changes: 1 addition & 1 deletion lib/moment/moment.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ class Moment {
_rolloverCount++;
}
_lastValue = value;
_milliseconds =
this->_milliseconds =
static_cast<int64_t>(value) + static_cast<int64_t>(_rolloverCount) * 0xFFFFFFFFLL;
}

Expand Down
2 changes: 2 additions & 0 deletions lib/temperature/include/temperature.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ class Temperature {
this->celsius = unit == Unit::C ? value : fahrenheitToCelsius(value);
}

// NOLINTBEGIN(bugprone-easily-swappable-parameters)
Temperature clamp(const Temperature &min, const Temperature &max) const {
return Temperature(std::max(std::min(this->celsius, max.celsius), min.celsius), Unit::C);
}
Expand All @@ -81,6 +82,7 @@ class Temperature {
celsius = std::max(std::min(this->celsius, max.celsius), min.celsius);
return *this;
}
// NOLINTEND(bugprone-easily-swappable-parameters)

static float celsiusToFahrenheit(const float celsius) {
return celsius * 9.0f / 5.0f + 32.0f;
Expand Down
10 changes: 4 additions & 6 deletions platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ extra_scripts =
check_tool = clangtidy, cppcheck
check_flags =
clangtidy: --checks '-*,bugprone-*,clang-analyzer-*,misc-*,performance-*,portability-*,readability-*,-readability-magic-numbers,-readability-static-accessed-through-instance,-readability-misplaced-array-index,google-*'
cppcheck: --enable=all --disable=unusedFunction --inline-suppr --std=c++20 --suppress=*:*/.pio/* --suppress=unmatchedSuppression:*/.pio/*
check_skip_packages = no
cppcheck: --enable=all --disable=unusedFunction --inline-suppr --std=c++20 --suppress=*:*/.pio/* --suppress=unmatchedSuppression:*/.pio/* --suppress=*:*/packages/* --suppress=unmatchedSuppression:*/packages/*
check_skip_packages = yes
check_src_filters = +<src/*> +<lib/*>
platform_packages =
platformio/tool-clangtidy@1.150005.0
Expand Down Expand Up @@ -66,7 +66,7 @@ framework = arduino
extends = common
lib_deps =
${common.lib_deps}
me-no-dev/ESP Async WebServer@1.2.3
ESP32Async/ESPAsyncWebServer @ 3.6.0

;
; Build settings shared across all ESP32 targets. These are appended to or overridden by the target-specific settings.
Expand All @@ -83,9 +83,7 @@ build_flags =
-D CORE_DEBUG_LEVEL=0
lib_deps =
${common.lib_deps}
; latest master required for ESP32 because released version causes linker failures
; https://github.com/me-no-dev/ESPAsyncWebServer/pull/999
https://github.com/me-no-dev/ESPAsyncWebServer.git
ESP32Async/ESPAsyncWebServer @ 3.6.0

;
; ESP8266 targets
Expand Down
2 changes: 2 additions & 0 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -583,8 +583,10 @@ bool safeModeActive() {
return config.other.safeMode && remoteTempStale();
}

// NOLINTBEGIN(readability-named-parameter)
void renderView(const String &view, JsonDocument &data,
const std::vector<std::pair<String, String>> &partials = {}) {
// NOLINTEND(readability-named-parameter)
auto header = data[F("header")].to<JsonObject>();
header[F("hostname")] = config.network.hostname;
header[F("git_hash")] = F(MITSUQTT_GIT_COMMIT);
Expand Down