Skip to content

Commit

Permalink
Fix script not handle empty lines and stop like was end of file
Browse files Browse the repository at this point in the history
  • Loading branch information
luc-github committed Sep 22, 2022
1 parent fa2023f commit c0d347e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion esp3d/src/include/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#define _VERSION_ESP3D_H

//version and sources location
#define FW_VERSION "3.0.0.a216"
#define FW_VERSION "3.0.0.a217"
#define REPOSITORY "https://github.com/luc-github/ESP3D/tree/3.0"

#endif //_VERSION_ESP3D_H
12 changes: 10 additions & 2 deletions esp3d/src/modules/gcode_host/gcode_host.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,11 @@ void GcodeHost::readNextCommand()
}
}
if (_currentCommand.length() == 0) {
_step = HOST_STOP_STREAM;
if (FSfileHandle.available()) {
_step = HOST_READ_LINE;
} else {
_step = HOST_STOP_STREAM;
}
}
}
#endif //FILESYSTEM_FEATURE
Expand All @@ -287,7 +291,11 @@ void GcodeHost::readNextCommand()
}
}
if (_currentCommand.length() == 0) {
_step = HOST_STOP_STREAM;
if (SDfileHandle.available()) {
_step = HOST_READ_LINE;
} else {
_step = HOST_STOP_STREAM;
}
}
}
#endif //SD_DEVICE
Expand Down

0 comments on commit c0d347e

Please sign in to comment.