Browse Source

Clean up serial out code

Scott Lahteine 8 years ago
parent
commit
788a16fc46
2 changed files with 78 additions and 118 deletions
  1. 75
    115
      Marlin/Marlin_main.cpp
  2. 3
    3
      Marlin/language.h

+ 75
- 115
Marlin/Marlin_main.cpp View File

764
 bool enqueue_and_echo_command(const char* cmd, bool say_ok/*=false*/) {
764
 bool enqueue_and_echo_command(const char* cmd, bool say_ok/*=false*/) {
765
   if (_enqueuecommand(cmd, say_ok)) {
765
   if (_enqueuecommand(cmd, say_ok)) {
766
     SERIAL_ECHO_START;
766
     SERIAL_ECHO_START;
767
-    SERIAL_ECHOPGM(MSG_Enqueueing);
768
-    SERIAL_ECHO(cmd);
767
+    SERIAL_ECHOPAIR(MSG_Enqueueing, cmd);
769
     SERIAL_ECHOLNPGM("\"");
768
     SERIAL_ECHOLNPGM("\"");
770
     return true;
769
     return true;
771
   }
770
   }
1354
       float homeposition[XYZ];
1353
       float homeposition[XYZ];
1355
       LOOP_XYZ(i) homeposition[i] = LOGICAL_POSITION(base_home_pos(i), i);
1354
       LOOP_XYZ(i) homeposition[i] = LOGICAL_POSITION(base_home_pos(i), i);
1356
 
1355
 
1357
-      // SERIAL_ECHOPGM("homeposition[x]= "); SERIAL_ECHO(homeposition[0]);
1358
-      // SERIAL_ECHOPGM("homeposition[y]= "); SERIAL_ECHOLN(homeposition[1]);
1356
+      // SERIAL_ECHOPAIR("homeposition X:", homeposition[X_AXIS]);
1357
+      // SERIAL_ECHOLNPAIR(" Y:", homeposition[Y_AXIS]);
1359
 
1358
 
1360
       /**
1359
       /**
1361
        * Works out real Homeposition angles using inverse kinematics,
1360
        * Works out real Homeposition angles using inverse kinematics,
1364
       inverse_kinematics(homeposition);
1363
       inverse_kinematics(homeposition);
1365
       forward_kinematics_SCARA(delta[A_AXIS], delta[B_AXIS]);
1364
       forward_kinematics_SCARA(delta[A_AXIS], delta[B_AXIS]);
1366
 
1365
 
1367
-      // SERIAL_ECHOPAIR("Delta X=", cartes[X_AXIS]);
1368
-      // SERIAL_ECHOPGM(" Delta Y="); SERIAL_ECHOLN(cartes[Y_AXIS]);
1366
+      // SERIAL_ECHOPAIR("Cartesian X:", cartes[X_AXIS]);
1367
+      // SERIAL_ECHOLNPAIR(" Y:", cartes[Y_AXIS]);
1369
 
1368
 
1370
       current_position[axis] = LOGICAL_POSITION(cartes[axis], axis);
1369
       current_position[axis] = LOGICAL_POSITION(cartes[axis], axis);
1371
 
1370
 
2019
     feedrate_mm_s = XY_PROBE_FEEDRATE_MM_S;
2018
     feedrate_mm_s = XY_PROBE_FEEDRATE_MM_S;
2020
     do_blocking_move_to_xy(x - (X_PROBE_OFFSET_FROM_EXTRUDER), y - (Y_PROBE_OFFSET_FROM_EXTRUDER));
2019
     do_blocking_move_to_xy(x - (X_PROBE_OFFSET_FROM_EXTRUDER), y - (Y_PROBE_OFFSET_FROM_EXTRUDER));
2021
 
2020
 
2022
-    #if ENABLED(DEBUG_LEVELING_FEATURE)
2023
-      if (DEBUGGING(LEVELING)) SERIAL_ECHOPGM("> ");
2024
-    #endif
2025
     if (DEPLOY_PROBE()) return NAN;
2021
     if (DEPLOY_PROBE()) return NAN;
2026
 
2022
 
2027
     float measured_z = run_z_probe();
2023
     float measured_z = run_z_probe();
2028
 
2024
 
2029
     if (stow) {
2025
     if (stow) {
2030
-      #if ENABLED(DEBUG_LEVELING_FEATURE)
2031
-        if (DEBUGGING(LEVELING)) SERIAL_ECHOPGM("> ");
2032
-      #endif
2033
       if (STOW_PROBE()) return NAN;
2026
       if (STOW_PROBE()) return NAN;
2034
     }
2027
     }
2035
     else {
2028
     else {
2203
 
2196
 
2204
   // Homing Z towards the bed? Deploy the Z probe or endstop.
2197
   // Homing Z towards the bed? Deploy the Z probe or endstop.
2205
   #if HOMING_Z_WITH_PROBE
2198
   #if HOMING_Z_WITH_PROBE
2206
-    if (axis == Z_AXIS) {
2207
-      #if ENABLED(DEBUG_LEVELING_FEATURE)
2208
-        if (DEBUGGING(LEVELING)) SERIAL_ECHOPGM("> ");
2209
-      #endif
2210
-      if (DEPLOY_PROBE()) return;
2211
-    }
2199
+    if (axis == Z_AXIS && DEPLOY_PROBE()) return;
2212
   #endif
2200
   #endif
2213
 
2201
 
2214
   // Set a flag for Z motor locking
2202
   // Set a flag for Z motor locking
2286
 
2274
 
2287
   // Put away the Z probe
2275
   // Put away the Z probe
2288
   #if HOMING_Z_WITH_PROBE
2276
   #if HOMING_Z_WITH_PROBE
2289
-    if (axis == Z_AXIS) {
2290
-      #if ENABLED(DEBUG_LEVELING_FEATURE)
2291
-        if (DEBUGGING(LEVELING)) SERIAL_ECHOPGM("> ");
2292
-      #endif
2293
-      if (STOW_PROBE()) return;
2294
-    }
2277
+    if (axis == Z_AXIS && STOW_PROBE()) return;
2295
   #endif
2278
   #endif
2296
 
2279
 
2297
   #if ENABLED(DEBUG_LEVELING_FEATURE)
2280
   #if ENABLED(DEBUG_LEVELING_FEATURE)
2416
 
2399
 
2417
 void unknown_command_error() {
2400
 void unknown_command_error() {
2418
   SERIAL_ECHO_START;
2401
   SERIAL_ECHO_START;
2419
-  SERIAL_ECHOPGM(MSG_UNKNOWN_COMMAND);
2420
-  SERIAL_ECHO(current_command);
2402
+  SERIAL_ECHOPAIR(MSG_UNKNOWN_COMMAND, current_command);
2421
   SERIAL_ECHOLNPGM("\"");
2403
   SERIAL_ECHOLNPGM("\"");
2422
 }
2404
 }
2423
 
2405
 
3713
 
3695
 
3714
     #ifdef Z_PROBE_END_SCRIPT
3696
     #ifdef Z_PROBE_END_SCRIPT
3715
       #if ENABLED(DEBUG_LEVELING_FEATURE)
3697
       #if ENABLED(DEBUG_LEVELING_FEATURE)
3716
-        if (DEBUGGING(LEVELING)) {
3717
-          SERIAL_ECHOPGM("Z Probe End Script: ");
3718
-          SERIAL_ECHOLNPGM(Z_PROBE_END_SCRIPT);
3719
-        }
3698
+        if (DEBUGGING(LEVELING)) SERIAL_ECHOLNPAIR("Z Probe End Script: ", Z_PROBE_END_SCRIPT);
3720
       #endif
3699
       #endif
3721
       enqueue_and_echo_commands_P(PSTR(Z_PROBE_END_SCRIPT));
3700
       enqueue_and_echo_commands_P(PSTR(Z_PROBE_END_SCRIPT));
3722
       stepper.synchronize();
3701
       stepper.synchronize();
4002
   lcd_setstatus(buffer);
3981
   lcd_setstatus(buffer);
4003
 
3982
 
4004
   SERIAL_ECHO_START;
3983
   SERIAL_ECHO_START;
4005
-  SERIAL_ECHOPGM("Print time: ");
4006
-  SERIAL_ECHOLN(buffer);
3984
+  SERIAL_ECHOLNPAIR("Print time: ", buffer);
4007
 
3985
 
4008
   thermalManager.autotempShutdown();
3986
   thermalManager.autotempShutdown();
4009
 }
3987
 }
5358
         endstop_adj[i] = code_value_axis_units(i);
5336
         endstop_adj[i] = code_value_axis_units(i);
5359
         #if ENABLED(DEBUG_LEVELING_FEATURE)
5337
         #if ENABLED(DEBUG_LEVELING_FEATURE)
5360
           if (DEBUGGING(LEVELING)) {
5338
           if (DEBUGGING(LEVELING)) {
5361
-            SERIAL_ECHOPGM("endstop_adj[");
5362
-            SERIAL_ECHO(axis_codes[i]);
5339
+            SERIAL_ECHOPAIR("endstop_adj[", axis_codes[i]);
5363
             SERIAL_ECHOLNPAIR("] = ", endstop_adj[i]);
5340
             SERIAL_ECHOLNPAIR("] = ", endstop_adj[i]);
5364
           }
5341
           }
5365
         #endif
5342
         #endif
5442
     if (code_seen('S')) soft_endstops_enabled = code_value_bool();
5419
     if (code_seen('S')) soft_endstops_enabled = code_value_bool();
5443
   #endif
5420
   #endif
5444
   #if ENABLED(min_software_endstops) || ENABLED(max_software_endstops)
5421
   #if ENABLED(min_software_endstops) || ENABLED(max_software_endstops)
5445
-    SERIAL_ECHOPGM(MSG_SOFT_ENDSTOPS ": ");
5422
+    SERIAL_ECHOPGM(MSG_SOFT_ENDSTOPS);
5446
     serialprintPGM(soft_endstops_enabled ? PSTR(MSG_ON) : PSTR(MSG_OFF));
5423
     serialprintPGM(soft_endstops_enabled ? PSTR(MSG_ON) : PSTR(MSG_OFF));
5447
   #else
5424
   #else
5448
-    SERIAL_ECHOPGM(MSG_SOFT_ENDSTOPS ": " MSG_OFF);
5425
+    SERIAL_ECHOPGM(MSG_SOFT_ENDSTOPS);
5426
+    SERIAL_ECHOPGM(MSG_OFF);
5449
   #endif
5427
   #endif
5450
-  SERIAL_ECHOPGM("  " MSG_SOFT_MIN ": ");
5428
+  SERIAL_ECHOPGM(MSG_SOFT_MIN);
5451
   SERIAL_ECHOPAIR(    MSG_X, soft_endstop_min[X_AXIS]);
5429
   SERIAL_ECHOPAIR(    MSG_X, soft_endstop_min[X_AXIS]);
5452
   SERIAL_ECHOPAIR(" " MSG_Y, soft_endstop_min[Y_AXIS]);
5430
   SERIAL_ECHOPAIR(" " MSG_Y, soft_endstop_min[Y_AXIS]);
5453
   SERIAL_ECHOPAIR(" " MSG_Z, soft_endstop_min[Z_AXIS]);
5431
   SERIAL_ECHOPAIR(" " MSG_Z, soft_endstop_min[Z_AXIS]);
5454
-  SERIAL_ECHOPGM("  " MSG_SOFT_MAX ": ");
5432
+  SERIAL_ECHOPGM(MSG_SOFT_MAX);
5455
   SERIAL_ECHOPAIR(    MSG_X, soft_endstop_max[X_AXIS]);
5433
   SERIAL_ECHOPAIR(    MSG_X, soft_endstop_max[X_AXIS]);
5456
   SERIAL_ECHOPAIR(" " MSG_Y, soft_endstop_max[Y_AXIS]);
5434
   SERIAL_ECHOPAIR(" " MSG_Y, soft_endstop_max[Y_AXIS]);
5457
   SERIAL_ECHOLNPAIR(" " MSG_Z, soft_endstop_max[Z_AXIS]);
5435
   SERIAL_ECHOLNPAIR(" " MSG_Z, soft_endstop_max[Z_AXIS]);
5569
         MOVE_SERVO(servo_index, code_value_int());
5547
         MOVE_SERVO(servo_index, code_value_int());
5570
       else {
5548
       else {
5571
         SERIAL_ECHO_START;
5549
         SERIAL_ECHO_START;
5572
-        SERIAL_ECHOPGM(" Servo ");
5573
-        SERIAL_ECHO(servo_index);
5574
-        SERIAL_ECHOPGM(": ");
5575
-        SERIAL_ECHOLN(servo[servo_index].read());
5550
+        SERIAL_ECHOPAIR(" Servo ", servo_index);
5551
+        SERIAL_ECHOLNPAIR(": ", servo[servo_index].read());
5576
       }
5552
       }
5577
     }
5553
     }
5578
     else {
5554
     else {
5579
       SERIAL_ERROR_START;
5555
       SERIAL_ERROR_START;
5580
-      SERIAL_ERROR("Servo ");
5581
-      SERIAL_ERROR(servo_index);
5582
-      SERIAL_ERRORLN(" out of range");
5556
+      SERIAL_ECHOPAIR("Servo ", servo_index);
5557
+      SERIAL_ECHOLNPGM(" out of range");
5583
     }
5558
     }
5584
   }
5559
   }
5585
 
5560
 
5635
       thermalManager.updatePID();
5610
       thermalManager.updatePID();
5636
       SERIAL_ECHO_START;
5611
       SERIAL_ECHO_START;
5637
       #if ENABLED(PID_PARAMS_PER_HOTEND)
5612
       #if ENABLED(PID_PARAMS_PER_HOTEND)
5638
-        SERIAL_ECHOPGM(" e:"); // specify extruder in serial output
5639
-        SERIAL_ECHO(e);
5613
+        SERIAL_ECHOPAIR(" e:", e); // specify extruder in serial output
5640
       #endif // PID_PARAMS_PER_HOTEND
5614
       #endif // PID_PARAMS_PER_HOTEND
5641
-      SERIAL_ECHOPGM(" p:");
5642
-      SERIAL_ECHO(PID_PARAM(Kp, e));
5643
-      SERIAL_ECHOPGM(" i:");
5644
-      SERIAL_ECHO(unscalePID_i(PID_PARAM(Ki, e)));
5645
-      SERIAL_ECHOPGM(" d:");
5646
-      SERIAL_ECHO(unscalePID_d(PID_PARAM(Kd, e)));
5615
+      SERIAL_ECHOPAIR(" p:", PID_PARAM(Kp, e));
5616
+      SERIAL_ECHOPAIR(" i:", unscalePID_i(PID_PARAM(Ki, e)));
5617
+      SERIAL_ECHOPAIR(" d:", unscalePID_d(PID_PARAM(Kd, e)));
5647
       #if ENABLED(PID_EXTRUSION_SCALING)
5618
       #if ENABLED(PID_EXTRUSION_SCALING)
5648
-        SERIAL_ECHOPGM(" c:");
5649
         //Kc does not have scaling applied above, or in resetting defaults
5619
         //Kc does not have scaling applied above, or in resetting defaults
5650
-        SERIAL_ECHO(PID_PARAM(Kc, e));
5620
+        SERIAL_ECHOPAIR(" c:", PID_PARAM(Kc, e));
5651
       #endif
5621
       #endif
5652
       SERIAL_EOL;
5622
       SERIAL_EOL;
5653
     }
5623
     }
5669
     thermalManager.updatePID();
5639
     thermalManager.updatePID();
5670
 
5640
 
5671
     SERIAL_ECHO_START;
5641
     SERIAL_ECHO_START;
5672
-    SERIAL_ECHOPGM(" p:");
5673
-    SERIAL_ECHO(thermalManager.bedKp);
5674
-    SERIAL_ECHOPGM(" i:");
5675
-    SERIAL_ECHO(unscalePID_i(thermalManager.bedKi));
5676
-    SERIAL_ECHOPGM(" d:");
5677
-    SERIAL_ECHOLN(unscalePID_d(thermalManager.bedKd));
5642
+    SERIAL_ECHOPAIR(" p:", thermalManager.bedKp);
5643
+    SERIAL_ECHOPAIR(" i:", unscalePID_i(thermalManager.bedKi));
5644
+    SERIAL_ECHOLNPAIR(" d:", unscalePID_d(thermalManager.bedKd));
5678
   }
5645
   }
5679
 
5646
 
5680
 #endif // PIDTEMPBED
5647
 #endif // PIDTEMPBED
6138
         SERIAL_ECHO(zprobe_zoffset);
6105
         SERIAL_ECHO(zprobe_zoffset);
6139
       }
6106
       }
6140
       else {
6107
       else {
6141
-        SERIAL_ECHOPGM(MSG_Z_MIN);
6142
-        SERIAL_ECHO(Z_PROBE_OFFSET_RANGE_MIN);
6108
+        SERIAL_ECHOPAIR(MSG_Z_MIN, Z_PROBE_OFFSET_RANGE_MIN);
6143
         SERIAL_CHAR(' ');
6109
         SERIAL_CHAR(' ');
6144
-        SERIAL_ECHOPGM(MSG_Z_MAX);
6145
-        SERIAL_ECHO(Z_PROBE_OFFSET_RANGE_MAX);
6110
+        SERIAL_ECHOPAIR(MSG_Z_MAX, Z_PROBE_OFFSET_RANGE_MAX);
6146
       }
6111
       }
6147
     }
6112
     }
6148
     else {
6113
     else {
6863
     #endif // HOTENDS <= 1
6828
     #endif // HOTENDS <= 1
6864
 
6829
 
6865
     SERIAL_ECHO_START;
6830
     SERIAL_ECHO_START;
6866
-    SERIAL_ECHOPGM(MSG_ACTIVE_EXTRUDER);
6867
-    SERIAL_PROTOCOLLN((int)active_extruder);
6831
+    SERIAL_ECHOLNPAIR(MSG_ACTIVE_EXTRUDER, (int)active_extruder);
6868
 
6832
 
6869
   #endif //!MIXING_EXTRUDER || MIXING_VIRTUAL_TOOLS <= 1
6833
   #endif //!MIXING_EXTRUDER || MIXING_VIRTUAL_TOOLS <= 1
6870
 }
6834
 }
7685
                           - sq(delta_tower3_y - cartesian[Y_AXIS])
7649
                           - sq(delta_tower3_y - cartesian[Y_AXIS])
7686
                          ) + cartesian[Z_AXIS];
7650
                          ) + cartesian[Z_AXIS];
7687
     /**
7651
     /**
7688
-    SERIAL_ECHOPGM("cartesian x="); SERIAL_ECHO(cartesian[X_AXIS]);
7689
-    SERIAL_ECHOPGM(" y="); SERIAL_ECHO(cartesian[Y_AXIS]);
7690
-    SERIAL_ECHOPGM(" z="); SERIAL_ECHOLN(cartesian[Z_AXIS]);
7652
+    SERIAL_ECHOPAIR("cartesian x=", cartesian[X_AXIS]);
7653
+    SERIAL_ECHOPAIR(" y=", cartesian[Y_AXIS]);
7654
+    SERIAL_ECHOLNPAIR(" z=", cartesian[Z_AXIS]);
7691
 
7655
 
7692
-    SERIAL_ECHOPGM("delta a="); SERIAL_ECHO(delta[A_AXIS]);
7693
-    SERIAL_ECHOPGM(" b="); SERIAL_ECHO(delta[B_AXIS]);
7694
-    SERIAL_ECHOPGM(" c="); SERIAL_ECHOLN(delta[C_AXIS]);
7656
+    SERIAL_ECHOPAIR("delta a=", delta[A_AXIS]);
7657
+    SERIAL_ECHOPAIR(" b=", delta[B_AXIS]);
7658
+    SERIAL_ECHOLNPAIR(" c=", delta[C_AXIS]);
7695
     */
7659
     */
7696
   }
7660
   }
