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:
Sonny Jeon
2014-01-05 10:27:34 -07:00
parent 1baff785f5
commit 3c3382ff75
7 changed files with 56 additions and 5 deletions

View File

@ -50,6 +50,12 @@ void settings_store_startup_line(uint8_t n, char *line)
memcpy_to_eeprom_with_checksum(addr,(char*)line, LINE_BUFFER_SIZE);
}
// Method to store build info into EEPROM
void settings_store_build_info(char *line)
{
memcpy_to_eeprom_with_checksum(EEPROM_ADDR_BUILD_INFO,(char*)line, LINE_BUFFER_SIZE);
}
// Method to store coord data parameters into EEPROM
void settings_write_coord_data(uint8_t coord_select, float *coord_data)
{
@ -120,6 +126,19 @@ uint8_t settings_read_startup_line(uint8_t n, char *line)
}
}
// Reads startup line from EEPROM. Updated pointed line string data.
uint8_t settings_read_build_info(char *line)
{
if (!(memcpy_from_eeprom_with_checksum((char*)line, EEPROM_ADDR_BUILD_INFO, LINE_BUFFER_SIZE))) {
// Reset line with default value
line[0] = 0;
settings_store_build_info(line);
return(false);
} else {
return(true);
}
}
// Read selected coordinate data from EEPROM. Updates pointed coord_data value.
uint8_t settings_read_coord_data(uint8_t coord_select, float *coord_data)
{