chore: 删除controller中过多的日志

This commit is contained in:
MistEO
2023-01-22 05:40:46 +08:00
parent 020aedb67f
commit 908fa6aa8d

View File

@@ -344,8 +344,6 @@ void asst::Controller::release_minitouch(bool force)
// 返回值代表是否找到 "\r\n",函数本身会将所有 "\r\n" 替换为 "\n"
bool asst::Controller::convert_lf(std::string& data)
{
LogTraceFunction;
if (data.empty() || data.size() < 2) {
return false;
}
@@ -403,7 +401,6 @@ void asst::Controller::random_delay() const
{
auto& opt = Config.get_options();
if (opt.control_delay_upper != 0) {
LogTraceFunction;
static std::default_random_engine rand_engine(std::random_device {}());
static std::uniform_int_distribution<unsigned> rand_uni(opt.control_delay_lower, opt.control_delay_upper);
@@ -1355,8 +1352,6 @@ std::optional<int> asst::Controller::call_command_win32(const std::string& cmd,
const int64_t timeout,
const std::chrono::steady_clock::time_point start_time)
{
LogTraceFunction;
using namespace std::chrono;
asst::platform::single_page_buffer<char> pipe_buffer;
@@ -1561,8 +1556,6 @@ std::optional<int> asst::Controller::call_command_posix(const std::string& cmd,
const int64_t timeout,
const std::chrono::steady_clock::time_point start_time)
{
LogTraceFunction;
using namespace std::chrono;
asst::platform::single_page_buffer<char> pipe_buffer;
@@ -1638,8 +1631,6 @@ std::optional<int> asst::Controller::call_command_tcpip(const std::string& cmd,
const int64_t timeout,
const std::chrono::steady_clock::time_point start_time)
{
LogTraceFunction;
// TODO: 从上面的 call_command_win32/posix 里抽取出 socket 接收的部分
if (recv_by_socket) {
Log.error("adb-lite does not support receiving data from socket");
@@ -1769,8 +1760,6 @@ std::optional<int> asst::Controller::call_command_tcpip(const std::string& cmd,
bool asst::Controller::call_and_hup_minitouch_win32(const std::string& cmd, const auto& check_timeout,
std::string& pipe_str)
{
LogTraceFunction;
constexpr int PipeReadBuffSize = 4096ULL;
constexpr int PipeWriteBuffSize = 64 * 1024ULL;
@@ -1841,8 +1830,6 @@ bool asst::Controller::call_and_hup_minitouch_win32(const std::string& cmd, cons
bool asst::Controller::call_and_hup_minitouch_posix(const std::string& cmd, const auto& check_timeout,
std::string& pipe_str)
{
LogTraceFunction;
constexpr int PipeReadBuffSize = 4096ULL;
constexpr int PipeWriteBuffSize = 64 * 1024ULL;
@@ -1931,8 +1918,6 @@ bool asst::Controller::call_and_hup_minitouch_posix(const std::string& cmd, cons
bool asst::Controller::call_and_hup_minitouch_tcpip(const std::string& cmd, const int timeout, std::string& pipe_str)
{
LogTraceFunction;
static const std::regex shell_regex(R"(^.+ -s \S+ shell (.+)$)");
std::smatch match;
@@ -1987,8 +1972,6 @@ bool asst::Controller::call_and_hup_minitouch_tcpip(const std::string& cmd, cons
bool asst::Controller::input_to_minitouch_adb(const std::string& cmd)
{
LogTraceFunction;
if (m_minitouch_handle == nullptr) {
Log.error("Minitouch connect not active");
return false;