Browse Source

Smaller I2CPositionEncoder strings

Scott Lahteine 6 years ago
parent
commit
a0dadc8c62
1 changed files with 11 additions and 11 deletions
  1. 11
    11
      Marlin/src/feature/I2CPositionEncoder.cpp

+ 11
- 11
Marlin/src/feature/I2CPositionEncoder.cpp View File

155
     #ifdef I2CPE_ERR_THRESH_ABORT
155
     #ifdef I2CPE_ERR_THRESH_ABORT
156
       if (ABS(error) > I2CPE_ERR_THRESH_ABORT * planner.settings.axis_steps_per_mm[encoderAxis]) {
156
       if (ABS(error) > I2CPE_ERR_THRESH_ABORT * planner.settings.axis_steps_per_mm[encoderAxis]) {
157
         //kill(PSTR("Significant Error"));
157
         //kill(PSTR("Significant Error"));
158
-        SERIAL_ECHOLNPAIR("Axis error greater than set threshold, aborting!", error);
158
+        SERIAL_ECHOLNPAIR("Axis error over threshold, aborting!", error);
159
         safe_delay(5000);
159
         safe_delay(5000);
160
       }
160
       }
161
     #endif
161
     #endif
379
 
379
 
380
 void I2CPositionEncoder::calibrate_steps_mm(const uint8_t iter) {
380
 void I2CPositionEncoder::calibrate_steps_mm(const uint8_t iter) {
381
   if (type != I2CPE_ENC_TYPE_LINEAR) {
381
   if (type != I2CPE_ENC_TYPE_LINEAR) {
382
-    SERIAL_ECHOLNPGM("Steps per mm calibration is only available using linear encoders.");
382
+    SERIAL_ECHOLNPGM("Steps/mm calibration requires linear encoder.");
383
     return;
383
     return;
384
   }
384
   }
385
 
385
 
386
   if (!(encoderAxis == X_AXIS || encoderAxis == Y_AXIS || encoderAxis == Z_AXIS)) {
386
   if (!(encoderAxis == X_AXIS || encoderAxis == Y_AXIS || encoderAxis == Z_AXIS)) {
387
-    SERIAL_ECHOLNPGM("Automatic steps / mm calibration not supported for this axis.");
387
+    SERIAL_ECHOLNPGM("Steps/mm calibration not supported for this axis.");
388
     return;
388
     return;
389
   }
389
   }
390
 
390
 
436
 
436
 
437
     travelledDistance = mm_from_count(ABS(stopCount - startCount));
437
     travelledDistance = mm_from_count(ABS(stopCount - startCount));
438
 
438
 
439
-    SERIAL_ECHOPAIR("Attempted to travel: ", travelDistance);
440
-    SERIAL_ECHOLNPGM("mm.");
439
+    SERIAL_ECHOPAIR("Attempted travel: ", travelDistance);
440
+    SERIAL_ECHOLNPGM("mm");
441
 
441
 
442
-    SERIAL_ECHOPAIR("Actually travelled:  ", travelledDistance);
443
-    SERIAL_ECHOLNPGM("mm.");
442
+    SERIAL_ECHOPAIR("   Actual travel:  ", travelledDistance);
443
+    SERIAL_ECHOLNPGM("mm");
444
 
444
 
445
     //Calculate new axis steps per unit
445
     //Calculate new axis steps per unit
446
     old_steps_mm = planner.settings.axis_steps_per_mm[encoderAxis];
446
     old_steps_mm = planner.settings.axis_steps_per_mm[encoderAxis];
447
     new_steps_mm = (old_steps_mm * travelDistance) / travelledDistance;
447
     new_steps_mm = (old_steps_mm * travelDistance) / travelledDistance;
448
 
448
 
449
-    SERIAL_ECHOLNPAIR("Old steps per mm: ", old_steps_mm);
450
-    SERIAL_ECHOLNPAIR("New steps per mm: ", new_steps_mm);
449
+    SERIAL_ECHOLNPAIR("Old steps/mm: ", old_steps_mm);
450
+    SERIAL_ECHOLNPAIR("New steps/mm: ", new_steps_mm);
451
 
451
 
452
     //Save new value
452
     //Save new value
453
     planner.settings.axis_steps_per_mm[encoderAxis] = new_steps_mm;
453
     planner.settings.axis_steps_per_mm[encoderAxis] = new_steps_mm;
464
 
464
 
465
   if (iter > 1) {
465
   if (iter > 1) {
466
     total /= (float)iter;
466
     total /= (float)iter;
467
-    SERIAL_ECHOLNPAIR("Average steps per mm: ", total);
467
+    SERIAL_ECHOLNPAIR("Average steps/mm: ", total);
468
   }
468
   }
469
 
469
 
470
   ec = oldec;
470
   ec = oldec;
471
 
471
 
472
-  SERIAL_ECHOLNPGM("Calculated steps per mm has been set. Please save to EEPROM (M500) if you wish to keep these values.");
472
+  SERIAL_ECHOLNPGM("Calculated steps/mm set. Use M500 to save to EEPROM.");
473
 }
473
 }
474
 
474
 
475
 void I2CPositionEncoder::reset() {
475
 void I2CPositionEncoder::reset() {

Loading…
Cancel
Save