summaryrefslogtreecommitdiff
path: root/src/dev_console
diff options
context:
space:
mode:
authorjacqueline <me@jacqueline.id.au>2023-09-26 13:36:07 +1000
committerjacqueline <me@jacqueline.id.au>2023-09-26 13:36:07 +1000
commit4d99d22e10a3cb2a421da1618c127128816613c9 (patch)
tree527490a466348e5cf40cf10a8f3768aa5be4e7c1 /src/dev_console
parentf6d06421090f88094aba76b72b04d614f54efafa (diff)
downloadtangara-fw-4d99d22e10a3cb2a421da1618c127128816613c9.tar.gz
std::string -> std::pmr::string in psram
Diffstat (limited to 'src/dev_console')
-rw-r--r--src/dev_console/CMakeLists.txt2
-rw-r--r--src/dev_console/console.cpp6
2 files changed, 5 insertions, 3 deletions
diff --git a/src/dev_console/CMakeLists.txt b/src/dev_console/CMakeLists.txt
index 74911e66..5555bf61 100644
--- a/src/dev_console/CMakeLists.txt
+++ b/src/dev_console/CMakeLists.txt
@@ -5,5 +5,5 @@
idf_component_register(
SRCS "console.cpp"
INCLUDE_DIRS "include"
- REQUIRES "console")
+ REQUIRES "console" "memory")
target_compile_options(${COMPONENT_LIB} PRIVATE ${EXTRA_WARNINGS})
diff --git a/src/dev_console/console.cpp b/src/dev_console/console.cpp
index 66fb6bf6..f2b1efea 100644
--- a/src/dev_console/console.cpp
+++ b/src/dev_console/console.cpp
@@ -16,16 +16,18 @@
#include "esp_log.h"
#include "esp_system.h"
+#include "memory_resource.hpp"
+
namespace console {
int CmdLogLevel(int argc, char** argv) {
- static const std::string usage =
+ static const std::pmr::string usage =
"usage: loglevel [VERBOSE,DEBUG,INFO,WARN,ERROR,NONE]";
if (argc != 2) {
std::cout << usage << std::endl;
return 1;
}
- std::string level_str = argv[1];
+ std::pmr::string level_str = argv[1];
std::transform(level_str.begin(), level_str.end(), level_str.begin(),
[](unsigned char c) { return std::toupper(c); });