0
0
Fork 0
mirror of https://github.com/MarlinFirmware/Marlin.git synced 2025-06-29 10:20:55 +00:00

Fix and improve EEPROM storage ()

* Clean up Temperature PID
* Improve EEPROM read/write/validate
* Group `SINGLENOZZLE` saved settings
* Group planner saved settings
* Group filament change saved settings
* Group skew saved settings
* Group `FWRETRACT` saved settings
This commit is contained in:
Scott Lahteine 2018-10-10 09:45:20 -05:00 committed by GitHub
parent 9b5c1a5e77
commit d556dc1865
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
35 changed files with 1151 additions and 1246 deletions
Marlin/src/module

View file

@ -2413,7 +2413,7 @@ void Stepper::report_positions() {
#if HAS_MOTOR_CURRENT_PWM
void Stepper::refresh_motor_power() {
for (uint8_t i = 0; i < COUNT(motor_current_setting); ++i) {
LOOP_L_N(i, COUNT(motor_current_setting)) {
switch (i) {
#if PIN_EXISTS(MOTOR_CURRENT_PWM_XY)
case 0:
@ -2443,7 +2443,7 @@ void Stepper::report_positions() {
#elif HAS_MOTOR_CURRENT_PWM
if (WITHIN(driver, 0, 2))
if (WITHIN(driver, 0, COUNT(motor_current_setting) - 1))
motor_current_setting[driver] = current; // update motor_current_setting
#define _WRITE_CURRENT_PWM(P) analogWrite(MOTOR_CURRENT_PWM_## P ##_PIN, 255L * current / (MOTOR_CURRENT_PWM_RANGE))