From 4f7997568c2e93544ef412c50086ff0c4d3b7755 Mon Sep 17 00:00:00 2001 From: 0xFEEDC0DE64 Date: Sat, 17 Jul 2021 18:10:25 +0200 Subject: [PATCH] small changes --- components/espcpputils | 2 +- main/CMakeLists.txt | 1 - main/futurecpp.h | 29 ----------------------------- main/myconfig.cpp | 8 ++++---- 4 files changed, 5 insertions(+), 35 deletions(-) delete mode 100644 main/futurecpp.h diff --git a/components/espcpputils b/components/espcpputils index 3dc1efd..3a350f1 160000 --- a/components/espcpputils +++ b/components/espcpputils @@ -1 +1 @@ -Subproject commit 3dc1efd38dcea8946eb684a1bebf4ff79d0c4112 +Subproject commit 3a350f11897f8f82bfc906efb7fbebd14e7da352 diff --git a/main/CMakeLists.txt b/main/CMakeLists.txt index 100782b..14ff134 100644 --- a/main/CMakeLists.txt +++ b/main/CMakeLists.txt @@ -8,7 +8,6 @@ set(headers feature_lamp.h feature_switch.h feature_tsl.h - futurecpp.h myconfig.h mymdns.h mymqtt.h diff --git a/main/futurecpp.h b/main/futurecpp.h deleted file mode 100644 index bf2b514..0000000 --- a/main/futurecpp.h +++ /dev/null @@ -1,29 +0,0 @@ -#pragma once - -// system includes -#include -#include - -// C++20 backports (until espressif finally updates their aged compiler suite) - -namespace std { -template -typename std::enable_if_t< - sizeof(To) == sizeof(From) && std::is_trivially_copyable_v && std::is_trivially_copyable_v, - To> -// constexpr support needs compiler magic -bit_cast(const From& src) noexcept -{ - static_assert(std::is_trivially_constructible_v, - "This implementation additionally requires destination type to be trivially constructible"); - - To dst; - std::memcpy(&dst, &src, sizeof(To)); - return dst; -} - -template {}>> -constexpr std::underlying_type_t to_underlying(EnumT e) noexcept { - return static_cast>(e); -} -} // namespace std diff --git a/main/myconfig.cpp b/main/myconfig.cpp index c48729e..c5576fb 100644 --- a/main/myconfig.cpp +++ b/main/myconfig.cpp @@ -39,21 +39,21 @@ ConfigWrapper invert_switch{"invert_switch", "invert_switch", true}; ConfigWrapper topic_switch_availability{"topic_switch_availability", "tpcswitchavaila", "dahoam/wohnzimmer/schalter1/available"}; ConfigWrapper topic_switch_status{"topic_switch_status", "topicswitchstat", "dahoam/wohnzimmer/schalter1/status"}; -ConfigWrapper enable_dht{"enable_dht", "enable_dht", true}; +ConfigWrapper enable_dht{"enable_dht", "enable_dht", false}; ConfigWrapper pins_dht{"pins_dht", "pins_dht", GPIO_NUM_33}; ConfigWrapper topic_dht11_availability{"topic_dht11_availability", "tpcdht11availab", "dahoam/wohnzimmer/dht11_1/available"}; ConfigWrapper topic_dht11_temperature{"topic_dht11_temperature", "tpcdht11tempera", "dahoam/wohnzimmer/dht11_1/temperature"}; ConfigWrapper topic_dht11_humidity{"topic_dht11_humidity", "tpcdht11humidit", "dahoam/wohnzimmer/dht11_1/humidity"}; -ConfigWrapper enable_i2c{"enable_i2c", "enable_i2c", true}; +ConfigWrapper enable_i2c{"enable_i2c", "enable_i2c", false}; ConfigWrapper pins_sda{"pins_sda", "pins_sda", GPIO_NUM_16}; ConfigWrapper pins_scl{"pins_scl", "pins_scl", GPIO_NUM_17}; -ConfigWrapper enable_tsl{"enable_tsl", "enable_tsl", true}; +ConfigWrapper enable_tsl{"enable_tsl", "enable_tsl", false}; ConfigWrapper topic_tsl2561_availability{"topic_tsl2561_availability", "tpctsl2561avail", "dahoam/wohnzimmer/tsl2561_1/available"}; ConfigWrapper topic_tsl2561_lux{"topic_tsl2561_lux", "tpc_tsl2561_lux", "dahoam/wohnzimmer/tsl2561_1/lux"}; -ConfigWrapper enable_bmp{"enable_bmp", "enable_bmp", true}; +ConfigWrapper enable_bmp{"enable_bmp", "enable_bmp", false}; ConfigWrapper topic_bmp085_availability{"topic_bmp085_availability", "topicbmp085avai", "dahoam/wohnzimmer/bmp085_1/available"}; ConfigWrapper topic_bmp085_pressure{"topic_bmp085_pressure", "tpcbmp085pressu", "dahoam/wohnzimmer/bmp085_1/pressure"}; ConfigWrapper topic_bmp085_temperature{"topic_bmp085_temperature", "tpcbmp085temper", "dahoam/wohnzimmer/bmp085_1/temperature"};