7697
 
7661
 
7806
       delta[Z_AXIS] += offset;
7770
       delta[Z_AXIS] += offset;
7807
 
7771
 
7808
       /**
7772
       /**
7809
-      SERIAL_ECHOPGM("grid_x="); SERIAL_ECHO(grid_x);
7810
-      SERIAL_ECHOPGM(" grid_y="); SERIAL_ECHO(grid_y);
7811
-      SERIAL_ECHOPGM(" floor_x="); SERIAL_ECHO(floor_x);
7812
-      SERIAL_ECHOPGM(" floor_y="); SERIAL_ECHO(floor_y);
7813
-      SERIAL_ECHOPGM(" ratio_x="); SERIAL_ECHO(ratio_x);
7814
-      SERIAL_ECHOPGM(" ratio_y="); SERIAL_ECHO(ratio_y);
7815
-      SERIAL_ECHOPGM(" z1="); SERIAL_ECHO(z1);
7816
-      SERIAL_ECHOPGM(" z2="); SERIAL_ECHO(z2);
7817
-      SERIAL_ECHOPGM(" z3="); SERIAL_ECHO(z3);
7818
-      SERIAL_ECHOPGM(" z4="); SERIAL_ECHO(z4);
7819
-      SERIAL_ECHOPGM(" left="); SERIAL_ECHO(left);
7820
-      SERIAL_ECHOPGM(" right="); SERIAL_ECHO(right);
7821
-      SERIAL_ECHOPGM(" offset="); SERIAL_ECHOLN(offset);
7773
+      SERIAL_ECHOPAIR("grid_x=", grid_x);
7774
+      SERIAL_ECHOPAIR(" grid_y=", grid_y);
7775
+      SERIAL_ECHOPAIR(" floor_x=", floor_x);
7776
+      SERIAL_ECHOPAIR(" floor_y=", floor_y);
7777
+      SERIAL_ECHOPAIR(" ratio_x=", ratio_x);
7778
+      SERIAL_ECHOPAIR(" ratio_y=", ratio_y);
7779
+      SERIAL_ECHOPAIR(" z1=", z1);
7780
+      SERIAL_ECHOPAIR(" z2=", z2);
7781
+      SERIAL_ECHOPAIR(" z3=", z3);
7782
+      SERIAL_ECHOPAIR(" z4=", z4);
7783
+      SERIAL_ECHOPAIR(" left=", left);
7784
+      SERIAL_ECHOPAIR(" right=", right);
7785
+      SERIAL_ECHOLNPAIR(" offset=", offset);
7822
       */
