diff --git a/plugins/Kaleidoscope-EEPROM-Settings/src/kaleidoscope/plugin/EEPROM-Settings.cpp b/plugins/Kaleidoscope-EEPROM-Settings/src/kaleidoscope/plugin/EEPROM-Settings.cpp index 1f4d86c8..22eed6c4 100644 --- a/plugins/Kaleidoscope-EEPROM-Settings/src/kaleidoscope/plugin/EEPROM-Settings.cpp +++ b/plugins/Kaleidoscope-EEPROM-Settings/src/kaleidoscope/plugin/EEPROM-Settings.cpp @@ -101,7 +101,7 @@ void EEPROMSettings::ignoreHardcodedLayers(bool value) { void EEPROMSettings::seal(void) { sealed_ = true; - CRC.finalize(); + CRCCalculator.finalize(); if (settings_.version != VERSION_CURRENT) { is_valid_ = false; @@ -109,9 +109,9 @@ void EEPROMSettings::seal(void) { } if (settings_.crc == 0xffff) { - settings_.crc = CRC.crc; + settings_.crc = CRCCalculator.crc; update(); - } else if (settings_.crc != CRC.crc) { + } else if (settings_.crc != CRCCalculator.crc) { return; } @@ -134,7 +134,7 @@ uint16_t EEPROMSettings::requestSlice(uint16_t size) { uint16_t start = next_start_; next_start_ += size; - CRC.update((const void *)&size, sizeof(size)); + CRCCalculator.update((const void *)&size, sizeof(size)); return start; } @@ -159,7 +159,7 @@ EventHandlerResult FocusSettingsCommand::onFocusEvent(const char *command) { DEFAULT_LAYER, IS_VALID, GET_VERSION, - CRC, + GET_CRC, } sub_command; if (::Focus.handleHelp(command, PSTR("settings.defaultLayer\nsettings.valid?\nsettings.version\nsettings.crc"))) @@ -175,7 +175,7 @@ EventHandlerResult FocusSettingsCommand::onFocusEvent(const char *command) { else if (strcmp_P(command + 9, PSTR("version")) == 0) sub_command = GET_VERSION; else if (strcmp_P(command + 9, PSTR("crc")) == 0) - sub_command = CRC; + sub_command = GET_CRC; else return EventHandlerResult::OK; @@ -196,8 +196,8 @@ EventHandlerResult FocusSettingsCommand::onFocusEvent(const char *command) { case GET_VERSION: ::Focus.send(::EEPROMSettings.version()); break; - case CRC: - ::Focus.sendRaw(::CRC.crc, F("/"), ::EEPROMSettings.crc()); + case GET_CRC: + ::Focus.sendRaw(::CRCCalculator.crc, F("/"), ::EEPROMSettings.crc()); break; } diff --git a/plugins/Kaleidoscope-EEPROM-Settings/src/kaleidoscope/plugin/EEPROM-Settings/crc.cpp b/plugins/Kaleidoscope-EEPROM-Settings/src/kaleidoscope/plugin/EEPROM-Settings/crc.cpp index 0c199695..6201ed09 100644 --- a/plugins/Kaleidoscope-EEPROM-Settings/src/kaleidoscope/plugin/EEPROM-Settings/crc.cpp +++ b/plugins/Kaleidoscope-EEPROM-Settings/src/kaleidoscope/plugin/EEPROM-Settings/crc.cpp @@ -66,4 +66,4 @@ CRC_::update(const void *data, uint8_t len) { crc &= 0xffff; } -CRC_ CRC; +CRC_ CRCCalculator; diff --git a/plugins/Kaleidoscope-EEPROM-Settings/src/kaleidoscope/plugin/EEPROM-Settings/crc.h b/plugins/Kaleidoscope-EEPROM-Settings/src/kaleidoscope/plugin/EEPROM-Settings/crc.h index 0eb1aec4..00371ed0 100644 --- a/plugins/Kaleidoscope-EEPROM-Settings/src/kaleidoscope/plugin/EEPROM-Settings/crc.h +++ b/plugins/Kaleidoscope-EEPROM-Settings/src/kaleidoscope/plugin/EEPROM-Settings/crc.h @@ -43,4 +43,4 @@ class CRC_ { void reflect(uint8_t len); }; -extern CRC_ CRC; +extern CRC_ CRCCalculator;