Updated to newest idf
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
// system includes
|
||||
#include <optional>
|
||||
#include <expected>
|
||||
|
||||
// esp-idf includes
|
||||
#include <esp_log.h>
|
||||
@@ -13,7 +14,6 @@
|
||||
#include <menudisplay.h>
|
||||
#include <numberparsing.h>
|
||||
#include <screenmanager.h>
|
||||
#include <tftinstance.h>
|
||||
#include <tickchrono.h>
|
||||
#include <wrappers/websocket_client.h>
|
||||
|
||||
@@ -196,7 +196,7 @@ typename std::enable_if<
|
||||
!std::is_same_v<T, HandbremseMode> &&
|
||||
!std::is_same_v<T, BobbyQuickActions> &&
|
||||
!std::is_same_v<T, BatteryCellType>
|
||||
, tl::expected<void, std::string>>::type
|
||||
, std::expected<void, std::string>>::type
|
||||
set_config(ConfigWrapper<T> &config, std::string_view newValue)
|
||||
{
|
||||
return tl::make_unexpected("Unsupported config type");
|
||||
@@ -205,7 +205,7 @@ set_config(ConfigWrapper<T> &config, std::string_view newValue)
|
||||
template<typename T>
|
||||
typename std::enable_if<
|
||||
std::is_same_v<T, bool>
|
||||
, tl::expected<void, std::string>>::type
|
||||
, std::expected<void, std::string>>::type
|
||||
set_config(ConfigWrapper<T> &config, std::string_view newValue)
|
||||
{
|
||||
if (cpputils::is_in(newValue, "true", "false"))
|
||||
@@ -218,7 +218,7 @@ template<typename T>
|
||||
typename std::enable_if<
|
||||
!std::is_same_v<T, bool> &&
|
||||
std::is_integral_v<T>
|
||||
, tl::expected<void, std::string>>::type
|
||||
, std::expected<void, std::string>>::type
|
||||
set_config(ConfigWrapper<T> &config, std::string_view newValue)
|
||||
{
|
||||
if (auto parsed = cpputils::fromString<T>(newValue))
|
||||
@@ -230,7 +230,7 @@ set_config(ConfigWrapper<T> &config, std::string_view newValue)
|
||||
template<typename T>
|
||||
typename std::enable_if<
|
||||
std::is_same_v<T, std::string>
|
||||
, tl::expected<void, std::string>>::type
|
||||
, std::expected<void, std::string>>::type
|
||||
set_config(ConfigWrapper<T> &config, std::string_view newValue)
|
||||
{
|
||||
return configs.write_config(config, std::string{newValue});
|
||||
@@ -239,7 +239,7 @@ set_config(ConfigWrapper<T> &config, std::string_view newValue)
|
||||
template<typename T>
|
||||
typename std::enable_if<
|
||||
std::is_same_v<T, wifi_stack::ip_address_t>
|
||||
, tl::expected<void, std::string>>::type
|
||||
, std::expected<void, std::string>>::type
|
||||
set_config(ConfigWrapper<T> &config, std::string_view newValue)
|
||||
{
|
||||
if (const auto parsed = wifi_stack::fromString<wifi_stack::ip_address_t>(newValue); parsed)
|
||||
@@ -251,7 +251,7 @@ set_config(ConfigWrapper<T> &config, std::string_view newValue)
|
||||
template<typename T>
|
||||
typename std::enable_if<
|
||||
std::is_same_v<T, wifi_stack::mac_t>
|
||||
, tl::expected<void, std::string>>::type
|
||||
, std::expected<void, std::string>>::type
|
||||
set_config(ConfigWrapper<T> &config, std::string_view newValue)
|
||||
{
|
||||
if (const auto parsed = wifi_stack::fromString<wifi_stack::mac_t>(newValue); parsed)
|
||||
@@ -263,7 +263,7 @@ set_config(ConfigWrapper<T> &config, std::string_view newValue)
|
||||
template<typename T>
|
||||
typename std::enable_if<
|
||||
std::is_same_v<T, std::optional<wifi_stack::mac_t>>
|
||||
, tl::expected<void, std::string>>::type
|
||||
, std::expected<void, std::string>>::type
|
||||
set_config(ConfigWrapper<T> &config, std::string_view newValue)
|
||||
{
|
||||
if (newValue.empty())
|
||||
@@ -284,7 +284,7 @@ typename std::enable_if<
|
||||
std::is_same_v<T, HandbremseMode> ||
|
||||
std::is_same_v<T, BobbyQuickActions> ||
|
||||
std::is_same_v<T, BatteryCellType>
|
||||
, tl::expected<void, std::string>>::type
|
||||
, std::expected<void, std::string>>::type
|
||||
set_config(ConfigWrapper<T> &config, std::string_view newValue)
|
||||
{
|
||||
if (auto parsed = cpputils::fromString<std::underlying_type_t<T>>(newValue))
|
||||
|
Reference in New Issue
Block a user