From bae1e422f615d585081078e88103af6742ded8c4 Mon Sep 17 00:00:00 2001
From: Keegi <keegi@spamcop.net>
Date: Thu, 8 Dec 2011 12:25:32 +0200
Subject: [PATCH] Fix M201 not saving settings in all places, so the changes
 did not get written into EEPROM

---
 Marlin/Marlin.pde | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/Marlin/Marlin.pde b/Marlin/Marlin.pde
index ac42c15846..9deac79669 100644
--- a/Marlin/Marlin.pde
+++ b/Marlin/Marlin.pde
@@ -984,7 +984,11 @@ FORCE_INLINE void process_commands()
     case 201: // M201
       for(int8_t i=0; i < NUM_AXIS; i++) 
       {
-        if(code_seen(axis_codes[i])) axis_steps_per_sqr_second[i] = code_value() * axis_steps_per_unit[i];
+        if(code_seen(axis_codes[i]))
+        {
+          max_acceleration_units_per_sq_second[i] = code_value();
+          axis_steps_per_sqr_second[i] = code_value() * axis_steps_per_unit[i];
+        }
       }
       break;
     #if 0 // Not used for Sprinter/grbl gen6
-- 
GitLab