mirror of
https://github.com/espressif/esp-protocols.git
synced 2025-07-18 13:02:21 +02:00
Test: Initial version of modem tests
This commit is contained in:
@ -29,7 +29,6 @@ command_result DTE::command(const std::string &command, got_line_cb got_line, ui
|
||||
{
|
||||
Scoped<Lock> l(lock);
|
||||
command_result res = command_result::TIMEOUT;
|
||||
term->write((uint8_t *)command.c_str(), command.length());
|
||||
term->set_data_cb([&](size_t len){
|
||||
auto data_to_read = std::min(len, buffer_size - consumed);
|
||||
auto data = buffer.get() + consumed;
|
||||
@ -44,6 +43,7 @@ command_result DTE::command(const std::string &command, got_line_cb got_line, ui
|
||||
}
|
||||
return false;
|
||||
});
|
||||
term->write((uint8_t *)command.c_str(), command.length());
|
||||
auto got_lf = signal.wait(GOT_LINE, time_ms);
|
||||
if (got_lf && res == command_result::TIMEOUT) {
|
||||
throw_if_esp_fail(ESP_ERR_INVALID_STATE);
|
||||
|
Reference in New Issue
Block a user