This commit is contained in:
2025-03-10 10:18:01 +01:00
parent ebef6ce886
commit 6f7ccc267d
4 changed files with 9 additions and 7 deletions

View File

@@ -52,7 +52,8 @@ namespace esphome {
void Marlin2::write(std::string gcode) {
ESP_LOGD(TAG, "->GCODE: %s", gcode.c_str());
write_str(gcode.c_str());
write_str((std::string("\r\n\r\n") + gcode + std::string("\r\n")).c_str());
flush();
}
@@ -77,6 +78,8 @@ namespace esphome {
}
void Marlin2::process_line() {
ESP_LOGD(TAG, "#%s#",MarlinOutput.c_str());
if(MarlinOutput.size() < 3) {
MarlinOutput="";
return;