7786
       */
7823
     }
7787
     }
7824
   #endif // AUTO_BED_LEVELING_NONLINEAR
7788
   #endif // AUTO_BED_LEVELING_NONLINEAR
7910
     int steps = max(1, int(delta_segments_per_second * seconds));
7874
     int steps = max(1, int(delta_segments_per_second * seconds));
7911
     float inv_steps = 1.0/steps;
7875
     float inv_steps = 1.0/steps;
7912
 
7876
 
7913
-    // SERIAL_ECHOPGM("mm="); SERIAL_ECHO(cartesian_mm);
7914
-    // SERIAL_ECHOPGM(" seconds="); SERIAL_ECHO(seconds);
7915
-    // SERIAL_ECHOPGM(" steps="); SERIAL_ECHOLN(steps);
7877
+    // SERIAL_ECHOPAIR("mm=", cartesian_mm);
7878
+    // SERIAL_ECHOPAIR(" seconds=", seconds);
7879
+    // SERIAL_ECHOLNPAIR(" steps=", steps);
7916
 
7880
 
7917
     for (int s = 1; s <= steps; s++) {
7881
     for (int s = 1; s <= steps; s++) {
7918
 
7882
 
8263
 
8227
 
8264
     float a_sin, a_cos, b_sin, b_cos;
8228
     float a_sin, a_cos, b_sin, b_cos;
8265
 
8229
 
8266
-    //SERIAL_ECHOPGM("f_delta x="); SERIAL_ECHO(a);
8267
-    //SERIAL_ECHOPGM(" y="); SERIAL_ECHO(b);
8268
-
8269
     a_sin = sin(RADIANS(a)) * L1;
8230
     a_sin = sin(RADIANS(a)) * L1;
8270
     a_cos = cos(RADIANS(a)) * L1;
8231
     a_cos = cos(RADIANS(a)) * L1;
8271
     b_sin = sin(RADIANS(b)) * L2;
8232
     b_sin = sin(RADIANS(b)) * L2;
8272
     b_cos = cos(RADIANS(b)) * L2;
8233
     b_cos = cos(RADIANS(b)) * L2;
8273
 
8234
 
8274
-    //SERIAL_ECHOPGM(" a_sin="); SERIAL_ECHO(a_sin);
8275
-    //SERIAL_ECHOPGM(" a_cos="); SERIAL_ECHO(a_cos);
8276
-    //SERIAL_ECHOPGM(" b_sin="); SERIAL_ECHO(b_sin);
8277
-    //SERIAL_ECHOPGM(" b_cos="); SERIAL_ECHOLN(b_cos);
8278
-
8279
     cartes[X_AXIS] = a_cos + b_cos + SCARA_OFFSET_X;  //theta
8235
     cartes[X_AXIS] = a_cos + b_cos + SCARA_OFFSET_X;  //theta
8280
     cartes[Y_AXIS] = a_sin + b_sin + SCARA_OFFSET_Y;  //theta+phi
8236
     cartes[Y_AXIS] = a_sin + b_sin + SCARA_OFFSET_Y;  //theta+phi
8281
 
8237
 
8282
-    //SERIAL_ECHOPGM(" cartes[X_AXIS]="); SERIAL_ECHO(cartes[X_AXIS]);
8283
-    //SERIAL_ECHOPGM(" cartes[Y_AXIS]="); SERIAL_ECHOLN(cartes[Y_AXIS]);
8238
+    /*
8239
+      SERIAL_ECHOPAIR("f_delta x=", a);
8240
+      SERIAL_ECHOPAIR(" y=", b);
8241
+      SERIAL_ECHOPAIR(" a_sin=", a_sin);
8242
+      SERIAL_ECHOPAIR(" a_cos=", a_cos);
8243
+      SERIAL_ECHOPAIR(" b_sin=", b_sin);
8244
+      SERIAL_ECHOLNPAIR(" b_cos=", b_cos);
8245
+      SERIAL_ECHOPAIR(" cartes[X_AXIS]=", cartes[X_AXIS]);
8246
+      SERIAL_ECHOLNPAIR(" cartes[Y_AXIS]=", cartes[Y_AXIS]);
8247
+    //*/
8284
   }
8248
   }
