deadsy / grbl_stm32f4

The grbl g-code interpreter ported to the STM32F4
61 stars 33 forks source link

Improper initialization operation #9

Open chunlin007 opened 1 year ago

chunlin007 commented 1 year ago

The implementation of eeprom_init is unreasonable in https://github.com/deadsy/grbl_stm32f4/blob/a70dfca1467828aa3ed2150312247c298f79b76a/grbl/files/eeprom.c#L21 Here, the purpose of this operation is to set all bit of eeprom_data as 0xff, rather than only sizeof(EEPROM_LEN) bytes. A reasonble operation is memset(eeprom_data, 0xff, EEPROM_LEN);

deadsy commented 1 year ago

Thanks. Fixed. btw- the code also inherited a buggy checksum calculation for the original grbl code. It doesn't matter here because it's a fake eeprom, but fyi.