New build info feature. (per @Analogreality request)
- New build info feature. Hidden command ‘$I’ will print the build info for your Grbl firmware. Users may also write an identifying message within it via ‘$I=‘ with up to 32 characters. (no more, or else it will break). - Adjusted the max number of startup lines to 3. Majority of people will only need one. - Fixed a compile error with spindle_control.c. A rogue #endif was causing problems.
This commit is contained in:
16
protocol.c
16
protocol.c
@ -254,6 +254,22 @@ uint8_t protocol_execute_line(char *line)
|
||||
if (!sys.abort) { protocol_execute_startup(); } // Execute startup scripts after successful homing.
|
||||
} else { return(STATUS_SETTING_DISABLED); }
|
||||
break;
|
||||
case 'I' : // Print or store build info.
|
||||
if ( line[++char_counter] == 0 ) {
|
||||
if (!(settings_read_build_info(line))) {
|
||||
report_status_message(STATUS_SETTING_READ_FAIL);
|
||||
} else {
|
||||
report_build_info(line);
|
||||
}
|
||||
} else { // Store startup line
|
||||
if(line[char_counter++] != '=') { return(STATUS_UNSUPPORTED_STATEMENT); }
|
||||
helper_var = char_counter; // Set helper variable as counter to start of user info line.
|
||||
do {
|
||||
line[char_counter-helper_var] = line[char_counter];
|
||||
} while (line[char_counter++] != 0);
|
||||
settings_store_build_info(line);
|
||||
}
|
||||
break;
|
||||
case 'N' : // Startup lines.
|
||||
if ( line[++char_counter] == 0 ) { // Print startup lines
|
||||
for (helper_var=0; helper_var < N_STARTUP_LINE; helper_var++) {
|
||||
|
Reference in New Issue
Block a user