Skip to content

Commit

Permalink
Merge pull request #5691 from AnHardt/fix5677
Browse files Browse the repository at this point in the history
Fix M110 without leading N
  • Loading branch information
thinkyhead authored Jan 14, 2017
2 parents 0c0c840 + fa26767 commit d3cb1a8
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions Marlin/Marlin_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ bool axis_homed[XYZ] = { false }, axis_known_position[XYZ] = { false };
/**
* GCode line number handling. Hosts may opt to include line numbers when
* sending commands to Marlin, and lines will be checked for sequentiality.
* M110 S<int> sets the current line number.
* M110 N<int> sets the current line number.
*/
static long gcode_N, gcode_LastN, Stopped_gcode_LastN = 0;

Expand Down Expand Up @@ -629,7 +629,7 @@ static bool send_ok[BUFSIZE];

#ifdef CHDK
millis_t chdkHigh = 0;
boolean chdkActive = false;
bool chdkActive = false;
#endif

#if ENABLED(PID_EXTRUSION_SCALING)
Expand Down Expand Up @@ -966,7 +966,7 @@ void gcode_line_error(const char* err, bool doFlush = true) {

inline void get_serial_commands() {
static char serial_line_buffer[MAX_CMD_SIZE];
static boolean serial_comment_mode = false;
static bool serial_comment_mode = false;

// If the command buffer is empty for too long,
// send "wait" to indicate Marlin is still waiting.
Expand Down Expand Up @@ -1006,7 +1006,7 @@ inline void get_serial_commands() {

if (npos) {

boolean M110 = strstr_P(command, PSTR("M110")) != NULL;
bool M110 = strstr_P(command, PSTR("M110")) != NULL;

if (M110) {
char* n2pos = strchr(command + 4, 'N');
Expand Down Expand Up @@ -5680,7 +5680,7 @@ inline void gcode_M109() {
* M110: Set Current Line Number
*/
inline void gcode_M110() {
if (code_seen('N')) gcode_N = code_value_long();
if (code_seen('N')) gcode_LastN = code_value_long();
}

/**
Expand Down
2 changes: 1 addition & 1 deletion Marlin/cardreader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ void CardReader::lsDive(const char *prepend, SdFile parent, const char * const m
createFilename(lfilename, p);

// Allocate enough stack space for the full path to a folder, trailing slash, and nul
boolean prepend_is_empty = (prepend[0] == '\0');
bool prepend_is_empty = (prepend[0] == '\0');
int len = (prepend_is_empty ? 1 : strlen(prepend)) + strlen(lfilename) + 1 + 1;
char path[len];

Expand Down
2 changes: 1 addition & 1 deletion Marlin/servo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ static void finISR(timer16_Sequence_t timer) {
#endif
}

static boolean isTimerActive(timer16_Sequence_t timer) {
static bool isTimerActive(timer16_Sequence_t timer) {
// returns true if any servo is active on this timer
for (uint8_t channel = 0; channel < SERVOS_PER_TIMER; channel++) {
if (SERVO(timer, channel).Pin.isActive)
Expand Down

0 comments on commit d3cb1a8

Please sign in to comment.