Touch UI fixes for Cocoa Press (#15847)

This commit is contained in:
Marcio Teixeira
2019-11-10 17:49:41 -07:00
committed by Scott Lahteine
parent 28e1614c2e
commit 5639b8ca20
84 changed files with 1036 additions and 994 deletions

View File

@ -446,6 +446,13 @@ void MarlinSettings::postprocess() {
#endif // SD_FIRMWARE_UPDATE
#ifdef ARCHIM2_SPI_FLASH_EEPROM_BACKUP_SIZE
static_assert(
EEPROM_OFFSET + sizeof(SettingsData) < ARCHIM2_SPI_FLASH_EEPROM_BACKUP_SIZE,
"ARCHIM2_SPI_FLASH_EEPROM_BACKUP_SIZE is insufficient to capture all EEPROM data."
);
#endif
#define DEBUG_OUT ENABLED(EEPROM_CHITCHAT)
#include "../core/debug_out.h"
@ -2076,9 +2083,21 @@ void MarlinSettings::postprocess() {
return !eeprom_error;
}
#ifdef ARCHIM2_SPI_FLASH_EEPROM_BACKUP_SIZE
extern bool restoreEEPROM();
#endif
bool MarlinSettings::validate() {
validating = true;
#ifdef ARCHIM2_SPI_FLASH_EEPROM_BACKUP_SIZE
bool success = _load();
if(!success && restoreEEPROM()) {
SERIAL_ECHOLNPGM("Recovered backup EEPROM settings from SPI Flash");
success = _load();
}
#else
const bool success = _load();
#endif
validating = false;
return success;
}

View File

@ -478,6 +478,7 @@ class Temperature {
#endif
static inline uint8_t scaledFanSpeed(const uint8_t target, const uint8_t fs) {
UNUSED(target); // Potentially unused!
return (fs * uint16_t(
#if ENABLED(ADAPTIVE_FAN_SLOWING)
fan_speed_scaler[target]