Revised core setting structures, changed from 8-bit to 16-bit CRC checksums for improved detection of corruption/version mismatches.

Added option to homing enable setting ($22) for per axis homing feedrates.

!! Backup and restore settings over an update is recommended since all settings will be reset to default. Any odometer data will also be lost.
This commit is contained in:
Terje Io
2024-12-09 19:24:20 +01:00
parent 795ced52f7
commit a41790dada
25 changed files with 1251 additions and 833 deletions

View File

@@ -411,19 +411,6 @@ struct tm *get_datetime (const char *s)
return (dt.tm_year | dt.tm_mon | dt.tm_mday | dt.tm_hour | dt.tm_min | dt.tm_sec) > 0 ? &dt : NULL;
}
// calculate checksum byte for data
uint8_t calc_checksum (uint8_t *data, uint32_t size) {
uint8_t checksum = 0;
while(size--) {
checksum = (checksum << 1) | (checksum >> 7);
checksum += *(data++);
}
return checksum;
}
// Remove spaces from and convert string to uppercase (in situ)
char *strcaps (char *s)
{
@@ -441,6 +428,18 @@ char *strcaps (char *s)
return s;
}
uint_fast8_t bit_count (uint32_t bits)
{
uint_fast8_t count = 0;
while(bits) {
bits &= (bits - 1);
count++;
}
return count;
}
void dummy_handler (void)
{
// NOOP