8285
 
8249
 
8286
   void inverse_kinematics(const float cartesian[XYZ]) {
8250
   void inverse_kinematics(const float cartesian[XYZ]) {
8771
   MCUSR = 0;
8735
   MCUSR = 0;
8772
 
8736
 
8773
   SERIAL_ECHOPGM(MSG_MARLIN);
8737
   SERIAL_ECHOPGM(MSG_MARLIN);
8774
-  SERIAL_ECHOLNPGM(" " SHORT_BUILD_VERSION);
8738
+  SERIAL_CHAR(' ');
8739
+  SERIAL_ECHOLNPGM(SHORT_BUILD_VERSION);
8740
+  SERIAL_EOL;
8775
 
8741
 
8776
-  #ifdef STRING_DISTRIBUTION_DATE
8777
-    #ifdef STRING_CONFIG_H_AUTHOR
8778
-      SERIAL_ECHO_START;
8779
-      SERIAL_ECHOPGM(MSG_CONFIGURATION_VER);
8780
-      SERIAL_ECHOPGM(STRING_DISTRIBUTION_DATE);
8781
-      SERIAL_ECHOPGM(MSG_AUTHOR);
8782
-      SERIAL_ECHOLNPGM(STRING_CONFIG_H_AUTHOR);
8783
-      SERIAL_ECHOPGM("Compiled: ");
8784
-      SERIAL_ECHOLNPGM(__DATE__);
8785
-    #endif // STRING_CONFIG_H_AUTHOR
8786
-  #endif // STRING_DISTRIBUTION_DATE
8742
+  #if defined(STRING_DISTRIBUTION_DATE) && defined(STRING_CONFIG_H_AUTHOR)
8743
+    SERIAL_ECHO_START;
8744
+    SERIAL_ECHOPGM(MSG_CONFIGURATION_VER);
8745
+    SERIAL_ECHOPGM(STRING_DISTRIBUTION_DATE);
8746
+    SERIAL_ECHOLNPGM(MSG_AUTHOR STRING_CONFIG_H_AUTHOR);
8747
+    SERIAL_ECHOLNPGM("Compiled: " __DATE__);
8748
+  #endif
8787
 
8749
 
8788
   SERIAL_ECHO_START;
8750
   SERIAL_ECHO_START;
8789
-  SERIAL_ECHOPGM(MSG_FREE_MEMORY);
8790
-  SERIAL_ECHO(freeMemory());
8791
-  SERIAL_ECHOPGM(MSG_PLANNER_BUFFER_BYTES);
8792
-  SERIAL_ECHOLN((int)sizeof(block_t)*BLOCK_BUFFER_SIZE);
8751
+  SERIAL_ECHOPAIR(MSG_FREE_MEMORY, freeMemory());
8752
+  SERIAL_ECHOLNPAIR(MSG_PLANNER_BUFFER_BYTES, (int)sizeof(block_t)*BLOCK_BUFFER_SIZE);
8793
 
8753
 
8794
   // Send "ok" after commands by default
8754
   // Send "ok" after commands by default
8795
   for (int8_t i = 0; i < BUFSIZE; i++) send_ok[i] = true;
8755
   for (int8_t i = 0; i < BUFSIZE; i++) send_ok[i] = true;

+ 3
- 3
Marlin/language.h View File

157
 #define MSG_ENDSTOP_OPEN                    "open"
157
 #define MSG_ENDSTOP_OPEN                    "open"
158
 #define MSG_HOTEND_OFFSET                   "Hotend offsets:"
158
 #define MSG_HOTEND_OFFSET                   "Hotend offsets:"
159
 #define MSG_DUPLICATION_MODE                "Duplication mode: "
159
 #define MSG_DUPLICATION_MODE                "Duplication mode: "
160
-#define MSG_SOFT_ENDSTOPS                   "Soft endstops"
161
-#define MSG_SOFT_MIN                        "Min"
162
-#define MSG_SOFT_MAX                        "Max"
160
+#define MSG_SOFT_ENDSTOPS                   "Soft endstops: "
161
+#define MSG_SOFT_MIN                        "  Min: "
162
+#define MSG_SOFT_MAX                        "  Max: "
163
 
163
 
164
 #define MSG_SD_CANT_OPEN_SUBDIR             "Cannot open subdir "
164
 #define MSG_SD_CANT_OPEN_SUBDIR             "Cannot open subdir "
165
 #define MSG_SD_INIT_FAIL                    "SD init fail"
165
 #define MSG_SD_INIT_FAIL                    "SD init fail"

Loading…
Cancel
Save