mirror of
https://git.steelants.cz/JonatanRek/ESPHomeMarlin2.git
synced 2026-10-11 17:44:36 +00:00
Fixes
This commit is contained in:
1 parent
fd901fd1e1
commit
68ab694d8a
3 files changed
+22
-1
No files matched your search
+17
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user