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:
19
settings.c
19
settings.c
@ -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)
|
||||
{
|
||||
|
Reference in New Issue
Block a user