This commit is contained in:
2025-06-16 11:07:46 +02:00
parent fd901fd1e1
commit 68ab694d8a
3 changed files with 22 additions and 1 deletions

View File

@@ -218,6 +218,23 @@ namespace esphome {
return;
}
size_t first_space = MarlinOutput.find(' ');
size_t second_space = MarlinOutput.find(' ', first_space + 1);
if(second_space == std::string::npos && first_space == std::string::npos) {
std::string short_name = MarlinOutput.substr(0, first_space);
std::string long_name = MarlinOutput.substr(second_space + 1);
file_table_[long_name] = short_name;
ESP_LOGD(TAG, "Uloženo do tabulky: %s => %s", long_name.c_str(), short_name.c_str());
//reset string for next line
MarlinOutput="";
return;
}
ESP_LOGD(TAG, "#%s#",MarlinOutput.c_str());
MarlinOutput="";
return;