diff --git a/CMakeLists.txt b/CMakeLists.txt index fa356a6..6a5a0ef 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -15,6 +15,7 @@ if(NOT EXISTS ${LIBAVR_ROOT}/CMakeLists.txt) message(FATAL_ERROR "libavr not found at ${LIBAVR_ROOT} - run: git submodule update --init libavr") endif() add_subdirectory(${LIBAVR_ROOT} libavr-build) +include(${LIBAVR_ROOT}/cmake/checks.cmake) add_executable(fantemp src/main.cpp) target_link_libraries(fantemp PRIVATE libavr) diff --git a/libavr b/libavr index 99434fb..1412b71 160000 --- a/libavr +++ b/libavr @@ -1 +1 @@ -Subproject commit 99434fb29af18f219ba9d24ba22d4d068e5790bb +Subproject commit 1412b7173b5c343d225cced990473f5e6b510c32 diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 551b543..e48917b 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -1,3 +1,5 @@ +libavr_format_test() + # The battery is a compile: a static_assert that fails is the failure. It is a # target rather than only a ctest so a plain build catches a regression too. add_library(consteval_tests OBJECT consteval.cpp) diff --git a/test/consteval.cpp b/test/consteval.cpp index b152034..176d87a 100644 --- a/test/consteval.cpp +++ b/test/consteval.cpp @@ -58,9 +58,9 @@ static_assert(curve_rises()); // definition puts that count at the nominal temperature. using app::thermistor::detail::quarters_entry; -inline constexpr std::int32_t nominal_count = static_cast( - app::thermistor::adc_full_scale * app::thermistor::nominal_resistance / - (app::thermistor::series_resistor + app::thermistor::nominal_resistance)); +inline constexpr std::int32_t nominal_count = + static_cast(app::thermistor::adc_full_scale * app::thermistor::nominal_resistance / + (app::thermistor::series_resistor + app::thermistor::nominal_resistance)); static_assert(quarters_entry(nominal_count / 4) >= 100); // 25.00 C, in quarters static_assert(quarters_entry(nominal_count / 4 + 1) < 100); // and the step below it