From a8203a6372c9c2e09fdb9355caab06c914ea5cb1 Mon Sep 17 00:00:00 2001 From: summermorningdream <24917424+zxkmm@users.noreply.github.com> Date: Tue, 21 May 2024 18:08:47 +0800 Subject: [PATCH] add path class usage type debug (#2154) --- firmware/application/usb_serial_asyncmsg.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/firmware/application/usb_serial_asyncmsg.cpp b/firmware/application/usb_serial_asyncmsg.cpp index a41a83c7d..f94277b0d 100644 --- a/firmware/application/usb_serial_asyncmsg.cpp +++ b/firmware/application/usb_serial_asyncmsg.cpp @@ -112,6 +112,15 @@ void UsbSerialAsyncmsg::asyncmsg(const std::filesystem::p chprintf((BaseSequentialStream*)&SUSBD1, "%s\r\n", path_str.c_str()); } +template <> +void UsbSerialAsyncmsg::asyncmsg(const std::filesystem::path::string_type& data) { + if (!portapack::async_tx_enabled) { + return; + } + std::string str_data(data.begin(), data.end()); + chprintf((BaseSequentialStream*)&SUSBD1, "%s\r\n", str_data.c_str()); +} + /// string // string obj